Openstack
Installation
Kolla Ansible
Kolla ansible inventory consists of 5 groups:
- control
- compute
- network
- storage
- monitoring
Networking
Openstack requires at least 2 network interfaces, in Kolla they are created using:
-
network_interface: Not used on its own but most other services default to using it. -
neutron_external_interface: Required by Neutron and used for flat networking and tagged vlans -
Openstack networks are Layer 2.
A network is the central object of the Neutron v2.0 API data model and describes an isolated Layer 2 segment. In a traditional infrastructure, machines are connected to switch ports that are often grouped together into Virtual Local Area Networks (VLANs) identified by unique IDs. Machines in the same network or VLAN can communicate with one another but cannot communicate with other networks in other VLANs without the use of a router.
IP address in openstack
- To create public ip address in openstack (floating ips) we use
openstack floating ip createdocs - To assign a new ip address to a machine we use
openstack server add floating ipdocs
Create a Test VM
openstack server create --flavor 1 --image cirros --network <network-id> test_vm
Networking
Creation
The Neutron workflow (when booting a VM instance)
- The user creates a network.
- The user creates a subnet and associates it with the network.
- The user boots a virtual machine instance and specifies the network.
- Nova interfaces with Neutron to create a port on the network.
- Neutron assigns a MAC address and IP address to the newly created port using attributes defined by the subnet.
- Nova builds the instance's libvirt XML file, which contains local network bridge and MAC address information, and starts the instance.
- The instance sends a DHCP request during boot, at which point, the DHCP server responds with the IP address corresponding to the MAC address of the instance
Deletion
- The user destroys the virtual machine instance.
- Nova interfaces with Neutron to destroy the ports associated with the instances.
- Nova deletes local instance data.
- The allocated IP and MAC addresses are returned to the pool.
Console
There are three remote console access methods commonly used with OpenStack:
- novnc: An in-browser VNC client implemented using HTML5 Canvas and WebSockets
- spice: A complete in-browser client solution for interaction with virtualized instances
- xvpvnc: A Java client offering console access to an instance