Packer creating Ubuntu ARM Images
So recently I started to play around with an article from Willam Lam for a Hyrbid Cluster and I instantly thought I may want to scale this up or better yet show my customers the art of the possible. My end goal at some stage is a set of scripts to automate the BYOH into Tanzu as easily as possible via code.
This is where I thought instantly this would be easy and well in short it was not all quite as straightforward to get this working as I thought. I have to confess I did even hit a few search engines and GitHub repos and it appeared no one else has documented this or tried this so I thought this would be a great time to get my engineer hat on and provide something back to the vCommunity.
In short, there were a multitude of errors when I tried to get this to work and I just had to beat them one by one and yes some workaround are not ideal but now I have this working I want to enhance this over time.
Before I get into the details here is a video below of it working and the GitHub over here if you want to try this yourself
I also have to say a massive thank you to Ryan Johnson who steered me in the right direction for one of my issues! I also hope to commit this to the awesome work he has done over here
So here are a few of the issues I came across
- Using CD Files rather than HTTP
- Some builds needing VMware tools so adding these as part of the build
- The disk controller would only work as NVME due to not being able to set SATA via Packer. This was a good old fashion spot the difference between Packer VM being built and a hand built VM
- Need to manaully add a USB controller as Packer was not adding this by default so the keyboard commands would not work
- SSH and IP timeouts needed setting to 60 minutes due to processing time of the Pi
- Need to manually add the CDROM drive as SATA
I do know of a few on-screen errors here and there I also need to work on the SSH keys part so they regen a new set upon the first boot once a clear up has taken place.
Now I have this working I want to start working on the Terraform so that it creates a build machine that will create the BYOH agents and then if possible walk the user through any configurations that are required. Finally, it would be awesome to then have a secondary Terraform script that takes those outputs and the agents to then start scaling up the requested amount of VMs from the Packer image 🙂