-
Notifications
You must be signed in to change notification settings - Fork 13
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
Discussion: Networking configuration and static IP assignments #25
Comments
Ok, I hacked this together to make sure my mental model was correct and it seems to be working. I wrote an article to document these learnings in case it's of any use to anyone. https://ryan-schachte.com/blog/ansible_multipass/ If it seems worthwhile, I can work on making this more production ready so we can release it to support the Tested locally, this seems to work well assuming I manually apply a netplan config file.
|
Thanks for the write-up @Schachte, I am just about to embark on a similar test using multipass. It's made things a bit clearer |
Currently, I've been working on static IPv4 assignments for my VMs, which is necessary for local IaC development when IP addresses are expected to be deterministic as I bring up/tear down machines.
Unfortunately, there isn't great interop with ARM & Multipass (ie. M1 mac), but I've gotten something jank kind of working per these docs. https://multipass.run/docs/configure-static-ips
Weirdly though, I cannot have this entire setup work with cloud-init alone. It seems like I have to manually apply a new netplan file and apply it as two separate steps. Only then do I see an IP assignment and MAC addresses matching what I expect.
In order for this to work, I create my VMs with some special arguments:
As you can see, I supply the
en0
interface, which is listed as an available bridge viamultipass networks
along with a static MAC address that is later linked via the netplan yaml above.It would be nice to be able to support passing in the
network_name
andmac_address
and maybeip_address_v4
/ip_address_v6
as parameters in the Terraform provider to handle this during initialization so I can keep it all self-contained in Terraform. Does this seem reasonable? I'd be happy to work on this if so. Open to discussing this as I'm new to Multipass and find the networking to be both poorly documented and convoluted.I'm still a bit confused why the cloud-init supplied doesn't take affect, but I'm all ears.
The text was updated successfully, but these errors were encountered: