Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAC-42: Improve datapusher deployment. #11

Merged
merged 5 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
roles/gantsign.minikube
roles/geerlingguy.helm
6 changes: 4 additions & 2 deletions roles/ckan/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@
login_host: "{{ ckan_fqdn }}"
login_user: "{{ rds_admin_username }}"
login_password: "{{ ckan_postgres_password }}"
when: (fjelltopp_env_type == 'local') and (ckan_datapusher_enable)
when: (fjelltopp_env_type == 'local') and (ckan_datapusher_enable == 'true')
register: db_ping_result
retries: 10
delay: 5
until: db_ping_result.is_available
failed_when: not db_ping_result.is_available
# In case this job fails cause there is no object db_ping_result.is_available, check if you
# are on proper virtualenv or install psycopg2 python package
jonathansberry marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup database parameters
set_fact:
Expand All @@ -106,7 +108,7 @@
become: false
with_items:
- ckandb_job.yaml
when: fjelltopp_env_type != 'local'
when: (fjelltopp_env_type != 'local') or (ckan_datapusher_enable == 'true')

- name: Deploy CKAN
kubernetes.core.k8s:
Expand Down
1 change: 1 addition & 0 deletions roles/ckan/templates/ckan/ckan_production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ ckan.datapusher.url = {{ ckan_datapusher_url }}
{% if ckan_datapusher_api_token %}
ckan.datapusher.api_token = {{ ckan_datapusher_api_token }}
{% endif %}
ckan.datapusher.callback_url_base = http://ckan:5000/
jonathansberry marked this conversation as resolved.
Show resolved Hide resolved
ckan.datapusher.assume_task_stale_after = 3600
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion roles/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ collections:
version: 2.10.0
- name: community.postgresql
accept_hostkey: true
version: 3.4.0
version: 3.4.1