From the multi-instance choice to the architecture prototype

Lilian Reyes
Apr 12, 2017 · 6 min read
Designed by Freepik

It has been almost two months since the decision to go for a multi instance architecture was made, and since then the technical track has focused on the much needed groundwork to enable such architecture.

High level, global architecture

The multi-instance architecture will allow each Greenpeace National / Regional office (NRO) to have its own customisable Wordpress instance. This means the infrastructure will have some services that are shared or centralised, and others that are distributed per each NRO.

High level multi-instance architecture for Planet 4

Shared services

Some services will be centralised to serve all NROs, such as continuous integration, unit testing and monitoring services. This is needed to ensure overall consistency and quality across the platform, while at the same time reduce the maintenance needed for each office. The majority of the tools intended to support each of these shared services have been reviewed and tested. Some are still going through selection review. Here is a map of the shared services and tools explored so far:

Shared services and tools exploration map for Planet 4

NRO services

Each NRO will have 3 different Planet 4 pods or environments: a testing environment to run the automated tests and functional manual testing, a staging environment to perform user acceptance testing (UAT) and a production environment, where the end user platform will sit open to the public.

Each one of these environments will be hosted either on 2 containers or 2 webheads (this will depend on the hosting architecture selection), and will be supported by a high availability key value database (Redis Sentinel) to handle sessions. Below a representation of how Planet 4 local instances architecture will look like.

Planet 4 local architecture

Infrastructure deployment tool

The new Greenpeace websites will be deployed on Google Cloud through Google deployment manager. The IT team explored three types of tools to deploy and manage Planet 4 infrastructure in a reproducible, predictable, scalable and continuously testable way. These are:

We were looking for a tool that supports automation, has version control, supports infrastructure changes and has scalable deployments to multiple nodes. Both the deployment manager and Terraform suit this tasks but due to the problems Terraform has with the current version of the Google Kubernetes Engine API, deployment manager is the option that seem to fit better Planet4 requirements at this moment. GDM automates creation and management of the platform, allowing the infrastructure to be managed as code and including descriptive information to track changes.

Hosting architecture

At this stage the final hosting architecture of the website is not decided yet. Two different approaches have been explored, deployed and tested in parallel to measure performance, high availability and scalability of the website:

from Docker.com

Both approaches have been set up in Google cloud due to high renewable energy rankings and high availability capability and the option to allow users to be spread across instances in different Google cloud zones in the same region.

A Wordpress instance has been set up on each architecture and performance tests are about to be executed on both to see how each setup behaves under stress conditions. The architecture that will perform the best and facilitate long term maintainability will be the chosen one. These tests are critical to ensure Planet 4 will have the right setup to support high volumes of traffic as that from Greenpeace.org audience or bigger.

Continuous Integration and Testing

A Jenkins server has been set up to start building the integration pipeline and configure the jobs needed to automate the deployments and run the automated tests. Jenkins was chosen due to its high possibilities of integration with other tools and its custom configuration available.

At the same time, two performance testing tools have been reviewed to see which one can better accomplish the types of testing we intend to do. JMeter and Gatling were considered and the choice is currently leaning towards Gatling, mostly due to its ease of use for scripting and its reporting abilities.

Software architecture

Progress on the software architecture has also been made. This baseline work will save us some time and help accelerate the roll-out process once the functional specifications of the websites are ready.

Planet 4 software architecture. Illustration by Remy

As simplified in the scheme above, the idea is to leverage multiple tools to automate as much of the Planet 4 deployment as possible:

We have a lot to do. We are in the process of hiring a system administrator, PHP Developer, Front end developer and a freelance graphic designer.

The Planet 4 project offers you the chance to innovate fearlessly. Please feel free to apply and join the team.

You can also join the team on volunteering basis. If any of these areas of work interest you please fill this form and tick the “Technical track”, and we will drop you a line (of code) soon.

Also, we’d love to hear your comments and receive feedback to improve the technical approach of this project. Please add your comments below or send an email to the Google group.

Written in collaboration with Remy, Larry Titus and Diego Lendoiro.

Planet 4

Planet 4 is the codename for the complete redesign of…

Planet 4

Planet 4 is the codename for the complete redesign of Greenpeace.org. This project is developed using open principles, and this Medium Publication will be the central hub for news and updates pertaining to the Planet 4 project. Learn more at www.greenpeace.org/p4

Lilian Reyes

Written by

Software scrum master, organiser and environmental activist

Planet 4

Planet 4 is the codename for the complete redesign of Greenpeace.org. This project is developed using open principles, and this Medium Publication will be the central hub for news and updates pertaining to the Planet 4 project. Learn more at www.greenpeace.org/p4

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store