Cloud Migration as a Service

Gabriel Adrian Samfira e5602d23b0 Update replicator 7 năm trước cách đây
coriolis e5602d23b0 Update replicator 7 năm trước cách đây
debian 9562e3c88c Adds Debian upstart init config 10 năm trước cách đây
etc fe24e86f5f Add /endpoints/{endpoint_id}/storage API path. 7 năm trước cách đây
systemd 586ccc5f9b Adds systemd support 9 năm trước cách đây
.gitattributes e5602d23b0 Update replicator 7 năm trước cách đây
.gitignore e16e22b078 Add replica scheduler 8 năm trước cách đây
.testr.conf 87000159e1 Adds tox.ini and fixes issues 8 năm trước cách đây
LICENSE 7274ec7616 Adds LICENSE file 10 năm trước cách đây
MANIFEST.in 77c44071ed add coriolis-dbsync command 8 năm trước cách đây
README.rst db72dad391 Update Client/UI links in the README. 7 năm trước cách đây
coriolis-architecture.svg 5e10b88d09 Adds README content 10 năm trước cách đây
requirements.txt ecad074061 Implement tunneling fallback 7 năm trước cách đây
setup.cfg e16e22b078 Add replica scheduler 8 năm trước cách đây
setup.py 87000159e1 Adds tox.ini and fixes issues 8 năm trước cách đây
test-requirements.txt 5f80dd0f27 Merged in bclaudiub/coriolis-core/bug-fixes-2 (pull request #86) 8 năm trước cách đây
tox.ini 87000159e1 Adds tox.ini and fixes issues 8 năm trước cách đây

README.rst

Project Coriolis
================

*Cloud Migration as a Service*


Migrating existing workloads between clouds is a necessity for a large number
of use cases, especially for user moving from traditional virtualization
technologies like VMware vSphere or Microsoft System Center VMM to Azure /
AzureStack, OpenStack, Amazon AWS or Google Cloud. Furthermore, cloud to cloud
migrations, like AWS to Azure are also a common requirement.

Project Coriolis(R) addresses exactly those requirements, in particular migrating
Linux (Ubuntu, Red Hat / CentOS, SUSE, Debian, Fedora) and Windows virtual
machine, templates, storage and networking configurations.

There are some tricky scenarios where Coriolis excels: to begin with, virtual
machines need to be moved between different hypervisors, which means including
new operating system drivers and tools, for example cloud-init / cloudbase-init
in the OpenStack use case, LIS kernel modules on Hyper-V and Azure and so on.


The project is largely using Oslo libraries with an architecture meant to be
familiar for devops used to OpenStack, as shown in the diagram below.
A clear separation between stateless microservices and proper usage of queues
allows scalability and fault tolerance from the start. For PoCs and small
environments, all components can be deployed on a single host / VM / container.

Authentication and endpoint discovery is based on Keystone (in the typical
OpenStack way), which means that passing an X-Auth-Token header from an
existing Keystone session allows an easy integration with other components,
e.g. in Horizon's console.
The same token is passed to other components along the pipeline, which also
implies that importing virtual machines and other resources to the same
OpenStack infrastructure doesn't require further authentication.

Authentication to external clouds (Azure, AWS, etc) or virtualisation solutions
(vSphere, SCVMM, etc) in order to export virtual resources requires credentials
that can be saved in Barbican, thus avoiding the need to pass secrets directly
to the API.

Cloud resources that can be migrated:

- Virtual machines
- Virtual Mmchine templates
- Storage
- Network configurations

VM disks are converted to the desired target format and drivers / tools are
automatically added where appropriate during the process (e. cloud-init on
OpenStack, KVM Windows VirtIO drivers, etc).

The migration jobs are split in import / export tasks with a scheduler taking
care of choosing a worker node where this can be executed. Each task contains
progress update info that the client can poll to follow the progress of the
operations. Tasks can be relatively long running, depending on the storage
size, so proper status reporting was included in the design from the start.


.. image:: https://cloudbase.it/wp-content/uploads/2016/02/coriolis-diagram.svg

Keystone configuration
----------------------

Here's an example Keystone service and endpoints configuration:
::

openstack service create --name coriolis --description "Cloud Migration as a Service" migration

ENDPOINT_URL="http://hostname:7667/v1/%(tenant_id)s"
openstack endpoint create --region RegionOne migration `
--publicurl $ENDPOINT_URL `
--internalurl $ENDPOINT_URL `
--adminurl $ENDPOINT_URL

openstack user create --password-prompt coriolis
openstack role add --project service --user coriolis admin

API
---

The API is also very straightforward, here's a complete example available on
Postman: https://www.getpostman.com/collections/734dc164d4b6b00cd8fc


Create a migration job:

POST http://server:7667/v1/%project_id/migrations

Example request body:
::
{
"migration": {
"origin": {
"type": "vmware_vsphere",
"connection_info": {
"secret_id": "ebe69d82-da6f-451e-a0f6-3551d0f7ef85"
}
},
"destination": {
"type": "openstack",
"target_environment": {
"flavor_name": "m1.small",
"network_map": {
"VM Network": "private",
"VM Network Local": "public"
}
}
},
"instances": ["CentOS 7", "RHEL 7.2", "Ubuntu 14.04", "WS 2012 R2"]
}
}

Note: here's an example secret stored in Barbican with vSphere connection info:
::
{
"host": "10.0.0.10",
"username": "user@vsphere.local",
"password": "Password",
"allow_untrusted": true
}

List migrations:

GET http://server:7667/v1/%(project_id)s/migrations
GET http://server:7667/v1/%(project_id)s/migrations/detail


Get a migration job info:

GET http://server:7667/v1/%(project_id)s/migrations/%(migration_id)s


Cancel a migration job:

This API allows the user to interrupt any running job.

POST http://server:7667/v1/%(project_id)s/migrations/%(migration_id)s/action

Request body:
::
{ "cancel": null }


Delete a migration job:

DELETE http://server:7667/v1/%(project_id)s/migrations/%(migration_id)s

Note: only completed, failed or cancelled jobs can be deleted.


API bindings
------------

A reference Python client library implementation is available at:
https://github.com/cloudbase/python-coriolisclient


Web UI
------
The official Web-based GUI for Coriolis is available at:
https://github.com/cloudbase/coriolis-web