puppetlabs / pupperware

Container fun time lives here.
Other
183 stars 67 forks source link

CA is not persisted to a volume #269

Open deedoubledub opened 3 years ago

deedoubledub commented 3 years ago

Describe the Bug

Perhaps I'm overlooking something here, but the ca data is stored outside of the puppetserver-config volume and is lost when stopping the stack. The ca is stored in /etc/puppetlabs/puppet/ssl/ca which is a symlink to /etc/puppetlabs/puppetserver/ca which is not defined as a volume.

Expected Behavior

The ca is persisted to the puppetserver-config volume with the rest of the ssl data.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Provision the stack
  2. docker compose down
  3. docker compose up -d
  4. bye bye ca

Environment

Additional Context

I'm going to work around this issue by mapping a volume to /etc/puppetlabs/puppetserver.

justinstoller commented 2 years ago

This PR would create a new volume to mount to /etc/puppetlabs/puppetserver https://github.com/puppetlabs/pupperware/pull/272

jurgenweber commented 2 years ago

I seem to have the completely opposite problem:


Running /docker-entrypoint.d/70-set-dns-alt-names.sh
Running /docker-entrypoint.d/80-ca.sh
Error:
Existing file at '/etc/puppetlabs/puppet/ssl/certs/puppet.pem'
Existing file at '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
Existing file at '/etc/puppetlabs/puppet/ssl/crl.pem'
If you would really like to replace your CA, please delete the existing files first.
Note that any certificates that were issued by this CA will become invalid if you
replace it!```

how can i restart with the current/already there ca and certs?
jurgenweber commented 2 years ago

updated, I edited thsi file

https://github.com/puppetlabs/pupperware/blob/main/gem/lib/pupperware/compose-services/puppet.yml#L7

and added a new env var:

- CA_ENABLED="false"

and I am back in action.