Mallard is the RTI-internal staging environment for SMART. This project lives at /projects/SMART, and can be updated by using git. It is easiest to edit code on mallard using VS Code Remote SSH. To have permission to edit the files, you must be added to the cds group on mallard.
The mallard branch of this repository contains a few changes necessary to run SMART on mallard, mainly port mappings.
These instructions are based on upgrading Postgres from 9 to 15 in the SMART staging environment, maintaining the existing data. Postgres changed its default password hashing method, but we kept the old one (md5) for compatibility in this environment.
docker compose down- Edit the
docker-compose.ymlfile to add a volume to the postgres service:
- ./smartapp:/smartapp
docker compose up -d postgresdocker exec prod_postgres_1 bash -c "pg_dumpall -d smart -U smart -h localhost > /smartapp/data.sql"docker compose down- Edit the
docker-common.ymlfile and replace- smart_pgdata:/var/lib/postgresql/datawith- smart_pgdata_15_2:/var/lib/postgresql/data - Edit the
docker-common.ymlfile and replaceimage: postgres:9.6.2withimage: postgres:15.2 - Edit the
docker-common.ymland add the environment variable- POSTGRES_HOST_AUTH_METHOD=md5 docker container ls | grep postgresthendocker rmany matching containersdocker rmi postgres:9.6.2docker compose up -d postgresdocker exec prod_postgres_1 bash -c "pg_dumpall -d smart -U smart -h localhost < /smartapp/data.sql"docker compose downdocker compose up
After verifying that the new Postgres version is working, you can remove the old volume by editing the docker-compose.yml file and removing the ./smartapp:/smartapp line from the postgres service. Then rm -fr ./smartapp and docker volume rm smart_pgdata.