Skip to content

Install on a Minikube Cluster

bbrauzzi edited this page Oct 8, 2021 · 1 revision

This section describes how to deploy the Ades on a local Kubernetes cluster using Minikube.

Install Minikube

To install minikube, execute the following shell script

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

For further information please refer to https://minikube.sigs.k8s.io/docs/start/

Run the following command to start up a local Kubernetes cluster

minikube start
😄  minikube v1.23.2 on Ubuntu 20.04 (kvm/amd64)
✨  Automatically selected the docker driver. Other choices: none, ssh
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=2200MB) ...
🐳  Preparing Kubernetes v1.22.2 on Docker 20.10.8 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Once minikube start finishes, run the command below to check the status of the cluster:

minikube status

If your cluster is running, the output from minikube status should be similar to:

minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

Clone the repository

  • Clone the repository

    git clone https://github.com/EOEPCA/proc-ades.git
  • Change local directory

    cd proc-ades

Storage Class configuration

By default, the Ades uses Longhorn storage class for instantiating kubernetes volumes. Minikube does not support Longhorn, therefor we highly recommend to use the standard storage class.

To configure Minikube standard storage class please modify the following parameters in the chart/ades/values.yaml file:

  • ades-longhorn.enabled

    from:

ades-longhorn:
  enabled: true

to:

ades-longhorn:
  enabled: false
  • workflowExecutor.processingStorageClass

    from:

processingStorageClass: longhorn

to:

processingStorageClass: standard
  • persistence.storageClass

    from:

storageClass: longhorn  

to:

storageClass: standard

Storage endpoint configuration

To configure the S3 compatible object storage where the processing results will be stored, uncomment and modify the STAGEOUT parameters in the chart/ades/values.yaml file as follows:

workflowExecutor:
  inputs:

    STAGEOUT_AWS_SERVICEURL: https://mys3repositoryendpoint.com
    STAGEOUT_AWS_ACCESS_KEY_ID: myAccesKeyId
    STAGEOUT_AWS_SECRET_ACCESS_KEY: mySecretAccessKey
    STAGEOUT_AWS_REGION: RegionOne
    STAGEOUT_OUTPUT: s3://processing_results

Create a dedicated namespace for the ADES

This namespace will be reserved for the operation of the ADES in order to separate the ADES proper execution from its processings job on kubernetes.

For instance, let's create namespace eoepca

kubectl create namespace eoepca

Deploy using Helm

The ADES is "installed" via helm specifying an optional "release name".

for instance, we will install the ADES with the name ades.

helm install ades charts/ades/ --namespace eoepca

the output should look like this

NAME: ades
LAST DEPLOYED: Fri Oct  1 15:24:07 2021
NAMESPACE: eoepca
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace eoepca -l "app.kubernetes.io/name=ades,app.kubernetes.io/instance=ades" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace eoepca port-forward $POD_NAME 8080:80

💡 detailed information of all the chart parameter is available in the ADES chart README

Check that service is available

kubectl get service ades --namespace eoepca

and you should get something like

NAME   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
ades   NodePort   10.99.254.201   <none>        80:32100/TCP   10s

Your service is available at port 32100 of the node

Get the application URL by running these commands:

export POD_NAME=$(kubectl get pods --namespace eoepca -l "app.kubernetes.io/name=ades,app.kubernetes.io/instance=ades" -o jsonpath="{.items[0].metadata.name}")

kubectl --namespace eoepca port-forward $POD_NAME 8080:80 &

host: Running kubelet: Running apiserver: Running kubeconfig: Configured


## Clone the repository

Clone the proc-ades git repository and open the project folder using the following commands:

```sh
git clone https://github.com/EOEPCA/proc-ades.git
cd proc-ades

Setup an S3 compatible storage

To configure the S3 object storage where the processing results will be stored, uncomment and modify the STAGEOUT parameters in the chart/ades/values.yaml file as follows:

workflowExecutor:
  inputs:

    STAGEOUT_AWS_SERVICEURL: https://mys3repositoryendpoint.com
    STAGEOUT_AWS_ACCESS_KEY_ID: myAccesKeyId
    STAGEOUT_AWS_SECRET_ACCESS_KEY: mySecretAccessKey
    STAGEOUT_AWS_REGION: RegionOne
    STAGEOUT_OUTPUT: s3://processing_results

Create a dedicated namespace for the ADES

This namespace will be reserved for the operation of the ADES in order to separate the ADES proper execution from its processings job on kubernetes.

For instance, let's create namespace eoepca

kubectl create namespace eoepca

Deploy using Helm

The ADES is "installed" via helm specifying an optional "release name".

for instance, we will install the ADES with the name ades.

helm install ades charts/ades/ --namespace eoepca

the output should look like this

NAME: ades
LAST DEPLOYED: Fri Oct  1 15:24:07 2021
NAMESPACE: eoepca
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace eoepca -l "app.kubernetes.io/name=ades,app.kubernetes.io/instance=ades" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace eoepca port-forward $POD_NAME 8080:80

💡 detailed information of all the chart parameter is available in the ADES chart README

Check that service is available

kubectl get service ades --namespace eoepca

and you should get something like

NAME   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
ades   NodePort   10.99.254.201   <none>        80:32100/TCP   10s

Your service is available at port 32100 of the node

Access the application endpoint

Get the application URL by running these commands:

export POD_NAME=$(kubectl get pods --namespace eoepca -l "app.kubernetes.io/name=ades,app.kubernetes.io/instance=ades" -o jsonpath="{.items[0].metadata.name}")

kubectl --namespace eoepca port-forward $POD_NAME 8080:80 &

The Ades is now deployed on your Kubernetes cluster and is ready to use. The WPS endpoint is reachable on the port 8080, to see how to make a request please proceed to the section Get Started.