diff --git a/docker-compose/Makefile b/docker-compose/Makefile index 6c2e767c8dfcac11cd1fb1d54f035e7b73b1f48a..91c9c52c67687539453bcada8dce1db1a3327b80 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -92,6 +92,8 @@ pull: ## pull the images from the Docker hub $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) pull build: ## rebuild images + # docker-compose does not support build dependencies, so manage those here + $(DOCKER_COMPOSE_ARGS) docker-compose -f lofar-device-base.yml build $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) build up: minimal ## start the base TANGO system and prepare all services diff --git a/docker-compose/device-pcc.yml b/docker-compose/device-pcc.yml new file mode 100644 index 0000000000000000000000000000000000000000..db4848121748f5cc0c819ca88c7df06f5bb54265 --- /dev/null +++ b/docker-compose/device-pcc.yml @@ -0,0 +1,30 @@ +# +# Docker compose file that launches an interactive iTango session. +# +# Connect to the interactive session with 'docker attach itango'. +# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> +# +# Defines: +# - itango: iTango interactive session +# +# Requires: +# - lofar-device-base.yml +# +version: '2' + +services: + device-pcc: + image: lofar-device-base + container_name: ${CONTAINER_NAME_PREFIX}device-pcc + network_mode: ${NETWORK_MODE} + volumes: + - ${TANGO_LOFAR_CONTAINER_MOUNT} + environment: + - TANGO_HOST=${TANGO_HOST} + entrypoint: + - /usr/local/bin/wait-for-it.sh + - ${TANGO_HOST} + - --timeout=30 + - --strict + - -- + - python3 -u ${TANGO_LOFAR_CONTAINER_DIR}/PCC/PCC LTS -v diff --git a/docker-compose/device-sdp.yml b/docker-compose/device-sdp.yml new file mode 100644 index 0000000000000000000000000000000000000000..8671d8666c18e03ce929dc4faa8576975681deda --- /dev/null +++ b/docker-compose/device-sdp.yml @@ -0,0 +1,30 @@ +# +# Docker compose file that launches an interactive iTango session. +# +# Connect to the interactive session with 'docker attach itango'. +# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> +# +# Defines: +# - itango: iTango interactive session +# +# Requires: +# - lofar-device-base.yml +# +version: '2' + +services: + device-sdp: + image: lofar-device-base + container_name: ${CONTAINER_NAME_PREFIX}device-sdp + network_mode: ${NETWORK_MODE} + volumes: + - ${TANGO_LOFAR_CONTAINER_MOUNT} + environment: + - TANGO_HOST=${TANGO_HOST} + entrypoint: + - /usr/local/bin/wait-for-it.sh + - ${TANGO_HOST} + - --timeout=30 + - --strict + - -- + - python3 -u ${TANGO_LOFAR_CONTAINER_DIR}/SDP/SDP LTS -v diff --git a/docker-compose/lofar-device-base.yml b/docker-compose/lofar-device-base.yml new file mode 100644 index 0000000000000000000000000000000000000000..3d40f0f63554222907e6094bc61f1342cc8fabfa --- /dev/null +++ b/docker-compose/lofar-device-base.yml @@ -0,0 +1,21 @@ +# +# Docker compose file that forms the basis for LOFAR tango devices +# +# This is an abstract image that does not need to be spinned up, but +# might be out of consistency with other images. +# +# Defines: +# - device-base: Base configuration for devices. +# +# Requires: +# - tango.yml +# +version: '2' + +services: + lofar-device-base: + image: lofar-device-base + build: + context: lofar-device-base + container_name: ${CONTAINER_NAME_PREFIX}lofar-device-base + network_mode: ${NETWORK_MODE} diff --git a/docker-compose/lofar-device-base/Dockerfile b/docker-compose/lofar-device-base/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cd6b59511f7e0a3e515ab282775edeadec6b9aaf --- /dev/null +++ b/docker-compose/lofar-device-base/Dockerfile @@ -0,0 +1,4 @@ +FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:latest + +COPY lofar-requirements.txt /lofar-requirements.txt +RUN pip3 install -r /lofar-requirements.txt diff --git a/docker-compose/lofar-device-base/lofar-requirements.txt b/docker-compose/lofar-device-base/lofar-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..90d21efe0e5ac0601204d4f05ce7efcd16dca2de --- /dev/null +++ b/docker-compose/lofar-device-base/lofar-requirements.txt @@ -0,0 +1,2 @@ +opcua >= 0.98.9 +astropy