Hi
This might be completely of topic but have to vent some frustration:
With the end of Centos 7 next, year I have been looking at moving my Asterisk PBX software to Rocky Linux while also trying to keep on trend with the new automation software like Puppet, Ansible and so forth. I decided to look at using a Puppet Master with client VM and on site servers as agent.
So I had to start learning to code puppet manifests and modules and things were going well.
My current Asterisk PBX software is currently installing all the packages and compiling the Asterisk software from a kickstart file. So should be simple enough, replicate what the kickstart is doing in a Puppet module.
- Install the packages required. Done with Puppet
- Install group packages. Done with Puppet forge yum module
- Change selinux - Done with Puppet forge selinux module
- Sync file from Master server (Multiple files so let look at rsync)
- This is were my first issue came up. I was oky, let use the Puppet rsync forge module and I just could not get it working. So I looked at the Puppet rsync module source code and found that basically it’s going a Puppet Exec and running a rsync command. Now I am already like but I can do this using a rsync deamon on the master
- Scrapped the Puppet rsync module and created my own module to just run a rsync exec command. Next problem, I need to enter a password or use SSH key. So SSH key created and it’s copied from the Puppet master using Puppet file resource.
- Compile the Asterisk PBX software using a bash script. Again using the Puppet exec command but i don’t want the bash script to execute every time puppet agent run, so we create a lock file to check if it exist and then execute won’t run.
Basically we are done. Puppet does what my kickstart is doing. However now I need a kickstart to install the Puppet agent and setup it’s config file. Again I ask why did I even bother with Puppet
- So the kickstart file is created. I install the Puppet agent and I create a config file
So at the end of the day. I went through all of this just to back using a kickstart file. So I was like, did I just do all of this for nothing. I could just as well have stayed with my original kickstart file and bash scripts that monitors for file changes and new packages.
I then realized maybe not all cloud platforms support VM installing using a kickstart file, since I have always really only worked with KVM. My company is currently using Hyper-V and kickstart files works. I then asked a Azure friend and if I understand him correctly I can’t specify kickstart for an azure VM.
So maybe at the end of the day it might have been a good thing.