From 030afce17e92fe2d24707c3fd4a675a43de87f2a Mon Sep 17 00:00:00 2001 From: Guilherme Rodrigues de Lima Date: Fri, 19 Apr 2024 16:31:57 -0300 Subject: [PATCH] base: add ether_ip IOC and module. The module was installed in the modules directory, because there can be other IOCs that depend on the ether_ip module, even though it ships an IOC of its own. --- CHANGES.md | 5 +++++ base/.env | 3 +++ base/Dockerfile | 8 ++++++++ base/docker-compose.yml | 2 ++ base/install_modules.sh | 4 ++++ base/install_opcua.sh | 17 +++++++++++++++++ base/musl/Dockerfile | 1 + base/musl/docker-compose.yml | 1 + 8 files changed, 41 insertions(+) create mode 100755 base/install_opcua.sh diff --git a/CHANGES.md b/CHANGES.md index 14d8715..599823c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,11 @@ ## Unreleased +### New features + +* base: add OPCUA and `ether_ip` IOCs and modules. by @guirodrigueslima in + https://github.com/cnpem/epics-in-docker/pull/57 + ## v0.7.0 Users of the `autosave` and `caPutLog` modules should update to this release, diff --git a/base/.env b/base/.env index e376d52..2220a35 100644 --- a/base/.env +++ b/base/.env @@ -15,6 +15,7 @@ RECCASTER_VERSION=1.5 IPAC_VERSION=2.16 CAPUTLOG_VERSION=R4.0 RETOOLS_VERSION=b7abe82533cdbd7ddbc2dc845c95a2c51b7f2db9 +ETHER_IP_VERSION=ether_ip-3-3 AREA_DETECTOR_VERSION=R3-12-1 NDSSCPIMEGA_VERSION=1.0.0 @@ -22,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 53845ec..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 @@ -50,6 +51,7 @@ ARG RECCASTER_VERSION ARG IPAC_VERSION ARG CAPUTLOG_VERSION ARG RETOOLS_VERSION +ARG ETHER_IP_VERSION COPY caputlog-waveform-fix.patch . COPY install_modules.sh . @@ -68,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 5e55efe..a1a0d01 100644 --- a/base/docker-compose.yml +++ b/base/docker-compose.yml @@ -24,8 +24,10 @@ services: IPAC_VERSION: ${IPAC_VERSION} CAPUTLOG_VERSION: ${CAPUTLOG_VERSION} RETOOLS_VERSION: ${RETOOLS_VERSION} + ETHER_IP_VERSION: ${ETHER_IP_VERSION} AREA_DETECTOR_VERSION: ${AREA_DETECTOR_VERSION} NDSSCPIMEGA_VERSION: ${NDSSCPIMEGA_VERSION} LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION} MOTOR_VERSION: ${MOTOR_VERSION} PMAC_VERSION: ${PMAC_VERSION} + OPCUA_VERSION: ${OPCUA_VERSION} diff --git a/base/install_modules.sh b/base/install_modules.sh index 311e0c4..0516e5c 100755 --- a/base/install_modules.sh +++ b/base/install_modules.sh @@ -61,3 +61,7 @@ EPICS_BASE install_from_github brunoseivam retools RETOOLS $RETOOLS_VERSION " EPICS_BASE " + +install_from_github -i epics-modules ether_ip ETHER_IP $ETHER_IP_VERSION " +EPICS_BASE +" 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} diff --git a/base/musl/Dockerfile b/base/musl/Dockerfile index 04b50b8..0adc10f 100644 --- a/base/musl/Dockerfile +++ b/base/musl/Dockerfile @@ -51,6 +51,7 @@ ARG RECCASTER_VERSION ARG IPAC_VERSION ARG CAPUTLOG_VERSION ARG RETOOLS_VERSION +ARG ETHER_IP_VERSION WORKDIR ${EPICS_MODULES_PATH} COPY caputlog-waveform-fix.patch . diff --git a/base/musl/docker-compose.yml b/base/musl/docker-compose.yml index 1f7f52a..e21d3ba 100644 --- a/base/musl/docker-compose.yml +++ b/base/musl/docker-compose.yml @@ -24,3 +24,4 @@ services: IPAC_VERSION: ${IPAC_VERSION} CAPUTLOG_VERSION: ${CAPUTLOG_VERSION} RETOOLS_VERSION: ${RETOOLS_VERSION} + ETHER_IP_VERSION: ${ETHER_IP_VERSION}