Skip to content
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

[feature request] Support passing userdata for vm creation #265

Open
fernflower opened this issue Jan 15, 2025 · 4 comments
Open

[feature request] Support passing userdata for vm creation #265

fernflower opened this issue Jan 15, 2025 · 4 comments

Comments

@fernflower
Copy link
Contributor

fernflower commented Jan 15, 2025

Unfortunately IBM Cloud Power requires manual routes addition in case of non-trivial (2 networks, public \ private) network setup that should be achieved with cloud-init scripts like

userdata_ppc64

#cloud-config
bootcmd:
- ip route add 10.0.0.0/8 via PRIVATE_GW dev eth0
- ip route add default via PUBLIC_GW dev eth1

Corresponding cli command would be

ibmcloud pi instance create pi-centos-2-subs-userdata --image CentOS-Stream-9 --subnets 969ef856-27e9-4255-ae9e-61b1a7bb6e2f,7233c9d2-aac8-41b5-8d3d-264eb2a57287 --key-name ivasilev **--user-data @userdata_ppc64**

Looking at what's supported atm I could not find anything related to userdata passing unfortunately :(

@mkumatag
Copy link
Member

Looking at what's supported atm I could not find anything related to userdata passing unfortunately :(

we aren't handling the user data part of the flow, I'm wondering if you can add the route via the provisioners step post deployment!

@fernflower
Copy link
Contributor Author

I can workaround the adding routes part with shell provisioner indeed, but some of our images require custom cloud-init-format scripts which won't play nicely.
Anyway, thanks for the response, if I get blocked on this I'll create a PR :)

@fernflower
Copy link
Contributor Author

fernflower commented Jan 20, 2025

Turns out there is no way to workaround it with shell provisioner in our case - during image building the vm is being rebooted several times, and the only friendly and persistent way to set up networking that will survive reboots is via userdata script.
So I'll create an PR for this, hope it's ok :)

@mkumatag
Copy link
Member

Turns out there is no way to workaround it with shell provisioner in our case - during image building the vm is being rebooted several times, and the only friendly and persistent way to set up networking that will survive reboots is via userdata script. So I'll create an PR for this, hope it's ok :)

go for it and make sure you keep it generic and optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants