New Question
0

Using cloudbase init NetworkConfigPlugin

asked 2015-02-24 10:32:17 +0300

aaditya gravatar image

updated 2015-02-24 13:51:33 +0300

Hey there, I am working on a project using OpenStack and using the cloudbase-init for the first boot configuration of the windows instances. I am having trouble finding the decent documentation on using the windows.networkConfigPlugin, we also tried looking into the source code hosted on GitHub-Stackforge repository but not sure whether it supports windows network configuration using metadata services. Could you guys please enlighten us on how can we assign IP address, subnet mask, default gateway and other network configuration parameters using metadata passed and what should be the keys name that this plugin expects in metadata for fetching and setting these network configuration values. That would be really helpful ..!!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2015-02-25 04:57:14 +0300

updated 2015-02-25 05:03:08 +0300

Hi,

In short, the networkconfig plugin will take automatically the network info from metadata and will statically configure each interface inside the instance. But for this to happen, you must keep in mind two things: the DHCP on the subnet attached to the private network must be disabled and the flat network injection must be enabled. To enable flat injection, just add the entry "flat_injected=True" to /etc/nova/nova.conf under the DEFAULT group. To disable the DHCP, you can use the interface/dashboard to untick the DHCP checkbox by editing the subnet on the private network or you can simply use the --disable-dhcp option with the neutron subnet-update/create command.

What happens next: Nova will see that DHCP is disabled and injection is allowed, so will gather network information using the networking driver. This info is handled by virt (netutils) and used to fill in a debian-interfaces-like template which will be exposed as a metadata content pointed out by the metadata json key "network_config". The networkconfig plugin from cloudbase-init finds the key, then searches further for the "content_path", then reads the entire content from that path which is very similar to /etc/network/interfaces file from debian systems. For each available NIC in the instance, there's also an eth<n> entry and for each entry, there's a set of network details as address, netmask, gateway, broadcast, dns, mac etc. Finally, using these details, each corresponding network interface from the instance is configured statically.

For extra setting, you could use a powershell script passed as userdata, just to configure what you want as you want. The userdata could be provided from the interface when creating the instance by wizzard or with --user-data option under nova boot command. Don't forget to put as a first line the comment "#ps1" or "#ps1_x86" indicating that will follow a powershell script.

Hope this will answer your question(s) :).

edit flag offensive delete link more

Comments

Thanks Cosmin, for your prompt reply..!! I will try these settings and see whether it works with our setup.! :)

aaditya gravatar imageaaditya ( 2015-02-25 10:06:27 +0300 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-02-24 10:32:17 +0300

Seen: 2,506 times

Last updated: Feb 25 '15