Container Infrastructure Management Service for OpenStack
Go to file
Steven Dake d03574a0c2 Use versioned objects for bays
This creates and deletes bay objects in the database.

This new model is great because we can do things like:

https://github.com/openstack/nova/blob/master/nova/cmd/compute.py#L67

And completely override the database with an RPC mechanism instead.
This way objects are created in the ReST endpoint but stored in the
database via the backend and conductor.

I was attempting to write this code, but found it is already on its
way to being merged into oslo-incubator here:

https://review.openstack.org/#/c/127532/

Change-Id: Iff995d28a78f41874cc6ad62baf7420960a530da
2014-12-03 17:21:17 -05:00
doc/source Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
etc/magnum Added Magnum Configuration file 2014-11-24 22:47:32 +05:30
magnum Use versioned objects for bays 2014-12-03 17:21:17 -05:00
.coveragerc Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
.gitignore Modify gitignore to ignore cover 2014-11-20 23:27:20 +09:00
.gitreview Added .gitreview 2014-11-07 10:08:48 +00:00
.mailmap Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
.testr.conf Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
CONTRIBUTING.rst Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
Dockerfile Merge "Fix docker container." 2014-11-28 13:58:29 +00:00
HACKING.rst Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
LICENSE Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
MANIFEST.in Copy Ironic's database model codebase 2014-12-02 15:04:31 -07:00
README.rst Update README for magnum 2014-12-01 00:40:48 -05:00
babel.cfg Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
openstack-common.conf Add versionutils from oslo-incubator 2014-12-02 01:28:43 -07:00
requirements.txt Use versioned objects for bays 2014-12-03 17:21:17 -05:00
setup.cfg Copy Ironic's database model codebase 2014-12-02 15:04:31 -07:00
setup.py Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
test-requirements.txt Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
tox.ini Enable automatic sample config generation 2014-11-24 12:34:07 -08:00

README.rst

Magnum

new Openstack project for containers.

Architecture

There are four different types of objects in the Magnum system:

  • Bay: A physical machine or virtual machine where work is scheduled
  • Pod: A collection of containers running on one physical or virtual machine
  • Service: A port to Pod mapping
  • Container: A docker container

Three binaries work together to compose the Magnum system. The first binary accessed by the python-magnumclient code is the magnum-api ReST server. The ReST server may run as one process or multiple processes. When a ReST request is sent to the client API, the request is sent via AMQP to the magnum-backend process.

The magnum-backend process runs on each machine where a docker server is running or where a k8s minion is located. The backend processor contacts the appropriate backend (for the container object, docker, for the server & pod objects, k8s). The backend then executes the operation requested and sends the results to the third binary.

The third binary, magnum-conductor, reads and writes the database with information related to the object operated upon. The conductor then returns the new object back up the call stack, where it may be used to provide information to the client or used for processing the operation. There is only one magnum-conductor process running.

Features

  • Abstractions for bays, pods, services, and containers.
  • Integration with Kubernetes and Docker for backend container technology.
  • Integration with Keystone for multi-tenant security.
  • Integraiton with Neutron for k8s multi-tenancy network security.

Installation

  • Configure Keystone:

    $ source openrc admin admin
    $ keystone user-create --name=magnum \
                           --pass=<secure-magnum-password> \
                           --email=magnum@example.com
    $ keystone service-create --name=container \
                              --type=container \
                              --description="Magnum Container Service"
    $ keystone endpoint-create --service=container \
                               --publicurl=http://127.0.0.1:9511/v1 \
                               --internalurl=http://127.0.0.1:9511/v1 \
                               --adminurl=http://127.0.0.1:9511/v1
  • Install Magnum:

    $ git clone http://github.com/stackforge/magnum
    $ cd magnum
    $ sudo python ./setup.py install
    $ cd ..
  • Install Magnum's Python Client:

    $ git clone http://github.com/stackforge/python-magnumclient
    $ cd python-magnumclient
    $ sudo python ./setup.py install
    $ cd ..

Run

  • Start magnum-api:

    $ magnum-api &
  • Start magnum-conductor:

    $ magnum-conductor &
  • Start magnum-backend (should be started where a docker server or kubernetes api server is running):

    $ magnum-backend &

Access Magnum via ReST API

  • Note the magnum ReST API is not yet plumbed *

  • select a subcommand::

    bay-create bay-delete bay-list bay-show container-create container-delete container-execute container-list container-logs container-pause container-reboot container-show container-start container-stop container-unpause pod-create pod-delete pod-list pod-show service-create service-delete service-list service-show

  • Run the operation:

    $ magnum bay-list