feat(dashmate): add Let's Encrypt SSL provider support#729
feat(dashmate): add Let's Encrypt SSL provider support#729ktechmidas merged 1 commit intov1.0-devfrom
Conversation
Add Let's Encrypt as a new SSL certificate provider option alongside existing ZeroSSL and self-signed providers. Dashmate handles renewal automatically, simplifying the deploy-side management. - Create bin/convert-to-letsencrypt migration script for existing nodes - Add letsencrypt provider config to dashmate.json.j2 template - Add ssl/letsencrypt.yml Ansible tasks for cert obtention - Change default SSL provider from self-signed to letsencrypt - Guard ZeroSSL certificate ID lookups with provider check - Default email: infrastructure@dash.org Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis change introduces Let's Encrypt SSL support to the Ansible dashmate role. Configuration defaults shift from self-signed to Let's Encrypt certificates, a new Ansible task file handles certificate provisioning, and a CLI utility automates migration from ZeroSSL/self-signed to Let's Encrypt for HP masternodes. Changes
Sequence Diagram(s)sequenceDiagram
participant Ansible as Ansible Playbook
participant Dashmate as Dashmate CLI
participant LE as Let's Encrypt
participant Storage as SSL Storage
Ansible->>Dashmate: Set SSL provider to letsencrypt
Ansible->>Dashmate: Set letsencrypt email config
Ansible->>Dashmate: Render configuration
Dashmate->>LE: Request certificate (ACME protocol)
LE->>LE: Validate domain ownership
LE-->>Dashmate: Issue certificate
Dashmate->>Storage: Store certificate & private key
Storage-->>Dashmate: Confirmed
Dashmate-->>Ansible: Success (rc == 0)
sequenceDiagram
participant Script as convert-to-letsencrypt
participant Inventory as Inventory Parser
participant SSH as SSH Session
participant Remote as Remote Dashmate
participant LE as Let's Encrypt
participant Service as Platform Service
Script->>Inventory: Parse targets from network inventory
Inventory-->>Script: List of hp-masternode hosts
loop For each matched host
Script->>SSH: Establish SSH connection
SSH->>Remote: Execute remote conversion routine
Remote->>Remote: Set SSL provider=letsencrypt
Remote->>Remote: Update email configuration
Remote->>Remote: Render dashmate config
Remote->>LE: Obtain certificate
LE-->>Remote: Certificate issued
Remote->>Service: Restart platform services
Service-->>Remote: Services running
Remote-->>SSH: Return exit status & logs
SSH-->>Script: Capture per-host result
end
Script->>Script: Aggregate results and report summary
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
bin/convert-to-letsencryptmigration script for converting existing HP masternodesself-signedtoletsencryptwithinfrastructure@dash.orgas default emailChanges
bin/convert-to-letsencryptansible/roles/dashmate/defaults/main.ymlletsencrypt, add email variableansible/roles/dashmate/templates/dashmate.json.j2letsencrypttoproviderConfigsansible/roles/dashmate/tasks/ssl/letsencrypt.ymlansible/roles/dashmate/tasks/main.ymlMigration (existing nodes)
Test plan
./bin/convert-to-letsencrypt -n testnet --dry-runto verify script parses inventory correctly./bin/convert-to-letsencrypt -n testnet -s hp-masternode-1dashmate config get platform.gateway.ssl.providerreturnsletsencrypt./bin/deploy -p --tags=dashmate_deploy testnetand verify letsencrypt config in dashmate.json🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores