{"id":3355,"date":"2021-07-23T13:59:00","date_gmt":"2021-07-23T11:59:00","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=3355"},"modified":"2021-07-22T15:54:05","modified_gmt":"2021-07-22T13:54:05","slug":"the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/","title":{"rendered":"The great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure."},"content":{"rendered":"\n

\u201cLife is what happens to you while you’re busy making other plans\u201d<\/p><\/blockquote>\n\n\n\n

said John Lennon in his song \u201cBeautiful Boy\u201d. <\/p>\n\n\n\n

In this article, we are going to see that sometimes there are unpredictable situations that can occur and, even if there\u2019s an accurate and detailed plan, our strategy needs to change quickly.<\/p>\n\n\n\n

When moving to the Cloud from an on-premise environment, <\/strong>it is always necessary to refactor or re-platform your application so that you can fully take advantage of the new paradigm. Sometimes external factors can make your decisions change dramatically: you have to change everything to be able to achieve your goal.<\/p>\n\n\n\n

A couple of months ago a customer asked us to help him migrate his e-commerce websites from his current hosting provider to AWS: we made a plan for an on-prem to cloud migration following the \u201c7R\u201d rules<\/strong><\/a>.<\/p>\n\n\n\n

After an inventory of all systems and applications it turned out that a lot of refactoring<\/strong> and re-architecting<\/strong> was needed, no systems had to be repurchased, retained, relocated, or retired, the rehost option wasn\u2019t even considered because the customer was eager to change the infrastructure paradigm he was using, taking full advantage of the cloud in terms of elasticity, cost optimization, and operational efficiency.<\/p>\n\n\n\n

There was a huge amount of technical debt due to old operating systems, obsolete versions of programming languages, and end-of-life database releases. <\/p>\n\n\n\n

We were not scared: the project was challenging but the prerequisites were clear and the final infrastructure will use containerized applications<\/strong>, RDS<\/strong> databases, and a bit of Amazon CloudFront + Amazon S3<\/strong> static sites hosting. <\/p>\n\n\n\n

The big effort was on the customer\u2019s development team side (supported by us): every application had to be refactored to be stateless<\/strong> and to perfectly integrate with AWS Cloud Services<\/strong> (like using S3 to host 5 Terabytes of static assets).<\/p>\n\n\n\n

We agreed to kick-off the project after the Christmas sales period, giving the developers the opportunity to take confidence with the Cloud and be ready to quickly release bug fixes if needed during the traffic-intensive period. <\/p>\n\n\n\n

Everything was going fine until Murphy\u2019s law<\/a> kicked in: during Black Friday the hosting provider had a major outage, resulting in a total downtime of 2 days and causing a big loss of profit. <\/p>\n\n\n\n

Once the damage was done there were also other problems and the migration priority was changed to \u201cas soon as possible\u201d, with a deadline for the end of next month.<\/p>\n\n\n\n

It was obvious that an application refactor wasn\u2019t an option: the deadline required something quick and, possibly, not so dirty: the rehost option<\/strong> went back in the pool of possible solutions.<\/p>\n\n\n\n

To be able to rehost everything we needed a tool that could help us to migrate on-prem virtual machines to the AWS Cloud, giving us the ability to test them and keep data in sync until we wanted to pull the trigger to switch the production environment.<\/p>\n\n\n\n

A quick search led us to CloudEndure<\/strong><\/a>, an AWS company. <\/p>\n\n\n\n

CloudEndure gives you the ability to migrate physical hosts and virtual machines to the AWS Cloud, keeping data synchronized and giving the opportunity to test the resulting instance until the \u201ccutoff\u201d, when the migration is considered as complete.<\/p>\n\n\n\n

The workflow for a typical CloudEndure migration is:<\/p>\n\n\n\n

\"The
A typical CloudEndure migration workflow<\/figcaption><\/figure><\/div>\n\n\n\n

After a quick successful test using a common configuration to validate the tool (Ubuntu 20.04 virtual machines), we started with the customer environment. The first problems started to arise: some operating systems were way too old to be able to run on AWS Cloud<\/p>\n\n\n\n

We decided to do a replatform in a test environment<\/strong> using a Linux os release supported by CloudEndure and migrate them after validating that everything was working properly.<\/p>\n\n\n\n

After some trial and error to accommodate requirements for old libraries and supported operating systems our only possible choice turned out to be Ubuntu 12.04<\/strong>, which is also the minimum version supported by CloudEndure.<\/p>\n\n\n\n

Because of this, we were unable to take advantage of the last generation of ec2 instances, as there were missing drivers for the Nitro platform.  We had to use the m4 family for production use.<\/p>\n\n\n\n

Different instance families run on different virtualization platforms: Xen-based on older generation and KVM based on the newest. The newest generations also can take advantage of the Nitro Platform<\/a>.<\/p>\n\n\n\n

We were also unable to migrate the database to RDS because of the engine version; upgrading it would have required a change of some libraries used by the application framework with unpredictable results.<\/p>\n\n\n\n

Once we deployed the virtual machines to re-platform and adapt the application we were able to migrate them using CloudEndure, while data was kept in sync using rsync<\/strong>.<\/p>\n\n\n\n

Our workflow turned out to be:<\/p>\n\n\n\n

\"new
New migration workflow<\/figcaption><\/figure><\/div>\n\n\n\n

We will not enter into technical details of how rsync was used and the database dump\/restore process because they are pretty standard commands.<\/p>\n\n\n\n

After applying this plan everything worked fine with a scheduled downtime of 3 hours (due to the hosting provider storage that sometimes slowed down data transfer to ec2 instances); after a careful review, we were able to shut down the old virtual machines, giving the customer a more stable production environment.<\/p>\n\n\n\n

Takeaways<\/h2>\n\n\n\n

As often happens, this project took an unexpected direction. Nevertheless, we were able to quickly respond to the new needs. Even if we did not take any advantage of all the managed services and features available on the AWS Cloud, the good news is that now the original migration project can start and, finally, we can continue modernizing the application.<\/p>\n\n\n\n

Sometimes a “Lift and Shift” migration is required (or mandatory) because of external factors like time constraints, refactoring costs, or technical feasibility: always keep in mind that the cost of technical debt (leaving systems out of date, use old libraries and programming languages) is hidden but it will give you a big headache at some point in the future. <\/p>\n\n\n\n

For more information on how to refactor and re-architect your application take a look at the Twelve-Factor app site<\/a>: even if you are not planning to migrate to the Cloud it can help you to prevent a lot of trouble in the future! <\/p>\n\n\n\n

Have you ever faced something similar in your DevOps life? Tell us about your extraordinary feat!<\/p>\n\n\n\n

And see you again in 14 days here on #Proud2beCloud<\/strong>!<\/p>\n","protected":false},"excerpt":{"rendered":"

\u201cLife is what happens to you while you’re busy making other plans\u201d said John Lennon in his song \u201cBeautiful Boy\u201d.  […]<\/p>\n","protected":false},"author":13,"featured_media":3387,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[482],"tags":[527,525,529],"yoast_head":"\nThe great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure. - Proud2beCloud Blog<\/title>\n<meta name=\"description\" content=\"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An extraordinary on-prem to Cloud migration with CloudEndure\" \/>\n<meta property=\"og:description\" content=\"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/\" \/>\n<meta property=\"og:site_name\" content=\"Proud2beCloud Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-23T11:59:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-22T13:54:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.besharp.it\/wp-content\/uploads\/2021\/07\/migrating-with-cloudendure-en.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Damiano Giorgi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"An extraordinary on-prem to Cloud migration with CloudEndure\" \/>\n<meta name=\"twitter:description\" content=\"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/blog.besharp.it\/wp-content\/uploads\/2021\/07\/migrating-with-cloudendure-en.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Damiano Giorgi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/\",\"url\":\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/\",\"name\":\"The great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure. - Proud2beCloud Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.besharp.it\/#website\"},\"datePublished\":\"2021-07-23T11:59:00+00:00\",\"dateModified\":\"2021-07-22T13:54:05+00:00\",\"author\":{\"@id\":\"https:\/\/blog.besharp.it\/#\/schema\/person\/a9195473e4a658b45cb12d3df3fdf293\"},\"description\":\"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.besharp.it\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.besharp.it\/#website\",\"url\":\"https:\/\/blog.besharp.it\/\",\"name\":\"Proud2beCloud Blog\",\"description\":\"il blog di beSharp\",\"alternateName\":\"Proud2beCloud Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.besharp.it\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.besharp.it\/#\/schema\/person\/a9195473e4a658b45cb12d3df3fdf293\",\"name\":\"Damiano Giorgi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.besharp.it\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9a20b8c97250d4fb49857192f7e4bedf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9a20b8c97250d4fb49857192f7e4bedf?s=96&d=mm&r=g\",\"caption\":\"Damiano Giorgi\"},\"description\":\"Ex sistemista on-prem, pigro e incline all'automazione di task noiosi. Alla ricerca costante di novit\u00e0 tecnologiche e quindi passato al cloud per trovare nuovi stimoli. L'unico hardware a cui mi dedico ora \u00e8 quello del mio basso; se non mi trovate in ufficio o in sala prove provate al pub o in qualche aeroporto!\",\"url\":\"https:\/\/blog.besharp.it\/author\/damiano-giorgi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure. - Proud2beCloud Blog","description":"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/","og_locale":"en_US","og_type":"article","og_title":"An extraordinary on-prem to Cloud migration with CloudEndure","og_description":"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.","og_url":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/","og_site_name":"Proud2beCloud Blog","article_published_time":"2021-07-23T11:59:00+00:00","article_modified_time":"2021-07-22T13:54:05+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/blog.besharp.it\/wp-content\/uploads\/2021\/07\/migrating-with-cloudendure-en.png","type":"image\/png"}],"author":"Damiano Giorgi","twitter_card":"summary_large_image","twitter_title":"An extraordinary on-prem to Cloud migration with CloudEndure","twitter_description":"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.","twitter_image":"https:\/\/blog.besharp.it\/wp-content\/uploads\/2021\/07\/migrating-with-cloudendure-en.png","twitter_misc":{"Written by":"Damiano Giorgi","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/","url":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/","name":"The great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure. - Proud2beCloud Blog","isPartOf":{"@id":"https:\/\/blog.besharp.it\/#website"},"datePublished":"2021-07-23T11:59:00+00:00","dateModified":"2021-07-22T13:54:05+00:00","author":{"@id":"https:\/\/blog.besharp.it\/#\/schema\/person\/a9195473e4a658b45cb12d3df3fdf293"},"description":"An extraordinary on-prem to Cloud migration: CloudEndure comes to the rescue! How we used it in a quick&pretty migration to the AWS Cloud.","breadcrumb":{"@id":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.besharp.it\/the-great-escape-migrating-from-the-on-prem-to-the-aws-cloud-in-a-quickpretty-way-with-cloudendure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.besharp.it\/"},{"@type":"ListItem","position":2,"name":"The great escape: migrating from the on-prem to the AWS Cloud in a quick&pretty way with CloudEndure."}]},{"@type":"WebSite","@id":"https:\/\/blog.besharp.it\/#website","url":"https:\/\/blog.besharp.it\/","name":"Proud2beCloud Blog","description":"il blog di beSharp","alternateName":"Proud2beCloud Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.besharp.it\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.besharp.it\/#\/schema\/person\/a9195473e4a658b45cb12d3df3fdf293","name":"Damiano Giorgi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.besharp.it\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9a20b8c97250d4fb49857192f7e4bedf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9a20b8c97250d4fb49857192f7e4bedf?s=96&d=mm&r=g","caption":"Damiano Giorgi"},"description":"Ex sistemista on-prem, pigro e incline all'automazione di task noiosi. Alla ricerca costante di novit\u00e0 tecnologiche e quindi passato al cloud per trovare nuovi stimoli. L'unico hardware a cui mi dedico ora \u00e8 quello del mio basso; se non mi trovate in ufficio o in sala prove provate al pub o in qualche aeroporto!","url":"https:\/\/blog.besharp.it\/author\/damiano-giorgi\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/posts\/3355"}],"collection":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/comments?post=3355"}],"version-history":[{"count":0,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/posts\/3355\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/media\/3387"}],"wp:attachment":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/media?parent=3355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/categories?post=3355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/tags?post=3355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}