Trading places: Lush’s website migration story

This week sees the return of the Google Cloud Next conference. Used by Eric Schmidt and the bosses over at Google to promote their Google Cloud Platform (GCP) and other offerings to large businesses, it may be a surprise to know that cosmetic company Lush will be one of the keynote companies.


The reason behind the unusual pairing is simple. At the end of last year, Lush migrated the entire ecosystem of 17 global eCommerce websites, onto Google Cloud. An initiative Lush hopes will bring us one step nearer to our ambition of being more sustainable, ethical and open source with our technology.

"When I first set the engineering team the challenge of migrating to Google Cloud, we had around 22 days,” starts Lush’s Chief Digital Officer Jack Constantine. “This decision was for stability, maintenance, cost and to align more with our long term ethics. With our busiest trading period in full flow I think the team thought I was crazy. Every single person gave 100% to get the job done, and that's why I'm speaking at the Google Next conference - to show what can be done with the right challenge and the right people"

Roll back to early December 2016; the cosmetic company's busiest trading period, and also the time when Lush's website platform provider’s contract was due for renewal. At the same time, the Lush Digital team were starting to outline the guiding ethics that they wanted to put in place; these would include Ethical Data, Open Source and Ethical Hardware.

This combination of events was the catalyst for one of the biggest technical challenges ever faced by with the engineering and development team at Lush.

“Moving from a PaaS (Platform as a Service) to an IaaS (Infrastructure as a Service) has always been on the cards for Lush as we explored new technologies and architectures,” explains Ryan Kerry, head of engineering for Lush and speaker at the Google Next event. “Myself and senior engineer Simon Ince attended Google NEXT 2016 in London after assessing Public Clouds and doing a lot of work with containers and Kubernetes. We got a glimpse into what we as a business were missing, firstly from a technology perspective and from how it aligned against our business ethics. The findings were presented back to the business along with a plan of action for the next financial year to consider a migration away from our then platform supplier.”

What’s the cloud?

Ryan and Simon presented the idea of moving to Google Cloud. The Cloud has become somewhat of a buzzword of late, especially within technology circles. For those unfamiliar with the concept, Cloud computing links your computer with a remote server, via an internet connection. The remote server does all the ‘heavy lifting’ but is led by your computer. This way you can access the same information from many devices (as the information is not stored on any one, but on the remote server). The additional benefit for Google Cloud, is that Google have committed the cloud to be 100% powered by renewable energy sources by end of 2017.

So how did the move to Google Cloud begin?

“It was decided that we did not want to renew with our current platform provider and the order to carry out the migration before the 23rd December 2016 was issued,” Ryan starts.

“We engaged with Google Cloud direct and Ancoris, as they were our current supplier of Google Products into the business, to look at a plan of action to achieve the target migration date. After a few intense sessions with our internal engineering team, Google, Bashton and Ancoris, architecting out our global infrastructure we had an extremely aggressive plan of action where there was no room for an option B.”

Senior engineer Dan Richards continues: “The project entailed moving our suite of eCommerce sites from a legacy hosting platform with Acquia to Google Cloud. The eCommerce suite consisted of multiple groups of Drupal based applications powering 17 separate Lush websites across the world. The groups of Drupal apps consisted of:

  • 3 Drupal installations per country (website, order store, order store archive)

  • A queue management system per region

  • A stock management system per region

  • A global content repository

  • A global customer care platform

“The migration project was split into two key areas; infrastructure and data. Firstly we had to create an entirely new infrastructure of web servers, database servers, load balancers etc. This in itself is a large piece of work and would ideally take longer than the 22 days we had available; for initial specification, testing and refinement.

“The second area was the actual migration of data and code. We were able to deploy the Drupal applications to the new hosting environment using a continuous integration system based on Jenkins. But the actual databases had to be downloaded from Acquia into Google Cloud Storage and then manually restored into Google Cloud SQL instances. Given the amount of databases and size of the data this took a considerable amount of time.”

Start as we mean to go on

Faced with a project full of unknowns - both inside the team and inside the support teams (no other company had ever attempted such a big migration in such a short amount of time) - the team had no choice but to throw themselves in head first.

“One of the key challenges was the lack of visibility of the incumbent technology stack we had,” explains Dan. “Given the slightly aggressive way that our previous platform provider protected their platform we had very little knowledge of the exact configuration and optimisations they had put in place for MySQL, PHP, Memcache, among other things. This meant that when spinning up the new infrastructure on GCP we had to make educated guesses - some of which did not turn out to be correct. We had to go through a process of trial and error to work out what was right for us.”

Dan continues: “There was a point, about eight days before the existing contract ended, that I thought we wouldn’t make it. At that point we had no working web servers, no code deployment process, and no means of testing whether the new platform would stand up to the Christmas peak traffic. But the team pulled off a miracle, worked some very very late nights and when it came down to it we were ready with about a day to spare.”

With such a tight deadline for the technical work, Ryan points out that the next steps involve making sure that the platform is as stable and secure as possible. “The next phase is looking at optimising our infrastructure to ensure we are getting the most out of it, because as you can imagine, migrating that amount of infrastructure in a short time there are a few bits that need tweaking still - we will then look at moving our architecture from Google Compute Engine over to Google Container Engine (GKE) to make the most of containers, kubernetes and our goal of moving to a service orientated architecture.”


The additional benefit for Google Cloud, is that Google have committed the cloud to be 100% powered by renewable energy sources by end of 2017

Comments (0)