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 Variable | Description | Default Value / Example |
|---|---|---|
| Specifies whether the API should also be reachable from outside the cluster host. (0.0.0.0 or 127.0.0.1) | false |
| Specifies whether access via TLS should also be possible | false |
| Sets the port for unencrypted communication | 4000 |
| Sets the port for encrypted communication | 4001 |
| Optional. Defines the location and name of the local database | containers.db |
| Defines the access path for the management interface |
|
| Optional. Sets the hostname or IP of the ControlCenter | Ex.: devicecenter.azurewebsites.net |
| Optional. Sets the HTTP proxy to access the ControlCenter | |
| Optional. Sets a hostname / IP of the ControlCenter that differs from RGDC_HOST | Value of |
| Optional. Sets an HTTP proxy that differs from RGDC_PROXY to reach the ControlCenter. | Value of |
| Optional. Specifies whether the full PKI chain should be verified when establishing an encrypted connection to the ControlCenter | true |
| Optional. Sets the client ID generated by the ControlCenter | any UUIDv4 |
| Optional. Sets the secret generated by the ControlCenter | any UUIDv4 |
| Defines the username for login | ccadmin |
| Defines the SHA256 hash of the password for login. |
|
| Comma-separated list of volume mounts to be additionally integrated into the RoboGate containers | Ex: |
Docker and Docker Compose on Debian/Ubuntu
First, the Docker platform must be installed.
apt install -y docker.ioA container image can be imported with the following command.
docker load -i <file_name>.tarAfterwards, a docker-compose.yml file with the following content can be created, for example in the folder /opt/robogate-container-manager:
/opt/robogate-container-manager/docker-compose.ymlversion: "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 -dSystemD 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 podmanThe 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.socketThe 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.ApiThe SystemD service file contains all necessary information and configurations to operate a ContainerManager.
/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.targetOnly 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-managerHelpful Commands
| Command | Description |
|---|---|
| Restart the ContainerManager service. No RoboGate Edge instances will be restarted in the process! |
| 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 errorError 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.