1 Project Introduction
Magnum is a service that provides container cluster deployment in OpenStack.
Magnum is a pass-level OpenStack project.
Magnum uses heat to deploy an operating system image that contains Docker and kubernetes.
Let the container cluster run in virtual machine or bare Metal.
2 Project Development Story
Magnum Project was created at the beginning, the project goal to CaaS for the purpose, namely container as a service.
However, in the subsequent development process, the community prefers to separate the container cluster deployment function and the management function of Docker container cluster.
So Magnum re-modifies the project objectives, and Magnum itself focuses on the container's cluster deployment capabilities.
Another project under incubation Zun focused on managing Docker container clusters.
3 Project composition
The Magnum consists of three code libraries:
Magnum: Http://git.openstack.org/cgit/openstack/magnum
python-magnumclient: http://git.openstack.org/cgit/openstack/python-magnumclient
magnum-ui: Http://git.openstack.org/cgit/openstack/magnum-ui
Magnum mainly provides two services:Magnum API and Magnum conductor.
The Python-magnumclient Encapsulation Magnum Rest API provides Magnum interface calls to the outside, while providing CLI functionality.
Magnum-ui provides a horizon plug-in that uses Django and ANGULARJS to implement Magnum interface operations.
4 Project Concept
Container: Docker container.
node: The nodes that the container runs on, which can be bare metal, virtual machines, or even containers.
Bay: A set of node sets that run a container, which is the basic unit of container dispatch in Magnum.
Baymodel: The object used to store the bay template, similar to the flavor in Nova.
Pods: A set of containers running on the same node, which is a concept in kubernetes.
Service: consists of one or more pods, representing an abstract application service, presented externally as the same provider,
Such access can be routed through the service without having to know the address of the Pods specifically.
replicationcontroller: Abbreviation RC,RC Specifies the number of copies of the pod, which guarantees that the number of copies exists and runs.
5 Project Architecture
Magnum itself as a set of API framework, itself calls other container management platform API to implement the function,
The currently supported backend includes Kubernetes, Swarm, and Mesos.
If Nova is a set of API frameworks that support different Hypervisor virtual machine platforms, then Magnum is an API framework that supports different container mechanisms.
The Magnum API provides a rest interface for resources.
Magnum Conductor is the core of the entire project, first deploying virtual machine instances or bare metal instances through heat,
You then call kubernetes, Swarm, or mesos to deploy the container cluster through cloud init on a virtual machine instance or bare metal instance.
6 Devstack Deployment
Download the devstack and add the Local.conf in the devstack directory with thefollowing file contents:
[[local|LOCALRC]] Database_password=Passwordrabbit_password=Passwordservice_token=Passwordservice_password=Passwordadmin_password=password# Magnum requires the following to be set Correctlypublic_interface=eth0enable_plugin Magnum https://Git.openstack.org/openstack/magnum# Enable Barbican service and use it to store TLS certificates# for details http://docs.openstack.org/developer/magnum/dev/dev-tls.htmlEnable_plugin Barbican https://Git.openstack.org/openstack/barbicanvolume_backing_file_size=20g
Perform the./stack.sh to complete The installation of the Magnum service.
7 Project Exchange
IRC Channel: #openstack-containers on freenode
Weekly Meetings: Beijing time every Wednesday 00:00 #openstack-meeting-alt
Editor's note: This article comes from OpenStack Open Source Team engineer to New Yong
Introduction to the OpenStack Magnum project