Once the execution is complete, go back to Puppet Enterprise web UI. You will see number “1” next to Unsigned certs. This means that the agent you have just installed is waiting for the certificate request to be accepted so that it can start to really communicate with the Puppet master. Let’s just accept the certificate.
After a little while, if you click Nodes tab, you will see the node you just accepted the certificate for shows up in the list.
When you need to create multiple VMs with slightly different settings, bash script comes in handy. I found myself constantly creating and destroying CentOS VMs on VirtualBox, so I decided to spend some time to come up with a bash script to create VirtualBox VM. Here is the script.
echo "Creating $VMName disk at $DiskDir. Its size is $DiskSize."
if [ ! -d "$DiskDir" ]; then
mkdir -p $DiskDir
#VBoxManage list vms
echo "Creating disk..."
VBoxManage createhd --filename "$DiskDir/$VMName.vdi" --size $DiskSize
echo "Creating VM..."
VBoxManage createvm --name $VMName --ostype "$OSTypeID" --register
echo "Adding the created disk to the VM..."
VBoxManage storagectl $VMName --name "SATA Controller" --add sata --portcount 1 --controller IntelAHCI
VBoxManage storageattach $VMName --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$DiskDir/$VMName.vdi"
VBoxManage storagectl $VMName --name "IDE Controller" --add ide
VBoxManage storageattach $VMName --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium "$ISOFilePath"
echo "Setting memory..."
VBoxManage modifyvm $VMName --memory $MemorySize --vram $VRamSize --cpus $CPUCount
echo "Setting boot sequence..."
VBoxManage modifyvm $VMName --boot1 dvd --boot2 disk --boot3 none --boot4 none
echo "Setting network..."
VBoxManage modifyvm $VMName --nic1 bridged --bridgeadapter1 $NetworkInterface
echo "VM Creation completed."
If you would like to fork the code, it can be found here.
Puppet is the key to a successful server management. In my own blog, I’m switching my gear to Puppet. I’m going to focus on Puppet Enterprise because Puppet allows 10 free agent complimentary license. This is more than enough for me to test things out.
Puppet makes all versions of Puppet Enterprise available on their website. I will try to use the latest LTS (Long Term Supported) release. As of June 5, 2019, 2018.1.8 is the latest LTS.
Let’s click Puppet Enterprise 2018.1.8 – Long Term Supported Release.
Right click the link to copy the link to the PE for the platform where you are installing your Puppet Enterprise.
Open Terminal and execute the following command to download the file.
One more thing before we can execute the Puppet Enterprise installer. Let’s edit /etc/hosts file to mimic DNS entry. My test Puppet Enterprise machine has “pem” as its host name and its IP address is 192.168.1.24, so we need 2 entries in the hosts file like the following. (Use sudo vi /etc/hosts to edit it in vi) If you don’t know how to use vi, go over the basics here.
Save the file by hitting ESC and :wq and then Enter key. On the side note, if you have DNS server in your network, it’s better to create the entry in DNS server instead of using the hosts file.
In the terminal, cd into the directory where Puppet Enterprise was extracted to and execute the installer.
$ cd puppet-enterprise-2018.1.8-el-7-x86_64
$ sudo ./puppet-enterprise-installer
When you see How to proceed?, enter 2 for Graphical-mode Install and hit enter. After a little while, it awaits you to hit https://yourpuppetserver:3000 to start the setup process. Click Let’s get started!
Enter a new admin password and click Continue.
Once the validation is clear, you will see a screen like the following screenshot. Click Deploy now button to start the whole process.
Once the deployment process is complete, you should able to hit https://yourpuppetserver and login as admin.
Finally close the port 3000 because it’s no longer necessary for it to be open.