OpenStack-Ansible allows you to deploy production-grade OpenStack cloud on LXC containers. OSAD(openstack ansible deployment project) enables you to rollout hasssle-free OpenStack updates and this is only one of many uses. It directly pulls code from git source rather than packages from distributions. But for now we will only be focusing on the OpesStack deployment.
Neutron is an Openstack stand-alone project which aims at providing network connectivity for the compute resources created by nova.
Neutron comprises of multiple services and agents running on multiple nodes. Let us know about the services in the above basic neutron deployment.
neutron-server provides an API layer that acts as an single point of access to manage other neutron services.
L2 agent runs on compute and network nodes which creates various types of networks (flat,local,vlan,vxlan,gre) and provides isolation between tenant networks. It takes care of wiring the VM instances. L2 agent can use Linux bridge or OpenvSwitch or any other vendor technology to perform above tasks.
L3 agent runs on network node allows its users to create routers that connects Layer2 networks. Behind the scenes L3 agent uses linux iptables to perform layer3 forwarding and NAT. It’s possible to create multiple routers with overlapping ip range through network namespaces. Each router creates its own namespace with name based on its UUID.
DHCP agent runs on the network node allocates ip addresses to instances. It uses a dnsmasq instance per network.
Neutron exposes a logical API which defines the network connectivity between the devices created by OpenStack nova. Under the hood all the CRUD operations on an attribute managed by neutron API is being handled by a Neutron Plugin.
As of Mitaka release core API of Neutron manages three kind of entities:
1.Network, representing isolated virtual Layer-2 domains; a network can also be regarded as a virtual (or logical) switch;
2.Subnet, representing IPv4 or IPv6 address blocks from which IPs to be assigned to VMs on a given network are selected;
Port, representing virtual (or logical) switch ports on a given network.
All entities, discussed in detail in the rest of this chapter, support the basic CRUD operations with POST/GET/PUT/DELETE verbs, and have an auto-generated unique identifier
The Modular Layer 2 (ML2) plugin is a python module which providesneutron.neutron_plugin_base_v2.NeutronPluginBaseV2 class with a minimum set of methods that needs to be implemented.
Recently Google joined hands with Mirantis and Intel to distribute Openstack components in docker containers managed with kubernetes. In the above deployment scenario, each and every component of openstack like nova, neutron, keystone etc.. runs in docker containers and are deployed, managed through kubernetes. I wondered if the nova service is running in a container then how is it going to span a vm instance. An another doubt flashed in my mind that is it possible to run a virtual machine inside a docker container? . The answer is yes but with some prerequisites installed and tweaks done on the docker host. In this post i will show you how to run a vm using kvm in a docker container.
As the docker containers don’t have a kernel of its own and it uses hosts kernel, so it’s not possible to insert kvm kernel module. So instead we will add /dev/kvm and /dev/net/tun devices to the container.
Make sure that you installed docker and kvm on the host. Kvm installation can be tested by
INFO: /dev/kvm exists
KVM acceleration can be used