Robotron Datenbank-Software GmbH Firmenlogo
MIT DATEN MEHR BEWEGEN.
🇩🇪 🇬🇧

Installation

A ContainerManager instance can be operated either as a system service or as a container. The following describes the options for operation and configuration.

Environment Variables

Environment VariableDescriptionDefault Value / Example

RGCC_SERVE_PUBLIC

Specifies whether the API should also be reachable from outside the cluster host. (0.0.0.0 or 127.0.0.1)

false

RGCC_SSL_DISABLED

Specifies whether access via TLS should also be possible

false

RGCC_PORT

Sets the port for unencrypted communication

4000

RGCC_SSL_PORT

Sets the port for encrypted communication

4001

RGCC_DATABASE

Optional. Defines the location and name of the local database

containers.db

RGCC_DOCKER_SOCKET_URI

Defines the access path for the management interface

unix:///var/run/docker.sock

RGDC_HOST

Optional. Sets the hostname or IP of the ControlCenter

Ex.: devicecenter.azurewebsites.net

RGDC_PROXY

Optional. Sets the HTTP proxy to access the ControlCenter

RGCC_INSTANCE_RGDC_HOST

Optional. Sets a hostname / IP of the ControlCenter that differs from RGDC_HOST

Value of RGDC_HOST

RGCC_INSTANCE_RGDC_PROXY

Optional. Sets an HTTP proxy that differs from RGDC_PROXY to reach the ControlCenter.

Value of RGDC_PROXY

RGDC_SSL_CHECK

Optional. Specifies whether the full PKI chain should be verified when establishing an encrypted connection to the ControlCenter

true

RGCC_CLIENT_ID

Optional. Sets the client ID generated by the ControlCenter

any UUIDv4

RGCC_SECRET

Optional. Sets the secret generated by the ControlCenter

any UUIDv4

RGCC_USER

Defines the username for login

ccadmin

RGCC_PASSWORD_HASH

Defines the SHA256 hash of the password for login.

05f3b8a40c10af15af8c7db56cd5c492e3fca30dd34e607f8da9ba37083543af ($ccpasswd123)

RGCC_INSTANCE_MOUNTS

Comma-separated list of volume mounts to be additionally integrated into the RoboGate containers

Ex: /host/d1:/container/d1,/host/d2/container/d2

Docker and Docker Compose on Debian/Ubuntu

First, the Docker platform must be installed.

apt install -y docker.io

A container image can be imported with the following command.

docker load -i <file_name>.tar

Afterwards, a docker-compose.yml file with the following content can be created, for example in the folder /opt/robogate-container-manager:

File: /opt/robogate-container-manager/docker-compose.yml
version: "3.5"
services:
  rgcc:
    image: rdsdocker.azurecr.io/robogate-container-manager:2021.11
    container_name: rgcc
    privileged: true
    restart: unless-stopped
    network_mode: host
    environment:
        - "RGCC_SSL_DISABLED=true"
        - "RGCC_SERVE_PUBLIC=true"
        - "RGCC_PORT=80"
#        - "RGDC_HOST= "         # optional
#        - "RGCC_CLIENT_ID= "    # optional
#        - "RGCC_SECRET= "       # optional
    volumes:
        - "/var/run/docker.sock:/var/run/docker.sock"
        - "/etc/ssl/certs:/etc/ssl/certs:z"

To start the ContainerManager, the following DockerCompose command must be executed. This starts the container automatically as a service, so that it is available again after a restart of the cluster host.

docker-compose up -d

SystemD Service with the Podman Container Platform on RHEL/CentOS

On RedHat distributions, it may occur that the Docker platform is no longer supported. In this case, the ContainerManager can also be registered and operated as a system service. An exemplary procedure is described below.

If not already done, Podman must first be installed.

yum install -y podman

The Podman socket usually needs to be activated separately. Only then does the ContainerManager gain access to the interface for managing the RoboGate containers.

systemctl enable --now podman.socket

The provided software bundle should ideally be extracted to /opt/robogate-container-manager. A different directory must be noted and adjusted in the following SystemD service file.

The startup program must be given execute permissions:

sudo chmod +x /opt/robogate-container-manager/app/Robotron.RoboGate.ClusterControl.Api

The SystemD service file contains all necessary information and configurations to operate a ContainerManager.

File: /etc/systemd/system/robogate-container-manager.service
[Unit]
Description=RoboGate ContainerManager

[Service]
User=root
Restart=always
Type=simple
WorkingDirectory=/opt/robogate-container-manager
ExecStart=/bin/bash /opt/robogate-container-manager/start.sh

Environment='RGCC_DOCKER_SOCKET_URI=unix:///run/podman/podman.sock'
Environment='RGCC_SSL_DISABLED=true'
Environment='RGCC_SERVE_PUBLIC=true'
Environment='RGCC_PORT=80'
Environment='RGCC_SSL_PORT=443'
#Environment='RGDC_HOST='      # optional
#Environment='RGCC_CLIENT_ID=' # optional
#Environment='RGCC_SECRET='    # optional

[Install]

WantedBy=multi-user.target

Only after activation by the following command will the ContainerManager service be running and remain available after a restart of the cluster host.

systemctl enable --now robogate-container-manager

Helpful Commands

CommandDescription

systemctl restart robogate-container-manager

Restart the ContainerManager service. No RoboGate Edge instances will be restarted in the process!

systemctl disable --now robogate-container-manager

Disable the ContainerManager service if it is no longer needed

Troubleshooting

Containers Cannot Be Started

  • Error in Podman log: Request Failed(Internal Server Error): container_linux.go:370: starting container process caused: unknown capability \"CAP_BPF\": OCI runtime error

  • Error with podman run: starting container process caused: error adding seccomp filter rule for syscall bdflush: permission denied: OCI permission denied

Solution: Update the runc package to version 1.0.2

Final Note

It is important to note that only one ContainerManager instance may run simultaneously on each cluster host. If multiple ContainerManager instances are active at the same time and possibly connected to a ControlCenter, undesirable effects can occur that do not guarantee stable operation.