Skip to content
Snippets Groups Projects

test rollout procedure (test, acceptance, production)

Merged Nico Vermaas requested to merge dev-nico into master
4 files
+ 42
21
Compare changes
  • Side-by-side
  • Inline

Files

+ 30
19
@@ -30,15 +30,19 @@ These diagrams show the current implementation and are kept up-to-date.
@@ -30,15 +30,19 @@ These diagrams show the current implementation and are kept up-to-date.
![](atdb/docs/ATDB-LDV%20Workflow%20Diagram.png)
![](atdb/docs/ATDB-LDV%20Workflow%20Diagram.png)
## Test Environment on sdc-dev.astron.nl:
## Deployed Instances
### main GUI:
### main GUI:
* https://sdc.astron.nl:5554/atdb/
* test: https://sdc-dev.astron.nl:5554/atdb/
 
* acc : http://dop457.astron.nl:5554/atdb/
 
* prod: https://sdc.astron.nl:5554/atdb/
### admin interface:
### admin interface:
* https://sdc.astron.nl:5554/atdb/admin/
* test: https://sdc-dev.astron.nl:5554/atdb/admin/
 
* acc : http://dop457.astron.nl:5554/atdb/admin/
 
* prod: https://sdc.astron.nl:5554/atdb/admin/
### REST API
### REST API (prod)
serializers:
serializers:
* workflows: http://sdc.astron.nl:5554/atdb/workflows/
* workflows: http://sdc.astron.nl:5554/atdb/workflows/
* tasks: http://sdc.astron.nl:5554/atdb/tasks/
* tasks: http://sdc.astron.nl:5554/atdb/tasks/
@@ -56,11 +60,31 @@ Return the sum the sizes of all tasks with a given list of statusses
@@ -56,11 +60,31 @@ Return the sum the sizes of all tasks with a given list of statusses
![](atdb/docs/ATDB-LDV%20-%20Deployment%20Diagram.png)
![](atdb/docs/ATDB-LDV%20-%20Deployment%20Diagram.png)
### CI/CD (semi) automatic deploy in Docker
### CI/CD (semi) automatic deploy in Docker
For the `master` branch there is a CI/CD pipeline in place which builds and deploys the backend at https://sdc.astron.nl:5554/atdb/
A gitlab CI/CD pipeline will automatically build and semi-automatically deploy ATDB on several targets,
 
depending on the name of the branch.
 
 
* `master` => test: https://sdc-dev.astron.nl:5554/atdb/
 
* `acceptance`=> acceptance: http://dop457.astron.nl:5554/atdb/
 
* `release` => prod: https://sdc.astron.nl:5554/atdb/
The deploy step requires pushing the 'play' button in the gitlab pipelines section.
The deploy step requires pushing the 'play' button in the gitlab pipelines section.
This is done to not have a mandatory deploy for every minor commmit.
This is done to not have a mandatory deploy for every minor commmit.
 
## The Procedure:
 
* commit changes to 'feature branch'
 
* gitlab: merge with `master`
 
* pipeline will start running: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines
 
* if 'passed' then click `>>` on the 'deploy' stage, this will deploy to test on sdc-dev
 
 
* gitlab: merge with `acceptance`
 
* pipeline will start running: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines
 
* if 'passed' then click `>>` on the 'deploy' stage, this will deploy to acceptance on dop457
 
 
* gitlab: merge with `release`
 
* pipeline will start running: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines
 
* if 'passed' then click `>>` on the 'deploy' stage, this will deploy to production on sdc
 
 
### Manual deploy in Docker (alternative to CI/CD)
### Manual deploy in Docker (alternative to CI/CD)
#### initial
#### initial
@@ -94,24 +118,11 @@ This is the procedure for that.
@@ -94,24 +118,11 @@ This is the procedure for that.
- when automatic build is finished, push >> to deploy
- when automatic build is finished, push >> to deploy
on sdc machine:
on 'test', 'acc' and 'prod' machine's:
> docker exec -it atdb-ldv python manage.py makemigrations --settings atdb.settings.docker_sdc
> docker exec -it atdb-ldv python manage.py makemigrations --settings atdb.settings.docker_sdc
> docker exec -it atdb-ldv python manage.py migrate --settings atdb.settings.docker_sdc
> docker exec -it atdb-ldv python manage.py migrate --settings atdb.settings.docker_sdc
## Postgres Database operations
### dump a copy of the database
> cd $HOME/shared
> docker exec -it atdb-ldv-postgres pg_dump -U postgres -O atdbldv > atdb_ldv.sql
### load a database (warning, this overwrites the database)
> docker exec -it atdb-ldv-postgres psql --command "drop database atdbldv"
> docker exec -it atdb-ldv-postgres psql --command "create database atdbldv"
> docker exec -it atdb-ldv-postgres psql -U postgres atdbldv -f /shared/atdb_ldv.sql
> docker exec atdb-ldv-postgres psql --command "grant ALL ON DATABASE atdbldv TO dbadmin;"
## Original ATDB Context diagrams
## Original ATDB Context diagrams
Similar diagram for ATDB-LDV will follow, showing the relationships with external services
Similar diagram for ATDB-LDV will follow, showing the relationships with external services
Loading