Deployment Guide for the Pipelines and the Web App#
Prerequisites#
-
Pipelines artefact
-
Web app artefact
Deployment#
Deploying the pipelines#
-
Be logged in to the user account corresponding to the required deployment environment (ie DEV, ACC, PROD etc).
-
Unzip the pipelines artefact.
-
Open the resultant directory.
-
Run
make deploy. This will perform a series of actions:-
deploy-images: Loads the images contained in the artefact, tags them as latest, and pushes them to the local docker registry. -
deploy-migrations: This unzips the migrations folder, and then runs the migrations against the database using one of the aforementioned docker images. -
deploy-pipelines: This unzips the pipelines folder, containing the Python source code for the pipelines, as well as service files such as thedocker-compose.ymlfile. It then moves the pipelines, starters, service files, and models into the correct locations on the server, and soft links the current directory to the latest version of the pipelines. The systemd service files are then moved to the correct location (/usr/local/lib/systemd/system/). The service timer is then enabled and started. -
deploy-scripts: This moves various housekeeping scripts into the correct locations on the server, generally under this corresponding user accounts’ home directories. It then sets the service timers for the scripts and their corresponding services to be enabled and started.
-
Deploying the web app#
-
Be logged in to the user account corresponding to the required deployment environment (ie DEV, ACC, PROD etc).
-
Unzip the web app artefact.
-
Open the resultant directory.
-
Run
make deploy. This will perform a series of actions:-
unpack: This decrypts the PGP encrypted archive, and then unzips the resultant archive. -
image: This loads the docker image file into docker. -
down: If there is a docker compose file present, this will bring down the docker compose stack. -
init: This will delete anything in the target directory, and then create a new empty directory. -
install: This will copy the service file (docker-compose.yml), as well as additional files such asappsettings.jsoninto the target directory. -
up: This will bring up the docker compose stack.
-