browsertrix/ansible
Ilya Kreymer ccd87e0dff
Rename api / nginx settings -> backend / frontend, set pull policy job images (#504)
* rename config values
- api -> backend
- nginx -> frontend

* job pods:
- set job_pull_policy from api_pull_policy (same as backend image)
- default to Always, but can be overridden for local deployment (same as backend image)

typo fix: CRAWL_NAMESPACE -> CRAWLER_NAMESPACE (part of #491)
ansible: set default label to :latest instead of :dev for
2023-01-18 20:21:36 -08:00
..
deploys
group_vars Rename api / nginx settings -> backend / frontend, set pull policy job images (#504) 2023-01-18 20:21:36 -08:00
inventory add digital ocean documentation (#421) 2023-01-11 21:57:17 -08:00
playbooks ansible: digitalocean tweaks: (#469) 2023-01-12 23:11:20 -08:00
.editorconfig
.tool-versions
Pipfile add digital ocean documentation (#421) 2023-01-11 21:57:17 -08:00
Pipfile.lock
README.md

Playbooks to install browsertrix

DigitalOcean

To install browsertrix on DigitalOcean you will need to the following:

Digital Ocean Variables

See Known Issues below.

The first running of the playbook will place variables under your tmp directory in the following format YYYY-MM-DD@:HH:MMd_ocean*. Content of these files will need to be added to the group_vars/do/private.yml or else run as an -e extra value as shown below

-e btrix_db_url: (contents of /tmp/YYYY-MM-DD@:HH:MMd_ocean_btrix_db_url.txt`
-e lb_uuid: (contents of /tmp/YYYY-MM-DD@:HH:MMd_ocean_lb_uuid.txt`
-e loadbalancer_ip: (contents of /tmp/YYYY-MM-DD@:HH:MMd_ocean_loadbalancer_ip.txt`
-e domain_name: <your registered domain

In addition change the name (it will default to demo otherwise) and the region DigitalOcean preferred region (it will default to sfo3).

Example Playbooks

The playbook will install the Kubernetes package manager and the DigitalOcean Controller both are useful in managing your installation.

  • Run the playbook two times.
ansible-playbook -v playbooks/do_setup.yml
ansible-playbook -v playbooks/do_setup.yml -t helm_upgrade -e btrix_db_url= -e lb_uuid= -e loadbalancer_ip=

Every subsequent time one needs to run helm updates the -t helm_upgrade can be passed to the playbook like so:

ansible-playbook -v playbooks/do_setup.yml -t helm_upgrade

Known Issues:

The doctl tool is the only one that allows us to create a mongodb password. We continue to investigate why this cannot use ansible's set_fact in the playbook. The Kubernetes task creates a loadbalancer which will not be ready by the time the playbook completes the first time. So a second or sometimes 3rd run will be needed.