Public | Automated Build

Last pushed: 5 days ago
Short Description
Apache for Land/Insitu Copernicus
Full Description

Docker Orchestration for Copernicus Land Monitoring/In Situ

Installation

  1. Install Docker.

  2. Install Docker Compose.

  3. Install Rancher Compose

Usage

Development

In order to be able to edit source-code on your machine using your favorite editor, without having to do it inside a Docker container, you'll have to create a new user on your laptop with uid=500 and use this user for development:

$ useradd -u 500 zope-www
$ usermod -a -G docker zope-www
$ sudo su - zope-www

Now get the source code:

$ git clone https://github.com/eea/eea.docker.copernicus.git
$ cd eea.docker.copernicus/devel/land
$ docker-compose -f source-code.yml up

Start the application:

$ docker-compose up

Within your favorite browser head to http://localhost:8080,
add a Plone site and install the following add-ons:

  • EEA Plone buildout profile
  • Copernicus Theme
  • Land Copernicus Content-Types

Now you are ready to develop Plone Add-ons within src folder:

$ ls -l src/

Once you're done editing, restart the application and test your changes:

$ docker-compose restart

Deployment

Pre-requirements:

  • Rancher Compose
  • Within Rancher UI register min 1 hosts with label: copernicus=yes

Deploy in production

On your laptop do :

$ git clone https://github.com/eea/eea.docker.copernicus.git

$ cd eea.docker.copernicus/deploy/land
$ rancher-compose --project-name copernicus-land --env-file land.env up -d

$ cd eea.docker.copernicus/deploy/insitu
$ rancher-compose --project-name copernicus-insitu --env-file insitu.env up -d

See also Rancher tips and tricks
for info on how to restore Data.fs and blobstorage

Upgrade (Land)

  1. Release a new version of eeacms/plone-copernicus-land:

     $ git clone https://github.com/eea/eea.docker.plone-copernicus-land.git
     $ cd eea.docker.plone-copernicus-land
     $ git tag 2020-12-31
     $ git push --tags
    
  2. Update VERSION within .env files:

     $ cd eea.docker.copernicus/deploy/land
     $ vim land.env
     VERSION=2020-12-31
    
  3. Run the upgrade:

     $ rancher-compose --project-name copernicus-land --env-file land.env pull
     $ rancher-compose --project-name copernicus-land --env-file land.env up -d --upgrade --interval 90000 --batch-size 1
    
  4. Confirm that the upgrade went well:

     $ rancher-compose --project-name copernicus-land --env-file land.env up -d --confirm-upgrade
    
  5. Roll-back if the upgrade didn't go well:

     $ rancher-compose --project-name copernicus-land --env-file land.env up -d --roll-back
    
  6. Invalidate cache

     $ rancher-compose --project-name copernicus-land --env-file land.env restart memcached
    

Upgrade (Insitu)

  1. Release a new version of eeacms/plone-copernicus-insitu:

     $ git clone https://github.com/eea/eea.docker.plone-insitu.git
     $ cd eea.docker.plone-insitu
     $ git tag 2020-12-31
     $ git push --tags
    
  2. Update VERSION within .env files:

     $ cd eea.docker.copernicus/deploy/insitu
     $ vim insitu.env
     VERSION=2020-12-31
    
  3. Run the upgrade:

     $ rancher-compose --project-name copernicus-insitu --env-file insitu.env pull
     $ rancher-compose --project-name copernicus-insitu --env-file insitu.env up -d --upgrade --interval 90000 --batch-size 1
    
  4. Confirm that the upgrade went well:

     $ rancher-compose --project-name copernicus-insitu --env-file insitu.env up -d --confirm-upgrade
    
  5. Roll-back if the upgrade didn't go well:

     $ rancher-compose --project-name copernicus-insitu --env-file insitu.env up -d --roll-back
    
  6. Invalidate cache

     $ rancher-compose --project-name copernicus-insitu --env-file insitu.env restart memcached
    
Docker Pull Command
Owner
eeacms
Source Repository

Comments (0)