chef-repo
chef-repo copied to clipboard
Where to put SSL certificates and keys in Chef repository?
HI, I have purchased SSL certs from a certificate authority (CA). Also, I added the files names to the site.json file within the nodes directory. For example,
"ssl_info": {
"key": "example.com.key",
"crt": "example.com.crt"
},
Now, where exactly should I put the actual certificates and keys within the chef-repo so that they are properly uploaded to the server and available to Nginx? At this time, the following files are empty after provisioning the server:
/u/apps/example_production/shared/config/certificate.crt
/u/apps/example_production/shared/config/certificate.key
@conradwt You can add the content of the SSL keys to:
"ssl_info": {
"key": "Here the content of the cert.key file",
"crt": "Here the content of the cert.crt file."
},
@jvanbaarsen Is it possible to not have to include the content within the node.json?
@conradwt In that case you have to move them to the server yourself using scp
. Then you don't have to add any ssl_info
in your node.json, since it will see the certificates in /u/apps/your_app/shared/config/
and use those.