Skip to content

Commit

Permalink
Infra255 fixing minor issues with local setup (#19)
Browse files Browse the repository at this point in the history
* Set varialbe to empty by deafault and do not use azures db_fqdm

* missing DB password that possibly should only have been removed for Azure

* blobs are just an azure thing I hope

* default value for storage_class_name

* Update roles/ckan/templates/kubernetes/ckan.yaml

Co-authored-by: Jonathan Berry <[email protected]>

---------

Co-authored-by: Jonathan Berry <[email protected]>
  • Loading branch information
mixmixmix and jonathansberry authored Jul 30, 2024
1 parent 9a977bc commit 13e225c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 3 additions & 1 deletion group_vars/all/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jenkins_aws_account_id: "791438942407"
# Environment type - local is for Minikube, aws for AWS :)
# by default it's local
fjelltopp_env_type: "local"
fjelltopp_cloud_provider: ''

# Helm role
# https://github.com/helm/helm/releases/
Expand Down Expand Up @@ -69,7 +70,6 @@ datapusher_image: clementmouchet/datapusher # this version is incredibly old, bu
ckan_max_upload_size_mb: "256"
ckan_redis_url: "redis://redis:6379/1"


ckan_solr_url: "http://solr:8983/solr/ckan"
# ckan_sqlalchemy_url: "postgresql://ckan:12345678@db/ckan"
ckan_plugins: "stats text_view image_view recline_view blob_storage authz_service"
Expand Down Expand Up @@ -138,3 +138,5 @@ who_authenticators: |-
plugins =
auth_tkt
ckan.lib.authenticator:UsernamePasswordAuthenticator
storage_class_name: "efs-client"
2 changes: 1 addition & 1 deletion roles/ckan/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
when: fjelltopp_cloud_provider == 'azure'

- include_tasks: ./deploy.yml
when: fjelltopp_cloud_provider != 'azure'
when: fjelltopp_cloud_provider != 'azure'
14 changes: 12 additions & 2 deletions roles/ckan/templates/kubernetes/ckan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ spec:
value: "{{ ckan_postgres_password }}"
- name: PIPENV_DONT_LOAD_ENV
value: "1"
- name: POSTGRES_HOST
value: "{{ db_fqdn }}"
{% if fjelltopp_cloud_provider != 'azure' %}
- name: AWS_DEFAULT_REGION
value: "{{ aws_region }}"
Expand Down Expand Up @@ -216,6 +214,7 @@ spec:
{% endif %}
restartPolicy: Always
volumes:
{% if fjelltopp_cloud_provider == 'azure' %}
- name: ckan-storage
persistentVolumeClaim:
claimName: ckan-storage-blob
Expand All @@ -225,6 +224,17 @@ spec:
- name: ckan-resources
persistentVolumeClaim:
claimName: ckan-resources-blob
{% else %}
- name: ckan-storage
persistentVolumeClaim:
claimName: ckan-storage
- name: ckan-webassets
persistentVolumeClaim:
claimName: ckan-webassets
- name: ckan-resources
persistentVolumeClaim:
claimName: ckan-resources
{% endif %}

{% if fjelltopp_env_type == 'local' %}
- name: localckan
Expand Down
4 changes: 3 additions & 1 deletion roles/ckan/templates/kubernetes/ckandb_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ spec:
value: "{{ ckan_db_hostname }}"
- name: POSTGRES_USER
value: "{{ rds_admin_username }}"

- name: POSTGRES_PASSWORD
value: "{{ ckan_postgres_password }}"

name: ckan-db-init
image: postgres:13
command: ['bash', '-c']
Expand Down

0 comments on commit 13e225c

Please sign in to comment.