Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in documentation / README how to generate new Hiera eyaml keys #100

Open
sahaqaa opened this issue May 17, 2022 · 5 comments
Open

Add in documentation / README how to generate new Hiera eyaml keys #100

sahaqaa opened this issue May 17, 2022 · 5 comments

Comments

@sahaqaa
Copy link

sahaqaa commented May 17, 2022

Hello,
Please add in documentation / README how to generate new Hiera eyaml keys for new Puppet installation. It may seems as unnessecary, but it will save time to beginers (who deploy Puppet first time) and doesn't know how to do it.

$ sudo mkdir /etc/puppetlabs/puppet/eyaml
$ sudo /opt/puppetlabs/puppet/bin/eyaml createkeys \
   --pkcs7-private-key /etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem \
   --pkcs7-public-key /etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem

$ sudo chown -R puppet:puppet
$ sudo chmod 500 /etc/puppetlabs/puppet/eyaml
$ sudo chmod 400 /etc/puppetlabs/puppet/eyaml/*.pem
@sahaqaa
Copy link
Author

sahaqaa commented May 17, 2022

Also question about how to configure r10k code repository. Here is a quote from README:

Then copy your eyaml keys and your r10k private key there, naming them private_key.pkcs7.pem, public_key.pkcs7.pem and r10k_key. You need to configure control repo settings within the installer as well.

Where should I put configuration for "control repo"? (provider Bitbucket)
I'm trying to understand there to put it, but don't found where to put it yet... It's not clear from README and checking code where and how to do it.

@sahaqaa
Copy link
Author

sahaqaa commented May 17, 2022

Trying to understand how to provide my values so they could be used during installation:

Main Config Menu
1. [✓] Configure puppetmaster_puppetboard
2. Display current config
3. Save and run
4. Cancel run without Saving
Choose an option from the menu... 2
---
puppetmaster_puppetboard:
  puppetdb_database_password:
  puppetboard_password:
  puppetboard_require_auth: true
  puppetboard_username: admin
  timezone: Etc/UTC
  manage_packetfilter: false
  puppetserver_allow_ipv4: 127.0.0.1
  puppetserver_allow_ipv6: "::1"
  server_reports: store,puppetdb
  autosign: "/etc/puppetlabs/puppet/autosign.conf"
  server_external_nodes: ''
  autosign_entries:
  key_path: "/etc/puppetlabs/r10k/ssh/r10k_key"
  control_repo: false
  provider:
  repo_url:
  repo_host:

@sahaqaa
Copy link
Author

sahaqaa commented May 17, 2022

I changed in file /usr/share/puppetmaster-installer/config/installer-scenarios.d/automated_install_answers.yaml

puppetdb_database_password: changeme
puppetboard_password: changeme

But when i re-run installer and checking config --> values are empty again

@sahaqaa
Copy link
Author

sahaqaa commented May 17, 2022

When I edit file:
cat /usr/share/puppetmaster-installer/config/installer-scenarios.d/puppetserver-with-puppetboard-answers.yaml

puppetmaster::puppetboard: true
puppetmaster::puppetboard::puppetdb_database_password: 'OLOLO'

and re-runing installer I see next:

Select installation scenario

Please select one of the pre-set installation scenarios. You can customize your setup later during the installation.

Available actions:
1. Install Puppetserver and PuppetDB
2. Install Puppetserver
3. Install Puppetserver, PuppetDB and Puppetboard:
4. Cancel Installation
Your choice: 3
Manifest puppetmaster/manifests/puppetboard/puppetdb_database_password.pp was not found in /usr/share/puppetmaster-installer/modules, /home
Traceback (most recent call last):
        13: from /usr/share/puppetmaster-installer/bin/puppetmaster-installer:9:in `<main>'
        12: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/kafo_configure.rb:50:in `run'
        11: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/clamp-1.3.0/lib/clamp/command.rb:140:in `run'
        10: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/clamp-1.3.0/lib/clamp/command.rb:140:in `new'
         9: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/kafo_configure.rb:157:in `initialize'
         8: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/kafo_configure.rb:312:in `set_parameters'
         7: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/configuration.rb:268:in `preset_defaults_from_puppet'
         6: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/configuration.rb:258:in `params'
         5: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/configuration.rb:133:in `modules'
         4: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/configuration.rb:133:in `map'
         3: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/configuration.rb:133:in `block in modules'
         2: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/configuration.rb:133:in `new'
         1: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/puppet_module.rb:42:in `initialize'
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/kafo-6.3.0/lib/kafo/puppet_module.rb:42:in `join': no implicit conversion of nil into String (TypeError)

How exactly end user can set this values?

@sahaqaa
Copy link
Author

sahaqaa commented May 17, 2022

Woops :-D My bad, I didn't saw option:

1. [✓] Configure puppetmaster_puppetboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant