Moving your infrastructure to the cloud has many advantages: managed services, cost control, and more flexibility to name only a few… But it is easier said than done. You’ll need time, money, and experience to understand the impact and design your migration plan.
I am Justin, Solutions Architect at Scaleway, and I've spent the last 15 years of my life deploying, managing, and consulting about IT infrastructures. Here are some best practices on cloud migration I learned along the way.
Redesigning your legacy
The first thing to implement when moving your legacy to cloud-native practices is to separate your existing infrastructure into three different parts: the front, the back, and your database. To do so, you must understand where you come from and what kind of legacy you are dealing with. There are two main types of legacies:
The legacy you made from scratch
At the time, you didn’t automate the deployment of your OS and your applications. So your priority will be to find the knowledge back. You may ask yourself “how can I reinstall this application?” or even “how does it work?”
For that, know that certain tools allow you to copy and paste your content of your server from one server to another. You can also retro engineer your installation.
So, if you have never automated an infrastructure, the cost of migrating your old infrastructure might match that of creating a brand new one. Here, the time and money you spend to build everything back will be higher than for other migration scenarios.
The already automated infrastructure legacy
For teams with entirely automated infrastructures (with scripts to install web servers, databases, etc.), a server is a server. The easy solution might be to reinstall what they had because they had the script.
This migration will not require too much energy or money but you won’t be able to enjoy what the cloud has to offer if you rehost. It’s like changing infrastructure.
Now that you understand where to start, let’s see what your options are.
Rehosting, replatforming & refactoring
Rehosting - or lift & shift
Rehosting might seem like the most relevant choice: cost-effective, no code change, no architecture change. Rehosting has little to no impact - it basically means that you move the application into the cloud as it is, without any modification. However, it doesn’t allow you to take full advantage of what the cloud has to offer.
In some cases, it could be a good alternative if you need to migrate quickly, but you should not stop your migration there..
Replatforming is quite similar to rehosting applications on the cloud but you will need to perform a few modifications on the application to enjoy the cloud functionalities.
The modifications will mainly impact the configuration (changing the address, etc.) or the way the application scales, by partly automating your process.
This is where you update your applications’ architectures and alter them in depth. Refactoring is the most complex cloud migration strategy.
You may have to make deep changes to your code and architecture, rebuild your deployment pipeline, and carefully test your applications to avoid regressions.
But you will be able to take full advantage of the cloud services (Serverless, Managed Kubernetes), microservices, infrastructure-as-code, containerization and cost optimization.
Best practices to replatform
You can also refactor your application but that would be a whole topic for another article.
Stop wasting your time scaling your application by yourself, let the infrastructure do it for you.
Instead of going to your console to order more resources, using IaC tools such as Terraform enables you to develop faster, deploy in a more reliable way, and ensure high quality.
Version control is an important part of IaC. Since they are files, they can and should be managed by a source control system like any other software source code.
For instance, Terraform is an open-source tool which deploys your infra with an added layer of abstraction.
Benefits: You don’t need to know the provider-specific commands to deploy a resource, you just have to understand how to describe the architecture you want to deploy in a human-readable way.
Deploy or redeploy your code
Instead of deploying your code yourself, and handling all the constraints - such as finding the right time to do it, warning teams and clients, etc. - you can automate the chain of deployment of your application.
By automating the packaging, the tests, and the deployment, you’ll be able to deploy in a quick & reproducible way on different environments (test, dev, prod, etc.).
CI/CD practices will help define processes for a quicker iteration, reducing the margin for human error. You will be able to allocate your spare time to your critical tasks.
What benefits can I get from the cloud now?
Moving your app to the cloud is a great step to start optimizing your infrastructure with cloud products. With a whole new world ahead, and spare time now that you don’t have to maintain your VM yourself, here are a few ideas on what you could do.
Focus on your product and let your cloud provider handle the rest.
If you sell chairs online, why bother with self-managed databases when you could let your cloud provider manage your databases, do the hard work, and let you focus on your mission.
The main advantage of the cloud is that it makes your application more flexible and scalable. You can directly use products to do so - such as Kubernetes, which allows auto-scale, or Serverless, which can scale from zero to many. Or you can design your application in a way that will make it easy to use the right amount of resources placed where you need it.
Cloud products allow you to only consume and pay for the resources you need so your billing is as optimized as possible.
More focus and a happier team
You’ll be able to help your engineering team focus more on your product and optimize your application. Enjoy better security, availability, and free your time to focus on tasks that bring more value to your users.
Is a migration worth the investment?
Migration is an investment for your future but, while moving to the cloud will require a bit of time, money, and training, it will pay off in the future.
We wanted to share our migration strategies with you, so you have all the tools to find one that’s just right for you. Just know that it can be done one step at a time. And if you have questions about your migration, you can reach out to us.
How to leverage the benefits of both the public and the private cloud? How to build a IaaS infrastructure on top of dedicated servers that fits your cloud ecosystem and processes?
SaaS solutions are mainly built on two types of architectures: Multi-instance on one side and multi-tenant on the other, “tenant” refers to the team or organization of your customers.