LogoLogo
Contact Uscybus.io
Connectware 1.8.0
Connectware 1.8.0
  • Getting Started
    • Introduction
    • Installing Connectware
      • System Requirements
      • Acquiring your License Key
      • Installing Connectware on Docker
      • Installing Connectware on Kubernetes
    • Connectware Admin UI
    • Basic Components of Connectware
    • Connecting your First Machine
      • Your First Service Commissioning File
  • Documentation
    • Services
      • Service Commissioning Files
        • Structure of Service Commissioning Files
          • description
          • metadata
          • parameters
          • definitions
          • resources
            • Cybus::Connection
            • Cybus::Endpoint
            • Cybus:Mapping
            • Cybus::Container
              • Docker problem with network changes
            • Cybus::Link
            • Cybus::IngressRoute
            • Cybus::User
            • Cybus::Role
            • Cybus::Volume
            • Cybus::File
            • Cybus::Server
            • Cybus::Node
        • Sample Service Commissioning Files
          • Modbus
            • “Bearbeitungszentrum BAZ” - Single File
            • “Bearbeitungszentrum BAZ” - Multiple Files
            • “Bearbeitungszentrum BAZ” - Single File and Custom Topics
            • “Bearbeitungszentrum BAZ” - Agent Mode
          • Machine Condition Monitoring : OPC UA + InfluxDB + Grafana Dashboard
            • “Machine Condition Monitoring Example” - Single File
          • Machine Utilization Example (Multi file service composition) : Modbus TCP + InfluxDB + Grafana + MSS
            • “Machine Utilization Example” - Machine Connectivity
            • “Machine Utilization Example” - Dashboards with role based access permission
            • “Machine Utilization Example” - Push data to MSSQL Database
      • Services View
      • Setting Up and Configuring Services
        • Installing Services
        • Enabling Services
        • Updating Services
        • Disabling Services
        • Deleting Services
      • Service Details View
      • ServiceID
      • Inter-Service Referencing
      • Deviation
      • Service Logs
        • Logs of Individual Services
        • Logs of All Services
      • Rule Engine
        • Data Processing Rules
        • Rule Sandbox
      • API Definition
    • Resources
      • Servers
      • Containers
      • Volumes
      • Connections
      • Endpoints
      • Mappings
      • Nodes
      • API Definition
    • User Management
      • Users and Roles View
      • Users
      • Roles
      • Permissions
      • Password Policy Rules
      • Default Admin User
      • MQTT Users
      • Adding a MQTT Publish Prefix for Users
      • Multi-Factor Authentication
      • Long lived JSON Web Tokens
      • Access Permissions for Admin-UI
        • UI Access
        • Minimum Access Role Pages
      • API Definition
    • Client Registry
      • Implicit Flow
      • Explicit Flow
      • Granting Access
      • API Definition
    • Certificates
    • Monitoring
      • Data Explorer
      • Live Data
    • Workbench
      • Flows in Git Repositories
    • System Status
      • Info
      • Metrics
      • Status
      • Retrieving More System Information
      • System Health
      • API Definition
    • Backup and Restore
      • Volumes
      • User Database
    • Configuration
      • Environment Variables
      • LDAP Configuration
      • MFA Configuration
    • Agents
      • Agents View
      • Installing Agents
        • Installing Agents via Docker
        • Installing Agents via Docker Compose
        • Installing Agents via Kubernetes
        • Using Mutual TLS for Agents
      • Registering Agents in Connectware
      • Using Agents
      • Monitoring Agents
      • Troubleshooting Agents
    • Industry Protocol Details
      • ADS
        • AdsConnection
        • AdsEndpoint
      • BACnet
        • BacnetConnection
        • BacnetEndpoint
      • EtherNet/IP
        • EthernetIpConnection
        • EthernetIpEndpoint
      • Focas
        • FocasConnection
        • FocasEndpoint
      • Generic VRPC
        • GenericVrpcConnection
        • GenericVrpcEndpoint
      • Hottinger Baldwin Messtechnik (HBM)
        • HbmdaqConnection
        • HbmdaqEndpoint
      • Heidenhain DNC
        • HeidenhainConnection
        • HeidenhainEndpoint
      • HTTP/REST
        • HttpConnection
        • HttpEndpoint
      • HTTP Server
        • HttpServer
        • HttpNode
      • InfluxDB
        • InfluxdbConnection
        • InfluxdbEndpoint
      • Kafka
        • KafkaConnection
        • KafkaEndpoint
      • Modbus/TCP
        • ModbusConnection
        • ModbusEndpoint
      • MQTT
        • MqttConnection
        • MqttEndpoint
      • MSSQL
        • MssqlConnection
        • MssqlEndpoint
      • OPC DA
        • OpcdaConnection
        • OpcdaEndpoint
      • OPC UA
        • OPC UA Client
          • OpcuaConnection
          • OpcuaEndpoint
        • OPC UA Server
          • OpcuaServer
          • OpcuaNode
        • OPC UA Object Types
        • OPC UA Server References
          • OpcuaReferenceNode
          • OpcuaObjectNode
      • Siemens SIMATIC S7
        • S7Connection
        • S7Endpoint
      • Shdr
        • ShdrConnection
        • ShdrEndpoint
      • Sinumerik
        • SinumerikConnection
        • SinumerikEndpoint
      • Sopas
        • SopasConnection
        • SopasEndpoint
      • SQL
        • SqlConnection
        • SqlEndpoint
      • Werma WIN Ethernet
        • WermaConnection
        • WermaEndpoint
      • Systemstate
        • SystemstateConnection
        • SystemstateEndpoint
      • API Definition
    • Connectware Licensing
    • Changelog
      • General changes from 0.x to 1.0
        • Upgrading from 0.x to 1.0
    • Upgrade Guide
      • Upgrading from 1.x to 1.7.0
      • Upgrading from 1.x to 1.5.0
