-
Notifications
You must be signed in to change notification settings - Fork 13
Maintenance
While no cronjob for this exists at the time of writing, it is possible to backup from and restore to the postgres database in Rodan using scripts. For the following, assume the postgres container has ID 612b4ae59567
.
Create a Backup
This stores a backup with the name backup_YYYY_MM_DDTHH_MM_SS.sql.gz
.
docker exec -it 612b4ae59567 backup
See a list of Backups
docker exec -it 612b4ae59567 backups
Restore a Backup
For a backup with the name backup_YYYY_MM_DDTHH_MM_SS.sql.gz
,
docker exec -it 612b4ae59567 restore backup_YYYY_MM_DDTHH_MM_SS.sql.gz
On staging, these backups will persist in a separate volume so they are not tied to a specific postgres container.
To renew the SSL certificate on Rodan instances, run docker -ps
to get the nginx container id. Then run
docker exec -it [nginx_container_id] bash
to enter the container. Once in the container, run certbot renew
to renew the certificate.
Finally, run service nginx restart
within the container to update the changes. If these steps went smoothly, then the certificate should be renewed.
- Route all error messages to
Sentry.io
, and automatically triage them to workers in the lab. - Create proper users/groups for the production container. In production (and on linux machines) docker needs to run as a privileged user. The container is not to be regarded as a layer of security. A root user inside the container can have root level effects outside of the container on linux. That is why a dummy user
www-data
is created in therodan
,celery
containers.- The rodan container should be ran by the
django
orrodan
user. - The nginx container should be ran by the
nginx
user. - The postgres container should be ran by the
postgres
user.
- The rodan container should be ran by the
- Fix issues outlined by
https://github.com/docker/docker-bench-security
, and intergrate them with atravis-ci
check. - Deploy with docker swarm
- Create
celery-GPU
queue for GPU intensive workloads.
- If you need root privileges inside of the docker container, you can specify a user with the
-u
before entering the container withexec
orrun
.docker compose -f docker-compose.yml -u root rodan bash
- Repository Structure
- Working on Rodan
- Testing Production Locally
- Working on Interactive Classifier
- Job Queues
- Testing New Docker Images
- Set up Environment Variables
- Set up SSL with Certbot
- Set up SSH with GitHub
- Deploying on Staging
- Deploying on Production
- Import Previous Data