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.10.1) and minikube (e.g. version 0.28.0):

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

    $ minikube start --kubernetes-version="v1.9.4"
  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)
  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, you will have to create the cluster with Kubernetes version 1.9.3 since 1.10.1 introduces a bug with backoff limit.

$ openstack coe cluster create reana-cloud --keypair mykey
    --node-count 1
    --cluster-template kubernetes
    --master-flavor m2.medium
    --flavor m2.medium
    --labels influx_grafana_dashboard_enabled=true
    --labels kube_tag="v1.9.3"
    --labels cvmfs_tag=qa
    --labels flannel_backend=vxlan
    --labels container_infra_prefix=gitlab-registry.cern.ch/cloud/atomic-system-containers/
    --labels ingress_controller=traefik


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 (since reana-commons is not yet released we have to install it manually):

    (reana) $ pip install git+git://github.com/reanahub/reana-commons.git@master#egg=reana-commons
    (reana) $ pip install git+git://github.com/reanahub/reana-cluster.git@master#egg=reana-cluster
  6. Set the database URI and instantiate REANA cluster:

(reana) $ export REANA_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://reana:reana@<db-server>:5432/reana
(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