ansible: digitalocean tweaks: (#469)

* ansible: digitalocean tweaks:
- add org_name to template
- better check for db existence
- simplify domain, fix default_org

chart:
- make job images pull IfNotPresent
This commit is contained in:
Ilya Kreymer 2023-01-12 23:11:20 -08:00 committed by GitHub
parent 2daa742585
commit a916322c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View File

@ -9,6 +9,8 @@ crawler_limits_cpu: "2200m"
crawler_requests_memory: "1200Mi"
crawler_limits_memory: "3200Mi"
crawler_pull_policy: "Always"
# Registry
{% if use_do_registry %}
api_image: "{{ registry_endpoint }}/webrecorder/browsertrix-backend:{{ image_tag }}"
@ -59,6 +61,8 @@ superuser:
registration_enabled: "{{ '1' if registration_enabled else '0' }}"
default_org: "{{ org_name }}"
# Admin Send Email Options
email:

View File

@ -15,7 +15,7 @@ k8s_name: "{{ project_name }}"
bucket_name: "{{ project_name }}"
bucket_path: "crawls"
domain: "{{ domain_name | default('browsertrix.cloud') }}"
domain: "browsertrix.cloud"
subdomain: "{{ project_name }}"
use_do_registry: true
@ -27,7 +27,9 @@ signing_host: "signing"
superuser_email: "dev@webrecorder.net"
superuser_password: "PassW0rd!"
registration_enabled: true
org_name: "{{ project_name }}"
registration_enabled: false
cert_email: "{{ superuser_email }}"

View File

@ -35,15 +35,17 @@
async: 1800
poll: 60
register: db_create_result
when: db_check.stdout.find(db_name) == -1
when: "db_check.stdout.find(' ' + db_name + ' ') == -1"
- name: d_ocean | db | set db url
ansible.builtin.set_fact:
db_url: "{{ db_create_result.stdout | from_json | json_query('[0].private_connection.uri') }}"
when: "db_check.stdout.find(' ' + db_name + ' ') == -1"
- name: d_ocean | db | set db id
ansible.builtin.set_fact:
db_uuid: db_create_result.stdout | from_json | json_query('[0].id')
when: "db_check.stdout.find(' ' + db_name + ' ') == -1"
# Storage (Space)
# ===========================================

View File

@ -41,7 +41,7 @@ spec:
containers:
- name: crawl-job
image: {{ job_image }}
imagePullPolicy: Never
imagePullPolicy: IfNotPresent
command: ["uvicorn", "btrixcloud.k8s.crawl_job:app", "--host", "0.0.0.0", "--access-log", "--log-level", "info"]
volumeMounts:

View File

@ -45,7 +45,7 @@ spec:
containers:
- name: crawl-job
image: {{ job_image }}
imagePullPolicy: Never
imagePullPolicy: IfNotPresent
command: ["python", "-m", "btrixcloud.k8s.profile_job"]
volumeMounts: