forked from morpht/letsencrypt_drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated defaults and acquia_cloud_cert_deployments dependencies
- Loading branch information
Showing
9 changed files
with
460 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Forked and adpated from https://github.com/morpht/letsencrypt_drupal | ||
|
||
# Let's Encrypt Drupal | ||
|
||
Wrapper script for https://github.com/dehydrated-io/dehydrated opinionated towards running in Drupal hosting environments and reporting to Slack. Slack is optional. Let's Encrypt challenge is published trough Drupal using Drush. There is no need to alter webserver settings or upload files. | ||
|
@@ -25,7 +27,7 @@ Wrapper script for https://github.com/dehydrated-io/dehydrated opinionated towar | |
* (Altering the list of domains in project repository results in generating new certificate.) | ||
* Upload new certificate to Acquia. | ||
* Activate the certificate. | ||
* Post the results to Slack | ||
* Post the results to Slack | ||
|
||
## Requirements | ||
|
||
|
@@ -42,36 +44,36 @@ These steps are for `prod` environment of PROJECT on Acquia Cloud. Can be easily | |
* `ssh [email protected]` | ||
* (You can get the address on "Servers" tab in Acquia UI) | ||
* `cd ~` | ||
* `git clone https://github.com/morpht/letsencrypt_drupal.git` | ||
* `git clone https://github.com/undp/letsencrypt_drupal.git` | ||
* In project root | ||
* Add letsencrypt_drupal configuration. | ||
* `git clone https://github.com/morpht/letsencrypt_drupal.git tmp_lea` # Temporarily get the repository to get example configuration files. | ||
* `git clone https://github.com/undp/letsencrypt_drupal.git tmp_lea` # Temporarily get the repository to get example configuration files. | ||
* `cp -r tmp_lea/example_project_config/* .` # Copy the configuration. | ||
* `rm -rf tmp_lea/` | ||
* Edit `letsencrypt_drupal/dehydrated/config.sh` | ||
* Edit `letsencrypt_drupal/dehydrated/config.sh` | ||
* You need to set your e-mail. The script provides the rest of defaults needed to get a certificate. | ||
* You can alter other values as described here: https://github.com/dehydrated-io/dehydrated/blob/master/docs/examples/config | ||
* Edit `letsencrypt_drupal/domains_site.env.txt` | ||
* Edit `letsencrypt_drupal/domains_undp.env.txt` | ||
* Rename it based on site alias you are going to be using. | ||
* For multiple environments create multiple copies of this file. | ||
* One line, space separated list of domains. | ||
* First domain will be set as Common name | ||
* Others are set as SANs | ||
* Edit `letsencrypt_drupal/config_site.env.sh` | ||
* Edit `letsencrypt_drupal/config_undp.env.sh` | ||
* Slack is optional. If you don't want to use it, just set `$SLACK_WEBHOOK_URL` to empty string. | ||
* Get your webhook url here: https://my.slack.com/services/new/incoming-webhook/ | ||
* Set the webhook url and target channel variables. | ||
* Certificate deployment is optional. | ||
* Fallback is just posting instructions in Salck/Log file. | ||
* Fallback is just posting instructions in Slack/Log file. | ||
* Set the `$CERT_DEPLOY_ENVIRONMENT_UUID` (Environment uuid needs to be aligned with the `env` of the file name.) | ||
* Multiple environments mean multiple config files. For example `test` and `prod`: | ||
* `config_site.test.sh` | ||
* `config_site.prod.sh` | ||
* `domains_site.test.txt` | ||
* `domains_site.prod.txt` | ||
* Multiple environments mean multiple config files. For example `test` and `live`: | ||
* `config_undp.01test.sh` | ||
* `config_undp.01live.sh` | ||
* `domains_undp.01test.txt` | ||
* `domains_undp.01live.txt` | ||
* `secrets.settings.php` | ||
* Should *not* be committed in project repository. | ||
* Should be placed on Acquia server here: `/mnt/files/PROJECT.prod/secrets.settings.php` | ||
* Should be placed on Acquia server here: `/mnt/files/undp.01live/secrets.settings.php` | ||
* Add https://www.drupal.org/project/letsencrypt_challenge module. | ||
* `composer require drupal/letsencrypt_challenge` | ||
* Commit and deploy to production. | ||
|
@@ -82,7 +84,7 @@ These steps are for `prod` environment of PROJECT on Acquia Cloud. Can be easily | |
* You should have 60 days of time (with default settings) even if something fails or new manual certificate upload is needed. | ||
* New job: | ||
* Job name: `LE renew cert` (just a default, feel free change it) | ||
* Command: `/home/PROJECT/letsencrypt_drupal/letsencrypt_drupal.sh PROJECT prod &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/letsencrypt_drupal.log` | ||
* Command: `/home/undp/letsencrypt_drupal/letsencrypt_drupal.sh undp 01live &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/letsencrypt_drupal.log` | ||
* Command frequency `0 7 * * 1` ( https://crontab.guru/#0_7_*_*_1 ) | ||
* It's good idea to run the command on Acquia manually first time to check if all is OK. | ||
* First script run will post results/instructions to Slack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "vagrant/acquia_cloud_cert_deployment", | ||
"name": "undp/acquia_cloud_cert_deployment", | ||
"type": "project", | ||
"require": { | ||
"nategood/commando": "^0.3.0", | ||
"acquia/http-hmac-php": "^4.0", | ||
"guzzlehttp/guzzle": "^6.3" | ||
"nategood/commando": "*", | ||
"acquia/http-hmac-php": "^6.1.1", | ||
"guzzlehttp/guzzle": "^7.9.2" | ||
} | ||
} |
Oops, something went wrong.