These are ansible playbooks for setting up and upgrading DCOR on a vanilla Ubuntu 24.04 machine.
To get started on your control node, install ansible:
pipx install ansible-core ansible # https://github.com/hifis-net/ansible-collection-toolkit ansible-galaxy collection install hifis.toolkit ansible-galaxy collection install community.general # https://docs.ansible.com/ansible/latest/collections/community/postgresql/index.html ansible-galaxy collection install community.postgresql # mounting cache partition automatically ansible-galaxy collection install ansible.posix
The following roles are available:
acme: Retrieve TLS certificate from letsencryptbackup: Create and restore backups (see below)ckan: Install CKAN with all its dependencies (including postgresql and Solr)common: General administrative tasks like unattended-upgradesdcor: Install DCOR on top of an existing CKAN installationdcorupdate: Used by dcor-update.yml for updating the DCOR Python libraries.maintenance: put a DCOR instance into maintenance modesecrets: Set up internal secrets for DCOR
Notes:
- The
site.ymlplaybook does not touch the redis or postgresql databases. Only access credentials are modified.
Although a DCOR instance can be updated by running site.yml, this is not always necessary. If only the CKAN extensions or other Python dependencies changed, use the dcor-update.yml playbook (note that for sending the status email to the maintainer, the -J option for the vault password is required):
ansible-playbook -J -i staging dcor-update.yml
The backup-create.yml and backup-restore.yml playbooks can be used to
create unencrypted backups of the CKAN database and the CKAN storage directory
(containing custom uploads such as user and organization images).
To create a backup, run:
ansible-playbook -i staging backup-create.yml
This will create a compressed backup in the corresponding backups/host-* directory.
For restoring a backup, you have to rename it to restore_instance.tar.bz2 in the
corresponding host-specific directory. Note that if the CKAN_INI_STORAGE_PATH
variable is different on the restore host, you will have to either manually
move the files after restoring or modify the backup file in-place.
To restore a backup, run:
ansible-playbook -i staging backup-restore.yml
Only hosts for which the restore_instance.tar.bz2 files exist will be restored
from backup.