Skip to content
Snippets Groups Projects
Commit 355fc026 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

test rollout procedure (test, acceptance, production)

parent a9003216
Branches
No related tags found
4 merge requests!39Dev nico,!18Acceptance,!17pre-deploy to acceptance,!16test rollout procedure (test, acceptance, production)
Pipeline #9424 passed
......@@ -30,15 +30,19 @@ These diagrams show the current implementation and are kept up-to-date.
![](atdb/docs/ATDB-LDV%20Workflow%20Diagram.png)
## Test Environment on sdc-dev.astron.nl:
## Deployed Instances
### 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:
* 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:
* workflows: http://sdc.astron.nl:5554/atdb/workflows/
* 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
![](atdb/docs/ATDB-LDV%20-%20Deployment%20Diagram.png)
### 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.
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)
#### initial
......@@ -94,24 +118,11 @@ This is the procedure for that.
- 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 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
Similar diagram for ATDB-LDV will follow, showing the relationships with external services
......
......@@ -2,7 +2,10 @@ from atdb.settings.base import *
import os
# Import production setting must remain False.
DEBUG = False
try:
DEBUG = os.environ['DEBUG']
except:
DEBUG = False
ALLOWED_HOSTS = ["*"]
......
SET DEBUG=True
SET DATABASE_HOST=localhost
SET DATABASE_PORT=5432
SET DATABASE_NAME=atdb_ldv
SET DATABASE_USER=atdb_admin
SET DATABASE_PASSWORD=atdb123
python manage.py runserver --settings=atdb.settings.dev
......@@ -44,7 +44,7 @@
</div>
{% include 'taskdatabase/pagination.html' %}
</div>
<p class="footer"> Version 1.0.0 (12 feb 2021 - 11:00)
<p class="footer"> Version 1.0.0 (12 feb 2021 - 15:00)
<script type="text/javascript">
(function(seconds) {
var refresh,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment