Containers have the advantages of low cost, efficient deployment, high portability, and environment consistency. You can use SMC to migrate Linux source servers to container images and then use the container images to deploy container applications. This implements low-cost containerized application migration.
Alibaba Cloud Container Registry is a service that allows you to manage and distribute cloud-native artifacts that meet the standards of Open Container Initiative (OCI) in an effective manner. The artifacts include container images and Helm charts. Container Registry Enterprise Edition provides end-to-end acceleration capabilities to support global image replication, distribution of large images at scale, and image building based on multiple code sources. The service seamlessly integrates with Container Service for Kubernetes (ACK) to help enterprises reduce delivery complexity and provides a one-stop solution for cloud-native applications. For more information, see What is Container Registry?
Alibaba Cloud Container Service for Kubernetes (Container Service for Kubernetes) is one of the first service platforms in the world to pass the Kubernetes consistency certification. It provides high-performance container application management services and supports the lifecycle management of enterprise-level Kubernetes containerized applications. This allows you to easily and efficiently run Kubernetes containerized applications in the cloud. For more information, see What is Hybrid Backup Recovery.
Limits
Only servers that run the x86 Linux operating system support migration to container images.
Impacts
Before you migrate data, take note of the following items:
Item | Description |
Migrate Data Directory | During migration, SMC can obtain the disk partition structure of the migration source and automatically generate the destination disk partition when creating a migration task. This accelerates data transmission during the migration.
|
Intermediate Instance | Do not interfere with intermediate instances. To run a migration task, SMC creates a temporary intermediate instance named Note If you select a destination instance, the destination instance is an intermediate instance. |
IP Address | After the migration, the IP address will change. If the service involves the configuration of the IP address, modify it after the migration. |
Underlying hardware | After the migration, the underlying hardware of the system changes, which may invalidate the licenses of some applications bound to the hardware. |
Prerequisites
The preparations for server migration are completed. For more information, see Prepare for migration.
Container Registry is activated, and an image repository is created. For more information, see Create a repository and build images.
The RAM role required by the SMC intermediate instance is created. For more information, see Create a RAM role.
Configure the following key parameters for the RAM role.
Select Trusted Entity: Select Alibaba Cloud Service.
Role Type: Select Normal Service Role.
Select Trusted Service: Select Elastic Compute Service.
You have created a custom policy that meets the requirements of container image migration and authorized the policy to a RAM role. For more information, see Create custom policies and Grant permissions to a RAM role.
Procedure
Import the information about a migration source.
Step 2: Create a migration task
Verify the migration results
If Migration Status is Completed, the migration is successful.
After the migration is successful, an Alibaba Cloud container image is generated. You can use the container image to deploy container applications. To clear your disks, perform the following steps:
Create an ACK cluster. For more information, see Create an ACK dedicated cluster.
In the Actions column of the migration source, click Deploy Application. The Create Application page appears.
Create an application. For more information, see Create a stateless application by using a Deployment.
After the server is migrated, you must verify the data to ensure data integrity and correctness. For more information, see the How do I check my system after I migrate a Linux server?
NoteIf a domain name has been bound to the source server, the public IP address of the source server will change after the migration. You must resolve the domain name to the new public IP address of the source server. For more information, see Add a website.
If Migration Status is Error, the migration task fails. In this case, you need to troubleshoot the issue and try again:
In the Actions column, click Troubleshoot Errors and fix the error based on the error code and error message. For more information, see FAQ and Errors occurred during a server migration.
On the Migration Tasks page, click Retry Task.
The migration job resumes from the point at which it was stopped.
ImportantIf the intermediate instance is released, you must create another migration job. For more information, see the What do I do if I release an intermediate instance by accident? section of the "FAQ" topic.