S3 Updates

Any software application has updates. So does the S3. S3 updates may include bug fixes, updates to existing modules, new modules and etc.

For most of the cases S3 Update mechanism will only include update of the Docker images (new versions).

In the S3 Deployment part of the guide we've created a docker-compose.yml file with a content that includes initial versions of the images:

version: '2'
services:
  web:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-web:sgw-20171201

...

  frontend:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-frontend:sgw-20171201

...

  backend:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-backend:sgw-20171201

...

  db:
    image: postgres:9.5

...

  auth:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-auth:sgw-20171201

...

  auth-db:
    image: postgres:9.5

...

  lrm-user-guide:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-lrm-user-guide:sgw-20171201
  highcharts-export-server:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-highcharts-export-server:sgw-20171201

To perform an update let's change the images (except postgres) to their latest production versions (sgw-prod-latest):

version: '2'
services:
  web:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-web:sgw-prod-latest

...

  frontend:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-frontend:sgw-prod-latest

...

  backend:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-backend:sgw-prod-latest

...

  db:
    image: postgres:9.5

...

  auth:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-auth:sgw-prod-latest

...

  auth-db:
    image: postgres:9.5

...

  lrm-user-guide:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-lrm-user-guide:sgw-prod-latest
  highcharts-export-server:
    image: registry.gitlab.com/metaphor/stratega-fm/fm-highcharts-export-server:sgw-prod-latest

Pull the latest images with a command:

docker-compose pull

You'll see an output like this:

Pulling db (postgres:9.5)...
Trying to pull repository docker.io/library/postgres ... 
9.5: Pulling from docker.io/library/postgres
Digest: sha256:9067a04c79390677d690c6e0f81fbcd3861f630fb4b769c50be8cbbfd8270586
Status: Image is up to date for docker.io/postgres:9.5
Pulling highcharts-export-server (registry.gitlab.com/metaphor/stratega-fm/fm-highcharts-export-server:sgw-prod-latest)...
Trying to pull repository registry.gitlab.com/metaphor/stratega-fm/fm-highcharts-export-server ... 
sgw-prod-latest: Pulling from registry.gitlab.com/metaphor/stratega-fm/fm-highcharts-export-server
Digest: sha256:8902c3f5a33767923ac5468ef1ea389479849b1578ce8b497a287c751baaead6
Status: Downloaded newer image for registry.gitlab.com/metaphor/stratega-fm/fm-highcharts-export-server:sgw-prod-latest
Pulling lrm-user-guide (registry.gitlab.com/metaphor/stratega-fm/fm-lrm-user-guide:sgw-prod-latest)...
Trying to pull repository registry.gitlab.com/metaphor/stratega-fm/fm-lrm-user-guide ... 
sgw-prod-latest: Pulling from registry.gitlab.com/metaphor/stratega-fm/fm-lrm-user-guide
Digest: sha256:d256c07694720b1e9721504c8886aa83b16459115644ea7d1522679520baf53a
Status: Downloaded newer image for registry.gitlab.com/metaphor/stratega-fm/fm-lrm-user-guide:sgw-prod-latest
Pulling auth-db (postgres:9.5)...
Trying to pull repository docker.io/library/postgres ... 
9.5: Pulling from docker.io/library/postgres
Digest: sha256:9067a04c79390677d690c6e0f81fbcd3861f630fb4b769c50be8cbbfd8270586
Status: Image is up to date for docker.io/postgres:9.5
Pulling auth (registry.gitlab.com/metaphor/stratega-fm/fm-auth:sgw-prod-latest)...
Trying to pull repository registry.gitlab.com/metaphor/stratega-fm/fm-auth ... 
sgw-prod-latest: Pulling from registry.gitlab.com/metaphor/stratega-fm/fm-auth
Digest: sha256:6965be3ed560d1a79e7f20b3863e934f2d609c59c021523c0402885880fc2a57
Status: Downloaded newer image for registry.gitlab.com/metaphor/stratega-fm/fm-auth:sgw-prod-latest
Pulling backend (registry.gitlab.com/metaphor/stratega-fm/fm-backend:sgw-prod-latest)...
Trying to pull repository registry.gitlab.com/metaphor/stratega-fm/fm-backend ... 
sgw-prod-latest: Pulling from registry.gitlab.com/metaphor/stratega-fm/fm-backend
Digest: sha256:3e0bbc19e4718b049b53bd34daa31c7568f2e3135873f39985528f892cc40d9c
Status: Downloaded newer image for registry.gitlab.com/metaphor/stratega-fm/fm-backend:sgw-prod-latest
Pulling frontend (registry.gitlab.com/metaphor/stratega-fm/fm-frontend:sgw-prod-latest)...
Trying to pull repository registry.gitlab.com/metaphor/stratega-fm/fm-frontend ... 
sgw-prod-latest: Pulling from registry.gitlab.com/metaphor/stratega-fm/fm-frontend
Digest: sha256:66816f0e09c8a623a9b28e6bcc77f37605cf7468ab2019b7791532f38802e333
Status: Downloaded newer image for registry.gitlab.com/metaphor/stratega-fm/fm-frontend:sgw-prod-latest
Pulling web (registry.gitlab.com/metaphor/stratega-fm/fm-web:sgw-prod-latest)...
Trying to pull repository registry.gitlab.com/metaphor/stratega-fm/fm-web ... 
sgw-prod-latest: Pulling from registry.gitlab.com/metaphor/stratega-fm/fm-web
Digest: sha256:c36dbf66659e5174a9975dfe87bddc9d3de96173c1c8107630111ca69b86995c
Status: Downloaded newer image for registry.gitlab.com/metaphor/stratega-fm/fm-web:sgw-prod-latest

In case there is an update to an image you'll see it downloading.

After pull is complete restart the application with the following command (no need to stop the application):

docker-compose up -d

This will recreate the containers with the newest images if necessary.

The application should be up and running.

This scenario will work most of the cases. In case there is an update with some special instructions a separate guide will be provided.

results matching ""

    No results matching ""