docs: Update cyclades.rst and admin guide

parent 563dd196
......@@ -495,71 +495,6 @@ Finally, backend systems having acquired a token can use the
Compute/Network/Image Service (Cyclades)
========================================
Compute Overview
----------------
Network Overview
----------------
Image Overview
--------------
Architecture
------------
Asynchronous communication with Ganeti backends
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Synnefo uses Google Ganeti backends for VM cluster management. In order for
Cyclades to be able to handle thousands of user requests, Cyclades and Ganeti
communicate asynchronously. Briefly, requests are submitted to Ganeti through
Ganeti's RAPI/HTTP interface, and then asynchronous notifications about the
progress of Ganeti jobs are being created and pushed upwards to Cyclades. The
architecture and communication with a Ganeti backend is shown in the graph
below:
.. image:: images/cyclades-ganeti-communication.png
:width: 50%
:target: _images/cyclades-ganeti-communication.png
The Cyclades API server is responsible for handling user requests. Read-only
requests are directly served by looking up the Cyclades DB. If the request
needs an action in the Ganeti backend, Cyclades submit jobs to the Ganeti
master using the `Ganeti RAPI interface
<http://docs.ganeti.org/ganeti/2.2/html/rapi.html>`_.
While Ganeti executes the job, `snf-ganeti-eventd`, `snf-ganeti-hook` and
`snf-progress-monitor` are monitoring the progress of the job and send
corresponding messages to the RabbitMQ servers. These components are part
of `snf-cyclades-gtools` and must be installed on all Ganeti nodes. Specially:
* *snf-ganeti-eventd* sends messages about operations affecting the operating
state of instances and networks. Works by monitoring the Ganeti job queue.
* *snf-ganeti_hook* sends messages about the NICs of instances. It includes a
number of `Ganeti hooks <http://docs.ganeti.org/ganeti/2.2/html/hooks.html>`_
for customisation of operations.
* *snf-progress_monitor* sends messages about the progress of the Image deployment
phase which is done by the Ganeti OS Definition `snf-image`.
Finally, `snf-dispatcher` consumes messages from the RabbitMQ queues, processes
these messages and properly updates the state of the Cyclades DB. Subsequent
requests to the Cyclades API, will retrieve the updated state from the DB.
Prereqs
-------
Work in progress. Please refer to :ref:`administrator's install quide <quick-install-admin-guide>`.
Installation
------------
Work in progress. Please refer to :ref:`administrator's install quide <quick-install-admin-guide>`.
Configuration
-------------
Work in progress. Please refer to :ref:`administrator's install quide <quick-install-admin-guide>`.
Working with Cyclades
---------------------
......@@ -665,7 +600,6 @@ between users and backends. If the user is found in ``BACKEND_PER_USER``, then
Synnefo allocates all his/hers VMs to the specific backend in the variable,
even if is marked as drained (useful for testing).
Managing Virtual Machines
~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -757,6 +691,7 @@ prefix pool is responsible for providing only unicast and locally administered
MAC addresses, so many of these prefixes will be externally reserved, to
exclude from allocation.
Cyclades advanced operations
----------------------------
......@@ -792,7 +727,6 @@ Adding the `--fix-all` option, will do the actual synchronization:
Please see ``snf-manage reconcile --help`` for all the details.
Reconciling Networks
````````````````````
......@@ -818,6 +752,47 @@ Adding the `--fix-all` option, will do the actual synchronization:
Please see ``snf-manage reconcile-networks --help`` for all the details.
Cyclades internals
------------------
Asynchronous communication with Ganeti backends
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Synnefo uses Google Ganeti backends for VM cluster management. In order for
Cyclades to be able to handle thousands of user requests, Cyclades and Ganeti
communicate asynchronously. Briefly, requests are submitted to Ganeti through
Ganeti's RAPI/HTTP interface, and then asynchronous notifications about the
progress of Ganeti jobs are being created and pushed upwards to Cyclades. The
architecture and communication with a Ganeti backend is shown in the graph
below:
.. image:: images/cyclades-ganeti-communication.png
:width: 50%
:target: _images/cyclades-ganeti-communication.png
The Cyclades API server is responsible for handling user requests. Read-only
requests are directly served by looking up the Cyclades DB. If the request
needs an action in the Ganeti backend, Cyclades submit jobs to the Ganeti
master using the `Ganeti RAPI interface
<http://docs.ganeti.org/ganeti/2.2/html/rapi.html>`_.
While Ganeti executes the job, `snf-ganeti-eventd`, `snf-ganeti-hook` and
`snf-progress-monitor` are monitoring the progress of the job and send
corresponding messages to the RabbitMQ servers. These components are part
of `snf-cyclades-gtools` and must be installed on all Ganeti nodes. Specially:
* *snf-ganeti-eventd* sends messages about operations affecting the operating
state of instances and networks. Works by monitoring the Ganeti job queue.
* *snf-ganeti_hook* sends messages about the NICs of instances. It includes a
number of `Ganeti hooks <http://docs.ganeti.org/ganeti/2.2/html/hooks.html>`_
for customisation of operations.
* *snf-progress_monitor* sends messages about the progress of the Image deployment
phase which is done by the Ganeti OS Definition `snf-image`.
Finally, `snf-dispatcher` consumes messages from the RabbitMQ queues, processes
these messages and properly updates the state of the Cyclades DB. Subsequent
requests to the Cyclades API, will retrieve the updated state from the DB.
Block Storage Service (Archipelago)
===================================
......
.. _cyclades:
Compute and Network Service (cyclades)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Cyclades is the the synnefo Compute and Network Service.
It implements OpenStack Compute API v1.1 + synnefo extensions.
.. todo:: list synnefo components needed by cyclades
.. _cyclades-introduction:
Cyclades Introduction
=====================
Cyclades is the Compute/Network software component of *synnefo*. Its design combines a Google
Ganeti backend for VM cluster management, with a Python/Django implementation of
the user-visible API at the frontend. We opted to reuse Ganeti as a VM
management solution in an effort not to re-invent the wheel; Ganeti is scalable
and proven software infrastructure for managing VMs in production environments,
and GRNET already had long experience with it, using it to provide VMs to
Network Operation Centers. The synnefo team is involved in Ganeti development,
contributing patches upstream.
Basing our work on Ganeti, we build on a solid, mature core which undertakes
most of the low-level VM management operations, e.g., handling of VM creations,
migrations among physical nodes, and handling of node downtimes; the design and
implementation of the end-user API is orthogonal to VM handling at the backend.
Building on Ganeti gave us a head start, allowing us to focus on creating a
custom cloud management layer, accesible over a consistent, clean end-user API
implementation, and an intuitive Web-based UI. Overall, the software stack is
as follows:
.. image:: images/synnefo-software-stack.png
With *Cyclades*, users have access to VMs powered by KVM, running Linux and
Windows guests on Debian hosts and using Google Ganeti for VM cluster
management. The VMs are accessible by the end-user over the Web or
programmatically (OpenStack Compute API v1.1). Users have full control over
their VMs: they can create new ones, start them, shutdown, reboot, and destroy
them. For the configuration of their VMs they can select number of CPUs, size of
RAM and system disk, and operating system from pre-defined Images including
popular Linux distros (Fedora, Debian, Ubuntu) and MS-Windows Server 2008 R2.
There is an Out-of-Band console over VNC for troubleshooting.
The REST API for VM management, being OpenStack Compute v. 1.1 compatible, can
interoperate with 3rd party tools and client libraries. GRNET has added custom
extensions for yet-unsupported functionality. It has been implemented in Python,
using the Django framework, from scratch.
The *Cyclades* UI is written in Javascript/jQuery and runs entirely on the client
side for maximum reponsiveness. It is just another API client; all UI operations
happen with asynchronous calls over the API.
Compute/Network/Image Service (Cyclades)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Cyclades is the Synnefo component that implements the Compute, Network, Image
and Volume services. It exposes the associated OpenStack REST APIs: OpenStack
Compute, Network, Glance and soon also Cinder. Cyclades is the part which
manages multiple Ganeti clusters at the backend. Cyclades issues commands to a
Ganeti cluster using Ganeti's Remote API (RAPI). The administrator can expand
the infrastructure dynamically by adding new Ganeti clusters to reach
datacenter scale. Cyclades knows nothing about low-level VM management
operations, e.g., handling of VM creations, migrations among physical nodes,
and handling of node downtimes; the design and implementation of the end-user
API is orthogonal to VM handling at the backend.
There are two distinct, asynchronous paths in the interaction between Synnefo
and Ganeti. The `effect` path is activated in response to a user request;
Cyclades issues VM control commands to Ganeti over RAPI. The `update` path is
triggered whenever the state of a VM changes, due to Synnefo- or
administrator-initiated actions happening at the Ganeti level. In the update
path, we exploit Ganeti’s hook mechanism to produce notifications to the rest
of the Synnefo infrastructure over a message queue.
Users have full control over their VMs: they can create new ones, start them,
shutdown, reboot, and destroy them. For the configuration of their VMs they can
select number of CPUs, size of RAM and system disk, and operating system from
pre-defined Images including popular Linux distros (Debian, Ubuntu, CentOS,
Fedora, Gentoo, Archlinux, OpenSuse), MS-Windows Server 2008 R2 and 2012 as
well as FreeBSD.
The REST API for VM management, being OpenStack compatible, can interoperate
with 3rd party tools and client libraries.
The *Cyclades* UI is written in Javascript/jQuery and runs entirely on the
client side for maximum reponsiveness. It is just another API client; all UI
operations happen with asynchronous calls over the API.
The networking functionality includes dual IPv4/IPv6 connectivity for each VM,
easy, platform-provided firewalling either through an array of pre-configured
......@@ -61,110 +44,6 @@ network topologie, e.g., to deploy VMs in multi-tier configurations. The
networking functionality is exported all the way from the backend to the API and
the UI.
.. _cyclades-architecture:
Cyclades Architecture
=====================
Nodes in an cyclades deployment belong in one of the following types.
For every type, we list the services that execute on corresponding nodes.
Throughout this guide, `node` refers to a physical machine in the deployment.
.. _DB_NODE:
DB
--
A node [or more than one nodes, if using an HA configuration], running a DB
engine supported by the Django ORM layer. The DB is the single source of
truth for the servicing of API requests by cyclades.
*Services:* PostgreSQL / MySQL
.. _APISERVER_NODE:
APISERVER
---------
A node running the ``api`` application contained in
:ref:`snf-cyclades-app <snf-cyclades-app>`. Any number of
:ref:`APISERVER <APISERVER_NODE>` nodes
can be used, in a load-balancing configuration, without any
special consideration. Access to a common DB ensures consistency.
*Services:* Web server, vncauthproxy
.. _QUEUE_NODE:
QUEUE
-----
A node running the RabbitMQ software, which provides AMQP functionality. More
than one :ref:`QUEUE <QUEUE_NODE>` nodes may be deployed, in an HA
configuration. Such deployments require shared storage, provided e.g., by DRBD.
*Services:* RabbitMQ [rabbitmq-server]
.. _LOGIC_NODE:
LOGIC
-----
A node running the business logic of synnefo, in Django. It dequeues
messages from QUEUE nodes, and provides the context in which business logic
functions run. It uses Django ORM to connect to the common DB and update the
state of the system, based on notifications received from the rest of the
infrastructure, over AMQP.
*Services:* the synnefo logic dispatcher, ``snf-dispatcher``
.. _GANETI_NODES:
.. _GANETI_MASTER:
.. _GANETI_NODE:
GANETI-MASTER and GANETI-NODE
-----------------------------
A single GANETI-MASTER and a large number of GANETI-NODEs constitute the
Ganeti backend for synnefo, which undertakes all VM management functions.
Any APISERVER can issue commands to the GANETI-MASTER, over RAPI, to effect
changes in the state of the VMs. The GANETI-MASTER runs the Ganeti request
queue.
*Services:*
* only on :ref:`GANETI-MASTER <GANETI_MASTER>`:
* the synnefo Ganeti monitoring daemon, ``snf-ganeti-eventd``
* the synnefo Ganeti hook, ``ganeti/snf-ganeti-hook.py``.
* on every :ref:`GANETI-NODE <GANETI_NODE>`:
* a deployment-specific KVM ifup script
* properly configured :ref:`NFDHCPD <cyclades-nfdhcpd-setup>`
.. src/design
.. src/dev
.. src/user
.. src/api
.. src/install
.. src/configuration
.. src/deployment
.. src/admin
.. src/admin_tools
.. src/develop
.. src/api
.. src/plankton
.. src/storage
.. src/upgrade
.. src/changelog
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Please also see the :ref:`Admin Guide <admin-guide>` for more information and
the :ref:`Installation Guide <quick-install-admin-guide>` for installation
instructions.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment