-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for using clones+cloud-init #34
Conversation
Notes I have (still evolving):
|
@lnxbil I consider this complete and ready for review. It should support all the previous I've ran many tests locally on my development machine and also created several clusters from rancher including nodes backed by Ubuntu, CentOS, and Rancher OS. In it's current state it appears to be robust enough to handle failure scenarios and other generally bad stuff (like a very overtaxed proxmox taking many hours to install etc). Open to review/suggestions at this point. |
Wow, thank you. Didn't had time to build and review the changes yet, but hopefully on the weekend. |
So I had a better look at the code and also built an test environment. After reverting back to
So, there is still something missing. Can you describe which what arguments you tried? |
@lnxbil what are you using for the template image? My guess is that it's failing due to |
The My system is a plain old buster + cloudinit + docker I setup for this test. |
I normally use the various 'cloud images' from the different vendors but haven't done so for debian. Did you build it manually? Which user gets the ssh key injected by cloud-init? |
I'll build a viable image with |
OK, worked like a charm first try for me. Here's my script to create the image/template (alter to your liking, it simply has the baseline stuff I use for k8s scenarios):
After that, I launched the machine with:
Some of the args above are irrelevant for |
Thank you, that is also great as an example for the In the end I discovered what my problem was: I forgot to add the cloudinit drive to the VM I was cloning. Yet without providing the |
Nice! I have similar scripts for all the major distros and even the rancher os image as well. I do need to clean them up a bit and could probably organize them a little better but they work. I’ll commit them all to a github repo and if we want we can point to that here or even just copy them and include if desired. |
@travisghansen - I wondered if you ever got the the chance to commit the scripts for other distros? I'm mainly interested in an Ubuntu one. |
@benosman there are a few bits that are specific to my env, but it should be pretty easy to alter to your needs. |
I use cloudinit to make templates off minimal cloud images: https://gist.github.com/nayrnet/066e3963397de02594d4963a9258e22f unfortunately right now w/proxmox its either/or using a yaml or proxmox UI/API with cloudinit.. I've asked them to implement vendordata which would allow for both to be used together.. but it still works for creating templates, then remove the snipplet to switch it to proxmox cloudinit. |
Thanks @travisghansen and @nayrnet, I will try those out tomorrow. @nayrnet: I like your suggestion of using the vendordata, I hope they take it up. Proxmox's cloudinit does seem quite limited compared to other hypervisors and cloud platforms. |
This adds support for using clone+cloud-init images.
Basic requirement of the
template
are:Currently only 2 changed flags are needed to make it work:
--proxmoxve-provision-strategy clone
--proxmoxve-vm-clone-vmid <vmid>
I've not tested onfull
clones yet, my storage setup supports shallow cloning so I enjoy the space saving etc.Full clones tested.
There are some other minor updates/fixes/additions as well.