4. Installation on Kubernetes

The installation on a Kubernetes cluster is possible but only recommended for experienced Kubernetes users. The installation mainly follows the manual installation where we generate a docker-compose.yml file for the Agora deployment. In the next step the docker-compose file is converted to kubernetes manifests using the kompose tool. These Kubernetes manifests can then be fine-tuned to meet the specific requirements of your cluster before being applied.

It’s important to note that Kubernetes is a sophisticated container orchestration platform designed for scalable and resilient deployments. As such, installing Agora on Kubernetes requires a solid understanding of Kubernetes fundamentals and general IT knowledge.

This documentation assumes that you are already familiar with concepts such as containerization, microservices architecture, networking, and basic Kubernetes operations.

4.1. Step-by-Step Instructions

  1. Open a bash terminal as root:

    sudo bash
    
  2. Download the Agora installer:

    curl -L http://download.gyrotools.com/download/getagora/gtagora -o /usr/bin/gtagora
    chmod +x /usr/bin/gtagora
    
  3. Display the available Agora versions and choose the latest version for the next step:

    gtagora versions
    
  4. Create a config.json file in the directory /etc/gyrotools/agora/ (or a location of your choice) and insert the following minimal configuration (see below for all config options):

    {
        "db": {
            "password": "agora"
        },
        "volumes": {
            "data": {
                "active": "agora_data_1",
                "previous": []
            }
        },
        "registry": {
          "username": "<PORTAL_USERNAME>",
          "password": "<PORTAL_PASSWORD_OR_ACCESS_TOKEN>"
        },
        "dicom": {
          "node": {
            "name": "gtAgora",
            "port": 3010
          }
        },
        "version": "<AGORA_VERSION>",
        "timezone": "Europe/Zurich"
    }
    

    For the docker registry use the same credentials as for the Gyrotools customer portal. Instead of the password you can also use your personal access token.

  5. Build the docker-compose.yml file from the config.json file. Ignore the error message about the missing docker volumes:

    gtagora rebuild
    # or when the config file is in a different location
    # gtagora -c /path/to/config.json rebuild
    

    The docker-compose-yml file will be stored parallel to the config.json file. The file is located at /etc/gyrotools/agora/docker-compose.yml by default.

  6. Inspect the docker-compose-yml file and make changes if necessary. The file is a standard yaml file and can be edited with any text editor.

    cat /etc/gyrotools/agora/docker-compose.yml
    
  7. Install the kompose tool and convert the docker-compose.yml file to Kubernetes manifests:

    kompose convert -f /etc/gyrotools/agora/docker-compose.yml
    

    The command will create the Kubernetes manifests in the current directory.

  8. Create a secret for the docker registry credentials and add it to the deployment manifests (e.g. app-deployment.yaml) via the imagePullSecrets field:

    kubectl create secret docker-registry gtregcred --docker-server=gtagora-registry.gyrotools.com --docker-username=<PORTAL_USERNAME> --docker-password=<PORTAL_PASSWORD_OR_ACCESS_TOKEN>
    

    Add the secret to the deployment manifest files:

    spec:
        imagePullSecrets:
            - name: gtregcred
        containers:
            ...
    
  9. Inspect the Kubernetes manifests and adapt them to the requirements of your Kubernetes cluster. The manifests are standard Kubernetes YAML files and can be edited with any text editor.

  10. Apply the Kubernetes manifests to your cluster:

    kubectl apply -f .