Arbutus Migration Guide: Difference between revisions

Marked this version for translation
No edit summary
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


<!--T:1-->
This document aims to describe how to migrate virtual machine (VM) instances from the legacy West Cloud to the new Arbutus Cloud.  
This document aims to describe how to migrate virtual machine (VM) instances from the legacy West Cloud to the new Arbutus Cloud.  
You know your workload best, so we recommend that you migrate your instances according to your own application requirements and schedule.
You know your workload best, so we recommend that you migrate your instances according to your own application requirements and schedule.


== Preliminaries ==
== Preliminaries == <!--T:2-->


<!--T:3-->
Note the following URLs for accessing the Horizon Web UI for the two Clouds:
Note the following URLs for accessing the Horizon Web UI for the two Clouds:


<!--T:4-->
'''West Cloud (legacy):''' [https://west.cloud.computecanada.ca https://west.cloud.computecanada.ca]
'''West Cloud (legacy):''' [https://west.cloud.computecanada.ca https://west.cloud.computecanada.ca]


<!--T:5-->
'''Arbutus Cloud (new):''' [https://arbutus.cloud.computecanada.ca https://arbutus.cloud.computecanada.ca]
'''Arbutus Cloud (new):''' [https://arbutus.cloud.computecanada.ca https://arbutus.cloud.computecanada.ca]


<!--T:6-->
Firefox and Chrome browsers are supported. Safari and Edge may work but have not been validated.
Firefox and Chrome browsers are supported. Safari and Edge may work but have not been validated.


<!--T:7-->
Your Project (Tenant), Network, and Router will be pre-created for you in Arbutus Cloud. User access will also be pre-populated.
Your Project (Tenant), Network, and Router will be pre-created for you in Arbutus Cloud. User access will also be pre-populated.


<!--T:8-->
Prior to migrating instances, we recommend that you complete the following preliminaries to prepare the necessary environment for migration.
Prior to migrating instances, we recommend that you complete the following preliminaries to prepare the necessary environment for migration.


<!--T:9-->
# '''IMPORTANT''': Back up any critical data! While the Cloud has redundant storage systems, no backups of any instances are taken.
# '''IMPORTANT''': Back up any critical data! While the Cloud has redundant storage systems, no backups of any instances are taken.
# Get RC files (used to set environment variables used by the OpenStack command-line tools) after logging in to the URLs above with your Compute Canada credentials:
# Get RC files (used to set environment variables used by the OpenStack command-line tools) after logging in to the URLs above with your Compute Canada credentials:
Line 45: Line 53:
# Plan an outage window. Generally, shutting down services and then shutting down the instance is the best way to avoid corrupt or inconsistent data after the migration. Smaller volumes can be copied over fairly quickly, e.g. a 10GB volume will copy over in less than 5 minutes, but larger volumes, e.g. 100GB can take 30 to 40 minutes. Plan for this. Additionally, floating IP addresses will change, so ensure the TTL of your DNS records is set to a small value so that the changes propagate as quickly as possible.  
# Plan an outage window. Generally, shutting down services and then shutting down the instance is the best way to avoid corrupt or inconsistent data after the migration. Smaller volumes can be copied over fairly quickly, e.g. a 10GB volume will copy over in less than 5 minutes, but larger volumes, e.g. 100GB can take 30 to 40 minutes. Plan for this. Additionally, floating IP addresses will change, so ensure the TTL of your DNS records is set to a small value so that the changes propagate as quickly as possible.  


<!--T:10-->
There are three general migration scenarios to consider.  
There are three general migration scenarios to consider.  
* [[#Manual or orchestrated migration|Manual or orchestrated migration]]
* [[#Manual or orchestrated migration|Manual or orchestrated migration]]
Line 51: Line 60:
Depending on your current setup, you may use any or all of these scenarios to migrate from the West Cloud to the Arbutus Cloud.
Depending on your current setup, you may use any or all of these scenarios to migrate from the West Cloud to the Arbutus Cloud.


== Manual or orchestrated migration ==
== Manual or orchestrated migration == <!--T:11-->


<!--T:12-->
In this scenario, instances and volumes are created in Arbutus with the same specifications as that on West Cloud. The general approach is:
In this scenario, instances and volumes are created in Arbutus with the same specifications as that on West Cloud. The general approach is:


<!--T:13-->
# Copy any Glance images from West Cloud to Arbutus Cloud if you are using any customized images. You may also simply start with a fresh base image in Arbutus Cloud.
# Copy any Glance images from West Cloud to Arbutus Cloud if you are using any customized images. You may also simply start with a fresh base image in Arbutus Cloud.
# Install and configure services on the instance (or instances).
# Install and configure services on the instance (or instances).
Line 61: Line 72:
# Decommission the old instances and delete old volumes.
# Decommission the old instances and delete old volumes.


<!--T:14-->
The above steps can be done manually or orchestrated via various configuration management tools such as
The above steps can be done manually or orchestrated via various configuration management tools such as
[https://docs.ansible.com/ansible/2.5/modules/list_of_cloud_modules.html Ansible],  
[https://docs.ansible.com/ansible/2.5/modules/list_of_cloud_modules.html Ansible],  
Line 67: Line 79:
The use of such tools is beyond the scope of this document, but if you were already using orchestration tools on West Cloud, they should work with Arbutus Cloud as well.
The use of such tools is beyond the scope of this document, but if you were already using orchestration tools on West Cloud, they should work with Arbutus Cloud as well.


== Migrating volume-backed instances ==
== Migrating volume-backed instances == <!--T:15-->


<!--T:16-->
Volume-backed instances, as their name implies, have a persistent volume attached to them containing the operating system and any required data. Best practice is to use separate volumes for the operating system and for data.
Volume-backed instances, as their name implies, have a persistent volume attached to them containing the operating system and any required data. Best practice is to use separate volumes for the operating system and for data.


=== Migration using Glance images ===
=== Migration using Glance images === <!--T:17-->


<!--T:18-->
This method is recommended for volumes less than 150GB in size. For volumes larger than that, the approach described in [[#Manual or orchestrated migration|Manual or orchestrated migration]] above is preferred.
This method is recommended for volumes less than 150GB in size. For volumes larger than that, the approach described in [[#Manual or orchestrated migration|Manual or orchestrated migration]] above is preferred.


<!--T:19-->
# Open two SSH sessions to the migration host ''cloudmigration.computecanada.ca'' with your Compute Canada credentials.
# Open two SSH sessions to the migration host ''cloudmigration.computecanada.ca'' with your Compute Canada credentials.
# In one session, source the OpenStack RC file for West Cloud. In the other session, source the OpenStack RC file for Arbutus Cloud. As mentioned earlier, use of the <code>screen</code> command is recommended in case of SSH disconnections.
# In one session, source the OpenStack RC file for West Cloud. In the other session, source the OpenStack RC file for Arbutus Cloud. As mentioned earlier, use of the <code>screen</code> command is recommended in case of SSH disconnections.
Line 87: Line 102:
# Once you have migrated and validated your instances and volumes, and once all associated DNS records updated, please delete your old instances and volumes on the legacy West Cloud.
# Once you have migrated and validated your instances and volumes, and once all associated DNS records updated, please delete your old instances and volumes on the legacy West Cloud.


=== Alternative method: Migrating a volume-backed instance using Linux 'dd' ===
=== Alternative method: Migrating a volume-backed instance using Linux 'dd' === <!--T:20-->


<!--T:21-->
# Launch an instance on West Cloud with the smallest flavor possible “p1-1.5gb”. We will call this the "temporary migration host". The instructions below assume you choose CentOS 7 for this instance, but any Linux distribution with Python and Pip available should work.
# Launch an instance on West Cloud with the smallest flavor possible “p1-1.5gb”. We will call this the "temporary migration host". The instructions below assume you choose CentOS 7 for this instance, but any Linux distribution with Python and Pip available should work.
# Log in to the instance via SSH and install the OpenStack CLI in a root shell:
# Log in to the instance via SSH and install the OpenStack CLI in a root shell:
Line 105: Line 121:
# Once you have migrated and validated your volumes and instances, and once any associated DNS records updated, please delete your old instances and volumes on the legacy West Cloud.
# Once you have migrated and validated your volumes and instances, and once any associated DNS records updated, please delete your old instances and volumes on the legacy West Cloud.


== Migrating ephemeral instances ==
== Migrating ephemeral instances == <!--T:22-->


<!--T:23-->
An ephemeral instance is an instance without a backing volume.
An ephemeral instance is an instance without a backing volume.


=== Migration using Glance images and volume snapshots ===
=== Migration using Glance images and volume snapshots === <!--T:24-->


<!--T:25-->
This method is recommended for instances with ephemeral storage less than 150GB in size. For instances larger than that, the approach described in [[#Manual or orchestrated migration|Manual or orchestrated migration]] above is preferred.
This method is recommended for instances with ephemeral storage less than 150GB in size. For instances larger than that, the approach described in [[#Manual or orchestrated migration|Manual or orchestrated migration]] above is preferred.


<!--T:26-->
In either case you will still need to copy data from any non-boot ephemeral storage (i.e. mounted under <code>/mnt</code>) separately. Consult [[#Methods to copy data|methods to copy data]] below for this.
In either case you will still need to copy data from any non-boot ephemeral storage (i.e. mounted under <code>/mnt</code>) separately. Consult [[#Methods to copy data|methods to copy data]] below for this.


<!--T:27-->
# Open two SS sessions to the migration host ''cloudmigration.computecanada.ca'' with your Compute Canada credentials.
# Open two SS sessions to the migration host ''cloudmigration.computecanada.ca'' with your Compute Canada credentials.
# In one session, source the OpenStack RC file for West Cloud. In the other session, source the OpenStack RC file for Arbutus Cloud. As mentioned earlier, use of the <code>screen</code> command is recommended in case of SSH disconnections.
# In one session, source the OpenStack RC file for West Cloud. In the other session, source the OpenStack RC file for Arbutus Cloud. As mentioned earlier, use of the <code>screen</code> command is recommended in case of SSH disconnections.
Line 128: Line 148:
# Once you have migrated and validated your volumes and instances, and after any associated DNS records are updated, please delete your old instances on the legacy West Cloud.
# Once you have migrated and validated your volumes and instances, and after any associated DNS records are updated, please delete your old instances on the legacy West Cloud.


=== Alternative method: Migrating an ephemeral instance using Linux 'dd' ===
=== Alternative method: Migrating an ephemeral instance using Linux 'dd' === <!--T:28-->


<!--T:29-->
# Login to the instance running on West Cloud via SSH. When migrating an ephemeral instance, it is important to shut down as many services as possible on the instance prior to migration e.g. httpd, databases, etc. Ideally, leave only SSH running.
# Login to the instance running on West Cloud via SSH. When migrating an ephemeral instance, it is important to shut down as many services as possible on the instance prior to migration e.g. httpd, databases, etc. Ideally, leave only SSH running.
# As root, install the OpenStack CLI if not already installed:
# As root, install the OpenStack CLI if not already installed:
Line 144: Line 165:
# Once you have migrated and validated your volumes and instances, and after any associated DNS records are updated, please delete your old instances on the legacy West Cloud.
# Once you have migrated and validated your volumes and instances, and after any associated DNS records are updated, please delete your old instances on the legacy West Cloud.


== Methods to copy data ==
== Methods to copy data == <!--T:30-->


<!--T:31-->
Here are two recommended approaches for copying data between instances running in the two clouds. The most appropriate method depends upon the size of the data volumes in your tenant. For very large volumes (e.g. greater than 5TB) Globus is recommended. Please see here for configuration details: [https://computecanada.github.io/DHSI-cloud-course/globus/ https://computecanada.github.io/DHSI-cloud-course/globus/]
Here are two recommended approaches for copying data between instances running in the two clouds. The most appropriate method depends upon the size of the data volumes in your tenant. For very large volumes (e.g. greater than 5TB) Globus is recommended. Please see here for configuration details: [https://computecanada.github.io/DHSI-cloud-course/globus/ https://computecanada.github.io/DHSI-cloud-course/globus/]


<!--T:32-->
If you have very large volumes, we recommend you submit a support ticket as well.
If you have very large volumes, we recommend you submit a support ticket as well.


<!--T:33-->
For smaller volumes, rsync+ssh provides good transfer speeds and can (like Globus) work in an incremental way. A typical use case would be:
For smaller volumes, rsync+ssh provides good transfer speeds and can (like Globus) work in an incremental way. A typical use case would be:


<!--T:34-->
# SSH to the West Cloud instance which has the large volume attached. Note the absolute path you want to copy to the instance on Arbutus Cloud.
# SSH to the West Cloud instance which has the large volume attached. Note the absolute path you want to copy to the instance on Arbutus Cloud.
# Execute rsync over SSH. The example below assumes that password-less login via [[SSH keys]] has already been setup between the instances. Replace the placeholders below with real values:
# Execute rsync over SSH. The example below assumes that password-less login via [[SSH keys]] has already been setup between the instances. Replace the placeholders below with real values:
Line 157: Line 182:
# Verify that the data has been successfully copied on the instance in Arbutus Cloud. Then delete the data from the legacy West Cloud.
# Verify that the data has been successfully copied on the instance in Arbutus Cloud. Then delete the data from the legacy West Cloud.


<!--T:35-->
You may also use any other method you are familiar with for transferring data.
You may also use any other method you are familiar with for transferring data.


== Support ==
== Support == <!--T:36-->


<!--T:37-->
Support requests can be sent to the usual Cloud support address at [mailto:cloud@computecanada.ca cloud@computecanada.ca]
Support requests can be sent to the usual Cloud support address at [mailto:cloud@computecanada.ca cloud@computecanada.ca]


</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits