Ask Your Question
0

Setting up a static network

asked 2014-09-28 19:26:33 -0500

Liam Haworth gravatar image

Morning Ask OpenStack,

I was hoping that someone might be able to aid in how I am trying to setup OpenStack. I currently have it setup in a 3 node configuration, one control node, one network node and one compute node. The control and network node are both virtualized on ESXi and the compute node is running on it's own physical server.

My current setup works fine, except for one problem. I am wanting to be able to spin up instances and have them attached directly to the external network, the only problem is that the external network has no DHCP server (there is no option to run one on the external network) and because of this the instance can't get it's IP.

Any suggestion and idea are welcome and thanked!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-09-28 19:45:11 -0500

larsks gravatar image

updated 2014-09-28 19:49:00 -0500

You can pass your instances a script to run at first boot. You do this as a user-data script, but the default mechanism for obtaining this information is via the Nova metadata service, which requires your system to already have an ip address.

In situations where networking is not available, you can pass this information as a config driver (providing the --config-drive=true option to nova boot). This will make metadata about your instance -- including the user-data script -- available to tools like cloud-init that handle initial boot configuration.

If your image does not have cloud-init available, you can process the metadata yourself. The config drive will be attached as a CD-ROM device, typically /dev/sr0, that contains the following files:

./ec2/2009-04-04/meta-data.json
./ec2/2009-04-04/user-data
./ec2/latest/meta-data.json
./ec2/latest/user-data
./openstack/2012-08-10/meta_data.json
./openstack/2012-08-10/user_data
./openstack/2013-04-04/meta_data.json
./openstack/2013-04-04/user_data
./openstack/2013-10-17/meta_data.json
./openstack/2013-10-17/user_data
./openstack/2013-10-17/vendor_data.json
./openstack/latest/meta_data.json
./openstack/latest/user_data
./openstack/latest/vendor_data.json

The config drive will contain the normal ec2 metadata, including the local-ipv4 address assigned by openstack. You can read this in your user-data script and manually configure the interface, rather than relying on a dhcp server.

Your boot command would look something like:

nova boot --user-data=path/to/myscript.sh --config-drive=true ...
edit flag offensive delete link more

Comments

Well things have changed and I can actually have DHCP enabled on the external network, but I have hit a new problem. I can launch a instance on the private network network and assign it a floating IP from the external network fine but I can spin it up attached directly to the external network

Liam Haworth gravatar imageLiam Haworth ( 2014-09-28 23:18:44 -0500 )edit

When the instance is spun up on the private network it can ping out and I can ping it via it's floating IP, but when it is attach directly to the external interface it can't talk out nor receive anything. Packets hit br-int on the network node but never leave via eth2 (the external interface)

Liam Haworth gravatar imageLiam Haworth ( 2014-09-28 23:20:23 -0500 )edit

In general you should not expect to be able to attach instances directly to an "external" network. If you want to do that, read up on Neutron "provider networks". (continued because of annoying comment length restrictions...)

larsks gravatar imagelarsks ( 2014-09-29 07:54:09 -0500 )edit

Documentation on provider networks is sparse, but Rackspace has some overview docs

larsks gravatar imagelarsks ( 2014-09-29 07:54:33 -0500 )edit

Your Answer

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

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-28 19:26:33 -0500

Seen: 1,065 times

Last updated: Sep 28 '14