Powered by GitBook
LogoLogo

Cybus

  • Terms and Condition
  • Imprint
  • Data Privacy

© Copyright 2025, Cybus GmbH

On this page
  • Container Images
  • Files
  • Container Name
  • Docker Networks
  • Properties
  • capAdd
  • command
  • cpus
  • devices
  • entrypoint
  • environment
  • image
  • labels
  • memory
  • ports
  • privileged
  • restart
  • volumes
  • workingDir
  • ulimit
  • Example

Was this helpful?

  1. Documentation
  2. Services
  3. Service Commissioning Files
  4. Structure of Service Commissioning Files
  5. resources

Cybus::Container

PreviousCybus:MappingNextDocker problem with network changes

Last updated 6 months ago

Was this helpful?

The Cybus::Container resource creates a docker container that is enabled to communicate to the Connectware’s internal broker via MQTT. A docker container can implement any choice of data processing or presentation, such as data analytics with python, or a dashboard with grafana, or anything else that can be wrapped into a container.

Note

This feature is available only in docker-compose deployments, but not in kubernetes deployments of Connectware. Using this in a kubernetes deployment will be refused with a suitable error message.

Container Images

Within Connectware, docker containers from various sources (called “Docker registries” or “repositories”) can be loaded at runtime. The source registry of any particular docker container is specified in the image property. You can use both the Cybus registry or the public “Docker hub” registry, or alternatively additional private registries, see .

Files

Commissioning files can additionally specify files as resources, which will be created inside . Containers can then mount those volumes using the property to access the file content that was written by the Cybus::File resource.

Container Name

The name of the newly created docker container will be built from the and the , separated by a hyphen. Example: A container resource with the resource ID my_container, used in a service that is installed using the service ID myService, will be created with the container name myService-my_container.

The container name will also be used as the container’s hostname property, which is the hostname that is visible for the application inside the container. When intending to communicate from one container to another container inside the same service, the name can be used to connect to this container.

Note that a container hostname argument must not be longer than 63 characters (according to RFC 1183), hence the resulting container name consisting of service ID and resource ID must not exceed this limit, too. Otherwise the creation of the container resource will be refused with an appropriate error message.

Docker Networks

All docker containers of one common service and commissioning file will be run inside a separate docker network. This service-specific docker network is named simply by the . This network connects all containers of this service, and also the ingress proxy container of Connectware, whose container name is simply connectware.

This structure ensures that all custom containers within one service can securely communicate with each other, but not (unintendedly) interfere with other containers of other services. If the communication of containers between different services is intended, or the communication of outside requests with any such custom containers, suitable resources need to be defined to allow any connection setups in detail.

There is one somewhat unexpected caveat in the event of changing Docker network configurations, leading to temporary loss of certain data connections each time this occurs. This event can occur only during enabling or disabling of a Connectware service. Further details are explained on the following page:

Properties

Property
Type
Required
Default

enum[]

Optional

string[]

Optional

number

Optional

0.0

object[]

Optional

string[]

Optional

object

Optional

string

Required

object

Optional

integer

Optional

0

string[]

Optional

boolean

Optional

false

enum

Optional

"no"

string[]

Optional

string

Optional

number

Optional

capAdd

