Skip to content

sirus-be/odala-public-ckan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Components - CKAN

This CKAN solution uses a custom build CKAN container image and a helm chart to deploy the custom CKAN container and other services (solr, datapusher,...) The container image should be present in the GitLabs docker registry. In this document the build and deployment of the ckan image is explained

License

for the ODALA project.

© 2023 Sirus

License EUPL 1.2

CKAN Build and deploy the custom Ckan-Odala image to docker regsitry

To build, tag, and push docker images to the private docker registry or other docker registry:

  1. Go into the root of the CKAN directory (top level)
  2. Login to the docker registry using
    docker login gitlab.publiccode.solutions:5050 or other docker registry
  3. Build the images
    docker build -t gitlab.publiccode.solutions:5050/odala/components_ckan/ckan-odala:1.0.10 ./ckan-odala
  4. Push the image to the store docker push gitlab.publiccode.solutions:5050/odala/components_ckan/ckan-odala:1.0.10

Release: gitlab pipelines

Add the image to the registry (previous steps) Change the ckan-odala image version number in values.yaml The release process is automated if you use the cicd pipepeline: .gitlab-ci.yml, the pipeline is triggered when changes are pushed to a branch with prefix odala-staging

Ingress (not part of the pipeline)

kubectl apply -f ingress.yaml --namespace odala-staging

Release issues

Create pull secret for the docker registry on kubernetes cluster

Add ckan extensions

https://github.com/keitaroinc/ckan-helm/issues/23

licenses

  • add license to ckan-odala/licenses/licenses.json
  • Build custom docker image (ckan-odala/Dockerfile):
    • Add the file: ADD licenses/licenses.json licenses.json
    • Set config: config-tool ${APP_DIR}/production.ini "licenses_group_url = file://licenses.json"

open api

https://github.com/bcgov/ckanext-openapiviewer

  • create vocabulary: resource_format ("name": "resource_format")
  • get resource_format id

DCAT extension

is included in Dockerfile

CKAN Local

Cluster

Kubernetes via Docker-Desktop

Nginx

helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace

ingress issues

Make sure that the ingress controller has external ip 'localhost' kubectl get service -n ingress-nginx issues multiple delete/deploy: external ip status reamains 'pending' (port 80 in use): restart docker-desktop kubernetes and machine

Build image

docker build -t ckan-odala:1.0.0 .

Deploy

helm install ckan-odala ckan-helm -f ckan-helm/valueslocal.yaml --namespace ckan --create-namespace kubectl apply -f ingresslocal.yaml --namespace ckan

Access CKAN via 'localhost'

Cleanup

kubectl delete pvc -l release=ckan-odala | 
kubectl delete pvc solr-pvc-solr-0 | 
kubectl delete pvc data-postgres-0```

If volume ckan needs to be recreated:
```kubectl delete pvc ckan``` 
and enable pvc.createckanpvc in helm values.yml for the next deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published