Bureaucrats, cc_docs_admin, cc_staff
2,879
edits
Line 102: | Line 102: | ||
== Migrating ephemeral instances == | == Migrating ephemeral instances == | ||
An ephemeral instance is an instance without a backing volume. | |||
=== Migration using Glance images and volume snapshots === | === Migration using Glance images and volume snapshots === | ||
This method is recommended for instances with ephemeral storage less than 150GB in size. For instances with storage larger than that, creating new instances in Arbutus Cloud and copying the required data across from West Cloud is preferred to creating Glance images and transferring the images between clouds. | This method is recommended for instances with ephemeral storage less than 150GB in size. For instances with storage larger than that, creating new instances in Arbutus Cloud and copying the required data across from West Cloud is preferred to creating Glance images and transferring the images between clouds. 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. | ||
# | # 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 screen 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. | ||
# In the West Cloud web UI, create a snapshot of the desired instance (Compute -> Instances and Create Snapshot from the drop down menu). The CLI can also be used: | # In the West Cloud web UI, create a snapshot of the desired instance (Compute -> Instances and Create Snapshot from the drop down menu). The CLI can also be used: | ||
#: <code>nova list</code> | #: <code>nova list</code> | ||
Line 118: | Line 120: | ||
#: <code>glance image-create --progress --visibility private --container-format bare --disk-format qcow2 --name <imagename> --file <filename></code> | #: <code>glance image-create --progress --visibility private --container-format bare --disk-format qcow2 --name <imagename> --file <filename></code> | ||
# New instances can now be launched on Arbutus Cloud from this image. | # New instances can now be launched on Arbutus Cloud from this image. | ||
# Once your instances | # 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' === | ||
# Login to the instance running on West Cloud via SSH. When migrating an ephemeral instance | # 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: | ||
#: <code>yum install epel-release</code> | #: <code>yum install epel-release</code> | ||
Line 131: | Line 133: | ||
#: <code>openstack image list</code> | #: <code>openstack image list</code> | ||
# The root disk on the instance is typically <code>/dev/vda1</code>; verify this using the <code>df</code> command. | # The root disk on the instance is typically <code>/dev/vda1</code>; verify this using the <code>df</code> command. | ||
# Use the <code>dd</code> utility to create an image from the root disk of the instance | # Use the <code>dd</code> utility to create an image from the root disk of the instance. You can call the image whatever you prefer; in the following example we've used "ephemeralmigrate". When the command completes, you will receive output showing the details of the image created): | ||
#: <code>dd if=/dev/vda | openstack image create --private --container-format bare --disk-format raw "ephemeralmigrate"</code> | #: <code>dd if=/dev/vda | openstack image create --private --container-format bare --disk-format raw "ephemeralmigrate"</code> | ||
# You should now be able to see the image under Compute -> Images in the Arbutus Cloud web UI. This image can now be used to launch | # You should now be able to see the image under Compute -> Images in the Arbutus Cloud web UI. This image can now be used to launch instances on Arbutus. | ||
# Once your instances | # 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 == |