From 1cdf26cc7304aa17dc5d2bd5d0dcadf280f95392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corn=C3=A9=20Lukken?= <lukken@astron.nl> Date: Mon, 8 Jan 2024 10:46:36 +0000 Subject: [PATCH] Fix pip internally managed hack --- .gitignore | 1 + .gitlab-ci.yml | 15 +- .prepare.gitlab-ci.yml | 8 +- bin/dump_ConfigDb.sh | 7 - bin/start-ds.sh | 2 +- docker-compose/.env | 28 -- docker-compose/Makefile | 301 ------------------ docker-compose/README.md | 119 ------- docker-compose/apsct-sim.yml | 24 -- docker-compose/apspu-sim.yml | 24 -- docker-compose/ccd-sim.yml | 24 -- docker-compose/device-afh.yml | 57 ---- docker-compose/device-afl.yml | 56 ---- docker-compose/device-aps.yml | 48 --- docker-compose/device-apsct.yml | 56 ---- docker-compose/device-apspu.yml | 56 ---- docker-compose/device-beamlet.yml | 56 ---- docker-compose/device-bst.yml | 63 ---- docker-compose/device-calibration.yml | 58 ---- docker-compose/device-ccd.yml | 56 ---- docker-compose/device-configuration.yml | 56 ---- docker-compose/device-digitalbeam.yml | 56 ---- docker-compose/device-docker.yml | 58 ---- docker-compose/device-ec.yml | 51 --- docker-compose/device-observation-control.yml | 55 ---- docker-compose/device-pcon.yml | 51 --- docker-compose/device-psoc.yml | 51 --- docker-compose/device-recvh.yml | 48 --- docker-compose/device-recvl.yml | 48 --- docker-compose/device-sdp.yml | 56 ---- docker-compose/device-sdpfirmware.yml | 56 ---- docker-compose/device-sst.yml | 63 ---- docker-compose/device-station-manager.yml | 51 --- docker-compose/device-temperature-manager.yml | 51 --- docker-compose/device-tilebeam.yml | 52 --- docker-compose/device-unb2.yml | 56 ---- docker-compose/device-xst.yml | 63 ---- docker-compose/ec-sim.yml | 25 -- docker-compose/grafana.yml | 45 --- docker-compose/integration-test.yml | 40 --- docker-compose/itango.yml | 52 --- docker-compose/itango/Dockerfile | 11 - docker-compose/itango/lofar-requirements.txt | 4 - docker-compose/jupyter-lab.yml | 39 --- docker-compose/lofar-device-base.yml | 44 --- docker-compose/loki.yml | 40 --- docker-compose/loki/Dockerfile | 2 - docker-compose/loki/local-config.yaml | 51 --- docker-compose/networks.yml | 26 -- docker-compose/prometheus-node-exporter.yml | 23 -- docker-compose/prometheus.yml | 43 --- docker-compose/prometheus/Dockerfile | 5 - docker-compose/prometheus/prometheus.yml | 46 --- docker-compose/recvh-sim.yml | 24 -- docker-compose/recvl-sim.yml | 24 -- docker-compose/sdptr-sim.yml | 25 -- docker-compose/sdptr.yml | 56 ---- docker-compose/tango-prometheus-exporter.yml | 79 ----- .../tango-prometheus-exporter/Makefile | 6 - docker-compose/tango-rest.yml | 42 --- docker-compose/tango.yml | 101 ------ docker-compose/unb2-sim.yml | 24 -- docker/Makefile | 38 +++ .../ci-runner/Dockerfile | 9 +- .../dsconfig/Dockerfile | 0 .../dsconfig/manage_object_properties.py | 0 .../dsconfig/merge_json.py | 0 {docker-compose => docker}/ec-sim/Dockerfile | 2 +- {docker-compose => docker}/ec-sim/ec_sim.py | 0 .../ec-sim/requirements.txt | 0 {docker-compose => docker}/grafana/Dockerfile | 0 {docker-compose => docker}/grafana/README.md | 0 .../grafana/datasources/loki.yaml | 0 .../grafana/datasources/tangodb.yaml | 0 .../grafana/stationcontrol-dashboards.yaml | 0 docker/integration-test/Dockerfile | 4 + .../jupyter-lab/Dockerfile | 2 +- .../stationcontrol-jupyter/ipython_config.py | 0 .../startup/00-tango.py | 0 .../startup/01-devices.py | 0 .../startup/02-stationcontrol.py | 0 .../stationcontrol-jupyter/startup/README.md | 0 .../stationcontrol/kernel.json | 0 .../jupyter-lab/jupyter_notebook_config.py | 0 .../jupyter-lab/requirements.txt | 0 .../notification.jupyterlab-settings | 0 .../git/plugin.jupyterlab-settings | 0 .../settings.jupyterlab-settings | 0 .../lofar-device-base/Dockerfile | 4 +- .../ephemerides/DE200/table.dat | Bin .../ephemerides/DE200/table.f0 | Bin .../ephemerides/DE200/table.f0i | Bin .../ephemerides/DE200/table.info | Bin .../ephemerides/DE200/table.lock | Bin .../geodetic/TAI_UTC/table.dat | Bin .../geodetic/TAI_UTC/table.f0 | Bin .../geodetic/TAI_UTC/table.info | Bin .../geodetic/TAI_UTC/table.lock | Bin .../lofar-device-base/casarc | 0 .../tango-prometheus-exporter/Dockerfile | 2 +- .../tango-prometheus-exporter/LICENSE | 0 .../tango-prometheus-exporter/README.md | 0 .../code/__init__.py | 0 .../code/pip-requirements.txt | 0 .../code/tango-prometheus-client.py | 0 .../tango-prometheus-exporter/get_metrics.sh | 0 .../lofar2-fast-policy.json | 0 .../lofar2-policy.json | 0 .../lofar2-slow-policy.json | 0 infra/README.md | 29 -- infra/dev/all.hcl | 1 + infra/dev/nomad/nomad.hcl | 1 + .../CS001/CalTable-CS001-HBA-150MHz.h5 | Bin .../CS001/CalTable-CS001-HBA-200MHz.h5 | Bin .../CS001/CalTable-CS001-HBA-250MHz.h5 | Bin .../CS001/CalTable-CS001-LBA-50MHz.h5 | Bin .../CalTable-DevStation-HBA-150MHz.h5 | Bin .../CalTable-DevStation-HBA-200MHz.h5 | Bin .../CalTable-DevStation-HBA-250MHz.h5 | Bin .../CalTable-DevStation-LBA-50MHz.h5 | Bin .../iers/ephemerides/DE200/table.dat | Bin .../iers/ephemerides/DE200/table.f0 | Bin .../iers/ephemerides/DE200/table.f0i | Bin .../iers/ephemerides/DE200/table.info | Bin .../iers/ephemerides/DE200/table.lock | Bin .../iers/geodetic/TAI_UTC/table.dat | Bin .../iers/geodetic/TAI_UTC/table.f0 | Bin .../iers/geodetic/TAI_UTC/table.info | Bin .../iers/geodetic/TAI_UTC/table.lock | Bin infra/dev/tango.hcl | 1 + infra/dev/tango/tango.hcl | 46 +-- infra/dev/tango/variables.hcl | 4 + infra/env.yaml | 10 +- infra/main.hcl | 64 ---- sbin/install-deps-ubuntu-debian.sh | 2 +- sbin/load_ConfigDb.sh | 7 - sbin/prepare_dev_env.sh | 2 +- sbin/run_integration_test.sh | 51 +-- sbin/run_service_test.sh | 16 +- sbin/tag_and_push_docker_image.sh | 54 ++-- sbin/update_ConfigDb.sh | 7 - setup.sh | 9 - tangostationcontrol/docs/source/developer.rst | 46 +-- .../docs/source/interfaces/control.rst | 2 +- .../test_tango_prometheus_client.py | 4 +- .../tangostationcontrol/devices/README.md | 2 +- .../test/prometheus/test_archiver_policy.py | 4 +- 147 files changed, 176 insertions(+), 3105 deletions(-) delete mode 100755 bin/dump_ConfigDb.sh delete mode 100644 docker-compose/.env delete mode 100644 docker-compose/Makefile delete mode 100644 docker-compose/README.md delete mode 100644 docker-compose/apsct-sim.yml delete mode 100644 docker-compose/apspu-sim.yml delete mode 100644 docker-compose/ccd-sim.yml delete mode 100644 docker-compose/device-afh.yml delete mode 100644 docker-compose/device-afl.yml delete mode 100644 docker-compose/device-aps.yml delete mode 100644 docker-compose/device-apsct.yml delete mode 100644 docker-compose/device-apspu.yml delete mode 100644 docker-compose/device-beamlet.yml delete mode 100644 docker-compose/device-bst.yml delete mode 100644 docker-compose/device-calibration.yml delete mode 100644 docker-compose/device-ccd.yml delete mode 100644 docker-compose/device-configuration.yml delete mode 100644 docker-compose/device-digitalbeam.yml delete mode 100644 docker-compose/device-docker.yml delete mode 100644 docker-compose/device-ec.yml delete mode 100644 docker-compose/device-observation-control.yml delete mode 100644 docker-compose/device-pcon.yml delete mode 100644 docker-compose/device-psoc.yml delete mode 100644 docker-compose/device-recvh.yml delete mode 100644 docker-compose/device-recvl.yml delete mode 100644 docker-compose/device-sdp.yml delete mode 100644 docker-compose/device-sdpfirmware.yml delete mode 100644 docker-compose/device-sst.yml delete mode 100644 docker-compose/device-station-manager.yml delete mode 100644 docker-compose/device-temperature-manager.yml delete mode 100644 docker-compose/device-tilebeam.yml delete mode 100644 docker-compose/device-unb2.yml delete mode 100644 docker-compose/device-xst.yml delete mode 100644 docker-compose/ec-sim.yml delete mode 100644 docker-compose/grafana.yml delete mode 100644 docker-compose/integration-test.yml delete mode 100644 docker-compose/itango.yml delete mode 100644 docker-compose/itango/Dockerfile delete mode 100644 docker-compose/itango/lofar-requirements.txt delete mode 100644 docker-compose/jupyter-lab.yml delete mode 100644 docker-compose/lofar-device-base.yml delete mode 100644 docker-compose/loki.yml delete mode 100644 docker-compose/loki/Dockerfile delete mode 100644 docker-compose/loki/local-config.yaml delete mode 100644 docker-compose/networks.yml delete mode 100644 docker-compose/prometheus-node-exporter.yml delete mode 100644 docker-compose/prometheus.yml delete mode 100644 docker-compose/prometheus/Dockerfile delete mode 100644 docker-compose/prometheus/prometheus.yml delete mode 100644 docker-compose/recvh-sim.yml delete mode 100644 docker-compose/recvl-sim.yml delete mode 100644 docker-compose/sdptr-sim.yml delete mode 100644 docker-compose/sdptr.yml delete mode 100644 docker-compose/tango-prometheus-exporter.yml delete mode 100644 docker-compose/tango-prometheus-exporter/Makefile delete mode 100644 docker-compose/tango-rest.yml delete mode 100644 docker-compose/tango.yml delete mode 100644 docker-compose/unb2-sim.yml create mode 100644 docker/Makefile rename {docker-compose => docker}/ci-runner/Dockerfile (55%) rename {docker-compose => docker}/dsconfig/Dockerfile (100%) rename {docker-compose => docker}/dsconfig/manage_object_properties.py (100%) rename {docker-compose => docker}/dsconfig/merge_json.py (100%) rename {docker-compose => docker}/ec-sim/Dockerfile (69%) rename {docker-compose => docker}/ec-sim/ec_sim.py (100%) rename {docker-compose => docker}/ec-sim/requirements.txt (100%) rename {docker-compose => docker}/grafana/Dockerfile (100%) rename {docker-compose => docker}/grafana/README.md (100%) rename {docker-compose => docker}/grafana/datasources/loki.yaml (100%) rename {docker-compose => docker}/grafana/datasources/tangodb.yaml (100%) rename {docker-compose => docker}/grafana/stationcontrol-dashboards.yaml (100%) create mode 100644 docker/integration-test/Dockerfile rename {docker-compose => docker}/jupyter-lab/Dockerfile (95%) rename {docker-compose => docker}/jupyter-lab/ipython-profiles/stationcontrol-jupyter/ipython_config.py (100%) rename {docker-compose => docker}/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/00-tango.py (100%) rename {docker-compose => docker}/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py (100%) rename {docker-compose => docker}/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/02-stationcontrol.py (100%) rename {docker-compose => docker}/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/README.md (100%) rename {docker-compose => docker}/jupyter-lab/jupyter-kernels/stationcontrol/kernel.json (100%) rename {docker-compose => docker}/jupyter-lab/jupyter_notebook_config.py (100%) rename {docker-compose => docker}/jupyter-lab/requirements.txt (100%) rename {docker-compose => docker}/jupyter-lab/user-settings/@jupyterlab/apputils-extension/notification.jupyterlab-settings (100%) rename {docker-compose => docker}/jupyter-lab/user-settings/@jupyterlab/git/plugin.jupyterlab-settings (100%) rename {docker-compose => docker}/jupyter-lab/user-settings/jupyterlab-skip-traceback/settings.jupyterlab-settings (100%) rename {docker-compose => docker}/lofar-device-base/Dockerfile (94%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.dat (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0 (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0i (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.info (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.lock (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.dat (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.f0 (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.info (100%) rename {docker-compose => docker}/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.lock (100%) rename {docker-compose => docker}/lofar-device-base/casarc (100%) rename {docker-compose => docker}/tango-prometheus-exporter/Dockerfile (85%) rename {docker-compose => docker}/tango-prometheus-exporter/LICENSE (100%) rename {docker-compose => docker}/tango-prometheus-exporter/README.md (100%) rename {docker-compose => docker}/tango-prometheus-exporter/code/__init__.py (100%) rename {docker-compose => docker}/tango-prometheus-exporter/code/pip-requirements.txt (100%) rename {docker-compose => docker}/tango-prometheus-exporter/code/tango-prometheus-client.py (100%) rename {docker-compose => docker}/tango-prometheus-exporter/get_metrics.sh (100%) rename {docker-compose => docker}/tango-prometheus-exporter/lofar2-fast-policy.json (100%) rename {docker-compose => docker}/tango-prometheus-exporter/lofar2-policy.json (100%) rename {docker-compose => docker}/tango-prometheus-exporter/lofar2-slow-policy.json (100%) delete mode 100644 infra/README.md rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/CS001/CalTable-CS001-HBA-150MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/CS001/CalTable-CS001-HBA-200MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/CS001/CalTable-CS001-HBA-250MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/CS001/CalTable-CS001-LBA-50MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/DevStation/CalTable-DevStation-HBA-150MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/DevStation/CalTable-DevStation-HBA-200MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/DevStation/CalTable-DevStation-HBA-250MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/caltables/DevStation/CalTable-DevStation-LBA-50MHz.h5 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/ephemerides/DE200/table.dat (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/ephemerides/DE200/table.f0 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/ephemerides/DE200/table.f0i (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/ephemerides/DE200/table.info (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/ephemerides/DE200/table.lock (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/geodetic/TAI_UTC/table.dat (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/geodetic/TAI_UTC/table.f0 (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/geodetic/TAI_UTC/table.info (100%) rename {docker-compose => infra/dev/seed-data}/object-storage/iers/geodetic/TAI_UTC/table.lock (100%) delete mode 100644 infra/main.hcl delete mode 100755 sbin/load_ConfigDb.sh delete mode 100755 sbin/update_ConfigDb.sh diff --git a/.gitignore b/.gitignore index b43090811..205a30417 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ infra/dev/nomad/tmp/* **/CDB/dump*.json .bin/* +/docker/lofar-device-base/tmp/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35578a611..9322859f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -64,7 +64,8 @@ wheel_packaging: tag="$CI_COMMIT_REF_SLUG" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" fi - - apk add --update make bash docker-compose python3 py3-pip + - apk add --update make bash python3 py3-pip + - python3 -m venv venv && source venv/bin/activate - pip install shyaml - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - touch ~/.Xauthority @@ -111,19 +112,15 @@ docker_build_image: matrix: - IMAGE: - ec-sim - - prometheus - tango-prometheus-exporter - - itango - grafana - - loki - jupyter-lab - dsconfig rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" changes: - - docker-compose/$IMAGE.yml - - docker-compose/$IMAGE/**/* - - docker-compose/.env + - docker/$IMAGE/**/* + - docker/Makefile - if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) || $CI_COMMIT_TAG script: # Do not remove 'bash' or statement will be ignored by primitive docker shell @@ -286,6 +283,7 @@ unit_test: - apk add --update bind-tools - apk add --update postgresql14-client gzip socat - apk add --update python3 py3-pip + - python3 -m venv venv && source venv/bin/activate - pip install shyaml - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - touch /root/.Xauthority @@ -310,8 +308,6 @@ unit_test: integration_test_docker: extends: .test_docker script: - - echo 'DNS ${DNS}' - - echo 'Network ${NETWORK_MODE}' # Do not remove 'bash' or statement will be ignored by primitive docker shell - bash -e $CI_PROJECT_DIR/sbin/run_integration_test.sh --no-build --save-logs --module="tango" @@ -351,6 +347,7 @@ publish_on_gitlab: before_script: - python3 --version - pip --version + - python3 -m venv venv && source venv/bin/activate - pip install twine --upgrade script: - echo "run twine for gitlab" diff --git a/.prepare.gitlab-ci.yml b/.prepare.gitlab-ci.yml index aba1e9d27..6a3c3af1b 100644 --- a/.prepare.gitlab-ci.yml +++ b/.prepare.gitlab-ci.yml @@ -4,15 +4,17 @@ stages: build_ci_runner_image: stage: build image: docker:latest + before_script: + - apk add yq script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - | - source docker-compose/.env + TANGO_ITANGO_VERSION=$(yq '.tango.itango.version' infra/env.yaml) if docker pull $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG; then - docker build --cache-from $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --build-arg SOURCE_IMAGE=${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} docker-compose/ci-runner + docker build --cache-from $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --build-arg SOURCE_IMAGE=${CI_REGISTRY_IMAGE}/tango-itango:${TANGO_ITANGO_VERSION} docker/ci-runner else docker pull $CI_REGISTRY_IMAGE/ci-build-runner:latest || true - docker build --cache-from $CI_REGISTRY_IMAGE/ci-build-runner:latest --tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --build-arg SOURCE_IMAGE=${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} docker-compose/ci-runner + docker build --cache-from $CI_REGISTRY_IMAGE/ci-build-runner:latest --tag $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG --build-arg SOURCE_IMAGE=${CI_REGISTRY_IMAGE}/tango-itango:${TANGO_ITANGO_VERSION} docker/ci-runner fi - docker push $CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG # push the image - | diff --git a/bin/dump_ConfigDb.sh b/bin/dump_ConfigDb.sh deleted file mode 100755 index b58beff1b..000000000 --- a/bin/dump_ConfigDb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# - -"${LOFAR20_DIR}/sbin/dsconfig.sh" --dump diff --git a/bin/start-ds.sh b/bin/start-ds.sh index 6732784f2..618230fdf 100755 --- a/bin/start-ds.sh +++ b/bin/start-ds.sh @@ -39,7 +39,7 @@ else # DO NOT PUT SPACES IN THE EXCLUDE LIST! rsync -av --progress --exclude={".tox","*.egg-info","dist","build",".git","*.pyc","cover",".stestr",".coverage*",".pytest_cache","htmlcov"} /opt/lofar/tango/tangostationcontrol /tmp/ cd /tmp/tangostationcontrol || exit 1 - pip -vvv install --no-deps --force-reinstall ./ + pip -vvv install --break-system-packages --no-deps --force-reinstall ./ fi # Return to the stored the directory, this preserves the working_dir argument in diff --git a/docker-compose/.env b/docker-compose/.env deleted file mode 100644 index fdd79db3f..000000000 --- a/docker-compose/.env +++ /dev/null @@ -1,28 +0,0 @@ -SKA_DOCKER_REGISTRY_HOST=artefact.skao.int -SKA_DOCKER_REGISTRY_USER=ska-tango-images -LOCAL_DOCKER_REGISTRY_HOST=git.astron.nl:5000 -LOCAL_DOCKER_REGISTRY_LOFAR=lofar2.0 -LOCAL_DOCKER_REGISTRY_USER=lofar2.0/tango - -# https://artefact.skao.int/#browse/search/docker=format%3Ddocker%20AND%20attributes.docker.imageName%3Dska-tango-images-* -# When updating these images be sure to run /sbin/tag_and_push_docker_image.sh locally beforehand -# for this to succeed you need to perform `docker login -u xxx git.astron.nl:5000` with a read/write registry access token! -TANGO_ARCHIVER_VERSION=2021-05-28 -TANGO_CPP_VERSION=9.4.2 -TANGO_DB_VERSION=11.0.2 -TANGO_DSCONFIG_VERSION=1.5.12 -TANGO_DATABASEDS_VERSION=5.22.0 -TANGO_HDBPP_VIEWER_VERSION=2021-05-28 -TANGO_ITANGO_VERSION=9.4.3 -TANGO_REST_VERSION=1.14.8 -TANGO_STARTER_VERSION=2021-05-28 - -MYSQL_ROOT_PASSWORD=secret -MYSQL_PASSWORD=tango - -MINIO_ROOT_USER=minioadmin -MINIO_ROOT_PASSWORD=minioadmin -MINIO_VERSION=RELEASE.2023-10-16T04-13-43Z -MINIO_CLIENT_VERSION=RELEASE.2023-10-14T01-57-03Z - -TEST_MODULE=default diff --git a/docker-compose/Makefile b/docker-compose/Makefile deleted file mode 100644 index 5d13de295..000000000 --- a/docker-compose/Makefile +++ /dev/null @@ -1,301 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 - -# Set dir of Makefile to a variable to use later -MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST))) -BASEDIR := $(notdir $(patsubst %/,%,$(dir $(MAKEPATH)))) - -TAG ?= latest -DNS ?= 127.0.0.11 - -DOCKER_COMPOSE ?= docker compose - -DOCKER_COMPOSE_ENV_FILE := $(abspath .env) -COMPOSE_FILES := $(wildcard *.yml) -ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES)),-f $(yml)) -BUILD_ONLY_FILE_ARGS := -f tango.yml -COMPOSE_FILE_ARGS := --env-file $(DOCKER_COMPOSE_ENV_FILE) $(ATTACH_COMPOSE_FILE_ARGS) - - -# The default Docker network mode is station. The "host" network -# mode will make the tangodb and archiverdb ports clash, -# But we allow to overwrite it. -NETWORK_MODE ?= station - -# Timeout used to await services to become healthy -TIMEOUT ?= 300 - -SCRATCH ?= /tmp - -# Disables building of the lofar-base-device -# and disables copying and building the Python package -# primarily used for integration tests in CI/CD -# Possible values: -# 1. 0 / unset = build everything -# 2. 1 = build nothing -NO_BUILD ?= 0 - -# Host name through which others can reach our control interfaces. -# Needs to be resolvable from the containers and clients. -ifneq (,$(wildcard /run/WSL)) - # Microsoft Windows Subsystem for Linux - HOSTNAME ?= host.docker.internal -else - HOSTNAME ?= $(shell hostname -f) -endif - -# Host name to which to send our container logs. Needs to be resolvable from -# the host. -LOG_HOSTNAME ?= localhost - -# If the first make argument is "start", "stop"... -ifeq (start,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (stop,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (restart,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (up,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (build,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (build-nocache,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (attach,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true - ifndef NETWORK_MODE - $(error NETWORK_MODE must specify the network to attach to, e.g., make NETWORK_MODE=tangonet-powersupply ...) - endif - - ifndef TANGO_HOST - $(error TANGO_HOST must specify the Tango database device, e.g., make TANGO_HOST=powersupply-databaseds:10000 ...) - endif -else ifeq (await,$(firstword $(MAKECMDGOALS))) - SERVICE_TARGET = true -else ifeq (run,$(firstword $(MAKECMDGOALS))) - RUN_TARGET = true -else ifeq (integration,$(firstword $(MAKECMDGOALS))) - INTEGRATION_TARGET = true -endif - -ifdef SERVICE_TARGET - # .. then use the rest as arguments for the make target - SERVICE := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) - # ...and turn them into do-nothing targets - $(eval $(SERVICE):;@:) -else ifdef RUN_TARGET - # Isolate second argument as service, the rest is arguments for run command - SERVICE := $(wordlist 2, 2, $(MAKECMDGOALS)) - # ...and turn them into do-nothing targets - $(eval $(SERVICE):;@:) - SERVICE_ARGS := $(wordlist 3, $(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) - $(eval $(SERVICE_ARGS):;@:) -else ifdef INTEGRATION_TARGET - # Isolate second argument as integration module, the rest as arguments - INTEGRATION_MODULE := $(wordlist 2, 2, $(MAKECMDGOALS)) - $(eval $(INTEGRATION_MODULE):;@:) - INTEGRATION_ARGS := $(wordlist 3, $(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) - $(eval $(INTEGRATION_ARGS):;@:) -endif - -# -# Never use the network=host mode when running CI jobs, and add extra -# distinguishing identifiers to the network name and container names to -# prevent collisions with jobs from the same project running at the same -# time. -# - -ifeq ($(OS),Windows_NT) - $(error Sorry, Windows is not supported yet) -else - UNAME_S := $(shell uname -s) - - ifeq ($(UNAME_S),Linux) - DOCKER_GID ?= $(shell getent group docker | cut -d: -f 3) - DISPLAY ?= :0.0 - XAUTHORITY_MOUNT := /tmp/.X11-unix:/tmp/.X11-unix - XAUTHORITY ?= /hosthome/.Xauthority - # /bin/sh (=dash) does not evaluate 'docker network' conditionals correctly - SHELL := /bin/bash - else ifeq ($(UNAME_S),Darwin) - DOCKER_GID ?= $(shell id -g) - IF_INTERFACE := $(shell scutil --nwi | grep 'Network interfaces:' | cut -d' ' -f3) - IP_ADDRESS := $(shell scutil --nwi | grep 'address' | cut -d':' -f2 | tr -d ' ' | head -n1) - DISPLAY := $(IP_ADDRESS):0 - # Make sure that Darwin, especially from macOS Catalina on, - # allows X access from our Docker containers. - ADD_TO_XHOST := $(shell xhost +$(IP_ADDRESS)) - XAUTHORITY_MOUNT := $(HOME)/.Xauthority:/hosthome/.Xauthority:ro - XAUTHORITY := /hosthome/.Xauthority - endif -endif - -# -# When running in network=host mode, point devices at a port on the host -# machine rather than at the container. -# -ifeq ($(NETWORK_MODE),host) - TANGO_HOST := $(shell hostname):10000 - MYSQL_HOST := $(shell hostname):3306 -else - ifeq ($(TANGO_HOST),) - # Use FQDN for TANGO_HOST to avoid confusion in the archiver, which also - # adds the domain. - TANGO_HOST := databaseds.$(NETWORK_MODE):10000 - else - TANGO_HOST := $(TANGO_HOST) - endif - - ifeq ($(MYSQL_HOST),) - MYSQL_HOST := tangodb:3306 - else - MYSQL_HOST := $(MYSQL_HOST) - endif -endif - - -DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \ - XAUTHORITY=$(XAUTHORITY) \ - TANGO_HOST=$(TANGO_HOST) \ - MYSQL_HOST=$(MYSQL_HOST) \ - HOSTNAME=$(HOSTNAME) \ - SCRATCH=$(SCRATCH) \ - LOG_HOSTNAME=$(LOG_HOSTNAME) \ - NETWORK_MODE=$(NETWORK_MODE) \ - XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) \ - COMPOSE_IGNORE_ORPHANS=true \ - COMPOSE_HTTP_TIMEOUT=180 \ - CONTAINER_EXECUTION_UID=$(shell id -u) \ - DOCKER_GID=$(DOCKER_GID) \ - TEST_MODULE=$(INTEGRATION_MODULE) \ - TAG=$(TAG) \ - DNS=$(DNS) - - -.PHONY: up base base-nocache down minimal context run integration start stop restart build build-nocache status clean pull help await -.DEFAULT_GOAL := help - -pull: ## pull the images from the Docker hub - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) pull --ignore-pull-failures - -base: context ## Build base lofar device image -ifneq ($(NO_BUILD),1) - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) build --progress=plain lofar-device-base -endif - -base-nocache: context ## Rebuild base lofar device image - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) $(BUILD_ONLY_FILE_ARGS) build --no-cache --progress=plain lofar-device-base - -build: base ## build images - # docker-compose does not support build dependencies, so manage those here - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) $(BUILD_ONLY_FILE_ARGS) build --parallel --progress=plain $(SERVICE) - -build-nocache: base-nocache ## rebuild images from scratch - # docker-compose does not support build dependencies, so manage those here - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) $(BUILD_ONLY_FILE_ARGS) build --no-cache --progress=plain $(SERVICE) - -up: base minimal ## start the base TANGO system and prepare requested services - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) up --no-start --no-recreate $(SERVICE) - -run: base minimal ## run a service using arguments and delete it afterwards -ifeq (device,$(findstring device,$(SERVICE))) - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) run -T --no-deps --rm --service-ports --name $(SERVICE) $(SERVICE) $(SERVICE_ARGS) -else ifeq (sim,$(findstring sim,$(SERVICE))) - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) run -T --no-deps --rm --service-ports --name $(SERVICE) $(SERVICE) $(SERVICE_ARGS) -else ## allow multiple container instances if they are not devices or simulators - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) run -T --no-deps --rm $(SERVICE) $(SERVICE_ARGS) -endif - -integration: minimal ## run a service using arguments and delete it afterwards - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) run -T --no-deps --rm integration-test $(INTEGRATION_ARGS) - -down: ## stop all services and tear down the system - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) down -ifneq ($(NETWORK_MODE),host) - docker network inspect $(NETWORK_MODE) &> /dev/null && ([ $$? -eq 0 ] && docker network rm $(NETWORK_MODE)) || true - docker network inspect 9000-$(NETWORK_MODE) &> /dev/null && ([ $$? -eq 0 ] && docker network rm 9000-$(NETWORK_MODE)) || true -endif - -minimal: context ## start the base TANGO system -ifneq ($(NETWORK_MODE),host) - docker network inspect $(NETWORK_MODE) &> /dev/null || ([ $$? -ne 0 ] && docker network create $(NETWORK_MODE)) - docker network inspect 9000-$(NETWORK_MODE) &> /dev/null || ([ $$? -ne 0 ] && docker network create 9000-$(NETWORK_MODE) -o com.docker.network.driver.mtu=9000) -endif - - - -context: ## Move and build the necessary files to create minimal docker context - rm -rf ./tmp; \ - mkdir -p tmp; \ - if [[ "${NO_BUILD}" -ne "1" ]]; then \ - rm -rf ../tangostationcontrol/dist; \ - cd ../tangostationcontrol; \ - tox -e build; \ - cd ../docker-compose; \ - fi; \ - cp ../tangostationcontrol/dist/*.whl tmp/; \ - cp ../tangostationcontrol/requirements.txt tmp/; \ - -bootstrap: pull build # first start, initialise from scratch - $(MAKE) start dsconfig # boot up containers to load configurations - sleep 5 # wait for dsconfig container to come up - ../sbin/dsconfig.sh --update ../CDB/LOFAR_ConfigDb.json # load default configuration - ../sbin/dsconfig.sh --update ../CDB/stations/simulators_ConfigDb.json # by default, use simulators - -start: up ## start a service (usage: make start <servicename>) - if [ $(UNAME_S) = Linux ]; then touch ~/.Xauthority; chmod a+r ~/.Xauthority; fi - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) start $(SERVICE) - -stop: ## stop a service (usage: make stop <servicename>) - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) stop $(SERVICE) - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) rm -f $(SERVICE) - -restart: ## restart a service (usage: make restart <servicename>) - make stop $(SERVICE) # cannot use dependencies, as that would allow start and stop to run in parallel.. - make start $(SERVICE) - -attach: ## attach a service to an existing Tango network - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(ATTACH_COMPOSE_FILE_ARGS) up --no-recreate -d $(SERVICE) - -TIME := 0 -await: ## Await every container with total max timeout of 300, do not reset timeout - time=$(TIME); \ - for i in $(SERVICE); do \ - current_service=$$($(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) ps -q $${i}); \ - if [ -z "$${current_service}" ]; then \ - continue; \ - fi; \ - service_has_health=$$(docker inspect -f '{{.State.Health.Status}}' $${current_service}); \ - if [ -z "$${service_has_health}" ]; then \ - continue; \ - fi; \ - echo -n "Wait for service $${i} to become healthy .."; \ - while [ "$$(docker inspect -f '{{.State.Health.Status}}' $${current_service})" != "healthy" ] ; do \ - echo -n '.'; \ - sleep 2; \ - time=$$(expr $$time + 1); \ - if [ $${time} -gt $(TIMEOUT) ]; then \ - echo "timeout"; \ - docker logs $${i}; \ - exit 1; \ - fi; \ - done; \ - echo ". [ok]"; \ - done - -status: ## show the container status - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) ps - -images: ## show the container images - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) images - -clean: down ## clear all TANGO database entries, and all containers - docker volume rm $(BASEDIR)_tangodb - $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) rm -f - -nuke: down - - docker rmi -f $(shell $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) config --images) - - docker volume rm $(shell $(DOCKER_COMPOSE_ARGS) $(DOCKER_COMPOSE) $(COMPOSE_FILE_ARGS) config --format json | jq '.volumes | .[] | .name' -r) - -help: ## show this help. - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/docker-compose/README.md b/docker-compose/README.md deleted file mode 100644 index 528f253ac..000000000 --- a/docker-compose/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Docker Compose & Station Services - -Documentation on how the LOFAR station control software utilizes docker-compose. -This documentation is intended for developers listing strategies and their -respective advantages and disadvantages. In addition, this documentation -contains developer expectations that they should uphold to. - -## Index - -1. [Station services]() - 1. [Types of container services and specific strategies](#types-of-containers-and-specific-strategies) -2. [HDB++ image updates](#hdb-image-updates) -3. [Gitlab CI/CD](#gitlab-cicd) - 1. [Image tagging and change detection](#image-tagging-and-change-detection) - 1. [Setup and maintenance](#setup-and-maintenance) - 2. [Gitlab CI phases](#gitlab-ci-phases) - -## Station Services - -The station offers different services, this documentation provides -names and an overview of their behavior as well as if these services -are used in production. - -- [Devices \[external\]](https://lofar20-station-control.readthedocs.io/en/latest/devices/overview.html) -- Simulators - - [sdptr \[external\]](https://git.astron.nl/lofar2.0/sdptr) - - [sdptr-sim](sdptr-sim.yml) - - [pypcc \[external\]](https://git.astron.nl/lofar2.0/pypcc) - - [apsct-sim](apsct-sim.yml) - - [apspu-sim](apspu-sim.yml) - - [ccd-sim](ccd-sim.yml) - - [recvh-sim](recvh-sim.yml) - - [recvl-sim](recvl-sim.yml) - - [unb2-sim](unb2-sim.yml) -- Base images - - [ci-runner](ci-runner/Dockerfile) - - [lofar-device-base](lofar-device-base.yml) -- Services - - databases - - dsconfig - - prometheus - - webservers / user interfaces - - jupyterlab - - [grafana](grafana/README.md) - - logging / monitoring - - prometheus-node-exporter - - [tango-prometheus-exporter](tango-prometheus-exporter/README.md) - loki - - tango - - itango - - tango-rest - -### Types of containers and specific strategies - -- Devices -- Simulators -- Base images -- Services - -Devices, these are detected by changes to the .yml file or directory of the -respective service inside the docker-compose directory. - -Simulators, Since the source code for simulators is maintained by other teams -we can not accurately determine from our repository if the simulator has -changed. Instead, the images is build by the teams their respective CI -pipelines. We simply pull these images as base images. - -Base images, these are detected by changes to the .env file in the -docker-compose directory. When changed they will be downloaded from the remote -registry and uploaded to our own using matching tags. - -Services, same mechanism as devices. - -## Gitlab CI/CD - -1. [Image tagging and change detection](#image-tagging-and-change-detection) - 1. [Setup and maintenance](#setup-and-maintenance) -2. [Gitlab CI phases](#gitlab-ci-phases) - -### Image tagging and change detection - -Preventing unnecessary builds of docker images reduces build times and increases -iteration speed. In order to achieve this the project requires properly tagged -images and mechanisms for change detection. - -For change detection the system relies on git. Git is used to determine the -directories and files that have changes between the current and previous commit. -All image related change detection mechanisms are based on this difference. - -Using docker cache within the dind service is impractical see: -https://gitlab.com/gitlab-org/gitlab-foss/-/issues/17861 - -#### Setup and maintenance - -All behavioral logic to orchestrate change detection and image pushing can be -found in the sbin/tag_and_push_docker_images.sh script as well as the -.gitlab-ci.yml. The shell script relies on the fact that each .yml file in the -docker-compose directory corresponds to one image. - -### Gitlab CI phases - -Docker images are managed in three phases. First is remote image storing, second -is image building and change detection with finally image pulling. - -Remote images are downloaded and stored on the local registry when the .env -file for docker-compose has changes. - -Local images are build when either the files in the base context directory -change or if the docker compose file itself has changes. See the gitlab-ci.yml -for how these changes are detected. All local images will be rebuild and tagged -latest when a tagged commit is pushed to master. - -Local images download the latest image from the registry as cache unless it is -a tagged commit on master. - -Finally, the integration test downloads all images from the registry either -tagged with the current pipeline or with latest. Should both tags be unavailable -than the integration test fails. Not all images are needed for the integration -test. See sbin/tag_and_push_docker_image.sh for how these images are -differentiated. diff --git a/docker-compose/apsct-sim.yml b/docker-compose/apsct-sim.yml deleted file mode 100644 index e1c1fdf72..000000000 --- a/docker-compose/apsct-sim.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches an APSCT simulator -# -# Defines: -# - apsct-sim -# -version: '2.1' - -services: - apsct-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/pypcc:latest - hostname: apsct-sim - container_name: apsct-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - entrypoint: hwtr --simulator --port 4843 --config APSCTTR - restart: on-failure diff --git a/docker-compose/apspu-sim.yml b/docker-compose/apspu-sim.yml deleted file mode 100644 index be0e38fd8..000000000 --- a/docker-compose/apspu-sim.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches an APSPU simulator -# -# Defines: -# - apspu-sim -# -version: '2.1' - -services: - apspu-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/pypcc:latest - hostname: apspu-sim - container_name: apspu-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - entrypoint: hwtr --simulator --port 4842 --config APSPUTR - restart: on-failure diff --git a/docker-compose/ccd-sim.yml b/docker-compose/ccd-sim.yml deleted file mode 100644 index 89a711ea8..000000000 --- a/docker-compose/ccd-sim.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches an APSCT simulator -# -# Defines: -# - apsct-sim -# -version: '2.1' - -services: - ccd-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/pypcc:latest - hostname: ccd-sim - container_name: ccd-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - entrypoint: hwtr --simulator --port 4843 --config CCDTR - restart: on-failure diff --git a/docker-compose/device-afh.yml b/docker-compose/device-afh.yml deleted file mode 100644 index f116d5e72..000000000 --- a/docker-compose/device-afh.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - - -services: - device-afh: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-afh - container_name: device-afh - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5715:5715" # unique port for this DS - - "5815:5815" # ZeroMQ event port - - "5915:5915" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5815 - - TANGO_ZMQ_HEARTBEAT_PORT=5915 - healthcheck: - test: l2ss-health dserver/AFH/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds AFH STAT -v -ORBendPoint giop:tcp:0:5715 -ORBendPointPublish giop:tcp:${HOSTNAME}:5715 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-afl.yml b/docker-compose/device-afl.yml deleted file mode 100644 index 8909990d4..000000000 --- a/docker-compose/device-afl.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - - -services: - device-afl: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-afl - container_name: device-afl - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - ports: - - "5730:5730" # unique port for this DS - - "5830:5830" # ZeroMQ event port - - "5930:5930" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5830 - - TANGO_ZMQ_HEARTBEAT_PORT=5930 - healthcheck: - test: l2ss-health dserver/AFL/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds AFL STAT -v -ORBendPoint giop:tcp:0:5730 -ORBendPointPublish giop:tcp:${HOSTNAME}:5730 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-aps.yml b/docker-compose/device-aps.yml deleted file mode 100644 index dc06afcb9..000000000 --- a/docker-compose/device-aps.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -services: - device-aps: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - container_name: device-aps - hostname: device-aps - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5728:5728" # unique port for this DS - - "5828:5828" # ZeroMQ event port - - "5928:5928" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5828 - - TANGO_ZMQ_HEARTBEAT_PORT=5928 - healthcheck: - test: l2ss-health dserver/APS/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds APS STAT -v -v -ORBendPoint giop:tcp:device-aps:5728 -ORBendPointPublish giop:tcp:${HOSTNAME}:5728 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-apsct.yml b/docker-compose/device-apsct.yml deleted file mode 100644 index 8ebd5c104..000000000 --- a/docker-compose/device-apsct.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-apsct: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-apsct - container_name: device-apsct - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5709:5709" # unique port for this DS - - "5809:5809" # ZeroMQ event port - - "5909:5909" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5809 - - TANGO_ZMQ_HEARTBEAT_PORT=5909 - healthcheck: - test: l2ss-health dserver/APSCT/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds APSCT STAT -v -v -ORBendPoint giop:tcp:device-apsct:5709 -ORBendPointPublish giop:tcp:${HOSTNAME}:5709 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-apspu.yml b/docker-compose/device-apspu.yml deleted file mode 100644 index 5c268b081..000000000 --- a/docker-compose/device-apspu.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-apspu: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-apspu - container_name: device-apspu - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5710:5710" # unique port for this DS - - "5810:5810" # ZeroMQ event port - - "5910:5910" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5810 - - TANGO_ZMQ_HEARTBEAT_PORT=5910 - healthcheck: - test: l2ss-health dserver/APSPU/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds APSPU STAT -v -ORBendPoint giop:tcp:device-apspu:5710 -ORBendPointPublish giop:tcp:${HOSTNAME}:5710 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-beamlet.yml b/docker-compose/device-beamlet.yml deleted file mode 100644 index 028376efc..000000000 --- a/docker-compose/device-beamlet.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-beamlet: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-beamlet - container_name: device-beamlet - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5712:5712" # unique port for this DS - - "5812:5812" # ZeroMQ event port - - "5912:5912" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5812 - - TANGO_ZMQ_HEARTBEAT_PORT=5912 - healthcheck: - test: l2ss-health dserver/Beamlet/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds Beamlet STAT -v -ORBendPoint giop:tcp:0:5712 -ORBendPointPublish giop:tcp:${HOSTNAME}:5712 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-bst.yml b/docker-compose/device-bst.yml deleted file mode 100644 index 23db88c15..000000000 --- a/docker-compose/device-bst.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-bst: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-bst - container_name: device-bst - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - - data - dns: ${DNS} - ports: - - "5003:5003/udp" # port to receive SST UDP packets on (first antennafield) - - "5103:5103/tcp" # port to emit SST TCP packets on - - "5013:5013/udp" # port to receive SST UDP packets on (second antennafield) - - "5113:5113/tcp" # port to emit SST TCP packets on - - "5023:5023/udp" # port to receive SST UDP packets on (third antennafield) - - "5123:5123/tcp" # port to emit SST TCP packets on - - "5717:5717" # unique port for this DS - - "5817:5817" # ZeroMQ event port - - "5917:5917" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5817 - - TANGO_ZMQ_HEARTBEAT_PORT=5917 - healthcheck: - test: l2ss-health dserver/BST/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds BST STAT -v -ORBendPoint giop:tcp:0:5717 -ORBendPointPublish giop:tcp:${HOSTNAME}:5717 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-calibration.yml b/docker-compose/device-calibration.yml deleted file mode 100644 index 495e8ea13..000000000 --- a/docker-compose/device-calibration.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-calibration: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-calibration - container_name: device-calibration - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5724:5724" # unique port for this DS - - "5824:5824" # ZeroMQ event port - - "5924:5924" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5824 - - TANGO_ZMQ_HEARTBEAT_PORT=5924 - - MINIO_ROOT_USER=${MINIO_ROOT_USER} - - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD} - healthcheck: - test: l2ss-health dserver/Calibration/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds Calibration STAT -v -ORBendPoint giop:tcp:0:5724 -ORBendPointPublish giop:tcp:${HOSTNAME}:5724 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-ccd.yml b/docker-compose/device-ccd.yml deleted file mode 100644 index 5d4292c34..000000000 --- a/docker-compose/device-ccd.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-ccd: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-ccd - container_name: device-ccd - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5721:5721" # unique port for this DS - - "5821:5821" # ZeroMQ event port - - "5921:5921" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5821 - - TANGO_ZMQ_HEARTBEAT_PORT=5921 - healthcheck: - test: l2ss-health dserver/CCD/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds CCD STAT -v -ORBendPoint giop:tcp:device-ccd:5721 -ORBendPointPublish giop:tcp:${HOSTNAME}:5721 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-configuration.yml b/docker-compose/device-configuration.yml deleted file mode 100644 index 2cbdfb6a5..000000000 --- a/docker-compose/device-configuration.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-configuration: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-configuration - container_name: device-configuration - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5722:5722" # unique port for this DS - - "5822:5822" # ZeroMQ event port - - "5922:5922" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5822 - - TANGO_ZMQ_HEARTBEAT_PORT=5922 - healthcheck: - test: l2ss-health dserver/Configuration/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds Configuration STAT -v -ORBendPoint giop:tcp:device-configuration:5722 -ORBendPointPublish giop:tcp:${HOSTNAME}:5722 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-digitalbeam.yml b/docker-compose/device-digitalbeam.yml deleted file mode 100644 index c47268f28..000000000 --- a/docker-compose/device-digitalbeam.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-digitalbeam: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-digitalbeam - container_name: device-digitalbeam - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5713:5713" # unique port for this DS - - "5813:5813" # ZeroMQ event port - - "5913:5913" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5813 - - TANGO_ZMQ_HEARTBEAT_PORT=5913 - healthcheck: - test: l2ss-health dserver/DigitalBeam/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds DigitalBeam STAT -v -ORBendPoint giop:tcp:0:5713 -ORBendPointPublish giop:tcp:${HOSTNAME}:5713 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-docker.yml b/docker-compose/device-docker.yml deleted file mode 100644 index 88ef8d898..000000000 --- a/docker-compose/device-docker.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-docker: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-docker - container_name: device-docker - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5705:5705" # unique port for this DS - - "5805:5805" # ZeroMQ event port - - "5905:5905" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - - /var/run/docker.sock:/var/run/docker.sock:rw # we want to control our sibling containers, NOT do docker-in-docker (dind) - user: 1000:${DOCKER_GID} # uid 1000 is the default "tango" user - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5805 - - TANGO_ZMQ_HEARTBEAT_PORT=5905 - healthcheck: - test: l2ss-health dserver/Docker/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds Docker STAT -v -ORBendPoint giop:tcp:0:5705 -ORBendPointPublish giop:tcp:${HOSTNAME}:5705 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-ec.yml b/docker-compose/device-ec.yml deleted file mode 100644 index ac5b62a7c..000000000 --- a/docker-compose/device-ec.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -volumes: - iers-data: { } - -services: - device-ec: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-ec - container_name: device-ec - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5729:5729" # unique port for this DS - - "5829:5829" # ZeroMQ event port - - "5929:5929" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5829 - - TANGO_ZMQ_HEARTBEAT_PORT=5929 - healthcheck: - test: l2ss-health dserver/ec/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds EC STAT -v -ORBendPoint giop:tcp:device-ec:5729 -ORBendPointPublish giop:tcp:${HOSTNAME}:5729 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-observation-control.yml b/docker-compose/device-observation-control.yml deleted file mode 100644 index c21733db5..000000000 --- a/docker-compose/device-observation-control.yml +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a LOFAR2.0 station's -# ObservationControl device. It also runs the dynamically -# created Observation devices. -# -# Defines: -# - device-observation-control: LOFAR2.0 station ObvservationControl -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -services: - device-observation-control: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-observation-control - container_name: device-observation-control - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5703:5703" # unique port for this DS - - "5803:5803" # ZeroMQ event port - - "5903:5903" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5803 - - TANGO_ZMQ_HEARTBEAT_PORT=5903 - healthcheck: - test: l2ss-health dserver/ObservationControl/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds ObservationControl STAT -v -ORBendPoint giop:tcp:0:5703 -ORBendPointPublish giop:tcp:${HOSTNAME}:5703 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-pcon.yml b/docker-compose/device-pcon.yml deleted file mode 100644 index c404f8ad1..000000000 --- a/docker-compose/device-pcon.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -volumes: - iers-data: { } - -services: - device-pcon: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-pcon - container_name: device-pcon - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5720:5720" # unique port for this DS - - "5820:5820" # ZeroMQ event port - - "5920:5920" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5820 - - TANGO_ZMQ_HEARTBEAT_PORT=5920 - healthcheck: - test: l2ss-health dserver/pcon/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds PCON STAT -v -ORBendPoint giop:tcp:device-pcon:5720 -ORBendPointPublish giop:tcp:${HOSTNAME}:5720 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-psoc.yml b/docker-compose/device-psoc.yml deleted file mode 100644 index 5e19bd580..000000000 --- a/docker-compose/device-psoc.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -volumes: - iers-data: { } - -services: - device-psoc: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-psoc - container_name: device-psoc - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5719:5719" # unique port for this DS - - "5819:5819" # ZeroMQ event port - - "5919:5919" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5819 - - TANGO_ZMQ_HEARTBEAT_PORT=5919 - healthcheck: - test: l2ss-health dserver/PSOC/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds PSOC STAT -v -ORBendPoint giop:tcp:device-psoc:5719 -ORBendPointPublish giop:tcp:${HOSTNAME}:5719 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-recvh.yml b/docker-compose/device-recvh.yml deleted file mode 100644 index d366e2bad..000000000 --- a/docker-compose/device-recvh.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -services: - device-recvh: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-recvh - container_name: device-recvh - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5725:5725" # unique port for this DS - - "5825:5825" # ZeroMQ event port - - "5925:5925" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5825 - - TANGO_ZMQ_HEARTBEAT_PORT=5925 - healthcheck: - test: l2ss-health dserver/RECVH/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds RECVH STAT -v -ORBendPoint giop:tcp:device-recvh:5725 -ORBendPointPublish giop:tcp:${HOSTNAME}:5725 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-recvl.yml b/docker-compose/device-recvl.yml deleted file mode 100644 index 4a2894350..000000000 --- a/docker-compose/device-recvl.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -services: - device-recvl: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-recvl - container_name: device-recvl - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5726:5726" # unique port for this DS - - "5826:5826" # ZeroMQ event port - - "5926:5926" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5826 - - TANGO_ZMQ_HEARTBEAT_PORT=5926 - healthcheck: - test: l2ss-health dserver/RECVL/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds RECVL STAT -v -ORBendPoint giop:tcp:device-recvl:5726 -ORBendPointPublish giop:tcp:${HOSTNAME}:5726 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-sdp.yml b/docker-compose/device-sdp.yml deleted file mode 100644 index dd47fad15..000000000 --- a/docker-compose/device-sdp.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-sdp: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-sdp - container_name: device-sdp - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5701:5701" # unique port for this DS - - "5801:5801" # ZeroMQ event port - - "5901:5901" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5801 - - TANGO_ZMQ_HEARTBEAT_PORT=5901 - healthcheck: - test: l2ss-health dserver/SDP/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds SDP STAT -v -ORBendPoint giop:tcp:device-sdp:5701 -ORBendPointPublish giop:tcp:${HOSTNAME}:5701 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-sdpfirmware.yml b/docker-compose/device-sdpfirmware.yml deleted file mode 100644 index c61c4a565..000000000 --- a/docker-compose/device-sdpfirmware.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-sdpfirmware: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-sdpfirmware - container_name: device-sdpfirmware - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5727:5727" # unique port for this DS - - "5827:5827" # ZeroMQ event port - - "5927:5927" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5827 - - TANGO_ZMQ_HEARTBEAT_PORT=5927 - healthcheck: - test: l2ss-health dserver/SDPFirmware/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds SDPFirmware STAT -v -ORBendPoint giop:tcp:device-sdpfirmware:5727 -ORBendPointPublish giop:tcp:${HOSTNAME}:5727 - restart: unless-stopped - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-sst.yml b/docker-compose/device-sst.yml deleted file mode 100644 index 66b1da00a..000000000 --- a/docker-compose/device-sst.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-sst: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-sst - container_name: device-sst - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - - data - dns: ${DNS} - ports: - - "5001:5001/udp" # port to receive SST UDP packets on (first antennafield) - - "5101:5101/tcp" # port to emit SST TCP packets on - - "5011:5011/udp" # port to receive SST UDP packets on (second antennafield) - - "5111:5111/tcp" # port to emit SST TCP packets on - - "5021:5021/udp" # port to receive SST UDP packets on (third antennafield) - - "5121:5121/tcp" # port to emit SST TCP packets on - - "5702:5702" # unique port for this DS - - "5802:5802" # ZeroMQ event port - - "5902:5902" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5802 - - TANGO_ZMQ_HEARTBEAT_PORT=5902 - healthcheck: - test: l2ss-health dserver/SST/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds SST STAT -v -ORBendPoint giop:tcp:0:5702 -ORBendPointPublish giop:tcp:${HOSTNAME}:5702 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-station-manager.yml b/docker-compose/device-station-manager.yml deleted file mode 100644 index 7570440c6..000000000 --- a/docker-compose/device-station-manager.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -volumes: - iers-data: { } - -services: - device-station-manager: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-station-manager - container_name: device-station-manager - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5723:5723" # unique port for this DS - - "5823:5823" # ZeroMQ event port - - "5923:5923" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5823 - - TANGO_ZMQ_HEARTBEAT_PORT=5923 - healthcheck: - test: l2ss-health dserver/StationManager/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds StationManager STAT -v -ORBendPoint giop:tcp:device-station-manager:5723 -ORBendPointPublish giop:tcp:${HOSTNAME}:5723 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-temperature-manager.yml b/docker-compose/device-temperature-manager.yml deleted file mode 100644 index 316a49301..000000000 --- a/docker-compose/device-temperature-manager.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -volumes: - iers-data: { } - -services: - device-temperature-manager: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-temperature-manager - container_name: device-temperature-manager - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5716:5716" # unique port for this DS - - "5816:5816" # ZeroMQ event port - - "5916:5916" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5816 - - TANGO_ZMQ_HEARTBEAT_PORT=5916 - healthcheck: - test: l2ss-health dserver/TemperatureManager/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds TemperatureManager STAT -v -ORBendPoint giop:tcp:0:5716 -ORBendPointPublish giop:tcp:${HOSTNAME}:5716 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-tilebeam.yml b/docker-compose/device-tilebeam.yml deleted file mode 100644 index 6c623144d..000000000 --- a/docker-compose/device-tilebeam.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Requires: -# - lofar-device-base.yml -# -version: '2.1' - -volumes: - iers-data: { } - -services: - device-tilebeam: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-tilebeam - container_name: device-tilebeam - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5711:5711" # unique port for this DS - - "5811:5811" # ZeroMQ event port - - "5911:5911" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - - iers-data:/opt/IERS - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5811 - - TANGO_ZMQ_HEARTBEAT_PORT=5911 - healthcheck: - test: l2ss-health dserver/TileBeam/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds TileBeam STAT -v -ORBendPoint giop:tcp:0:5711 -ORBendPointPublish giop:tcp:${HOSTNAME}:5711 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-unb2.yml b/docker-compose/device-unb2.yml deleted file mode 100644 index 8e127bb04..000000000 --- a/docker-compose/device-unb2.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-unb2: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-unb2 - container_name: device-unb2 - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - dns: ${DNS} - ports: - - "5704:5704" # unique port for this DS - - "5804:5804" # ZeroMQ event port - - "5904:5904" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5804 - - TANGO_ZMQ_HEARTBEAT_PORT=5904 - healthcheck: - test: l2ss-health dserver/UNB2/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds UNB2 STAT -v -ORBendPoint giop:tcp:device-unb2:5704 -ORBendPointPublish giop:tcp:${HOSTNAME}:5704 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/device-xst.yml b/docker-compose/device-xst.yml deleted file mode 100644 index 5c3bc0735..000000000 --- a/docker-compose/device-xst.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - device-xst: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - hostname: device-xst - container_name: device-xst - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - - data - dns: ${DNS} - ports: - - "5002:5002/udp" # port to receive XST UDP packets on (first antennafield) - - "5102:5102/tcp" # port to emit XST TCP packets on - - "5012:5012/udp" # port to receive XST UDP packets on (second antennafield) - - "5112:5112/tcp" # port to emit XST TCP packets on - - "5022:5022/udp" # port to receive XST UDP packets on (third antennafield) - - "5122:5122/tcp" # port to emit XST TCP packets on - - "5706:5706" # unique port for this DS - - "5806:5806" # ZeroMQ event port - - "5906:5906" # ZeroMQ heartbeat port - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TANGO_ZMQ_EVENT_PORT=5806 - - TANGO_ZMQ_HEARTBEAT_PORT=5906 - healthcheck: - test: l2ss-health dserver/XST/STAT - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - working_dir: /opt/lofar/tango - entrypoint: - - bin/start-ds.sh - # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA - # can't know about our Docker port forwarding - - l2ss-ds XST STAT -v -ORBendPoint giop:tcp:0:5706 -ORBendPointPublish giop:tcp:${HOSTNAME}:5706 - restart: on-failure - stop_signal: SIGINT # request a graceful shutdown of Tango - stop_grace_period: 2s diff --git a/docker-compose/ec-sim.yml b/docker-compose/ec-sim.yml deleted file mode 100644 index bfcd7ad79..000000000 --- a/docker-compose/ec-sim.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a RECVH simulator -# -# Defines: -# - recvh-sim -# -version: '2.1' - -services: - ec-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/ec-sim:${TAG} - build: - context: ec-sim - hostname: ec-sim - container_name: ec-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - restart: on-failure diff --git a/docker-compose/grafana.yml b/docker-compose/grafana.yml deleted file mode 100644 index f6e37341a..000000000 --- a/docker-compose/grafana.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches Grafana -# -# Defines: -# - grafana: Grafana -# - -version: '2.1' - -services: - grafana: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/grafana:${TAG} - build: - context: grafana - hostname: grafana - container_name: grafana - networks: - - control - volumes: - - grafana-database:/var/lib/grafana/database:rw - # - grafana-configs:/etc/grafana - ports: - - "3000:3000" - environment: - - GF_SERVER_DOMAIN=${HOSTNAME} - healthcheck: - test: > - bash -c "printf 'GET /nc.1 HTTP/1.1\r\nHost: astron.nl\r\n\r\n' | nc localhost 3000" - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped - -volumes: - grafana-database: -# grafana-configs: diff --git a/docker-compose/integration-test.yml b/docker-compose/integration-test.yml deleted file mode 100644 index fa50df0dd..000000000 --- a/docker-compose/integration-test.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches integration tests -# -# Defines: -# - integration: Integration testing -# -version: '2.1' - -services: - integration-test: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/ci-build-runner:${TAG} - build: - context: . - dockerfile: ci-runner/Dockerfile - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} - hostname: integration-test - container_name: integration-test - networks: - - control - dns: - - ${DNS} - volumes: - - ..:/opt/lofar/tango:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - TEST_MODULE=${TEST_MODULE} - working_dir: /opt/lofar/tango/tangostationcontrol - entrypoint: - - tox - command: - # Allow for arguments to be passed that wil be put after the entrypoint - # tox is configured to take these arguments as integration test directory - # specifications. - - -e - - integration - - -- - - "" diff --git a/docker-compose/itango.yml b/docker-compose/itango.yml deleted file mode 100644 index 0f38388f2..000000000 --- a/docker-compose/itango.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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: -# - tango.yml -# -version: '2.1' - -services: - itango: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/itango:${TAG} - build: - context: itango - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} - hostname: itango - container_name: itango - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - ..:/opt/lofar/tango:rw - - ${HOME}:/hosthome - - ${SCRATCH}:/scratch:rw - environment: - - TANGO_HOST=${TANGO_HOST} - - XAUTHORITY=${XAUTHORITY} - - DISPLAY=${DISPLAY} - stdin_open: true - tty: true - entrypoint: - - /usr/local/bin/wait-for-it.sh - - ${TANGO_HOST} - - --timeout=30 - - --strict - - -- - - /home/tango/.local/bin/itango3 - restart: unless-stopped diff --git a/docker-compose/itango/Dockerfile b/docker-compose/itango/Dockerfile deleted file mode 100644 index b29e962cd..000000000 --- a/docker-compose/itango/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -ARG SOURCE_IMAGE -FROM ${SOURCE_IMAGE} - -RUN --mount=type=cache,target=/var/cache/apt \ - sudo apt-get -y update && \ - sudo apt-get -y upgrade && \ - sudo apt-get -y install apt-file apt-transport-https apt-utils aptitude && \ - sudo apt-get -y install htop iftop iproute2 mc most net-tools tcpdump && \ - sudo apt-get -y install telnet tmux traceroute vim xterm git && \ - sudo aptitude clean && \ - sudo aptitude autoclean diff --git a/docker-compose/itango/lofar-requirements.txt b/docker-compose/itango/lofar-requirements.txt deleted file mode 100644 index b193887db..000000000 --- a/docker-compose/itango/lofar-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Do not put tangostationcontrol dependencies here -parso == 0.7.1 -jedi == 0.17.2 -astropy diff --git a/docker-compose/jupyter-lab.yml b/docker-compose/jupyter-lab.yml deleted file mode 100644 index 71f695dee..000000000 --- a/docker-compose/jupyter-lab.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches Jupyter Lab for interactive iTango sessions over HTTP. -# -# Connect by surfing to http://localhost:8888/ -# View logs through 'docker logs -f -t jupyter-lab' -# -# Defines: -# - jupyter-lab: Jupyter Lab with iTango support -# - -version: '2.1' - -services: - jupyter-lab: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/jupyter-lab:${TAG} - build: - context: jupyter-lab - hostname: jupyter-lab - container_name: jupyter-lab - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - volumes: - - ..:/opt/lofar/tango:rw - - ../jupyter-notebooks:/jupyter-notebooks:rw - - ${HOME}:/hosthome - - ${SCRATCH}:/scratch:rw - environment: - - TANGO_HOST=${TANGO_HOST} - ports: - - "8888:8888" - command: jupyter lab --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password= --Application.log_level=0 - restart: unless-stopped diff --git a/docker-compose/lofar-device-base.yml b/docker-compose/lofar-device-base.yml deleted file mode 100644 index 46ee4a2cf..000000000 --- a/docker-compose/lofar-device-base.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# 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.1' - -services: - lofar-device-base: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/lofar-device-base:${TAG} - build: - context: . - dockerfile: lofar-device-base/Dockerfile - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} - TANGO_STATION_CONTROL: ${TANGO_STATION_CONTROL} - hostname: lofar-device-base - container_name: lofar-device-base - # These parameters are just visual queues, you have to define them again - # in derived docker-compose files! - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - lofar_log:/var/log/tango - -volumes: - lofar_log: diff --git a/docker-compose/loki.yml b/docker-compose/loki.yml deleted file mode 100644 index ce364dab0..000000000 --- a/docker-compose/loki.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a LOKI instance. -# See https://grafana.com/docs/loki/latest/installation/docker/ -# -# - -version: "2.1" - -volumes: - loki-data: { } - -services: - loki: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/loki:${TAG} - build: - context: loki - hostname: loki - container_name: loki - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - healthcheck: - test: > - sh -c "printf 'GET /nc.1 HTTP/1.1\r\nHost: astron.nl\r\n\r\n' | nc localhost 3100" - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - networks: - - control - volumes: - - loki-data:/loki - ports: - - "3100:3100" - command: -config.file=/etc/loki/local-config.yaml - restart: unless-stopped diff --git a/docker-compose/loki/Dockerfile b/docker-compose/loki/Dockerfile deleted file mode 100644 index 466a31876..000000000 --- a/docker-compose/loki/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM grafana/loki:2.6.0 -COPY local-config.yaml /etc/loki/local-config.yaml diff --git a/docker-compose/loki/local-config.yaml b/docker-compose/loki/local-config.yaml deleted file mode 100644 index 0e2a61a7f..000000000 --- a/docker-compose/loki/local-config.yaml +++ /dev/null @@ -1,51 +0,0 @@ -auth_enabled: false - -server: - http_listen_port: 3100 - -common: - path_prefix: /loki - storage: - filesystem: - chunks_directory: /loki/chunks - rules_directory: /loki/rules - replication_factor: 1 - ring: - kvstore: - store: inmemory - -schema_config: - configs: - - from: 2020-10-24 - store: boltdb-shipper - object_store: filesystem - schema: v11 - index: - prefix: index_ - period: 24h - -compactor: - retention_enabled: true - -limits_config: - retention_period: 744h - retention_stream: - - selector: '{level="debug"}' - priority: 1 - period: 24h - -ruler: - alertmanager_url: http://localhost:9093 - -# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration -# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ -# -# Statistics help us better understand how Loki is used, and they show us performance -# levels for most users. This helps us prioritize features and documentation. -# For more information on what's sent, look at -# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go -# Refer to the buildReport method to see what goes into a report. -# -# If you would like to disable reporting, uncomment the following lines: -analytics: - reporting_enabled: false diff --git a/docker-compose/networks.yml b/docker-compose/networks.yml deleted file mode 100644 index 387161f50..000000000 --- a/docker-compose/networks.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that describes our docker networks. -# -version: '2.1' - -networks: - - # Control network, with MTU=1500. Our default network. - control: - name: ${NETWORK_MODE} - # The networks are created and destroyed in the Makefile. - external: true - - # Data network, with MTU=9000, to receive the Jumbo frames from SDP - data: - # This name needs to be alphabetically before the control network. - # - # As we add the data-receiving devices to both control and data - # network, we need to make sure the UDP data are forwarded to - # the data network, not the control network. The way Docker decides - # which network to actually expose ports on is by chosing the - # first one in alphabetical order. - name: 9000-${NETWORK_MODE} - external: true diff --git a/docker-compose/prometheus-node-exporter.yml b/docker-compose/prometheus-node-exporter.yml deleted file mode 100644 index f61e4b845..000000000 --- a/docker-compose/prometheus-node-exporter.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches Prometheus Node Exporter -# -# Provides system metrics for Prometheus to scrape -# - -version: '2.1' - -services: - prometheus-node-exporter: - image: prom/node-exporter - hostname: prometheus-node-exporter - container_name: prometheus-node-exporter - network_mode: host # run on the host to be able to access host network statistics - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped diff --git a/docker-compose/prometheus.yml b/docker-compose/prometheus.yml deleted file mode 100644 index 977197e1b..000000000 --- a/docker-compose/prometheus.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches Prometheus -# -# Defines: -# - prometheus: Prometheus -# - -version: '2.1' - -volumes: - prometheus-data: { } - -services: - prometheus: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/prometheus:${TAG} - build: - context: prometheus - hostname: prometheus - container_name: prometheus - networks: - - control - extra_hosts: - - "host.docker.internal:host-gateway" - volumes: - - prometheus-data:/prometheus - ports: - - "9090:9090" - healthcheck: - test: > - sh -c "printf 'GET /nc.1 HTTP/1.1\r\nHost: astron.nl\r\n\r\n' | nc localhost 9090" - interval: 1m - timeout: 30s - retries: 3 - start_period: 30s - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped diff --git a/docker-compose/prometheus/Dockerfile b/docker-compose/prometheus/Dockerfile deleted file mode 100644 index ed4c142db..000000000 --- a/docker-compose/prometheus/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM prom/prometheus - -COPY prometheus.yml /etc/prometheus/prometheus.yml - -CMD ["--config.file=/etc/prometheus/prometheus.yml", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles", "--storage.tsdb.retention.time=5y", "--storage.tsdb.retention.size=500GB", "--web.enable-admin-api"] diff --git a/docker-compose/prometheus/prometheus.yml b/docker-compose/prometheus/prometheus.yml deleted file mode 100644 index 09a306763..000000000 --- a/docker-compose/prometheus/prometheus.yml +++ /dev/null @@ -1,46 +0,0 @@ -global: - evaluation_interval: 10s - scrape_interval: 10s - scrape_timeout: 10s - -scrape_configs: - - job_name: tango - static_configs: - - targets: [ "tango-prometheus-exporter:8000" ] - labels: - "host": "localhost" - - job_name: tango-fast - scrape_interval: 1s - static_configs: - - targets: [ "tango-prometheus-fast-exporter:8000" ] - labels: - "host": "localhost" - - job_name: tango-slow - scrape_interval: 60s - scrape_timeout: 30s - static_configs: - - targets: [ "tango-prometheus-slow-exporter:8000" ] - labels: - "host": "localhost" - - job_name: host - scrape_interval: 60s - static_configs: - - targets: [ "host.docker.internal:9100" ] - labels: - "host": "localhost" - # scrape local services - - job_name: prometheus - static_configs: - - targets: [ "localhost:9090" ] - labels: - "host": "localhost" - - job_name: grafana - static_configs: - - targets: [ "grafana:3000" ] - labels: - "host": "localhost" - - job_name: loki - static_configs: - - targets: [ "loki:3100" ] - labels: - "host": "localhost" diff --git a/docker-compose/recvh-sim.yml b/docker-compose/recvh-sim.yml deleted file mode 100644 index 3cbd437f0..000000000 --- a/docker-compose/recvh-sim.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a RECVH simulator -# -# Defines: -# - recvh-sim -# -version: '2.1' - -services: - recvh-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/pypcc:latest - hostname: recvh-sim - container_name: recvh-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - entrypoint: hwtr --simulator --port 4844 --config RECVTR_HB,PPS - restart: on-failure diff --git a/docker-compose/recvl-sim.yml b/docker-compose/recvl-sim.yml deleted file mode 100644 index d257992bc..000000000 --- a/docker-compose/recvl-sim.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a RECVL simulator -# -# Defines: -# - recvl-sim -# -version: '2.1' - -services: - recvl-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/pypcc:latest - hostname: recvl-sim - container_name: recvl-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - entrypoint: hwtr --simulator --port 4845 --config RECVTR_LB,PPS - restart: on-failure diff --git a/docker-compose/sdptr-sim.yml b/docker-compose/sdptr-sim.yml deleted file mode 100644 index 740f37613..000000000 --- a/docker-compose/sdptr-sim.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a SDP translator simulator -# -# Defines: -# - sdptr-sim -# -version: '2.1' - -services: - sdptr-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/sdptr:latest - hostname: sdptr-sim - container_name: sdptr-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - - command: /usr/local/bin/sdptr --ip_prefix=127.0. --nodaemon - networks: - - control - restart: unless-stopped diff --git a/docker-compose/sdptr.yml b/docker-compose/sdptr.yml deleted file mode 100644 index 2218714e0..000000000 --- a/docker-compose/sdptr.yml +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file for TANGO database and database device server -# -version: '2.1' - -services: - sdptr-lba: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/sdptr:latest - container_name: sdptr-lba - networks: - - control - ports: - - "4840:4840" - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - - command: /usr/local/bin/sdptr-lba --port 4840 --first_gn 0 --fpgas 16 --nodaemon - restart: unless-stopped - sdptr-hba0: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/sdptr:latest - container_name: sdptr-hba0 - networks: - - control - ports: - - "4842:4842" - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - - command: /usr/local/bin/sdptr-hba0 --port 4842 --first_gn 16 --fpgas 4 --nodaemon - restart: unless-stopped - sdptr-hba1: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/sdptr:latest - container_name: sdptr-hba1 - networks: - - control - ports: - - "4844:4844" - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - - command: /usr/local/bin/sdptr-hba1 --port 4844 --first_gn 20 --fpgas 4 --nodaemon - restart: unless-stopped diff --git a/docker-compose/tango-prometheus-exporter.yml b/docker-compose/tango-prometheus-exporter.yml deleted file mode 100644 index 69e0df046..000000000 --- a/docker-compose/tango-prometheus-exporter.yml +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches the Tango -> Prometheus adapter -# -version: '2.1' - -services: - tango-prometheus-exporter: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-prometheus-exporter - build: - context: tango-prometheus-exporter - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} - dockerfile: ./Dockerfile - command: - - "--config=/code/lofar2-policy.json" - hostname: tango-prometheus-exporter - container_name: tango-prometheus-exporter - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - environment: - - TANGO_HOST=${TANGO_HOST} - ports: - - "8000:8000" - restart: unless-stopped - - tango-prometheus-fast-exporter: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-prometheus-exporter - build: - context: tango-prometheus-exporter - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} - dockerfile: ./Dockerfile - command: - - "--config=/code/lofar2-fast-policy.json" - hostname: tango-prometheus-fast-exporter - container_name: tango-prometheus-fast-exporter - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - environment: - - TANGO_HOST=${TANGO_HOST} - ports: - - "8001:8000" - restart: unless-stopped - - tango-prometheus-slow-exporter: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-prometheus-exporter - build: - context: tango-prometheus-exporter - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} - dockerfile: ./Dockerfile - command: - - "--config=/code/lofar2-slow-policy.json" - hostname: tango-prometheus-slow-exporter - container_name: tango-prometheus-slow-exporter - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - environment: - - TANGO_HOST=${TANGO_HOST} - ports: - - "8002:8000" - restart: unless-stopped diff --git a/docker-compose/tango-prometheus-exporter/Makefile b/docker-compose/tango-prometheus-exporter/Makefile deleted file mode 100644 index 6f318981c..000000000 --- a/docker-compose/tango-prometheus-exporter/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -NAME:=tango-exporter - -VERSION:=1.0.2 -TAG:=$(VERSION) - -include ../make/Makefile.mk \ No newline at end of file diff --git a/docker-compose/tango-rest.yml b/docker-compose/tango-rest.yml deleted file mode 100644 index 0505cd7be..000000000 --- a/docker-compose/tango-rest.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches Astor, sending the display to a remote X11 -# display. -# -# Defines: -# - astor: service that runs Astor in a container -# - container1: example container running Starter device -# -# Requires: -# - tango.yml -# -version: '2.1' - -services: - tango-rest: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-rest:${TANGO_REST_VERSION} - hostname: tango-rest - container_name: tango-rest - networks: - - control - environment: - - TANGO_HOST=${TANGO_HOST} - ports: - - 8080:8080 - entrypoint: - - /usr/local/bin/wait-for-it.sh - - ${TANGO_HOST} - - --timeout=30 - - --strict - - -- - - /usr/bin/supervisord - - --configuration - - /etc/supervisor/supervisord.conf - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped diff --git a/docker-compose/tango.yml b/docker-compose/tango.yml deleted file mode 100644 index c4a2827d9..000000000 --- a/docker-compose/tango.yml +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file for TANGO database and database device server -# -# Defines: -# - tangodb: MariaDB database with TANGO schema -# - databaseds: TANGO database device server -# -# Requires: -# - None -# -version: '2.1' - -volumes: - tangodb: { } - -services: - tangodb: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-db:${TANGO_DB_VERSION} - hostname: tangodb - container_name: tangodb - networks: - - control - environment: - - MYSQL_ROOT_PASSWORD=secret - - MYSQL_DATABASE=tango - - MYSQL_USER=tango - - MYSQL_PASSWORD=tango - - MARIADB_AUTO_UPGRADE=1 - volumes: - - tangodb:/var/lib/mysql - ports: - - "3306:3306" - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped - - databaseds: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-databaseds:${TANGO_DATABASEDS_VERSION} - hostname: databaseds - container_name: databaseds - networks: - - control - ports: - - "10000:10000" - depends_on: - - tangodb - environment: - - MYSQL_HOST=${MYSQL_HOST} - - MYSQL_DATABASE=tango - - MYSQL_USER=tango - - MYSQL_PASSWORD=tango - - TANGO_HOST=${TANGO_HOST} - entrypoint: - - /usr/local/bin/wait-for-it.sh - - ${MYSQL_HOST} - - --timeout=30 - - --strict - - -- - - /usr/local/bin/DataBaseds - - "2" - - -ORBendPoint - - giop:tcp:0.0.0.0:10000 - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped - - dsconfig: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/dsconfig:${TAG} - build: - context: dsconfig - args: - SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-dsconfig:${TANGO_DSCONFIG_VERSION} - hostname: dsconfig - container_name: dsconfig - networks: - - control - environment: - - TANGO_HOST=${TANGO_HOST} - command: > - sh -c "wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict -- - sleep infinity" - volumes: - - ..:/opt/lofar/tango:rw - - ${HOME}:/hosthome - logging: - driver: syslog - options: - syslog-address: udp://${LOG_HOSTNAME}:1514 - syslog-format: rfc3164 - tag: "{{.Name}}" - restart: unless-stopped diff --git a/docker-compose/unb2-sim.yml b/docker-compose/unb2-sim.yml deleted file mode 100644 index 1a99e5fdd..000000000 --- a/docker-compose/unb2-sim.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# -# Docker compose file that launches a UNB2 simulator -# -# Defines: -# - unb2-sim -# -version: '2.1' - -services: - unb2-sim: - image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_LOFAR}/pypcc:latest - hostname: unb2-sim - container_name: unb2-sim - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - control - entrypoint: hwtr --simulator --port 4841 --config UNB2TR - restart: on-failure diff --git a/docker/Makefile b/docker/Makefile new file mode 100644 index 000000000..169d7c363 --- /dev/null +++ b/docker/Makefile @@ -0,0 +1,38 @@ +TAG ?= latest +TANGO_STATION_CONTROL ?= 1 +LOCAL_DOCKER_REGISTRY ?= $(shell shyaml get-value registry.astron.url < "../infra/env.yaml") +TANGO_ITANGO_VERSION ?= $(shell shyaml get-value tango.itango.version < "../infra/env.yaml") +TANGO_DSCONFIG_VERSION ?= $(shell shyaml get-value tango.dsconfig.version < "../infra/env.yaml") + + +.PHONY: ec-sim jupyter-lab lofar-device-base tango-prometheus-exporter dsconfig ci-runner integration-test context grafana + +context: ## Move and build the necessary files to create minimal docker context + rm -rf ./lofar-device-base/tmp; \ + mkdir -p lofar-device-base/tmp; \ + if [[ "${NO_BUILD}" -ne "1" ]]; then \ + rm -rf ../tangostationcontrol/dist; \ + cd ../tangostationcontrol; \ + tox -e build; \ + cd ../docker; \ + fi; \ + cp ../tangostationcontrol/dist/*.whl lofar-device-base/tmp/; \ + cp ../tangostationcontrol/requirements.txt lofar-device-base/tmp/; \ + +jupyter-lab ec-sim grafana: + docker build -f $@/Dockerfile -t $(LOCAL_DOCKER_REGISTRY)/$@:$(TAG) $@ + +tango-prometheus-exporter: + docker build --build-arg SOURCE_IMAGE=$(LOCAL_DOCKER_REGISTRY)/tango-itango:$(TANGO_ITANGO_VERSION) -f tango-prometheus-exporter/Dockerfile -t $(LOCAL_DOCKER_REGISTRY)/tango-prometheus-exporter:$(TAG) tango-prometheus-exporter + +dsconfig: + docker build --build-arg SOURCE_IMAGE=$(LOCAL_DOCKER_REGISTRY)/tango-dsconfig:$(TANGO_DSCONFIG_VERSION) -f dsconfig/Dockerfile -t $(LOCAL_DOCKER_REGISTRY)/dsconfig:$(TAG) dsconfig + +lofar-device-base: context + docker build --build-arg TANGO_STATION_CONTROL=$(TANGO_STATION_CONTROL) --build-arg SOURCE_IMAGE=$(LOCAL_DOCKER_REGISTRY)/tango-itango:$(TANGO_ITANGO_VERSION) -f lofar-device-base/Dockerfile -t $(LOCAL_DOCKER_REGISTRY)/lofar-device-base:$(TAG) lofar-device-base + +ci-runner: + docker build --build-arg SOURCE_IMAGE=$(LOCAL_DOCKER_REGISTRY)/tango-itango:$(TANGO_ITANGO_VERSION) -f ci-runner/Dockerfile -t $(LOCAL_DOCKER_REGISTRY)/ci-build-runner:$(TAG) ci-runner + +integration-test: ci-runner + docker build --build-arg SOURCE_IMAGE=$(LOCAL_DOCKER_REGISTRY)/ci-build-runner:$(TAG) -f integration-test/Dockerfile -t $(LOCAL_DOCKER_REGISTRY)/integration-test:$(TAG) integration-test diff --git a/docker-compose/ci-runner/Dockerfile b/docker/ci-runner/Dockerfile similarity index 55% rename from docker-compose/ci-runner/Dockerfile rename to docker/ci-runner/Dockerfile index d15d54b7a..793e61b00 100644 --- a/docker-compose/ci-runner/Dockerfile +++ b/docker/ci-runner/Dockerfile @@ -4,7 +4,10 @@ FROM ${SOURCE_IMAGE} RUN echo 'tzdata tzdata/Areas select Etc' | sudo debconf-set-selections RUN echo 'tzdata tzdata/Zones/Etc select UTC' | sudo debconf-set-selections RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections -RUN sudo apt-get update && sudo apt-get install -y tzdata -RUN sudo apt-get update && sudo apt-get install -y tox python3-dev libboost-python-dev pkg-config git shellcheck graphviz casacore-data + +RUN --mount=type=cache,target=/var/cache/apt \ + sudo apt-get update +RUN --mount=type=cache,target=/var/cache/apt \ + sudo apt-get install -y tzdata tox python3-dev libboost-python-dev pkg-config git shellcheck graphviz casacore-data RUN sudo ln -s /var/lib/casacore/data/geodetic/TAI_UTC /usr/share/casacore/data/geodetic/TAI_UTC -RUN sudo pip install --upgrade tox +RUN sudo pip install --break-system-packages --upgrade tox diff --git a/docker-compose/dsconfig/Dockerfile b/docker/dsconfig/Dockerfile similarity index 100% rename from docker-compose/dsconfig/Dockerfile rename to docker/dsconfig/Dockerfile diff --git a/docker-compose/dsconfig/manage_object_properties.py b/docker/dsconfig/manage_object_properties.py similarity index 100% rename from docker-compose/dsconfig/manage_object_properties.py rename to docker/dsconfig/manage_object_properties.py diff --git a/docker-compose/dsconfig/merge_json.py b/docker/dsconfig/merge_json.py similarity index 100% rename from docker-compose/dsconfig/merge_json.py rename to docker/dsconfig/merge_json.py diff --git a/docker-compose/ec-sim/Dockerfile b/docker/ec-sim/Dockerfile similarity index 69% rename from docker-compose/ec-sim/Dockerfile rename to docker/ec-sim/Dockerfile index a5514caac..c193baf2f 100644 --- a/docker-compose/ec-sim/Dockerfile +++ b/docker/ec-sim/Dockerfile @@ -3,7 +3,7 @@ FROM python:3.10 #RUN apt-get -y update && apt-get install -y python pip COPY requirements.txt / -RUN pip install -r /requirements.txt +RUN pip install --break-system-packages -r /requirements.txt COPY ec_sim.py / CMD python ec_sim.py diff --git a/docker-compose/ec-sim/ec_sim.py b/docker/ec-sim/ec_sim.py similarity index 100% rename from docker-compose/ec-sim/ec_sim.py rename to docker/ec-sim/ec_sim.py diff --git a/docker-compose/ec-sim/requirements.txt b/docker/ec-sim/requirements.txt similarity index 100% rename from docker-compose/ec-sim/requirements.txt rename to docker/ec-sim/requirements.txt diff --git a/docker-compose/grafana/Dockerfile b/docker/grafana/Dockerfile similarity index 100% rename from docker-compose/grafana/Dockerfile rename to docker/grafana/Dockerfile diff --git a/docker-compose/grafana/README.md b/docker/grafana/README.md similarity index 100% rename from docker-compose/grafana/README.md rename to docker/grafana/README.md diff --git a/docker-compose/grafana/datasources/loki.yaml b/docker/grafana/datasources/loki.yaml similarity index 100% rename from docker-compose/grafana/datasources/loki.yaml rename to docker/grafana/datasources/loki.yaml diff --git a/docker-compose/grafana/datasources/tangodb.yaml b/docker/grafana/datasources/tangodb.yaml similarity index 100% rename from docker-compose/grafana/datasources/tangodb.yaml rename to docker/grafana/datasources/tangodb.yaml diff --git a/docker-compose/grafana/stationcontrol-dashboards.yaml b/docker/grafana/stationcontrol-dashboards.yaml similarity index 100% rename from docker-compose/grafana/stationcontrol-dashboards.yaml rename to docker/grafana/stationcontrol-dashboards.yaml diff --git a/docker/integration-test/Dockerfile b/docker/integration-test/Dockerfile new file mode 100644 index 000000000..5f9bbac5f --- /dev/null +++ b/docker/integration-test/Dockerfile @@ -0,0 +1,4 @@ +ARG SOURCE_IMAGE +FROM ${SOURCE_IMAGE} + +ENTRYPOINT ["tox", "-e", "integration", "--", ""] diff --git a/docker-compose/jupyter-lab/Dockerfile b/docker/jupyter-lab/Dockerfile similarity index 95% rename from docker-compose/jupyter-lab/Dockerfile rename to docker/jupyter-lab/Dockerfile index 5837b0f0a..cea9f724b 100644 --- a/docker-compose/jupyter-lab/Dockerfile +++ b/docker/jupyter-lab/Dockerfile @@ -18,7 +18,7 @@ RUN mamba install --yes jupyterlab-git && \ RUN jupyter server extension enable --py jupyterlab_git COPY requirements.txt ./ -RUN pip install -r requirements.txt +RUN pip install --break-system-packages -r requirements.txt RUN rm requirements.txt USER root diff --git a/docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/ipython_config.py b/docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/ipython_config.py similarity index 100% rename from docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/ipython_config.py rename to docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/ipython_config.py diff --git a/docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/00-tango.py b/docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/00-tango.py similarity index 100% rename from docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/00-tango.py rename to docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/00-tango.py diff --git a/docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py b/docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py similarity index 100% rename from docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py rename to docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py diff --git a/docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/02-stationcontrol.py b/docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/02-stationcontrol.py similarity index 100% rename from docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/02-stationcontrol.py rename to docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/02-stationcontrol.py diff --git a/docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/README.md b/docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/README.md similarity index 100% rename from docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/README.md rename to docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/README.md diff --git a/docker-compose/jupyter-lab/jupyter-kernels/stationcontrol/kernel.json b/docker/jupyter-lab/jupyter-kernels/stationcontrol/kernel.json similarity index 100% rename from docker-compose/jupyter-lab/jupyter-kernels/stationcontrol/kernel.json rename to docker/jupyter-lab/jupyter-kernels/stationcontrol/kernel.json diff --git a/docker-compose/jupyter-lab/jupyter_notebook_config.py b/docker/jupyter-lab/jupyter_notebook_config.py similarity index 100% rename from docker-compose/jupyter-lab/jupyter_notebook_config.py rename to docker/jupyter-lab/jupyter_notebook_config.py diff --git a/docker-compose/jupyter-lab/requirements.txt b/docker/jupyter-lab/requirements.txt similarity index 100% rename from docker-compose/jupyter-lab/requirements.txt rename to docker/jupyter-lab/requirements.txt diff --git a/docker-compose/jupyter-lab/user-settings/@jupyterlab/apputils-extension/notification.jupyterlab-settings b/docker/jupyter-lab/user-settings/@jupyterlab/apputils-extension/notification.jupyterlab-settings similarity index 100% rename from docker-compose/jupyter-lab/user-settings/@jupyterlab/apputils-extension/notification.jupyterlab-settings rename to docker/jupyter-lab/user-settings/@jupyterlab/apputils-extension/notification.jupyterlab-settings diff --git a/docker-compose/jupyter-lab/user-settings/@jupyterlab/git/plugin.jupyterlab-settings b/docker/jupyter-lab/user-settings/@jupyterlab/git/plugin.jupyterlab-settings similarity index 100% rename from docker-compose/jupyter-lab/user-settings/@jupyterlab/git/plugin.jupyterlab-settings rename to docker/jupyter-lab/user-settings/@jupyterlab/git/plugin.jupyterlab-settings diff --git a/docker-compose/jupyter-lab/user-settings/jupyterlab-skip-traceback/settings.jupyterlab-settings b/docker/jupyter-lab/user-settings/jupyterlab-skip-traceback/settings.jupyterlab-settings similarity index 100% rename from docker-compose/jupyter-lab/user-settings/jupyterlab-skip-traceback/settings.jupyterlab-settings rename to docker/jupyter-lab/user-settings/jupyterlab-skip-traceback/settings.jupyterlab-settings diff --git a/docker-compose/lofar-device-base/Dockerfile b/docker/lofar-device-base/Dockerfile similarity index 94% rename from docker-compose/lofar-device-base/Dockerfile rename to docker/lofar-device-base/Dockerfile index 14dcd0804..af246c0f1 100644 --- a/docker-compose/lofar-device-base/Dockerfile +++ b/docker/lofar-device-base/Dockerfile @@ -39,9 +39,9 @@ RUN if [ $TANGO_STATION_CONTROL ]; then \ # install and use ephimerides and geodetic ("measures") tables for casacore. # we install a _stub_ since the tables need to be deployed explicitly from within the software. RUN sudo mkdir -p /opt/IERS && sudo chmod a+rwx /opt/IERS -COPY lofar-device-base/WSRT_Measures_stub /opt/IERS +COPY WSRT_Measures_stub /opt/IERS -COPY lofar-device-base/casarc /home/tango/.casarc +COPY casarc /home/tango/.casarc ENV TANGO_LOG_PATH=/var/log/tango RUN sudo mkdir -p /var/log/tango && sudo chmod a+rwx /var/log/tango diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.dat b/docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.dat similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.dat rename to docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.dat diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0 b/docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0 similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0 rename to docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0 diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0i b/docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0i similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0i rename to docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.f0i diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.info b/docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.info similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.info rename to docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.info diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.lock b/docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.lock similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.lock rename to docker/lofar-device-base/WSRT_Measures_stub/ephemerides/DE200/table.lock diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.dat b/docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.dat similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.dat rename to docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.dat diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.f0 b/docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.f0 similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.f0 rename to docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.f0 diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.info b/docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.info similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.info rename to docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.info diff --git a/docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.lock b/docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.lock similarity index 100% rename from docker-compose/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.lock rename to docker/lofar-device-base/WSRT_Measures_stub/geodetic/TAI_UTC/table.lock diff --git a/docker-compose/lofar-device-base/casarc b/docker/lofar-device-base/casarc similarity index 100% rename from docker-compose/lofar-device-base/casarc rename to docker/lofar-device-base/casarc diff --git a/docker-compose/tango-prometheus-exporter/Dockerfile b/docker/tango-prometheus-exporter/Dockerfile similarity index 85% rename from docker-compose/tango-prometheus-exporter/Dockerfile rename to docker/tango-prometheus-exporter/Dockerfile index 6cf1017c0..b09506285 100644 --- a/docker-compose/tango-prometheus-exporter/Dockerfile +++ b/docker/tango-prometheus-exporter/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install curl -y USER tango COPY code/pip-requirements.txt /tmp/ -RUN pip install -r /tmp/pip-requirements.txt +RUN pip install --break-system-packages -r /tmp/pip-requirements.txt COPY code /code COPY lofar2-policy.json /code/ diff --git a/docker-compose/tango-prometheus-exporter/LICENSE b/docker/tango-prometheus-exporter/LICENSE similarity index 100% rename from docker-compose/tango-prometheus-exporter/LICENSE rename to docker/tango-prometheus-exporter/LICENSE diff --git a/docker-compose/tango-prometheus-exporter/README.md b/docker/tango-prometheus-exporter/README.md similarity index 100% rename from docker-compose/tango-prometheus-exporter/README.md rename to docker/tango-prometheus-exporter/README.md diff --git a/docker-compose/tango-prometheus-exporter/code/__init__.py b/docker/tango-prometheus-exporter/code/__init__.py similarity index 100% rename from docker-compose/tango-prometheus-exporter/code/__init__.py rename to docker/tango-prometheus-exporter/code/__init__.py diff --git a/docker-compose/tango-prometheus-exporter/code/pip-requirements.txt b/docker/tango-prometheus-exporter/code/pip-requirements.txt similarity index 100% rename from docker-compose/tango-prometheus-exporter/code/pip-requirements.txt rename to docker/tango-prometheus-exporter/code/pip-requirements.txt diff --git a/docker-compose/tango-prometheus-exporter/code/tango-prometheus-client.py b/docker/tango-prometheus-exporter/code/tango-prometheus-client.py similarity index 100% rename from docker-compose/tango-prometheus-exporter/code/tango-prometheus-client.py rename to docker/tango-prometheus-exporter/code/tango-prometheus-client.py diff --git a/docker-compose/tango-prometheus-exporter/get_metrics.sh b/docker/tango-prometheus-exporter/get_metrics.sh similarity index 100% rename from docker-compose/tango-prometheus-exporter/get_metrics.sh rename to docker/tango-prometheus-exporter/get_metrics.sh diff --git a/docker-compose/tango-prometheus-exporter/lofar2-fast-policy.json b/docker/tango-prometheus-exporter/lofar2-fast-policy.json similarity index 100% rename from docker-compose/tango-prometheus-exporter/lofar2-fast-policy.json rename to docker/tango-prometheus-exporter/lofar2-fast-policy.json diff --git a/docker-compose/tango-prometheus-exporter/lofar2-policy.json b/docker/tango-prometheus-exporter/lofar2-policy.json similarity index 100% rename from docker-compose/tango-prometheus-exporter/lofar2-policy.json rename to docker/tango-prometheus-exporter/lofar2-policy.json diff --git a/docker-compose/tango-prometheus-exporter/lofar2-slow-policy.json b/docker/tango-prometheus-exporter/lofar2-slow-policy.json similarity index 100% rename from docker-compose/tango-prometheus-exporter/lofar2-slow-policy.json rename to docker/tango-prometheus-exporter/lofar2-slow-policy.json diff --git a/infra/README.md b/infra/README.md deleted file mode 100644 index d44445f60..000000000 --- a/infra/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Station infrastructure as code - -## Base software deployment - -This directory contains 3 parts/approaches to deploy nomad and consul on a station. -They should be seen as a starting point as soon as we have decided on the final approach. - -The currently deployed station configuration can be found in the `station-config` directory. - -### bash script - -The bash script `install-station.sh` documents the steps taken to get nomad and consul installed on a station. -It should still be aimed to separate the servers and clients in one or another shape or form (e.g. VMs) to increase -robustness. This script might be used as a base for future ansible scripts. - -### IDMS - -The files in idms use the [cloud-init](https://cloudinit.readthedocs.io/en/latest/) project to fully install nomad and -consul on a cloud-base image from debian/ubuntu or any other big distribution. These where mostly created to easily -create a demo setup of multiple stations. Depending on the route we go it could be used as a base and could be combined -with ansible if wanted. - -### Packer (qemu) - -The `qemu-test.pkr.hcl` uses the [QEMU packer builder](https://developer.hashicorp.com/packer/plugins/builders/qemu) to -create a debian VM image based on the latest iso file and installs all required components. -It is [derived from an existing project](https://github.com/tylert/packer-build) and therefore contains some stuff we -don't use (e.g. local apt_cache_url). It also uses cloud-init, but could be a way to have more complete images and less -overhead in the cloud-init file. diff --git a/infra/dev/all.hcl b/infra/dev/all.hcl index 479e67576..e47a4e802 100644 --- a/infra/dev/all.hcl +++ b/infra/dev/all.hcl @@ -21,6 +21,7 @@ module "tango" { variables = { nomad_cluster = module.nomad.output.nomad_cluster lofar20_dir = variable.lofar20_dir + image_tag = variable.image_tag } } diff --git a/infra/dev/nomad/nomad.hcl b/infra/dev/nomad/nomad.hcl index 9d8abe433..85bff9e94 100644 --- a/infra/dev/nomad/nomad.hcl +++ b/infra/dev/nomad/nomad.hcl @@ -83,6 +83,7 @@ resource "container" "consul" { privileged = false } + resource "nomad_cluster" "station" { depends_on = ["resource.container.consul"] client_nodes = 1 diff --git a/docker-compose/object-storage/caltables/CS001/CalTable-CS001-HBA-150MHz.h5 b/infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-HBA-150MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/CS001/CalTable-CS001-HBA-150MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-HBA-150MHz.h5 diff --git a/docker-compose/object-storage/caltables/CS001/CalTable-CS001-HBA-200MHz.h5 b/infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-HBA-200MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/CS001/CalTable-CS001-HBA-200MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-HBA-200MHz.h5 diff --git a/docker-compose/object-storage/caltables/CS001/CalTable-CS001-HBA-250MHz.h5 b/infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-HBA-250MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/CS001/CalTable-CS001-HBA-250MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-HBA-250MHz.h5 diff --git a/docker-compose/object-storage/caltables/CS001/CalTable-CS001-LBA-50MHz.h5 b/infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-LBA-50MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/CS001/CalTable-CS001-LBA-50MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/CS001/CalTable-CS001-LBA-50MHz.h5 diff --git a/docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-HBA-150MHz.h5 b/infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-HBA-150MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-HBA-150MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-HBA-150MHz.h5 diff --git a/docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-HBA-200MHz.h5 b/infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-HBA-200MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-HBA-200MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-HBA-200MHz.h5 diff --git a/docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-HBA-250MHz.h5 b/infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-HBA-250MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-HBA-250MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-HBA-250MHz.h5 diff --git a/docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-LBA-50MHz.h5 b/infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-LBA-50MHz.h5 similarity index 100% rename from docker-compose/object-storage/caltables/DevStation/CalTable-DevStation-LBA-50MHz.h5 rename to infra/dev/seed-data/object-storage/caltables/DevStation/CalTable-DevStation-LBA-50MHz.h5 diff --git a/docker-compose/object-storage/iers/ephemerides/DE200/table.dat b/infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.dat similarity index 100% rename from docker-compose/object-storage/iers/ephemerides/DE200/table.dat rename to infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.dat diff --git a/docker-compose/object-storage/iers/ephemerides/DE200/table.f0 b/infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.f0 similarity index 100% rename from docker-compose/object-storage/iers/ephemerides/DE200/table.f0 rename to infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.f0 diff --git a/docker-compose/object-storage/iers/ephemerides/DE200/table.f0i b/infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.f0i similarity index 100% rename from docker-compose/object-storage/iers/ephemerides/DE200/table.f0i rename to infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.f0i diff --git a/docker-compose/object-storage/iers/ephemerides/DE200/table.info b/infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.info similarity index 100% rename from docker-compose/object-storage/iers/ephemerides/DE200/table.info rename to infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.info diff --git a/docker-compose/object-storage/iers/ephemerides/DE200/table.lock b/infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.lock similarity index 100% rename from docker-compose/object-storage/iers/ephemerides/DE200/table.lock rename to infra/dev/seed-data/object-storage/iers/ephemerides/DE200/table.lock diff --git a/docker-compose/object-storage/iers/geodetic/TAI_UTC/table.dat b/infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.dat similarity index 100% rename from docker-compose/object-storage/iers/geodetic/TAI_UTC/table.dat rename to infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.dat diff --git a/docker-compose/object-storage/iers/geodetic/TAI_UTC/table.f0 b/infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.f0 similarity index 100% rename from docker-compose/object-storage/iers/geodetic/TAI_UTC/table.f0 rename to infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.f0 diff --git a/docker-compose/object-storage/iers/geodetic/TAI_UTC/table.info b/infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.info similarity index 100% rename from docker-compose/object-storage/iers/geodetic/TAI_UTC/table.info rename to infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.info diff --git a/docker-compose/object-storage/iers/geodetic/TAI_UTC/table.lock b/infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.lock similarity index 100% rename from docker-compose/object-storage/iers/geodetic/TAI_UTC/table.lock rename to infra/dev/seed-data/object-storage/iers/geodetic/TAI_UTC/table.lock diff --git a/infra/dev/tango.hcl b/infra/dev/tango.hcl index bbf58a06a..29bb0afdc 100644 --- a/infra/dev/tango.hcl +++ b/infra/dev/tango.hcl @@ -21,5 +21,6 @@ module "tango" { variables = { nomad_cluster = module.nomad.output.nomad_cluster lofar20_dir = variable.lofar20_dir + image_tag = variable.image_tag } } diff --git a/infra/dev/tango/tango.hcl b/infra/dev/tango/tango.hcl index d44eef418..0e9db59c3 100644 --- a/infra/dev/tango/tango.hcl +++ b/infra/dev/tango/tango.hcl @@ -29,12 +29,14 @@ resource "exec" "init-object-storage" { } script = <<-EOF #!/bin/bash - echo -n "Waiting for s3 service to become available .." - until [[ $(dig @127.0.0.1 -p 8600 s3.service.consul +short) ]]; do - sleep 2 - echo -n "." - done - echo ". [ok]" + docker run --rm --network="station" --dns="192.168.123.100" busybox \ + sh -c "echo -n 'Waiting for s3 service to become available ..' + until nc -z -w 1 s3.service.consul 9000; do + sleep 2 + echo -n '.' + done + echo '. [ok]' + " docker run --rm -i --network="station" --dns="192.168.123.100" busybox \ sh -c "while true; do @@ -43,15 +45,15 @@ resource "exec" "init-object-storage" { done" docker run --rm -i --network="station" --dns="192.168.123.100" --entrypoint bash \ - -v "${variable.lofar20_dir}":/opt/lofar/tango:rw \ + -v "${variable.lofar20_dir}/infra/dev/seed-data":/opt/seed-data \ minio/mc:RELEASE.2023-10-14T01-57-03Z \ -c "mc alias set object-storage http://s3.service.consul:9000 minioadmin minioadmin echo 'Initialising caltables' mc mb object-storage/caltables - mc cp --recursive /opt/lofar/tango/docker-compose/object-storage/caltables/ object-storage/caltables/ + mc cp --recursive /opt/seed-data/object-storage/caltables/ object-storage/caltables/ echo 'Initialising IERS tables' mc mb object-storage/iers - mc cp --recursive /opt/lofar/tango/docker-compose/object-storage/iers/ object-storage/iers/ + mc cp --recursive /opt/seed-data/object-storage/iers/ object-storage/iers/ date +'%F %T' echo 'Initialisation completed'" EOF @@ -84,26 +86,24 @@ resource "exec" "dsconfig" { environment = { DNS="192.168.123.100" DOCKER_HOST=docker_host() + TANGO_HOST="tango.service.consul:10000" + TAG=variable.image_tag } working_directory = "${variable.lofar20_dir}" timeout = "3000s" script = <<-EOF #!/bin/bash - echo "Docker host is $DOCKER_HOST" - echo -n "Waiting for tango service to become available .." - until [[ $(dig @127.0.0.1 -p 8600 tango.service.consul +short) ]]; do - sleep 2 - echo -n "." - done - echo ". [ok]" - - tango_port=$(dig @127.0.0.1 -p 8600 tango.service.consul SRV +short | awk '{printf "%s",$3}') - tango_host=$(dig @127.0.0.1 -p 8600 tango.service.consul +short) - - export TANGO_HOST="$tango_host:$tango_port" - + docker run --rm --network="station" --dns="192.168.123.100" busybox \ + sh -c "echo -n 'Waiting for tango service to become available ..' + until nc -z -w 1 tango.service.consul 10000; do + sleep 2 + echo -n '.' + done + echo '. [ok]' + " - echo "Using tango host $TANGO_HOST" + echo "Docker host is $DOCKER_HOST" + echo "Tango host within docker network is $TANGO_HOST" bash sbin/dsconfig.sh --load CDB/stations/common.json bash sbin/dsconfig.sh --update CDB/stations/l0.json bash sbin/dsconfig.sh --update CDB/stations/l1.json diff --git a/infra/dev/tango/variables.hcl b/infra/dev/tango/variables.hcl index ebc49b1ac..311bbc9a2 100644 --- a/infra/dev/tango/variables.hcl +++ b/infra/dev/tango/variables.hcl @@ -2,6 +2,10 @@ variable "nomad_cluster" { default = "" } +variable "image_tag" { + default = "latest" +} + variable "lofar20_dir" { default = "" } diff --git a/infra/env.yaml b/infra/env.yaml index 01ab05cb1..6ad4d3e88 100644 --- a/infra/env.yaml +++ b/infra/env.yaml @@ -1,10 +1,16 @@ tango: + itango: + version: 9.4.3 + dsconfig: + version: 1.5.12 db: version: 11.0.2 databaseds: version: 5.22.0 rest: version: 1.14.8 + cpp: + version: 9.4.2 registry: astron: @@ -16,7 +22,9 @@ monitoring: object_storage: minio: - version: RELEASE.2023-09-23T03-47-50Z + version: RELEASE.2023-12-09T18-17-51Z + mc: + version: RELEASE.2023-12-07T22-13-17Z user: name: minioadmin pass: minioadmin diff --git a/infra/main.hcl b/infra/main.hcl deleted file mode 100644 index 6b5f8e48c..000000000 --- a/infra/main.hcl +++ /dev/null @@ -1,64 +0,0 @@ -resource "network" "station" { - subnet = "192.168.123.0/16" -} - -resource "container" "consul" { - network { - id = resource.network.station.id - ip_address = "192.168.123.200" - aliases = ["consul"] - } - - image { - name = "consul:1.6.1" - } - - command = [ - "consul", - "agent" - ] - - environment = { - CONSUL_HTTP_ADDR = "http://localhost:8500" - } - - port { - local = 8500 - remote = 8500 - host = 18500 - } - - port_range { - range = "9000-9002" - enable_host = true - } - - privileged = false -} - -resource "nomad_cluster" "station" { - depends_on = ["resource.container.consul"] - client_nodes = 1 - client_config = "./config/client.hcl" - - network { - id = resource.network.station.id - } - - volume { - source = "./volumes" - destination = "/localdata/volumes" - type = "bind" - } -} - -resource "nomad_job" "tango" { - cluster = resource.nomad_cluster.station - - paths = ["./jobs/tango.nomad"] - - health_check { - timeout = "30s" - jobs = ["tango"] - } -} diff --git a/sbin/install-deps-ubuntu-debian.sh b/sbin/install-deps-ubuntu-debian.sh index 9c2230658..2af01d24b 100755 --- a/sbin/install-deps-ubuntu-debian.sh +++ b/sbin/install-deps-ubuntu-debian.sh @@ -4,4 +4,4 @@ sudo apt update sudo apt install git g++ gcc make docker docker-compose shellcheck graphviz python3-dev \ python3-pip libboost-python-dev pkg-config shellcheck graphviz dnsutils \ bsdextrautils wget pkg-config jq -sudo pip install tox +sudo pip install --break-system-packages tox diff --git a/sbin/load_ConfigDb.sh b/sbin/load_ConfigDb.sh deleted file mode 100755 index cc7c8b254..000000000 --- a/sbin/load_ConfigDb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# - -"${LOFAR20_DIR}/sbin/dsconfig.sh" --load "${1}" diff --git a/sbin/prepare_dev_env.sh b/sbin/prepare_dev_env.sh index e10ceb849..6e7a1936f 100755 --- a/sbin/prepare_dev_env.sh +++ b/sbin/prepare_dev_env.sh @@ -5,7 +5,7 @@ # # Url to the jumppad download location -jumppad_download="https://git.astron.nl/lofar2.0/tango/-/package_files/41059/download" +jumppad_download="https://git.astron.nl/lofar2.0/tango/-/package_files/41902/download" levant_download="https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_linux_amd64.zip" if [ -z "$LOFAR20_DIR" ]; then diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index b35afc023..736aa5e83 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -103,8 +103,8 @@ if [ -z "${no_build+x}" ]; then rm -rf "${LOFAR20_DIR}/tangostationcontrol/dist" cd "${LOFAR20_DIR}/tangostationcontrol" || exit 1 tox -e build - cd "$LOFAR20_DIR/docker-compose" || exit 1 - make build dsconfig + cd "$LOFAR20_DIR/docker" || exit 1 + make dsconfig cd "$LOFAR20_DIR" fi @@ -143,7 +143,6 @@ function cleanup { find log -size 0 -exec rm {} ';' fi if [ -z "${preserve}" ]; then - make stop > /dev/null 2>&1 HOME="$JUMPPAD_HOME" jumppad down infra/dev docker volume rm "$tmp_volume" || true fi @@ -181,7 +180,7 @@ function integration_test { } function await { - timeout_sec=30 + timeout_sec=300 for i in "$@"; do start_time="$(date -u +%s)" echo -n "Wait for service ${i} to become healthy .." @@ -207,13 +206,10 @@ if [ -z "$JUMPPAD_HOME" ]; then JUMPPAD_HOME="$HOME" fi -rm -rf "$JUMPPAD_HOME/.jumppad/" - +dsconfig_image="git.astron.nl:5000/lofar2.0/tango/dsconfig:$TAG" # Update the dsconfig -docker pull -q "git.astron.nl:5000/lofar2.0/tango/dsconfig:$TAG" || docker pull -q "git.astron.nl:5000/lofar2.0/tango/dsconfig:latest" || true -if [ -n "$(docker image inspect \""git.astron.nl:5000/lofar2.0/tango/dsconfig":"${TAG}"\")" ]; then - docker tag "git.astron.nl:5000/lofar2.0/tango/dsconfig:latest" "git.astron.nl:5000/lofar2.0/tango/dsconfig:$TAG" -fi +docker pull -q "$dsconfig_image" || docker pull -q "git.astron.nl:5000/lofar2.0/tango/dsconfig:latest" || true +docker image inspect "$dsconfig_image" > /dev/null || docker tag "git.astron.nl:5000/lofar2.0/tango/dsconfig:latest" "$dsconfig_image" jumppad_options=( --var="host_volume=$tmp_volume" @@ -221,44 +217,31 @@ jumppad_options=( --var="image_tag=$TAG" ) -if [ -n "$DOCKER_HOST" ]; then - echo "Set docker host to: $DOCKER_HOST" - jumppad_options+=(--var="docker_host=$DOCKER_HOST") -fi - echo "Start module: $module" jumppad_options+=("infra/dev/$module.hcl") HOME="$JUMPPAD_HOME" jumppad up "${jumppad_options[@]}" -echo -n "Waiting for tango service to become available .." -until [[ $(dig @127.0.0.1 -p 8600 tango.service.consul +short) ]]; do - sleep 2 - echo -n "." -done -echo ". [ok]" - -tango_port=$(dig @127.0.0.1 -p 8600 tango.service.consul SRV +short | awk '{printf "%s",$3}') -tango_host=$(dig @127.0.0.1 -p 8600 tango.service.consul +short) - -export TANGO_HOST="$tango_host:$tango_port" +docker run --rm --network="station" --dns="192.168.123.100" busybox \ + sh -c "echo -n 'Waiting for tango service to become available ..' + until nc -z -w 1 tango.service.consul 10000; do + sleep 2 + echo -n '.' + done + echo '. [ok]' + " +export TANGO_HOST="tango.service.consul:10000" echo "Using tango host $TANGO_HOST" -cd "$LOFAR20_DIR/docker-compose" || exit 1 +cd "$LOFAR20_DIR/docker" || exit 1 # Devices list is used to explitly word split when supplied to commands, must # disable shellcheck SC2086 for each case. DEVICES=(device-stationmanager device-aps device-apsct device-ccd device-ec device-apspu device-sdpfirmware device-sdp device-recvh device-recvl device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-pcon device-afh device-afl device-temperaturemanager device-observationcontrol device-configuration device-calibration) -# Build only the required images, please do not build everything that makes CI -# take really long to finish, especially grafana / jupyter / prometheus. -# jupyter is physically large > 2.5gb and overlayfs is really slow. - -[ -n "${no_build}" ] || make build integration-test - -cd "$LOFAR20_DIR/docker-compose" || exit 1 +[ -n "${no_build}" ] || make integration-test # Wait for devices to restart diff --git a/sbin/run_service_test.sh b/sbin/run_service_test.sh index 806f4774e..e2060eef6 100755 --- a/sbin/run_service_test.sh +++ b/sbin/run_service_test.sh @@ -13,6 +13,10 @@ if [ -z "$LOFAR20_DIR" ]; then LOFAR20_DIR=$(readlink -f "${LOFAR20_DIR_RELATIVE}") fi +if [ -z "$TAG" ]; then + export TAG="latest" +fi + docker network rm station || true # prepare a docker volume for nomad @@ -29,14 +33,14 @@ function cleanup { done bash "${LOFAR20_DIR}"/sbin/dsconfig.sh --dump >& log/dump_ConfigDb.log fi + if [ -z "${preserve}" ]; then - make stop > /dev/null 2>&1 HOME="$JUMPPAD_HOME" jumppad down docker volume rm "$tmp_volume" || true fi } -trap cleanup EXIT +trap cleanup INT EXIT TERM ERR SIGTERM SIGINT cd "$LOFAR20_DIR" || exit 1 @@ -50,13 +54,9 @@ rm -rf "$JUMPPAD_HOME/.jumppad/" jumppad_options=( --var="host_volume=$tmp_volume" - --var="lofar20_dir=$LOFAR20_DIR" --var="image_tag=$TAG" ) -if [ -n "$DOCKER_HOST" ]; then - echo "Set docker host to: $DOCKER_HOST" - jumppad_options+=(--var="docker_host=$DOCKER_HOST") -fi +HOME="$JUMPPAD_HOME" jumppad up "${jumppad_options[@]}" infra/dev/services.hcl --no-browser -HOME="$JUMPPAD_HOME" jumppad up "${jumppad_options[@]}" infra/dev/services.hcl +echo "success" diff --git a/sbin/tag_and_push_docker_image.sh b/sbin/tag_and_push_docker_image.sh index f39c8315c..88d501a99 100755 --- a/sbin/tag_and_push_docker_image.sh +++ b/sbin/tag_and_push_docker_image.sh @@ -6,8 +6,7 @@ function usage { echo "./$(basename "$0") - no arguments, downloads remote images and pushes these to ASTRON registry. - The versions downloaded are controlled by the docker-compose/.env file" + no arguments, downloads remote images and pushes these to ASTRON registry." echo "" echo "./$(basename "$0") -h displays this help message" @@ -21,9 +20,12 @@ function usage { downloads all images for the integration test with the specified tag falling back to 'latest' if unavailable. Should neither exist on the ASTRON registry the script will exit 1. The images are retagged to match - the output of docker-compose." + the output of docker." } +SKA_DOCKER_REGISTRY_HOST=artefact.skao.int +SKA_DOCKER_REGISTRY_USER=ska-tango-images + # list of arguments expected in the input optstring=":h" @@ -49,16 +51,24 @@ if [ -z "${LOFAR20_DIR+x}" ]; then exit 1 fi -# shellcheck disable=SC1090,SC1091 -. "${LOFAR20_DIR}/docker-compose/.env" || exit 1 - if [ -z "$(which shyaml)" ]; then echo "Shyaml not found!, install using: 'pip install shyaml'" exit 1 fi + +LOCAL_DOCKER_REGISTRY=$(shyaml get-value registry.astron.url < "${LOFAR20_DIR}/infra/env.yaml") + POSTGRES_VERSION=$(shyaml get-value monitoring.db.version < "${LOFAR20_DIR}/infra/env.yaml") MINIO_VERSION=$(shyaml get-value object_storage.minio.version < "${LOFAR20_DIR}/infra/env.yaml") +MINIO_CLIENT_VERSION=$(shyaml get-value object_storage.mc.version < "${LOFAR20_DIR}/infra/env.yaml") + +TANGO_DSCONFIG_VERSION=$(shyaml get-value tango.dsconfig.version < "${LOFAR20_DIR}/infra/env.yaml") +TANGO_ITANGO_VERSION=$(shyaml get-value tango.itango.version < "${LOFAR20_DIR}/infra/env.yaml") +TANGO_CPP_VERSION=$(shyaml get-value tango.cpp.version < "${LOFAR20_DIR}/infra/env.yaml") +TANGO_DB_VERSION=$(shyaml get-value tango.db.version < "${LOFAR20_DIR}/infra/env.yaml") +TANGO_DATABASEDS_VERSION=$(shyaml get-value tango.databaseds.version < "${LOFAR20_DIR}/infra/env.yaml") +TANGO_REST_VERSION=$(shyaml get-value tango.rest.version < "${LOFAR20_DIR}/infra/env.yaml") # List of images and their tag from ska repository REMOTE_SKA_IMAGES=( @@ -67,7 +77,6 @@ REMOTE_SKA_IMAGES=( "tango-cpp:${TANGO_CPP_VERSION}" "tango-db:${TANGO_DB_VERSION}" "tango-databaseds:${TANGO_DATABASEDS_VERSION}" - "tango-dsconfig:${TANGO_DSCONFIG_VERSION}" "tango-rest:${TANGO_REST_VERSION}" ) @@ -79,14 +88,11 @@ REMOTE_IMAGES=( "consul latest hashicorp" "minio ${MINIO_VERSION} minio" "mc ${MINIO_CLIENT_VERSION} minio" - "busybox latest" - "bash latest" - "alpine latest" - "nomad 1.6.1 shipyardrun" - "docker-registry-proxy 0.6.3 shipyardrun" + "loki latest grafana" + "prometheus latest prom" ) -# Triple tuple of docker-compose names, image names and if necessary for +# Triple tuple of docker names, image names and if necessary for # integration tests. # TODO(Corne): Have this list generated from the .yml files LOCAL_IMAGES=( @@ -95,13 +101,9 @@ LOCAL_IMAGES=( "dsconfig dsconfig y" "ec-sim ec-sim y" - - "itango itango n" - - "grafana grafana n" "prometheus prometheus n" - "loki loki n" + "grafana grafana n" "jupyter-lab jupyter-lab n" - "integration-test docker-compose_integration-test n" + "integration-test integration-test n" "tango-prometheus-exporter tango-prometheus-exporter n" ) @@ -139,7 +141,7 @@ if [ -z "${1+x}" ]; then # Iterate over al the REMOTE_IMAGES and pull them from remote and push local for image in "${REMOTE_SKA_IMAGES[@]}"; do - local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${image}" + local_url="${LOCAL_DOCKER_REGISTRY}/${image}" remote_url="${SKA_DOCKER_REGISTRY_HOST}/${SKA_DOCKER_REGISTRY_USER}-${image}" docker pull "${remote_url}" docker tag "${remote_url}" "${local_url}" @@ -149,7 +151,7 @@ if [ -z "${1+x}" ]; then for image in "${REMOTE_IMAGES[@]}"; do # shellcheck disable=SC2086 set -- $image - local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${1}:${2}" + local_url="${LOCAL_DOCKER_REGISTRY}/${1}:${2}" if [ -n "${3+x}" ]; then remote_url="${3}/${1}:${2}" else @@ -177,7 +179,7 @@ if [ -n "${1+x}" ] && [ "${1}" != "pull" ]; then local_image="${1}" tag="${2}" - cd "${LOFAR20_DIR}/docker-compose" || exit 1 + cd "${LOFAR20_DIR}/docker" || exit 1 # Loop through images and find the specified one for image in "${LOCAL_IMAGES[@]}"; do @@ -186,7 +188,7 @@ if [ -n "${1+x}" ] && [ "${1}" != "pull" ]; then set -- $image if [ "${local_image}" == "${1}" ]; then echo "Building image for ${1} container" - local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${2}" + local_url="${LOCAL_DOCKER_REGISTRY}/${2}" # If tag is not latest, than it is not a tagged master build and we can # pull the latest image as cache (if it already exists). @@ -197,7 +199,7 @@ if [ -n "${1+x}" ] && [ "${1}" != "pull" ]; then fi fi - TAG="$tag" NO_BUILD=1 make build "${1}" || exit 1 + TAG="$tag" NO_BUILD=1 make "${1}" || exit 1 docker tag "${2}" "${local_url}:${tag}" || docker tag "${2/_/-}" "${local_url}:${tag}" docker push "${local_url}:${tag}" fi @@ -227,14 +229,14 @@ if [ -n "${1+x}" ] && [ "${1}" == "pull" ]; then # Only download images which are needed for integration test if [ "${3}" == "y" ]; then - local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${2}" + local_url="${LOCAL_DOCKER_REGISTRY}/${2}" # Pull images, at least one of the two images must succeed echo "docker pull ${local_url}:${tag}" docker pull "${local_url}:${tag}" || docker pull "${local_url}:latest" || exit 1 if [ -n "$(docker image inspect \""${local_url}":"${tag}"\")" ]; then docker tag "${local_url}:latest" "${local_url}:${tag}" fi - # Ensure the images will have the same tags as generated by docker-compose + # Ensure the images will have the same tags as generated by docker docker tag "${local_url}:${tag}" "${2}" || docker tag "${local_url}:latest" "${2}" || exit 1 fi done diff --git a/sbin/update_ConfigDb.sh b/sbin/update_ConfigDb.sh deleted file mode 100755 index dd46a81eb..000000000 --- a/sbin/update_ConfigDb.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 -# - -"${LOFAR20_DIR}/sbin/dsconfig.sh" --update "${1}" diff --git a/setup.sh b/setup.sh index 67e8a87f5..646af6260 100755 --- a/setup.sh +++ b/setup.sh @@ -4,9 +4,6 @@ # SPDX-License-Identifier: Apache-2.0 # -# Set up station control development -export DNS=192.168.123.100 - # This file's directory is used to determine the station control directory # location. if [ -z ${BASH_SOURCE} ]; then @@ -22,9 +19,6 @@ if [ ! -f "${LOFAR20_DIR}/.git/hooks/post-checkout" ]; then alias git="cp ${LOFAR20_DIR}/bin/update_submodules.sh ${LOFAR20_DIR}/.git/hooks/post-checkout; cp ${LOFAR20_DIR}/bin/update_submodules.sh ${LOFAR20_DIR}/.git/hooks/post-merge; unalias git; git" fi -# This is the docker network used within the integration tests/development environment -export NETWORK_MODE=station - # It checks if Tango is running within nomad, by trying to query the service from consul. # If consul is not available it is assumed that the Tango host, the computer that runs the TangoDB, # is this host. If this is not true, then modify to the Tango host's FQDN and @@ -42,6 +36,3 @@ echo "Using tango host $TANGO_HOST" # Configure to install station control in lofar-device-base image # TODO(L2SS-520): Extend to support debug and expose as property in devices export TANGO_STATION_CONTROL=1 - -# Allow read access for everybody to allow Docker forwarding of X11. -chmod a+r ~/.Xauthority diff --git a/tangostationcontrol/docs/source/developer.rst b/tangostationcontrol/docs/source/developer.rst index d3d46b065..6e5d80113 100644 --- a/tangostationcontrol/docs/source/developer.rst +++ b/tangostationcontrol/docs/source/developer.rst @@ -10,63 +10,41 @@ Several environment variables fundamentally control the deployment and development environment. These include: - `TANGO_HOST` -- `HOSTNAME` -- `NETWORK_MODE` - `TANGO_STATION_CONTROL` -- `NO_BUILD` +- `TANGO_SKIP_BUILD` Firstly, `TANGO_HOST` should point to the tango database server including its port. An example would be `10.14.0.205:10000`. If `TANGO_HOST` is not set instead -`$HOSTNAME:10000` is used. - -With `NETWORK_MODE` the name of the docker network can be controlled or `host` can -be used as value to point directly to the host. This feature has not been used -in a very long time. +`tango.service.consul:10000` is used. Finally `TANGO_STATION_CONTROL` can be used to control if device containers should build software from source (developer mode). Or if the software should be built into the `lofar-device-base` docker image directly. If `TANGO_STATION_CONTROL` is set the makefile will build a wheel package which will be installed into the docker image. -If instead a particular wheel package needs to be installed `NO_BUILD` can be +If instead a particular wheel package needs to be installed `TANGO_SKIP_BUILD` can be set as well. Be sure the wheel package is placed in the `tangostationcontrol/dist/` directory. In the future the actual value of the `TANGO_STATION_CONTROL` variable might be used to control various types of different behavior. -Docker compose +Docker ------------------------- -The docker setup is managed using ``make`` in the ``docker-compose`` directory. Key commands are: - -- ``make status`` to check which containers are running, -- ``make build <container>`` to rebuild the image for the container, -- ``make build-nocache <container>`` to rebuild the image for the container from scratch, -- ``make restart <container>`` to restart a specific container, for example to effectuate a code change. -- ``make clean`` to remove all images and containers, and the ``tangodb`` volume. To do a deeper clean, we need to remove all volumes and rebuild all containers from scratch:: +Docker containers are build using ``make`` in the ``docker`` directory. Key commands are: - make clean - docker volume prune - docker build-nocache +- ``make <container>`` to build the image for the container, Since the *Python code is taken from the host when the container starts*, restarting is enough to use the code you have in your local git repo. Rebuilding is unnecessary. - Docker networking ------------------------- -The Docker containers started use a *virtual network* to communicate among each other. This means that: - -- Containers address each other by a host name equal to the container name (f.e. ``databaseds`` for the TANGO_HOST), -- ``localhost`` cannot be used within the containers to access ports of other containers. -- ``host.docker.internal`` resolves to the actual host running the containers, -- All ports used by external parties need to be exposed explicitly in the docker-compose files. The container must open the same port as is thus exposed, or the port will not be reachable. +The Docker containers started use a consul based *virtual network* to communicate among each other. This means that: -The networks are defined in ``docker-compose/networks.yml``: - -.. literalinclude:: ../../../docker-compose/networks.yml - -The ``$NETWORK_MODE`` defaults to ``tangonet`` in the ``docker-compose/Makefile``. +- Containers address each other by a service name as defined in the job file (f.e. ``tango.service.consul`` for the TANGO_HOST), +- ``localhost`` can only be used within the containers to access other containers, if sidecar proxy is used. +- Most ports are dynamically allocated. It will be mapped to the right port within the container. .. _corba: @@ -126,10 +104,6 @@ Log from Docker Not all Docker containers run our Python programs, and can forward the logs themselves. For those, we use the ``syslog`` log driver in Docker. Extend the ``docker compose`` files with: -.. literalinclude:: ../../../docker-compose/tango-rest.yml - :start-at: logging: - :end-before: restart: - Logs forwarded in this way are provided with the container name, their timestamp, and a log level guessed by Docker. It is thus wise to parse the message content further in Logstash (see above). Services diff --git a/tangostationcontrol/docs/source/interfaces/control.rst b/tangostationcontrol/docs/source/interfaces/control.rst index df1b816d0..44e5bb680 100644 --- a/tangostationcontrol/docs/source/interfaces/control.rst +++ b/tangostationcontrol/docs/source/interfaces/control.rst @@ -12,7 +12,7 @@ The station offers Jupyter Lab On http://localhost:8888, which allow one to inte The notebooks provide some predefined variables, so you don't have to look them up: -.. literalinclude:: ../../../../docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py +.. literalinclude:: ../../../../docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py Note: the Jupyter notebooks use enhancements from the ``itango`` suite, which provide tab completions, but also the ``Device`` alias for ``DeviceProxy`` as was used in the Python examples in the next section. diff --git a/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py b/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py index 77f46c5c1..bed604556 100644 --- a/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py +++ b/tangostationcontrol/integration_test/default/prometheus/test_tango_prometheus_client.py @@ -15,7 +15,7 @@ from integration_test.device_proxy import TestDeviceProxy module_name = "ArchiverPolicy" file_path = os.path.join( os.path.realpath(".."), - "docker-compose/tango-prometheus-exporter/code/tango-prometheus-client.py", + "docker/tango-prometheus-exporter/code/tango-prometheus-client.py", ) spec = importlib.util.spec_from_file_location(module_name, file_path) tpc_policy = importlib.util.module_from_spec(spec) @@ -32,7 +32,7 @@ spec.loader.exec_module(tpc_cc) class TestPrometheusClient(BaseIntegrationTestCase): config_path = os.path.join( os.path.realpath(".."), - "docker-compose/tango-prometheus-exporter/lofar2-policy.json", + "docker/tango-prometheus-exporter/lofar2-policy.json", ) CONFIG = tpc_policy.ArchiverPolicy.load_config(config_path) diff --git a/tangostationcontrol/tangostationcontrol/devices/README.md b/tangostationcontrol/tangostationcontrol/devices/README.md index 924faf2ff..2e20c416f 100644 --- a/tangostationcontrol/tangostationcontrol/devices/README.md +++ b/tangostationcontrol/tangostationcontrol/devices/README.md @@ -8,7 +8,7 @@ If a new device is added, it will (likely) need to be referenced in several plac - Adjust `CDB/LOFAR_ConfigDb.json` to create the device in the Tango device database, - Add the device hierarchies in `CDB/hierarchies` to define the power, control and clock configuration, -- Adjust `docker-compose/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py` to make an alias for it available in Jupyter-Lab, +- Adjust `docker/jupyter-lab/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py` to make an alias for it available in Jupyter-Lab, - Adjust `tangostationcontrol/tangostationcontrol/devices/boot.py` to add the device to the station initialisation sequence, - Add to `docker-compose/` to create a YaML file to start the device in a docker container. NOTE: it needs a unique 57xx port assigned (current _unused_ port value: 5731), a unique 58xx port for ZMQ events, and a unique 59xx port for ZMQ heartbeat - Adjust `tangostationcontrol/setup.cfg` to add an entry point for the device in the package installation, diff --git a/tangostationcontrol/test/prometheus/test_archiver_policy.py b/tangostationcontrol/test/prometheus/test_archiver_policy.py index 519bdb7f4..1e96e1937 100644 --- a/tangostationcontrol/test/prometheus/test_archiver_policy.py +++ b/tangostationcontrol/test/prometheus/test_archiver_policy.py @@ -10,7 +10,7 @@ from test import base module_name = "ArchiverPolicy" file_path = os.path.join( os.path.realpath(".."), - "docker-compose/tango-prometheus-exporter/code/tango-prometheus-client.py", + "docker/tango-prometheus-exporter/code/tango-prometheus-client.py", ) spec = importlib.util.spec_from_file_location(module_name, file_path) tpc = importlib.util.module_from_spec(spec) @@ -21,7 +21,7 @@ spec.loader.exec_module(tpc) class TestArchiverPolicy(base.TestCase): config_path = os.path.join( os.path.realpath(".."), - "docker-compose/tango-prometheus-exporter/lofar2-policy.json", + "docker/tango-prometheus-exporter/lofar2-policy.json", ) CONFIG = tpc.ArchiverPolicy.load_config(config_path) -- GitLab