Skip to content

Instantly share code, notes, and snippets.

@damonmaria
Last active September 6, 2019 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damonmaria/8a8245f6613b7334131733c47c1320f2 to your computer and use it in GitHub Desktop.
Save damonmaria/8a8245f6613b7334131733c47c1320f2 to your computer and use it in GitHub Desktop.
Foreman 1.23 install with separate puppet server
# Start with puppet-install.sh first
export PUPPET_FQDN=puppet.example.com
sudo groupadd puppet # Otherwise error during install
sudo foreman-installer \
--no-enable-foreman-proxy \
--puppet-server false \
--puppet-puppetmaster ${PUPPET_FQDN}
# Above actually fails (unreported) to start apache2 on https port due to missing certificates, carry on
# You need the below to finish puppet-install.sh
sudo foreman-rake config -- -k oauth_consumer_key
sudo foreman-rake config -- -k oauth_consumer_secret
# Finish puppet-install.sh
export FOREMAN_FQDN=foreman.example.com
sudo foreman-installer \
--no-enable-foreman \
--puppet-server true \
--puppet-server-foreman-url https://${FOREMAN_FQDN} \
--puppet-autosign-entries ${FOREMAN_FQDN} \
--enable-foreman-proxy \
--foreman-proxy-tftp false \
--foreman-proxy-puppet true \
--foreman-proxy-puppetca true \
--foreman-proxy-foreman-base-url https://${FOREMAN_FQDN} \
--foreman-proxy-trusted-hosts ${FOREMAN_FQDN} \
--foreman-proxy-register-in-foreman false
sudo ln -s /opt/puppetlabs/bin/puppet /usr/local/sbin/puppet
sudo ln -s /opt/puppetlabs/bin/puppetserver /usr/local/sbin/puppetserver
# Now run through foreman-install.sh
# Replace OAUTH_KEY and OAUTH_SECRET with values from foreman-install.sh
sudo foreman-installer \
--foreman-proxy-oauth-consumer-key OAUTH_KEY \
--foreman-proxy-oauth-consumer-secret OAUTH_SECRET \
--foreman-proxy-register-in-foreman true \
--reset-puppet-autosign-entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment