Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The purpose of this article is to describe how to update the backend (API) of HUMBLE.

Environments

There are several HUMBLE backend environments. All the environments are available as a container service (ECS) in AWS. Below the list of environments

URL API endpoint

Cluster

Service

prd-api.humble-online.com

Humble-multi-tenant

HUM-PRD

acc-api.humble-online.com

Development

HUM-ACC

test.humble-online.com

HUMBLE-Development

HUM-TST

cwd-prd-api.humble-online.com

CroonWolterenDrosProductieOmgeving

CWDProductieService

homij-prd-api.humble-online.com

Homij

HUM-HOM

Goto AWS to the Elastic Container Service (ECS) to see all the clusters and there details https://eu-west-1.console.aws.amazon.com/ecs/home?region=eu-west-1#/clusters

...

Branches

Before the update can be performed the latest version of the code must be committed to the appropriate branch.

...

Each commit creates a new repository file in the repository directory name as described. The Repo file is tagged with the commit number and pipeline id.

Pipelines

Pipelines Some pipelines are running automatically and can also others must be started by hand.

branch

Pipeline

Description

develop

build_and_deploy_test_api

Creates ECR Repo and restarts the ECS Service and task automatically.

Every night at 3 am the latest version will be deployed automatically.

release

build_and_deploy_acc_api

Creates ECR Repo and restarts the ECS Service and task automatically

master

master

Creates ECR Repo only. ECS Service and task is not automatically restarted

publish_to_escrow

.

master (ECR)

deploy_prd_api

Does not create ECR Repo.Deploy the latest master ECR Repo to the Multi Tenant Cluster. ECS Service and task automatically.

master (ECR)

deploy_prd_cwd_api

Does not create ECR Repo. Deploy the latest master ECR Repo to the CWD Cluster. ECS Service and task automatically.

master (ECR)

deploy_prd_homij_api

Does not create ECR Repo. Deploy the latest master ECR Repo to the Homij Cluster. ECS Service and task automatically.

Occasionally : Restart an ECS Service / Task using AWS

Note

Use this only when above mentioned Pipelines not working !

On the production API the new version must be installed by restarting the ECS Service and task.

  • Go to AWS ECS

  • Go to the cluster

  • Click on the Tab sheet Tasks

  • Check the checkbox and click on the Stop button

  • Read the popup message and click again on the red Stop button

  • The tasks will be stopped and restarted, the latest version of the ECR Repo will be loaded

Synchronize the database structure and data

The master database contains a set of data that must be synchronised with all the different environments. During the startup of the backend API the synchronise will be performed.

  • Between 00-06:00 am a complete synchronisation is performed meaning database structure and data.

  • Outside these times only the structure will be updated.

Synchronize data during the day

When new data is added to the Master database and the other API’s have to be synchronised an employee must do this by hand.

...