Skip to content

1.0 GovCMS Platform

Joseph Zhao edited this page Jun 16, 2020 · 1 revision

The GovCMS hosting platform is designed to host Drupal CMS websites and support continuous deployment. It uses containerisation to segregate projects and scale to meet traffic demands, as opposed to traditional shared, virtual or dedicated hosting.

On this page

Main components

The key components of the GovCMS platform are described here in point form.

  • GitHub is used for public (open source) code where possible.
  • GovCMS has its own private instance of Gitlab for CI and private repositories.
  • Your project runs on individual Docker containers (for Nginx, PHP, MariaDB, etc). The base images are hosted publicly.
  • As a first principle, all projects run independently (they don't share services).
  • Where possible, the same dockers images are the basis for local, testing and production containers.
  • Lagoon by Amazee.io is the collection of services that co-ordinates the moving parts in the cloud.
  • OpenShift by Redhat is responsible for deploying Docker containers onto AWS, under instruction from Lagoon.
  • Lagoon and OpenShift are not required for local development. Local development uses Docker Compose.

Diagram

This diagram gives an overview of how the elements of the GovCMS platform fit together.

 I                      site 1      site 2      site 3     site 4   <---+ Public facing websites,
 N                        ^           ^           ^           ^           each of which is a
 T                        |           |           |           |           segregated project on
 E                        |           |           |           |           the GovCMS platform
 R                   +---------------------------------------------+
 N                   |    Akamai Content Delivery Network (CDN)    |
 E                   |   (DDoS protection, speed + uptime boost)   |
 T                   +---------------------------------------------+
                          ^           ^           ^           ^
                          |           |           |           |
    +--------------------------------------------------------------+
 G  |                | php     | | php     | | php     | | php     |  
 O  |                | +-----+ | | +-----+ | | +-----+ | | +-----+ |           
 V  |    Lagoon      | nginx   | | nginx   | | nginx   | | nginx   |  <--------+
 C  |                | +-----+ | | +-----+ | | +-----+ | | +-----+ |           |
 M  |                | redis   | | redis   | |         | | solr    |           |
 S  |                +---------------------------------------------+           |
    |                |                                             |           |
 P  |                |   OpenShift (Kubernetes, Docker images)     |      ----------------------
 L  |                |                                             |      The same Docker images
 A  +--------------------------------------------------------------+      are used locally as in
 T  |                                                              |      the cloud. This way,
 F  |                  Amazon WebServices (AWS)                    |      developers get the most
 O  |             including RDS for mariadb databases              |      accurate possible
 R  |                                                              |      environment to test in.
 M  +--------------------------------------------------------------+      ----------------------
                                  |                                            |
                                  |                                            |
    +--------------------------------------------------------------+           |
    |              GitLab (privately hosted)                       |           |
    |       Testing, Continuous Integration (CI), some code        |           |
    +--------------------------------------------------------------+           |
                ^                                                              |
                |                                                              |
                |                    local1.com    local2.com   local3.com     |
 L      +---------------+          +-------------------------------------+     |
 O      |               |          | php       | | php      | | php      |     |
 C      | Local working |          | +-------+ | | +------+ | | +------+ |     |
 A      | files on      |          | mariadb   | | mariadb  | | mariadb  |  <--+
 L      | on your PC    | +----->  | +-------+ | | +------+ | | +------+ |
        |               |     |    | nginx     | | nginx    | | nginx    |
        +---------------+     |    | +-------+ | | +------+ | | +------+ |
       / + + + + + + + + \    |    | test      | | test     | | test     |
      / + + + + + + + + + \   |    +-------------------------------------+
      =====================   |    |      Docker (Docker Compose)        |
                              |    +-------------------------------------+
                              |
                              |        +----------------+
                              |        |                |
                              |        |  Github        |
                              |        |  (public)      |
                              +----->  |                |
                                       |  open source   |
                                       |  code where    |
                                       |  possible      |
                                       |                |
                                       +----------------+

Services

Some more information about the key services we use.

OpenShift is a security-focused open source container application platform based on top of Docker containers, and is a tool to automate the build, deployment, and management of enterprise applications on Kubernetes. The OpenShift Container Platform is supported and maintained by RedHat, providing stability for version upgrades as well as managing any security patches.

Kubernetes is an open source orchestration system, originally created by Google, for automating the deployment, scaling, and management of containerized applications, eliminating many of the manual processes involved in running at scale.

Kubernetes will automatically resolve issues with any container, site or availability zone. Self-healing capabilities ensure automated recovery of individual sites, or in the most extreme case, entire physical data centers (availability zones).

Lagoon from Amazee.io is made up of a number of interconnected open source services working together on OpenShift - at a high level, these services and tools include things like GraphQL API, Rabbit MQ, Ansible scripts. By using Docker Compose locally, when you push your repository Lagoon determines what images to deploy for you from the same configuration files, which means your remote hosting uses the same images as your local setup.

GitLab is an open source Git repository manager with issue management, version control, code review, monitoring, continuous integration and continuous deployment.

In the context of GovCMS hosting, 'GitLab' refers to the privately-hosted instance of GitLab managed by the Department of Finance, not the public website 'https://www.gitlab.com'.

GitLab will also be used to manage the release and patch process – allowing precise control over the availability of GovCMS releases, with the ability to create on-demand test environments for agencies to test upcoming features and releases.