From 40e00b5806ebd3af84744c1f5fcc80e101190a6a Mon Sep 17 00:00:00 2001 From: Guilherme Rodrigues de Lima Date: Wed, 24 Apr 2024 10:09:35 -0300 Subject: [PATCH] base: add OPCUA IOC and module. A new install script was added for it because it isn't supported for all our current platforms, due to being prebuilt, and includes extra build steps for that same reason. Its install location follows the same reasoning as ether_ip. --- CHANGES.md | 2 +- base/.env | 2 ++ base/Dockerfile | 7 +++++++ base/docker-compose.yml | 1 + base/install_opcua.sh | 17 +++++++++++++++++ 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 base/install_opcua.sh diff --git a/CHANGES.md b/CHANGES.md index a5a947d..4d3983d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,7 @@ need to update if they noticed missing features. https://github.com/cnpem/epics-in-docker/pull/42 * ci: add reusable job for IOC images. by @ericonr in https://github.com/cnpem/epics-in-docker/pull/49 -* base: add `ether_ip` IOC and module. by @guirodrigueslima in +* base: add OPCUA and `ether_ip` IOCs and modules. by @guirodrigueslima in https://github.com/cnpem/epics-in-docker/pull/57 ### Bug fixes diff --git a/base/.env b/base/.env index 9908946..2220a35 100644 --- a/base/.env +++ b/base/.env @@ -23,3 +23,5 @@ LIBSSCPIMEGA_VERSION=fb8acf533a7c01b5266bf32d60d1a5f923e19523 MOTOR_VERSION=R7-3-1 PMAC_VERSION=2-6-1 + +OPCUA_VERSION=0.9.4 diff --git a/base/Dockerfile b/base/Dockerfile index f6a9a48..4a22930 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -17,6 +17,7 @@ RUN apt update -y && \ libtiff-dev \ libusb-1.0-0-dev \ libxml2-dev \ + libssl-dev \ re2c \ wget \ ca-certificates @@ -69,3 +70,9 @@ ARG PMAC_VERSION COPY install_motor.sh . RUN ./install_motor.sh + +ARG DEBIAN_VERSION +ARG OPCUA_VERSION + +COPY install_opcua.sh . +RUN ./install_opcua.sh diff --git a/base/docker-compose.yml b/base/docker-compose.yml index 22d20dc..a1a0d01 100644 --- a/base/docker-compose.yml +++ b/base/docker-compose.yml @@ -30,3 +30,4 @@ services: LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION} MOTOR_VERSION: ${MOTOR_VERSION} PMAC_VERSION: ${PMAC_VERSION} + OPCUA_VERSION: ${OPCUA_VERSION} diff --git a/base/install_opcua.sh b/base/install_opcua.sh new file mode 100755 index 0000000..e61890a --- /dev/null +++ b/base/install_opcua.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -ex + +. /opt/epics/install-functions.sh + +opcua_release_url=https://github.com/epics-modules/opcua/releases/download/v${OPCUA_VERSION} +opcua_release_file=IOC_opcua-${OPCUA_VERSION}_Base-${EPICS_BASE_VERSION}_debian${DEBIAN_VERSION%.*}.tar.gz +lnls-get-n-unpack -l $opcua_release_url/$opcua_release_file + +mv binaryOpcuaIoc opcua +install_module -i opcua OPCUA " +EPICS_BASE +" + +EPICS_HOST_ARCH=`perl ${EPICS_BASE_PATH}/lib/perl/EpicsHostArch.pl` +ln -s ${EPICS_MODULES_PATH}/opcua/{opcuaIocApp/libopcua.so.0.9,lib/${EPICS_HOST_ARCH}/libopcua.so}