diff --git a/CHANGES.md b/CHANGES.md index 6a9aef7..dd0c89a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,7 +9,7 @@ * ci: add reusable job for IOC images. by @ericonr in https://github.com/cnpem/epics-in-docker/pull/49 * base: Created a new install_iocs() function and changed the function - name structure. by @guirodrigueslima in + name structure. Added OPCUA and ether_ip IOC. by @guirodrigueslima in https://github.com/cnpem/epics-in-docker/pull/57 ### Bug fixes diff --git a/base/.env b/base/.env index ee947ff..d089510 100644 --- a/base/.env +++ b/base/.env @@ -23,3 +23,6 @@ MOTOR_VERSION=R7-3-1 PMAC_VERSION=2-6-1 LIBSSCPIMEGA_VERSION=fb8acf533a7c01b5266bf32d60d1a5f923e19523 + +OPCUA_VERSION=0.9.4 +ETHER_IP_VERSION=ether_ip-3-3 diff --git a/base/Dockerfile b/base/Dockerfile index 1cbf43c..d540741 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 @@ -27,6 +28,7 @@ COPY lnls-run.sh /usr/local/bin/lnls-run ARG EPICS_BASE_VERSION ENV EPICS_BASE_PATH /opt/epics/base ENV EPICS_MODULES_PATH /opt/epics/modules +ENV EPICS_IOCS_PATH /opt/epics/iocs ENV EPICS_RELEASE_FILE /opt/epics/RELEASE WORKDIR /opt/epics @@ -36,6 +38,7 @@ COPY backport-epics-base-musl.patch . COPY install_epics.sh . RUN ./install_epics.sh +ARG DEBIAN_VERSION ARG PVXS_VERSION ARG SEQUENCER_VERSION ARG CALC_VERSION @@ -66,3 +69,11 @@ RUN ./install_area_detector.sh COPY install_motor.sh . RUN ./install_motor.sh + +ARG OPCUA_VERSION +ARG ETHER_IP_VERSION + +WORKDIR ${EPICS_IOCS_PATH} + +COPY install_iocs.sh . +RUN ./install_iocs.sh diff --git a/base/docker-compose.yml b/base/docker-compose.yml index 16e8757..7469a01 100644 --- a/base/docker-compose.yml +++ b/base/docker-compose.yml @@ -29,3 +29,5 @@ services: PMAC_VERSION: ${PMAC_VERSION} LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION} RETOOLS_VERSION: ${RETOOLS_VERSION} + OPCUA_VERSION: ${OPCUA_VERSION} + ETHER_IP_VERSION: ${ETHER_IP_VERSION} diff --git a/base/install_iocs.sh b/base/install_iocs.sh new file mode 100755 index 0000000..160cfd0 --- /dev/null +++ b/base/install_iocs.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -ex + +. /opt/epics/install-functions.sh + +#Build OPCUA IOC +lnls-get-n-unpack -l https://github.com/epics-modules/opcua/releases/download/v${OPCUA_VERSION}/IOC_opcua-${OPCUA_VERSION}_Base-${EPICS_BASE_VERSION}_debian${DEBIAN_VERSION%.*}.tar.gz +mv binaryOpcuaIoc opcua + +install_iocs opcua OPCUA " +EPICS_BASE +" + +EPICS_HOST_ARCH=`perl ${EPICS_BASE_PATH}/lib/perl/EpicsHostArch.pl` +ln -s ${EPICS_IOCS_PATH}/opcua/{opcuaIocApp/libopcua.so.0.9,lib/${EPICS_HOST_ARCH}/libopcua.so} + +#Build ether_ip IOC +install_github -i epics-modules ether_ip ETHER_IP $ETHER_IP_VERSION " +EPICS_BASE +"