A list of kernel capabilities to add to the container.

  • is optional

  • type: enum[]

    • All items must be of the type: string

    • Allowed Values:

      • ALL

      • AUDIT_CONTROL

      • AUDIT_WRITE

      • CHOWN

      • DAC_OVERRIDE

      • DAC_READ_SEARCH

      • FOWNER

      • FSETID

      • IPC_LOCK

      • IPC_OWNER

      • KILL

      • LEASE

      • LINUX_IMMUTABLE

      • MAC_ADMIN

      • MAC_OVERRIDE

      • MKNOD

      • NET_ADMIN

      • NET_BIND_SERVICE

      • NET_BROADCAST

      • NET_RAW

      • SETFCAP

      • SETGID

      • SETPCAP

      • SETUID

      • SYSLOG

      • SYS_ADMIN

      • SYS_BOOT

      • SYS_CHROOT

      • SYS_MODULE

      • SYS_NICE

      • SYS_PACCT

      • SYS_PTRACE

      • SYS_RAWIO

      • SYS_RESOURCE

      • SYS_TIME

      • SYS_TTY_CONFIG

      • WAKE_ALARM

command

Command to run specified as a string or an array of strings.

  • is optional

  • type: string[]

    • All items must be of the type: string

cpus

Specify how much of the available CPU resources a container can use. If zero, no limit is set. If you want to set a limit here specify a non-zero value. For instance, if the host machine has two CPUs and you set cpus to 1.5, the container is guaranteed at most one and a half of the CPUs.

  • is optional

  • type: number

  • default: 0.0

devices

A list of devices to add to the container. Each device entry is specified as an object with mandatory keys PathOnHost, PathInContainer and CgroupPermissions.

  • is optional

  • type: object[]

entrypoint

The entry point for the container as a string or an array of strings.

  • is optional

  • type: string[]

    • All items must be of the type: string

environment

A list of environment variables to set inside the container.

  • is optional

  • type: object

  • You can refer to some default parameters like this:

myServiceContainer:
    type: Cybus::Container
    properties:
        image: registry.cybus.io/cybus-services/baz-dashboard:0.2.0
        environment:
            CYBUS_MQTT_HOST: !ref Cybus::MqttHost
            CYBUS_MQTT_PORT: !ref Cybus::MqttPort
            CYBUS_MQTT_USER: !ref Cybus::MqttUser
            CYBUS_MQTT_PASSWORD: !ref Cybus::MqttPassword

image

Specifies the image to use for this container. The image specifier may consist of several parts:

  • (Optional) The repository address, which is the domain name of a docker repository server, also known as registry, e.g. registry.cybus.io

  • The image name, which can either be written as a filesystem path or just as a plain name, e.g. alpine or cybus-services/baz-dashboard

  • (Optional) The image tag, which usually is the version number, e.g. 0.2.0

Short Example: A very simple image specification, when using a container of the latest alpine linux, will look as follows:

image: alpine

Longer Example: An image specification for a container from the docker repository registry.cybus.io, in particular the container image name cybus-services/baz-dashboard, in version 0.2.0, is:

image: registry.cybus.io/cybus-services/baz-dashboard:0.2.0

The Connectware uses the current license key as credentials for the Cybus repository server at the address registry.cybus.io. Additionally, the public hub.docker.com repository could be used if public docker images should be used.

  • is required

  • type: string

labels

User-defined key/value metadata.

  • is optional

  • type: object

memory

The maximum amount of memory the container can use, in bytes. If zero, no limit is set. If you set a limit (by specifying a non-zero value here) the minimum allowed value is 4194304 bytes (equal to 4 megabyte).

  • is optional

  • type: integer

  • default: 0, i.e. no limit is set.

ports

Defines port mappings between host and container OS

  • is optional

  • type: Array of string[]

  • All items must be of the type string: <hostPort>:<containerPort>

privileged

Defines whether the container is privileged, i.e. the container has full access to the host.

  • is optional

  • type: boolean

  • default: false

restart

The behavior to apply when the container exits.

  • is optional

  • type: enum

  • default: "no", i.e. the default is not to restart.

    • The value of this property must be equal to one of the below.

      • no

      • always

      • on-failure

      • unless-stopped

volumes

A reference to a volume resource that should be attached to this container

  • is optional

  • type: string[]

    • All items must be of the type: string

workingDir

The working directory for commands to run in.

  • is optional

  • type: string

ulimit

Specifies how many open files per processes are allowed in this container. If given, both soft and hard ulimit values (called NOFILES for number of files) is set to this value.

If not given, the system default (or Docker environment’s default) for the maximum number of open files is in effect, instead of any specified limit.

Given that this property configures values related to shared resources some environments will not allow for it to be changed, this is specially true when the Docker host is running inside a virtualized environment.

  • is optional

  • type: number

Example

myServiceContainer:
    type: Cybus::Container
    properties:
        image: registry.cybus.io/cybus-services/baz-dashboard:0.2.0
        volumes:
            - !sub ${myVolume}:/some/path/in/container
        ports:
            - 8080:8080
        environment:
            SOME_ENV_VARIABLE: 'important setting'

Docker problem with network changes
capAdd
command
cpus
devices
entrypoint
environment
image
labels
memory
ports
privileged
restart
volumes
workingDir
ulimit
Cybus::File
volumes
service ID
service ID
Ingress::Routes
image
volumes
resource ID