Skip to content
Discussion options

You must be logged in to vote

@rajivr,

Is there a more canonical and automate-able approach that I can take?

Yes! There are actually several ways to do this!

PR #714 added apiclient network configure which lets you write net.toml.

Using bootstrap-commands:

[settings.bootstrap-commands.setup-dual-nic]
commands = [
 ["apiclient", "network", "configure", "base64:dmVyc2lvbiA9IDEKCltldGgwXQpkaGNwNCA9IHRydWUKcHJpbWFyeSA9IHRydWUKCltldGgxXQpkaGNwNCA9IHRydWUK"],
 ["apiclient", "reboot"]
]
mode = "once"
essential = true

The base64 decodes to your net.toml. The instance boots, writes the config, reboots, and comes up with both interfaces configured.

echo "dmVyc2lvbiA9IDEKCltldGgwXQpkaGNwNCA9IHRydWUKcHJpbWFyeSA9IHRydWUKCltldGg…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rajivr
Comment options

Answer selected by rajivr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants