Microservice: EC Protocol Bridge and Plugins¶
The following section describes the procedure to integrate a containerized Edge Control Protocol Bridge with plugins. These instructions assume that you have an existing ECI installation and you are familiar with building Docker containers and running the Edge Control Protocol Bridge.
Build EC Protocol Bridge Container¶
The following section is applicable to:

Do the following to build a Docker* image that contains the Edge Control Protocol Bridge with plugins.
If not already completed, Prepare Build System for Microservices.
Open a terminal on the build system and navigate to the extracted
Dockerfiles
directory. This directory should contain the following:$ ls application-containers softplc-containers
Navigate to the
application-containers
directory. This directory should contain the following:$ ls ec-protocol-bridge
Navigate to the
ec-protocol-bridge
directory. This directory should contain the following:$ ls build.sh Dockerfile README.md
Run the
build.sh
script, located in this directory, to build the EC Protocol Bridge Docker* image:/bin/bash build.sh
After the build has completed successfully, Docker* images would have been generated and tarballed.
Docker* Image Archive Name
Description of Docker* Image
ec-protocol-bridge.tar
Contains the EC Protocol Bridge and the available plugins
Execute EC Protocol Bridge Container¶
The following section is applicable to:

Install Docker if not already done.
Ensure that the Docker* daemon is active. Restart the Docker* daemon:
Warning: All Docker* containers that are currently running will also restart.
$ systemctl restart docker
Verify the status of the Docker* daemon:
$ systemctl status docker
Copy the Docker* image created earlier to the target system.
Load the copied Docker* image:
$ docker load < ec-protocol-bridge.tar
Check the Docker* images that are present on the target system:
$ docker images
The EC Protocol Bridge image that was loaded should be present in the list. Note down the name and tag of the image.
Here is a sample output:
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ec-protocol-bridge v2.0 4297400814be 49 seconds ago 913MB
Run the container. Note that
<container>
and<tag>
correspond to the values on the target system:$ docker run -it --cap-add IPC_LOCK --network host <container>:<tag>
For example, here is the command to run the EC Protocol Bridge container:
$ docker run --cap-add IPC_LOCK --network host --rm ec-protocol-bridge:v2.0
Customize EC Protocol Bridge Container¶
The following section is applicable to:

Do the following to customize the Docker* image that contains the Edge Control Protocol Bridge with plugins.
If not already completed, Prepare Build System for Microservices.
Open a terminal on the build system and navigate to the extracted
Dockerfiles
directory. This directory should contain the following:$ ls application-containers softplc-containers
Navigate to the
application-containers
directory. This directory should contain the following:$ ls ec-protocol-bridge
Navigate to the
ec-protocol-bridge
directory. This directory should contain the following:$ ls build.sh Dockerfile README.md
Add a custom YAML file to the
./assets/config
directory. This file will be used by the EC Protocol Bridge.Open
Dockerfile
in a text editor, and modify the line that contains theENTRYPOINT
definition to point to the YAML configuration file added in the previous step. For example:ENTRYPOINT ["ec-bridge", "/opt/ec-protocol-bridge/config/custom_config.yaml"]