What is an IOhub container
A container is the smallest piece of software in the IOhubTM Application that is designed to execute a specific tasks. The container is developed with Docker. You can combine two or more IOhubTM containers to execute more complex tasks. This combination of containers is defined as an IOhubTM application.IOhubTM has a Catalog of containers specifically designed for the industrial machine applications. This Catalog includes a continuously growing list of ready-to-use containers.
Hundreds of containers are also available on the Docker hub web site from which you can select and deploy to build your applications.
Add containers to an application
Containers can be added in different ways:
- from IOhubTM Catalog
- from Docker Registry
- from a Template
Add containers from IOhub CatalogIOhubTM Catalog is the simplest and fastest way to build your IOhubTM application. IOhubTM Catalog includes several out-of-the-box Docker images that have been already configured to work together.
The IOhubTM catalog was designed to give the maximum result with minimum effort.
You can select a container from the IOhubTM catalog from the application management interface (IOhubTM/EZ BoxTM name/Manage application name):
Choose from Catalogbutton.
+Addbutton to select and add the container you need.
- Repeat the step above to add other Containers into your Application.
Please note that any time you add or remove a container, you'll be required to confirm the operation.
All added containers will be shown in the
Containers list section like into the example below:
Please check the "Configure and customize the containers" section if you need to manage the containers.
Add containers form a Docker registryIOhubTM allows users to add Docker containers from the Docker Hub registry or any other public Docker registry.
Docker Hub is the world’s largest online repository of container images.
Docker images may be public or private.
Public vs Private containers
There are no technical differences between public or private containers.
Public Docker containers are available to everyone from the Docker Hub registry or any other public Docker registry and anyone can use them in IOhubTM.
Private Docker containers let you keep container images private, either to your account or within an organization or team. Private Docker containers require a User ID and a token to be accessed and used.
Please visit Docker Hub website for further information and Docker image availability.
In order to add a container in an IOhubTM application from Docker Hub, you need to follow the instructions below:
- Type the
Container name. (Required)
- Type the
Docker Imagename (Required)
Docker image is privatecheck box if containers require authentication and add the proper additional information.
Add Containerbutton to add the container into the Application.
Names must be lowercase and cannot include spaces. Names cannot start with "ezvpn-" prefix. "ezvpn-" prefix is reserved for internal use only.
Below are the names of the Docker images you'll find into the Docker registry website.
Docker image names allow tag usage. Some example includes:
Docker authentication information is provided directly from Docker Hub. You can create the token for your private image when accessing the Docker Hub profile security section of your account.
Please note that you'll be able to customize the container as soon as it has been added.
Configure and customize the containers
In order to facilitate IOhubTM usage, all IOhubTM catalog containers have already been preconfigured to facilitate the implementation and the interaction with each other.
Some containers may require your attention in order to configure or customize the parameters or variables necessary to adapt the containers to your environment.
Any containers you add into an application can be customized and configured to fit your needs.
Changes to the IOhubTM catalog's preconfigured containers may break the communications or interactions with other pre-configured IOhubTM catalog containers. Please check the documentation of each IOhubTM catalog container before applying any changes to the default settings.
To configure or customize containers please access the Container Management page (IOhubTM/EZ BoxTM name/Manage Application name):
Managebutton to access the Container Management interface.
Click on containers details to review the container configuration.
Within the containers management page you can customize and configure the following parameters (IOhubTM/EZ BoxTM name/Application name/Manage container name):
Please note that some of the above parameters may have already been configured if the container was added from IOhubTM Catalog.
Environment variables is the common way to pass information to a Docker container. Docker containers within the IOhubTM catalog have already been configured to interact with other containers within the catalog. All you need to do is to add the additional variable and value to set the container for your needs.
Please refer to the IOhubTM Catalog containers information page for details about the variables. You may also review the documentation on the Docker Hub website for further information on specific Docker containers.
In order to add an Environment Variable:
- Type the variable name.
- Type the value for the variable.
- Select the validation language for the payload.
Validate asbutton to validate the content of the payload.
Add Variablebutton to add the variable.
Please note that steps 3 and 4 are optional and recommended for payload has been written with one of the following languages: JSON, XML, YAML, EXCH.
Removebutton to delete the variable.
To update a variable value, add a new variable with the same name and a new value. Variables with the same name are overwritten.
Containers' networks are isolated by design and cannot be reached from other containers, applications or external users. Port mapping allows a container to be contacted from other applications or external users.
To add a port mapping:
- In the External port field type the port number that will be used to contact the container.
- In the internal port type, type the port number used by the container.
Add Mappingbutton to create the port mapping.
In Port mappings, a network port forwarding method is applied automatically.
Adding the same external port will update port mapping entry.
Please note that ports from 12300 to 13299 are reserved for IOhubTM system applications.
To remove a port mapping entry:
Exposed ports are used to provide network communication between containers within the same application. A container that needs to be contacted by another container (within the same application) will need to be exposed to a communication port.
To configure exposed ports:
- Type the port number you need to expose.
Please note that ports from 12300 to 13299 are reserved for IOhubTM internal system applications.
To remove an exposed port:
- Click the
Removebutton that belongs to the port you want to remove.
In the Devices section you can enable the available USB ports to let the container use an external device such as a USB-to-Serial adapter (suitable for example for RS485, RS422, RS232 and other connection types).
When a compatible USB device is connected, the container can use the USB interface through a standard device driver, mapped from the docker host to the container.
The number of available USB ports may vary and it depends on the EZ BoxTM device you are using.IOhubTM automatically shows the exact number of available ports of the device you are configuring.
At the moment we support only USB-to-serial devices. The Prolific, FTDI and CP210X serial-to-USB chipset are tested and fully supported. Other chipset might work as well but they are untested at the moment.
Each USB device gets mapped in the container with a name depending on the physical port it is connected to. You can therefore configure your container without worring about the order you plug the devices into the EZ BoxTM.
For example, the serial adapters connected to the physical port #2, will provide a driver, inside the container, with name
If you need to know the exact number of available ports has your device and what name has each physical port, please check the technical detail of your EZ BoxTM device into the IOconTM hardware section
To enable a port:
- Tick all the /dev/ttyUSB<n> ports you need to enable.
- Click the
Update Devicesbutton to save the devices configuration.
To disable a port:
- Untick all the /dev/ttyUSB<n> ports you need to disable.
- Click the
Update Devicesbutton to save the devices configuration.
Volumes section defines data storage volumes for the container. Volumes are useful to store continuous information within the IOhubTM device. A device power cycle does not remove content saved in the volumes. Volumes size is dynamic and depends on the IOhubTM device storage.
For your convenience, the volume section of IOhubTM catalog containers have been already configured where necessary.IOhubTM allow different type of volumes:
This is the standard volume. Access to this type of volume is allowed on the container only. Other containers cannot access this volume. Up to 5 standard Volumes can be configured for each container.
Access to this volume is allowed to all containers within the same application.
Access to this volume is allowed to all applications within the same device.
To configure a volume for the container:
- Click the Volume drop down menu and select the volume type you need.
- Type the Mount Point path for the container.
Add Mount Pointbutton to add the volume.
Mount Point path may vary from container to container. Please refer to the Docker container documentation for further details.
To remove a volume:
Removebutton of the Mounting point.
Please note that removing a volume will delete any data in the volume. Data cannot be recovered.
Dependencies section defines startup relations among containers. When a container has a dependency it will be started when the dependent container has been started. A container may have more than one dependency. Dependencies guarantee the container will be executed when its dependent has been started.
To create a dependency:
Depends Ondrop down menu and select the dependent container.
Add Dependencybutton to create the dependency.
Repeat the above steps to add more dependencies.
To remove a dependency:
- Click the
Removebutton that belongs to the dependency.