2. Getting started

This tutorial explains how to quick-start with REANA-Cluster.

2.1. Deploy locally

Are you looking at installing and deploying REANA cluster locally on your laptop?

  1. Install kubectl (e.g. version 1.11.2) and minikube (e.g. version 0.28.2):

    $ sudo dpkg -i kubectl*.deb minikube*.deb
  2. Start Minikube virtual machine:

    $ minikube start --kubernetes-version="v1.11.2"
  3. Install REANA-Cluster sources. You probably want to use a virtual environment:

    $ mkvirtualenv reana-cluster
    $ pip install reana-cluster
  4. Start REANA cluster instance on Minikube:

    $ reana-cluster init
  5. Check the status of the REANA cluster deployment. (Note that it may take several minutes to pull the REANA component images for the first time.)

    $ reana-cluster status
    REANA cluster is ready.
  6. Display the commands to set up the environment for the user clients:

    $ reana-cluster env
    export REANA_SERVER_URL=
    $ eval $(reana-cluster env --include-admin-token)

    If you need to create more users you can:

    $ kubectl exec \
          -ti $(kubectl get pods -l=app=server -o jsonpath='{.items[0].metadata.name}') \
          -- flask users create \
                -e jane.doe@example.org \
                --admin-access-token $REANA_ACCESS_TOKEN
    User was successfully created.
    ID                                     EMAIL                  ACCESS_TOKEN
    09259d12-b06c-4a13-a696-ae8e57f1f0c9   jane.doe@example.org   dHYXgh5AXmukZrdWccZaSg
  7. You can now run REANA examples on the locally-deployed cluster using reana-client.

  1. Note that after you finish testing REANA, you can delete the locally-deployed cluster and the Minikube virtual machine as follows:

    $ reana-cluster down
    $ minikube stop

2.2. Deploy on CERN infrastructure

  1. Log into lxplus-cloud (CC7 subset of lxplus with recent OpenStack clients) and create a working directory for reana:

    $ ssh lxplus-cloud.cern.ch
    $ mkdir reana && cd reana
  2. Setup your OpenStack account and create a Kubernetes cluster following the official documentation.


For now, the traefik ingress needs to be amended so permissions are set correctly (once fixed in OpenStack this will come automatically.

$ kubectl -n kube-system edit ds/ingress-traefik
# add: `serviceAccountName: ingress-traefik` under
# `spec.template.spec`.
# Restart the Ingress controller so it uses the correct permissions.
$ get pods -n kube-system  | grep ingress
ingress-traefik-666ee                   1/1       Running   0          2m
$ kubectl delete ingress-traefik-666ee -n kube-system
  1. Load the configuration to connect to the Kubernetes cluster and wait for the pods to be created:

    $ $(openstack coe cluster config reana-cloud)
    $ kubectl get pods -w
  2. Set one of the nodes (kubectl get nodes) to be an ingress controller and create a landb alias:

    $ kubectl label node <node-name> role=ingress
    $ openstack server set --property landb-alias=reana <ingress-node>
  3. Create or add ssl secrets:

    $ openssl req -x509 -nodes -days 365 -newkey rsa:2048
          -keyout /tmp/tls.key -out /tmp/tls.crt
          -subj "/CN=reana.cern.ch"
    $ kubectl create secret tls reana-ssl-secrets
          --key /tmp/tls.key --cert /tmp/tls.crt
  4. Since Python3 does not come by default we have to use the slc command to activate it and we create a virtual environment for REANA:

    $ scl enable rh-python36 bash
    $ virtualenv reana
    $ source reana/bin/activate
  5. Install reana-cluster:

    (reana) $ pip install reana-cluster
  6. Set the database URI and instantiate REANA cluster:

(reana) $ reana-cluster init
  1. Make REANA accessible from outside:

    (reana) $ curl http://test-reana.cern.ch/api/ping
    {"message": "OK", "status": "200"}

2.3. Next steps

For more information, please see:

  • Looking for a more comprehensive user manual? See User guide
  • Looking for tips how to develop REANA-Cluster component? See Developer guide
  • Looking for command-line API reference? See CLI API