Skip to content

Commit

Permalink
Add ckanext-hierarchy (#71)
Browse files Browse the repository at this point in the history
* Add ckanext-hierarchy

* Add hierarchy to deployment Dockerfile
  • Loading branch information
mpolidori authored Nov 3, 2023
1 parent 4db372f commit 31e4f49
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ckan-backend-dev/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ DATAPUSHER_REWRITE_RESOURCES=True
DATAPUSHER_REWRITE_URL=http://ckan-dev:5000

# Extensions
CKAN__PLUGINS=image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth envvars
CKAN__PLUGINS=image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form envvars
CKAN__VIEWS__DEFAULT_VIEWS=image_view text_view webpage_view datatables_view
CKAN__HARVEST__MQ__TYPE=redis
CKAN__HARVEST__MQ__HOSTNAME=redis
Expand Down
7 changes: 2 additions & 5 deletions ckan-backend-dev/ckan/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN pip3 install -e 'git+https://github.com/datopian/ckanext-scheming.git@ckan-2
pip3 install -e 'git+https://github.com/datopian/ckanext-s3filestore.git@wri/cost-splitting-orgs#egg=ckanext-s3filestore' && \
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/requirements.txt' && \
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/dev-requirements.txt' && \
pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth'
pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth' && \
pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy'

# Update ckanext-s3filestore test.ini with minio credentials
RUN sed -i "s|ckanext.s3filestore.aws_access_key_id = test-access-key|ckanext.s3filestore.aws_access_key_id = ${AWS_ACCESS_KEY_ID}|g" src/ckanext-s3filestore/test.ini && \
Expand Down Expand Up @@ -61,12 +62,8 @@ COPY setup/start_ckan_development.sh.override ${APP_DIR}/start_ckan_development.
RUN chmod +x ${APP_DIR}/start_ckan_development.sh
RUN chown ckan:ckan ${APP_DIR}/start_ckan_development.sh

USER root

RUN apk --no-cache add openssl

USER ckan

RUN openssl genpkey -algorithm RSA -out ${APP_DIR}/jwtRS256.key && \
openssl rsa -in ${APP_DIR}/jwtRS256.key -pubout -outform PEM -out ${APP_DIR}/jwtRS256.key.pub && \
chown ckan:ckan ${APP_DIR}/jwtRS256.key && \
Expand Down
5 changes: 3 additions & 2 deletions deployment/ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN pip3 install -e 'git+https://github.com/datopian/ckanext-scheming.git@ckan-2
pip3 install -e 'git+https://github.com/datopian/ckanext-s3filestore.git@wri/cost-splitting-orgs#egg=ckanext-s3filestore' && \
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/requirements.txt' && \
pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/dev-requirements.txt' && \
pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth'
pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth' && \
pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy'

COPY ckanext-wri ${APP_DIR}/src/ckanext-wri
USER root
Expand All @@ -26,7 +27,7 @@ RUN cd ${APP_DIR}/src/ckanext-wri && pip3 install -r requirements.txt && pip3 in
# fi ; \
# done

ENV CKAN__PLUGINS image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth envvars
ENV CKAN__PLUGINS image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form envvars

RUN ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}"

Expand Down
2 changes: 1 addition & 1 deletion deployment/helm-templates/values.yaml.dev.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ckan:
CKAN__SITE_TITLE: x demo
CKAN__STORAGE_PATH: /tmp
CKAN__VIEWS__DEFAULT_VIEWS: recline_view text_view image_view pdf_view geojson_view
CKAN__PLUGINS: image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth envvars
CKAN__PLUGINS: image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form envvars
CKAN__AUTH__CREATE_UNOWNED_DATASET: "True"
CKAN__AUTH__ALLOW_DATASET_COLLABORATORS: "True"
CKAN__AUTH__ALLOW_ADMIN_COLLABORATORS: "True"
Expand Down

0 comments on commit 31e4f49

Please sign in to comment.