Using cloud init to configure an Amazon Linux 2 on-premise VM

0

I'm developing Ansible playbooks to configure our software and service to install and run in EC2 instances running Amazon Linux 2. Our software works very well within AL2, and the Ansible playbooks are coming along.

I want to test them very thoroughly, which means destroying and re-creating the VM over and over. I don't really want to keep doing that within AWS itself, because it's slow to keep transferring things over the network, and I would prefer not to be billed for it, and I have plenty of host machines available here in my office.

I read the instructions for deploying the on-premise qcow2 images. They say to create a seed.iso, and then go through the VM manager wizard on the host machine, and define the seed.iso image as the CD image, and then start it. Honestly Amazon, you really didn't think this through. Our VM hostmachines don't have GUIs installed. And I want this to be a process I can automate, so I don't want to have to open up a GUI wizard and click around on things every time I do a test. I want a command line process I can run that gets my VM started and configures network and a SSH key on it so I can then hit it with Ansible. Why would I be automating everything except the one task of creating the VM itself, which will require clicking around in a GUI? That's what we need to avoid.

I can see that the VM would try to do a cloud init process but there's no documentation anywhere about how that actually happens. The best I can find is that cloud init will try to access config files on a magic IP, but it's not clear what that IP is or what I need to do on my VM host to make that possible.

Does anyone have ideas on this? It's really disappointing that Amazon expects people to use their on-premise images with a GUI tool. Someone didn't think that through.

Thank you!

asked 2 years ago169 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions