MICHAEL COLEMAN: Hi, I'm Mike Coleman, a developer advocate
here at Google Cloud.
In this video, I want to introduce
you to Migrate for Anthos.
Migrate for Anthos is a set of tools
that inspects existing workloads running in virtual machines
and automatically creates the needed container
artifacts for modernization.
Let me break down that last sentence into two parts
and talk separately about where these virtual machines might
be running and what types of artifacts Migrate for Anthos
creates.
Migrate for Anthos can migrate both Windows and Linux
applications.
Windows applications can be running on a Google Compute
Engine VM.
In addition to Google Compute Engine,
Linux applications can also be hosted on-prem
with VMware vSphere, AWS EC2, and Azure VMs.
In Migrate for Anthos, where your VM currently resides
is called the migration source.
For this video, the source will be an application running
in a VM on Compute Engine.
The output from Migrate for Anthos
is a comprehensive set of artifacts
that you can use to deploy your newly
containerised application.
These artifacts include a Kubernetes YAML
file that you can use to create Kubernetes
deployments and services, a Dockerfile that
can be used to create a new container image,
and other YAML files that describe
what was actually migrated.
Once you have these artifacts, you
can deploy the containerised version of your application
to an Anthos cluster or to the various flavors of Google
Kubernetes Engine, including GKE running
on Google Cloud, on-prem, or on AWS.
So you have an application running on a supported source.
And you can use Migrate for Anthos
to get it running in a container.
But why would you do that?
There are several key benefits to migrating your workloads.
The first is density.
Containers are much lighter weight than VMs,
since they don't contain the operating system,
and therefore, require considerably fewer compute
and memory resources.
This in turn allows greater density
of workloads across your clusters, fine-grained resource
allocations and overall lower infrastructure costs.
Another benefit is security.
GKE offers automatic operating system upgrades,
freeing you from the burden of maintaining your operating
system.
You can also augment legacy apps with modern services.
GKE allows you to leverage platform add-on services
to [? seemingly ?] integrate up-to-date functionality
with existing apps.
For instance, you can take advantage of Istio
on GKE or ASM on Anthos to automate network and security
policies, without changing your application code.
Additionally, you can leverage Cloud Logging
and Cloud Monitoring with your applications.
Unified policy and integrated resource management.
GKE allows you to focus on managing applications, not
infrastructure.
It offers the power of declarative desired state
management with powerful tagging strategies and selector
policies.
You can also move to modern image-based management
and orchestration.
Migrate for Anthos offers a unique capability
to extract an application from the VM workload
and construct a Docker image and related artifacts,
which in turn, allows you to modernize the application
lifecycle and operations management.
This could include integrating with a CI/CD pipeline,
using tools like Cloud Build to implement day 2 maintenance
procedures.
Furthermore, image-based management
enables customers to use GKE to perform
rolling updates, dynamic scaling, self-healing,
and more.
So now you have a general idea of what Migrate for Anthos
does and why you might choose to use it,
let's jump into an actual migration.
Migrate for Anthos has three primary components--
the Discovery tool, which assesses
how successful a migration of a given application might be;
the Processing Cluster, a Kubernetes cluster
that is used to examine the source VM
and create the migration plan, as well as execute
the actual migration; and migctl, a command line tool,
like kubctl, for interacting with the processing cluster.
Migctl is already installed in Cloud Shell.
A migration generally consists of the following steps.
And don't worry if you're not sure of what each
of these steps actually means.
We're going to get into that as we
move through this video series.
First, you need to create a Google project,
set up service accounts, and enable appropriate APIs.
Next, you create a migration processing cluster.
Then you go into the process of choosing and qualifying
your targeted workload.
Once you've done that, you can define your migration source,
using migctl to create a migration plan.
Then you adjust that migration plan to ensure
that it meets your needs.
Then you create the deployment artifacts.
And then you can deploy your newly containerised
application.
In the rest of this video, I'm going
to talk about the first two steps,
since they are largely the same whether you are deploying
Linux or Windows applications.
I will cover the remaining steps in subsequent videos.
Now that we have the migration process laid out,
let's jump into setting up the prerequisites for a migration.
Migrate for Anthos requires two service accounts.
The first service account is used by Migrate for Anthos
to access Container Registry and Cloud Storage.
You will use this service account
when you install the Migrate for Anthos components.
And it requires storage admin permissions.
The second service account enables Compute Engine
as a migration source and it requires Computer Viewer
and Computer Storage admin roles.
I will actually create this service account
in a follow-on video, but I wanted
to make sure you were aware of it.
In addition to the two service accounts,
you will enable the following APIs
that are shown on the screen.
The next prerequisite we need to deal with
is the Processing Cluster.
As mentioned before, Processing Cluster
is a GKE cluster running the actual code
that analyzes the source VM and creates the deployment
artifacts.
So I will create a one-node cluster here in the console.
The cluster itself is a pretty standard cluster.
We're going to name it Processing Cluster.
We're going to put it in US-WEST2,
which is the same location as my VM that I'm going to migrate.
Under the default pool, we're going
to change that to one-node.
We only need a single node.
And then for the actual nodes, just a couple of things.
Ubuntu image type and the N1 standard for machine type.
So with those configurations, we're ready to click Create.
And that will go off and that will build our cluster.
Now this is going to take a couple of minutes.
So we'll fast forward the video and we'll check back
in when that's finished.
OK, it looks like the processing cluster is ready to go.
So the next step is to actually install
the Migrate for Anthos components.
So we'll come up here.
We'll click into Anthos, Migrate To Containers.
We'll come up here.
And we're going to add a processing cluster.
So click Add Processing Cluster.
And we're going to come down to Linux workloads.
And we're going to select that processing cluster we just
created.
Click Next.
Then we're going to run a series of commands in Cloud Shell.
The first one is going to be to enable
the APIs I mentioned before.
So we'll copy that, paste that in,
and those APIs will get enabled.
The next step is to go ahead and create the service
account that's going to allow us access to the Container
Registry and the storage--
Cloud Storage.
So we'll paste that in and create that service account.
Then we're going to go in and we're
going to assign the storage admin
role to that service account.
So we'll paste this command in.
That will create the role binding.
Then we're going to go in and we're
going to download the JSON key, so that we
have that to authenticate to the necessary services
as we go forward.
And then finally, let's clear the screen.
It's getting a little crowded.
I'm going to go ahead and I'm going
to start the installation process of actually creating
the Migrate for Anthos components on the cluster.
So using migctl, I do a migctl setup install.
And it goes through and it adds all the necessary components
to perform the actual migration.
This will take just a couple of seconds to finish up.
All right.
So now I can run migctl doctor and that'll tell me
the status of my installation.
OK, let's check again here with migctl.
And migctl is reporting back that the deployment
has completed successfully.
And we're now ready to perform an actual migration, which
we're going to do in our next two videos.
We're going to have one on migrating
Linux applications and the other on migrating
Windows applications.
To recap, in this video, you learned
the benefits and features of Migrate
for Anthos, as well as how to configure the prerequisites.
Be sure to like and subscribe, because we'll
be posting subsequent videos in the series, including how
to migrate Linux and Windows applications,
as well as best practices for evaluating your applications
and what considerations you need to be aware of when
planning a migration.
And to get started on Migrate for Anthos today,
visit cloud.google.com/migrate/anthos.