The Foreman on Azure
This post is just a collection of notes regarding how I got The Foreman working in Azure on CentOS 7.5.
Install the Puppet Master
-
It turns out The Foreman requires a forward DNS lookup of it’s hostname, to get that working in Azure without DNS servers, I used a private zone for Azure DNS as per: https://docs.microsoft.com/en-us/azure/dns/private-dns-getstarted-powershell.
-
I then had to change my hostname as per: https://www.tecmint.com/set-change-hostname-in-centos-7/.
-
I then install The Foreman as per: https://theforeman.org/manuals/1.18/index.html#2.Quickstart.
-
I also had to open port 443 for inbound traffic to my VM over the public IP. This is only if you want to use The Foreman website remotely.
-
(optional) Install PDK (Puppet Development Kit): sudo yum install pdk
Install a Puppet Agent
-
Change the hostname per: https://www.tecmint.com/set-change-hostname-in-centos-7/.
-
Install the Puppet Agent: sudo yum install puppet-agent
-
Start the service: /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
-
Approve the certificate on the Puppet Master
-
Test the agent: sudo /opt/puppetlabs/bin/puppet agent –test
Jumpbox
If you need to SSH through a jumpbox (example shows connecting to a machine on the local network as 10.0.0.4):
ssh jumpbox.eastus2.cloudapp.azure.com -o StrictHostKeyChecking=no -o ProxyCommand=’ssh jumpbox.eastus2.cloudapp.azure.com -o ChallengeResponseAuthentication=yes -p 22 -W 10.0.0.4:22’
Helpful References
- https://www.example42.com/tutorials/PuppetTutorial
- https://github.com/puppetlabs/puppetlabs-azure#module-description