...
Table of Contents | ||||
---|---|---|---|---|
|
OpenStack has the following two network APIs: Neutron and Nova. Follow the instructions below to set the OpenStack networking API:
Use one of the following methods to define the OpenStack networking API:
Use the cloud-controller.xml
to directly set the networking API as follows:
...
The openstack.networking.provider
property can be either set to nova or neutron. The default is nova. If any other value is set for this property, other than one of the two OpenStack networking APIs, the default API will be used.
If you are using the stratos-installer to setup Stratos, you can set the following parameter in the stratos-installer/conf/setup.conf
file under the OpenStack configurations as follows:
...
The setup.sh
automatically adds the value of the openstack.networking.provider
property in the cloud-controller.xml
file, based on the value in the setup.conf
file.
The autoAssignIp
property needs to be set to false in either one of the following methods:
Set via the cartridge definition.
Code Block |
---|
"property":[ { "name":"keyPair", "value":"raj" }, { "name":"autoAssignIp", "value":"false" } ---- ] |
Set via the cloud-controller.xml
file.
Code Block |
---|
<property name="autoAssignIp" value="false" /> |
Your cartridge base image should contain multiple interface entries in the /etc/network/interfaces
file to be able to ping
or ssh
the floating IP associated with network interface. The number of entries in the /etc/network/interfaces
file will depend on the number of network interfaces that you define.
...
This entry in the /etc/network/interfaces
file will allow you to ping
or ssh
the floating IP associated with eth1
. If you want to associate a floating IP to eth2
, you should add another entry in the /etc/network/interfaces
file.
You can specify multiple network interfaces with internal and floating networks, and/or fixed private and floating IPs in the cartridge deployment. You need to define a floating networks for each network interface. One network interface can have several floating networks. A floating network can be defined for several network interfaces as well.
The VM instances that you create from this cartridge subscription gets one private IP per network interface from the internal network, and floating IPs per floating network. If you define fixed floating IPs instead of network UUIDs, floating IPs are associated to the corresponding network interfaces.
The following is the interfaces section of a sample cartridge definition:
Code Block |
---|
"networkInterfaces": [ { "networkUuid": "68aab21d-fc9a-4c2f-8d15-b1e41f6f7bb8" }, { "networkUuid": "512e1f54-1e85-4dac-b2e6-f0b30fc552cf", "floatingNetworks": [ { "name": "externalOne", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c" } ] }, { "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e", "floatingNetworks": [ { "name": "externalThree", "floatingIP": "192.168.17.227" } ] }, { "networkUuid": "d343d343-1cc6-4b17-924f-4ae0ee18db5e", "floatingNetworks": [ { "name": "externalThree", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c", "floatingIP": "192.168.17.227" } ] }, { "portUuid": "d343d343-1cc6-4b17-924f-4ae0ee18db5e", "fixedIp": "10.5.62.3", "floatingNetworks": [ { "name": "externalThree", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c", "floatingIP": "192.168.17.227" } ] }, { "networkUuid": "d343d343-1cc6-4b17-924f-4ae0ee18db5e", "floatingNetworks": [ { "name": "externalOne", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c", "floatingIP": "192.168.17.227" }, { "name": "externalTwo", "networkUuid": "sddsdsd-7ba8-4b24-b360-b74a0211c83c", } ] } ] |
The following sections explain various multiple network interface scenarios together with examples.
Floating networks are optional.
...
Code Block |
---|
{ "networkUuid": "68aab21d-fc9a-4c2f-8d15-b1e41f6f7bb8" } |
The floating networks' networkUuid
can be specified. A floating IP is assigned to the the interface from the given floating network. If there are any unassigned floating IPs in the given floating network, one is randomly chosen and assign to the interface. If not, a floating IP is allocated from the given floating network and assigned to the interface.
...
Code Block |
---|
{ "networkUuid": "512e1f54-1e85-4dac-b2e6-f0b30fc552cf", "floatingNetworks": [ { "name": "externalOne", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c" } ] } |
You can specify a floating IP, which is considered as fixed floating IPs. Stratos, checks whether the given IP is available for allocation. If it is available, Stratos associates it with the interface. Otherwise, Stratos throws an exception.
...
Code Block |
---|
{ "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e", "floatingNetworks": [ { "name": "externalThree", "floatingIP": "192.168.17.227" } ] } |
Both networkUuid
and a fixed floating IP can be specified. The networkUuid
will get higher priority over the fixed floating IP.
...
Code Block |
---|
{ "networkUuid": "d343d343-1cc6-4b17-924f-4ae0ee18db5e", "floatingNetworks": [ { "name": "externalThree", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c", "floatingIP": "192.168.17.227" } ] } |
Any number of floating networks can be specified for a network interface. One floating IP per floating network will be associated to the corresponding interface. This scenario is supported from Stratos side. Due to the unavailability of an OpenStack environment with several floating networks, it is yet to be confirmed that OpenStack will also support this scenario.
...
Code Block |
---|
{ "networkUuid": "d343d343-1cc6-4b17-924f-4ae0ee18db5e", "floatingNetworks": [ { "name": "externalOne", "networkUuid": "ba667f72-7ba8-4b24-b360-b74a0211c83c", "floatingIP": "192.168.17.227" }, { "name": "externalTwo", "networkUuid": "sddsdsd-7ba8-4b24-b360-b74a0211c83c", } ] } |
Both private IPs and floating IPs can be predefined. If available they will be associated, otherwise an exception will be thrown.
...
Code Block |
---|
{ "portUuid": "d343d343-1cc6-4b17-924f-4ae0ee18db5e", "fixedIp": "10.5.62.3", "floatingNetworks": [ { "name": "externalThree", "floatingIP": "192.168.17.227" } ] } |
Predefined floating IPs will be reserved if there are multiple floating networks defined for a cartridge. Therefore, in such a scenario an interface is guaranteed to have the floating IP that is defined to it.
...