Skip to content

ARLAS Exploration Stack with Kubernetes

This documentation is for running ARLAS Exploration stack from the https://github.com/gisaia/ARLAS-Exploration-stack project. You can also run it by using directly the chart:

helm repo add arlas https://gisaia.github.io/ARLAS-Exploration-stack/
helm search repo arlas

Prerequisites

  • git
  • kubernetes cluster (e.g. KIND for testing: kind create cluster --name arlas-kind-cluster)
  • kubectl
  • helm
  • load balancer for kubernetes

Get the project by cloning the ARLAS Exploration Stack project.

git clone git@github.com:gisaia/ARLAS-Exploration-stack.git
cd ARLAS-Exploration-stack

The third party helm charts are provided by bitnami. Its repository must be registered:

helm repo add bitnami https://charts.bitnami.com/bitnami

Important: Bitnami charts are not supported anymore by bitnamy. The charts are used for development purpose only. You must deploy your own third party service charts.

Note for test/dev environment: If your cluster does not have an ingress controller, you can install metallb and nginx_ingress_controller:

k8s/scripts/install_metallb.sh
k8s/scripts/install_nginx_ingress_controller.sh

Configuring the ARLAS stack

Directory structure

The repository contains files related to docker compose deployment and kubernetes deployment. The k8s/ directory contains the charts and the scripts for running the stack with kubernetes.

Files are organized as follows:

  • k8s/: everything for installing the ARLAS Stack chart
  • scripts/: scripts for initializing and installing the charts
  • charts/: contains the umbrella chart (k8s/charts/arlas-stack/Chart.yaml) and sub charts for arlas backend, arlas front end and AIAS

Storage

The default storage class of the cluster might have a delete reclaim policy. For that reason, the chart deploys a standard-retain storage class based on rancher.io/local-path provisioner. You might want to use a different provisioner with a reclaim policy. See defaultStorageClass in k8s/charts/arlas-stack/values.yaml

Configuration

Most of the configuration should be done by setting values for the charts. Default values are set in the values.yaml files of the various charts.

IMPORTANT: the passwords must be configured before the first install of the chart!

The main initial configuration is done in the "umbrella chart" contained in k8s/charts/arlas-stack/values.yaml. Configure in priority all the fields with the mention "MUST BE CONFIGURED:". Note that keycloak deployment uses by default the provided certificate. Once you changed all the "MUST BE CONFIGURED:" variables, the default stack can be installed.

More configuration options can be set in the three sub charts: arlas-services (ARLAS Backend), arlas-uis (ARLAS User interfaces) and aias-services (ARLAS AIRS and AIAS services).

The variables for the charts are documented:

The detailed settings of AIAS services are located in the conf/aias/ yaml files:

Basemap

In case you want to use a local protomap basemap, you must specify the right Persistent Volume Claim storage size for the protomap file: set the arlas-uis.basemap.storageSize property in the arlas-stack chart values.yaml file (at least 120 Gi for full coverage).

Running the ARLAS stack

Start the ARLAS Stack

To start, run:

./k8s/scripts/start.sh 

This script:

  • creates the configmaps for the AIAS configuration files
  • create a secret and configmap for keycloak certificate if the certificate exists (e.g. created with ./scripts/create_certificate.sh keycloak.arlas.k8s)
  • update and build the sub charts
  • install or upgrade the arlas-stack chart

Stop the ARLAS Stack

You can remove the deployment with:

./k8s/scripts/remove_deployment.sh

The script:

  • uninstall the chart
  • delete the keycloak-tls secret if exists

Restart the ARLAS Stack

Before re-starting the ARLAS stack, please make sure that the persistence volume have a bound or available status. If they are released, then you can make them available with the folmlowing script:

./k8s/scripts/free_released_persistence_volumes.sh

Test/dev environment

Services, DNS and Certificates

Four services are exposed with an ingress:

  • keycloak, default DNS is keycloak.arlas.k8s
  • elasticsearch, default DNS is elastic.arlas.k8s
  • apisix, which serves ARLAS and AIAS, default DNS is site.arlas.k8s
  • minio, which serves as the object store, default DNS is minio.arlas.k8s

In a Linux test environment, you will need to link the ingress external IP with the domain names of the services. You can for instance add them in /etc/hosts:

172.18.0.10 keycloak.arlas.k8s
172.18.0.10 elastic.arlas.k8s
172.18.0.10 site.arlas.k8s
172.18.0.10 minio.arlas.k8s

In a MacOs test environment keep local host and we will use port forwarding to access applications :

127.0.0.1   keycloak.arlas.k8s
127.0.0.1   elastic.arlas.k8s
127.0.0.1   site.arlas.k8s
127.0.0.1   minio.arlas.k8s
and run
sudo kubectl port-forward -n default service/ingress-nginx-controller 80:80 443:443

The arlas-ingress IP is obtained with:

kubectl get svc ingress-nginx-controller  -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Configuring arlas_cli for the keycloak test realm

Let's assume the domain names are elastic.arlas.k8s, keycloak.arlas.k8s and site.arlas.k8s, then you can init your arlas_cli configuration file with:

./k8s/scripts/init_arlas_cli_confs.sh site.arlas.k8s:443 elastic.arlas.k8s:443 keycloak.arlas.k8s:443
Replace site.arlas.k8s:443, elastic.arlas.k8s:443 and keycloak.arlas.k8s:443 with your own values.

You can now list the indices:

arlas_cli --config-file /tmp/arlas-cli.yaml indices list
Using default configuration local.k8s.kc.data
+----------------------------------+--------+-------+---------+
| name                             | status | count | size    |
+----------------------------------+--------+-------+---------+
| .arlas                           | open   | 0     | 249b    |
+----------------------------------+--------+-------+---------+
Total count: 0

and collections:

arlas_cli --config-file /tmp/arlas-cli.yaml collections list
Using default configuration local.k8s.kc.data
+------+-------+
| name | index |
+------+-------+
+------+-------+

EO Catalog

Just like the docker compose deployment, you can init a catalog:

./scripts/init_aias_catalog.sh local.k8s.kc.data main org.com

Remember to change main and org.com according to the values you changed in the arlas-stack chart values.yaml file.

Remove deployment

To start, run:

./k8s/scripts/remove_deployment.sh