项目作者: ErinMorelli

项目描述 :
Allows you to use Dreamhost with dehydrated and DNS challenge response
高级语言: Python
项目地址: git://github.com/ErinMorelli/dehydrated-dreamhost-hook.git
创建时间: 2016-03-04T15:39:30Z
项目社区:https://github.com/ErinMorelli/dehydrated-dreamhost-hook

开源协议:MIT License

下载


Dreamhost hook for dehydrated ACME client

This a hook for the Let’s Encrypt ACME client dehydrated, that enables using DNS records on Dreamhost to respond to dns-01 challenges. Requires your Dreamhost API key being in the environment.

Quality Gate Status


Setup

  1. $ git clone https://github.com/lukas2511/dehydrated
  2. $ cd dehydrated
  3. $ mkdir hooks
  4. $ git clone https://github.com/ErinMorelli/dehydrated-dreamhost-hook hooks/dreamhost
  5. $ pip install -r hooks/dreamhost/requirements.txt
  6. $ export DREAMHOST_API_KEY='K9uX2HyUjeWg5AhAb'
  7. $ mkdir -p ~/.config/dehydrated
  8. $ cp hooks/dreamhost/sample_deploy.conf ~/.config/dehydrated/deploy.conf

Open the ~/.config/dehydrated/deploy.conf file in your favorite text editor and update it for your personal needs.

Get your Dreamhost API key by logging in to your control panel, and navigating to the Web Panel API page. Make sure that the “All dns functions” option is checked before clicking on “Generate a new API Key now!”.

Usage

  1. $ ./dehydrated -c -d example.com -t dns-01 -k 'hooks/dreamhost/hook.py'
  2. #
  3. # !! WARNING !! No main config file found, using default config!
  4. #
  5. Processing example.com
  6. + Signing domains...
  7. + Creating new directory /home/user/dehydrated/certs/example.com ...
  8. + Generating private key...
  9. + Generating signing request...
  10. + Requesting challenge for example.com...
  11. + Checking if TXT record for _acme-challenge.example.com exists...
  12. + Adding new TXT record KuJORHNYWBU3QVp9vS6tlkMFh5A6WHxMbsTp2-Ufz-Y...
  13. + record_added: success
  14. + Settling down for 10s...
  15. + DNS not propagated, waiting 30s...
  16. + DNS not propagated, waiting 30s...
  17. + Responding to challenge for example.com...
  18. + Dreamhost hook executing: clean_challenge
  19. + Checking if TXT record for _acme-challenge.home.example.com exists...
  20. + Old TXT record found, removing...
  21. + record_removed: success
  22. + Challenge is valid!
  23. + Requesting certificate...
  24. + Checking certificate...
  25. + Done!
  26. + Creating fullchain.pem...
  27. + Dreamhost hook executing: deploy_cert
  28. + Private Key: /home/user/dehydrated/certs/example.com/privkey.pem
  29. + Certificate: /home/user/dehydrated/certs/example.com/cert.csr
  30. + Full Chain: /home/user/dehydrated/certs/example.com/fullchain.pem
  31. Starting new file deployment
  32. # INFO: Using deployment config file /home/user/.config/dehydrated/deploy.conf
  33. Deploying new files for: example.com
  34. + Succesfully deployed new cert to /opt/lampp/etc/ssl.crt/server.crt
  35. + Succesfully deployed new privkey to /opt/lampp/etc/ssl.key/server.key
  36. Starting post-deployment actions
  37. + Attempting action: /opt/lampp/lampp restart
  38. + Action exited with status 0
  39. New file deployment done.
  40. + Done!