Skip to content
Snippets Groups Projects
Commit 04f3b545 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

Merge branch 'master' into L2SS-429-timescaledb-container

parents 36dba6c7 9a5cd4fb
No related branches found
No related tags found
1 merge request!177Resolve L2SS-429 "Timescaledb container"
Showing
with 189 additions and 408 deletions
......@@ -12,3 +12,8 @@
**/.project
**/.pydevproject
**/.settings/org.eclipse.core.resources.prefs
tangostationcontrol/dist
tangostationcontrol/build
**/.ipynb_checkpoints
**/pending_log_messages.db
**/.eggs
......@@ -2,10 +2,8 @@
# images is in place.
image: artefact.skao.int/ska-tango-images-tango-itango:9.3.5
variables:
GIT_SUBMODULE_STRATEGY: recursive
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# The PBR dependency requires a set version, not actually used
# Instead `util/lofar_git.py:get_version()` is used.
PBR_VERSION: "0.1"
cache:
paths:
- .cache/pip
......@@ -15,21 +13,29 @@ stages:
- static-analysis
- unit-tests
- integration-tests
- packaging
newline_at_eof:
stage: linting
before_script:
- pip3 install -r devices/test-requirements.txt
script:
- flake8 --filename *.sh,*.conf,*.md,*.yml --select=W292 --exclude .tox,.egg-info,docker
stage: linting
before_script:
- pip3 install -r tangostationcontrol/test-requirements.txt
script:
# TODO(Corne): Ignore shell files in submodules more cleanly
- flake8 --filename *.sh,*.conf,*.md,*.yml --select=W292 --exclude docker-compose/tango-prometheus-exporter,.tox,.egg-info,docker
python_linting:
stage: linting
before_script:
- sudo apt-get update
- sudo apt-get install -y git
script:
- cd devices
- cd tangostationcontrol
- tox -e pep8
bandit:
stage: static-analysis
before_script:
- sudo apt-get update
- sudo apt-get install -y git
script:
- cd devices
- cd tangostationcontrol
- tox -e bandit
shellcheck:
stage: static-analysis
......@@ -37,6 +43,7 @@ shellcheck:
- sudo apt-get update
- sudo apt-get install -y shellcheck
script:
# TODO(Corne): Ignore shell files in submodules
- shellcheck **/*.sh
unit_test:
stage: unit-tests
......@@ -44,29 +51,47 @@ unit_test:
- sudo apt-get update
- sudo apt-get install -y git
script:
- cd devices
- tox --recreate -e py37
integration_test:
- cd tangostationcontrol
- tox -e py37
integration_test_docker:
stage: integration-tests
allow_failure: true
image: docker:latest
tags:
- privileged
services:
- name: docker:20.10.8-dind
- name: docker:dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
# Everything below does not work currently, we need a privileged container
# that can run the dind service
before_script:
- sudo apt update
- sudo apt install -y docker.io
- export USER=$(id | awk -F'=' '{print $2}' | awk -F'(' '{print $2}' | awk -F')' '{print $1}')
- echo $USER
# - sudo usermod -aG docker $USER
- sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- apk add --update make bash docker-compose
- apk add --update bind-tools
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- touch /root/.Xauthority
# Hack BASH_SOURCE into sourced files, docker its sh shell won't set this
- export BASH_SOURCE=$(pwd)/bootstrap/etc/lofar20rc.sh
# Hack HOSTNAME env variable into host.docker.internal, set in docker-compose
- export HOSTNAME=host.docker.internal
# - export HOSTNAME=$(hostname -i)
# - export HOSTNAME=$(cat /run/systemd/netif/leases/2 | grep ^ADDRESS= | awk -F'=' '{print $2}')
# source the lofarrc file and mask its non zero exit code
- . bootstrap/etc/lofar20rc.sh || true
# TANGO_HOST must be unset our databaseds will be unreachable
- unset TANGO_HOST
# Allow integration test to execute
- chmod u+x $CI_PROJECT_DIR/sbin/run_integration_test.sh
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/run_integration_test.sh
wheel_packaging:
stage: packaging
artifacts:
paths:
- tangostationcontrol/dist/*.whl
before_script:
- sudo apt-get update
- sudo apt-get install -y git
- pip3 install -r tangostationcontrol/test-requirements.txt
- pip3 install -r docker-compose/itango/lofar-requirements.txt
script:
- touch /home/$USER/.Xauthority
- source bootstrap/etc/lofar20rc.sh
- export HOSTNAME=$(cat /run/systemd/netif/leases/2 | grep ^ADDRESS= | awk -F'=' '{print $2}')
- echo $HOSTNAME
- sudo $CI_PROJECT_DIR/sbin/run_integration_test.sh
- cd tangostationcontrol
- python setup.py bdist_wheel
......@@ -63,7 +63,7 @@
"LTS/SDP/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
"10.99.0.252"
],
"OPC_Server_Port": [
"4840"
......@@ -100,7 +100,7 @@
"LTS/SST/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
"10.99.0.252"
],
"OPC_Server_Port": [
"4840"
......@@ -127,22 +127,22 @@
"0c:c4:7a:c0:30:f1"
],
"FPGA_sst_offload_hdr_ip_destination_address_RW_default": [
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1"
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250"
]
}
}
......@@ -155,7 +155,7 @@
"LTS/XST/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
"10.99.0.252"
],
"OPC_Server_Port": [
"4840"
......@@ -182,22 +182,22 @@
"0c:c4:7a:c0:30:f1"
],
"FPGA_xst_offload_hdr_ip_destination_address_RW_default": [
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1",
"10.99.0.1"
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250",
"10.99.250.250"
]
}
}
......
{
"servers": {
"APSCT": {
"LTS": {
"APSCT": {
"LTS/APSCT/1": {
"properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
],
"OPC_Node_Path_prefix": [
"PCC"
]
}
}
}
}
},
"APSPU": {
"LTS": {
"APSPU": {
"LTS/APSPU/1": {
"properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
],
"OPC_Node_Path_prefix": [
"PCC"
]
}
}
}
}
},
"RECV": {
"LTS": {
"RECV": {
......@@ -53,10 +9,9 @@
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4842"
"4840"
],
"OPC_Node_Path_prefix": [
"PCC"
],
"OPC_Time_Out": [
"5.0"
......@@ -72,7 +27,7 @@
"LTS/SDP/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
"dop369.astron.nl"
],
"OPC_Server_Port": [
"4840"
......@@ -115,7 +70,7 @@
"5101"
],
"OPC_Server_Name": [
"dop36.astron.nl"
"dop369.astron.nl"
],
"OPC_Server_Port": [
"4840"
......@@ -194,7 +149,7 @@
"5102"
],
"OPC_Server_Name": [
"dop36.astron.nl"
"dop369.astron.nl"
],
"OPC_Server_Port": [
"4840"
......@@ -260,28 +215,6 @@
}
}
}
},
"UNB2": {
"LTS": {
"UNB2": {
"LTS/UNB2/1": {
"properties": {
"OPC_Server_Name": [
"despi.astron.nl"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Node_Path_prefix": [
"PCC"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
}
}
}
#!/bin/bash
# writes the JSON dump to stdout
docker exec -it dsconfig python -m dsconfig.dump
# writes the JSON dump to stdout, Do not change -i into -it incompatible with gitlab ci!
docker exec -i "${CONTAINER_NAME_PREFIX}"dsconfig python -m dsconfig.
#!/bin/bash
exec docker exec -it itango itango3
exec docker exec -it "${CONTAINER_NAME_PREFIX}"itango itango3
#!/bin/bash
exec docker exec -it itango /bin/bash
exec docker exec -it "${CONTAINER_NAME_PREFIX}"itango /bin/bash
#!/bin/bash
function help()
{
why="${1}"
echo -e "*** Cannot start the Python device server.\\n${why}\\n\\n* The Python file for the device server must be the 1st parameter that is provided.\\n* The instance of this device server must be the 2nd parameter that is provided."
exit -1
}
# Check if the mandatory parameters are present:
# ${1}: device server's Python file
# ${2}: instance of the device server's executable in the configDB
case ${#} in
0)
help "The device server's Python file and the instance are missing."
;;
1)
help "The device server's instance is missing."
;;
*)
deviceServer="${1}"
shift
instance="${1}"
shift
;;
esac
# Find the path to the device server's Python file that is
# relative to the /hosthome directory (in Docker the user's
# mounted ${HOME}).
# ATTENTION
# This is assuming that the device server's Python file exists
# on the Docker's host in the user's ${HOME} directory.
runThis=$(basename "${deviceServer}")
runThis=${runThis//.sh/.py}
if [ -f "${runThis}" ]; then
myDir=${PWD}
else
myDir=${PWD}/$(dirname "${deviceServer}")
fi
deviceServerPath=${myDir/${HOME}/\/hosthome}
# Tango log lines start with a UNIX timestamp. Replace them with the UTC time.
docker exec -it itango python3 "${deviceServerPath}/${runThis}" "${instance}" "${@}" | perl -ne 'use Time::Piece; s/^([0-9]+)/gmtime($1)->strftime("%F %T")/e; print;'
#!/bin/bash
# Serves as entrypoint script for docker containers
# Check required support file exists
if [[ ! -f "/usr/local/bin/wait-for-it.sh" ]]; then
>&2 echo "/usr/local/bin/wait-for-it.sh file does not exist!"
exit 1
fi
# Check required environment variable is set
if [[ ! $TANGO_HOST ]]; then
>&2 echo "TANGO_HOST environment variable unset!"
exit 1
fi
# Check if configured for specific version
if [[ $TANGOSTATIONCONTROL ]]; then
# TODO (Corne): Download version from artifacts or pypi.
# Consider exit 2 an UnImplementedError
exit 2
else
# Install the package, exit 1 if it fails
cd tangostationcontrol || exit 1
mkdir -p /tmp/tangostationcontrol
python3 setup.py build --build-base /tmp/tangostationcontrol egg_info --egg-base /tmp/tangostationcontrol bdist_wheel --dist-dir /tmp/tangostationcontrol || exit 1
# shellcheck disable=SC2012
sudo pip install "$(ls -Art /tmp/tangostationcontrol/*.whl | tail -n 1)"
fi
/usr/local/bin/wait-for-it.sh "$TANGO_HOST" --timeout=30 --strict -- "$@"
......@@ -16,6 +16,14 @@ 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
if [ ! -z ${CI_BUILD_ID+x} ]; then
export CONTAINER_NAME_PREFIX=${CI_BUILD_ID}-
elif [ ! -z ${CI_JOB_ID+x} ]; then
export CONTAINER_NAME_PREFIX=${CI_JOB_ID}-
else
unset CONTAINER_NAME_PREFIX
fi
# This needs to be modified for a development environment.
# In case you run multiple Docker networks on the same host in parallel, you need to specify a unique
# network name for each of them.
......@@ -26,7 +34,6 @@ export NETWORK_MODE=tangonet
# Example: export TANGO_HOST=station-xk25.astron.nl:10000
export TANGO_HOST=$(hostname):10000
#
# NO MODIFICATION BEYOND THIS POINT!
#
......
[DEFAULT]
test_path=${TESTS_DIR:-./test}
top_dir=./
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2021 ASTRON Netherlands Institute for Radio Astronomy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
import setuptools
# Requires: setup.cfg
setuptools.setup(setup_requires=['pbr>=2.0.0'], pbr=True)
......@@ -13,7 +13,8 @@ ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES
# But we allow to overwrite it.
NETWORK_MODE ?= tangonet
# Host name through which others can reach our control interfaces
# 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
......@@ -21,6 +22,10 @@ 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" or "stop"...
ifeq (start,$(firstword $(MAKECMDGOALS)))
SERVICE_TARGET = true
......@@ -113,6 +118,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
TANGO_HOST=$(TANGO_HOST) \
MYSQL_HOST=$(MYSQL_HOST) \
HOSTNAME=$(HOSTNAME) \
LOG_HOSTNAME=$(LOG_HOSTNAME) \
NETWORK_MODE=$(NETWORK_MODE) \
XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) \
CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \
......@@ -130,7 +136,7 @@ pull: ## pull the images from the Docker hub
build: ## rebuild images
# docker-compose does not support build dependencies, so manage those here
$(DOCKER_COMPOSE_ARGS) docker-compose -f lofar-device-base.yml -f networks.yml build --progress=plain
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) build --progress=plain $(SERVICE)
$(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) build --parallel --progress=plain $(SERVICE)
build-nocache: ## rebuild images from scratch
# docker-compose does not support build dependencies, so manage those here
......
......@@ -3,7 +3,7 @@ version: '2'
services:
archiver-maria-db:
image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/mariadb_hdbpp:2021-05-28
container_name: archiver-maria-db
container_name: ${CONTAINER_NAME_PREFIX}archiver-maria-db
networks:
- control
ports:
......@@ -17,13 +17,19 @@ services:
- MYSQL_USER=tango
- MYSQL_PASSWORD=tango
- TANGO_HOST=${TANGO_HOST}
logging:
driver: syslog
options:
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
hdbpp-es:
image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-archiver:2021-05-28
networks:
- control
container_name: hdbpp-es
container_name: ${CONTAINER_NAME_PREFIX}hdbpp-es
depends_on:
- databaseds
- dsconfig
......@@ -36,13 +42,19 @@ services:
wait-for-it.sh archiver-maria-db:3306 --timeout=30 --strict --
wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict --
hdbppes-srv 01"
logging:
driver: syslog
options:
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
hdbpp-cm:
image: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-archiver:${TANGO_ARCHIVER_VERSION}
networks:
- control
container_name: hdbpp-cm
container_name: ${CONTAINER_NAME_PREFIX}hdbpp-cm
depends_on:
- databaseds
- dsconfig
......@@ -55,10 +67,16 @@ services:
wait-for-it.sh archiver-maria-db:3306 --timeout=30 --strict --
wait-for-it.sh ${TANGO_HOST} --timeout=30 --strict --
hdbppcm-srv 01"
logging:
driver: syslog
options:
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
dsconfig:
image: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-dsconfig:${TANGO_DSCONFIG_VERSION}
container_name: dsconfig
container_name: ${CONTAINER_NAME_PREFIX}dsconfig
networks:
- control
depends_on:
......@@ -73,5 +91,11 @@ services:
- ..:/opt/lofar/tango:rw
- ${HOME}:/hosthome
- ../docker/tango/tango-archiver:/tango-archiver
logging:
driver: syslog
options:
syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164
tag: "{{.Name}}"
restart: unless-stopped
......@@ -26,6 +26,8 @@ services:
- control
ports:
- "5709:5709" # unique port for this DS
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ..:/opt/lofar/tango:rw
environment:
......
......@@ -26,6 +26,8 @@ services:
- control
ports:
- "5710:5710" # unique port for this DS
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ..:/opt/lofar/tango:rw
environment:
......
......@@ -25,17 +25,15 @@ services:
- control
ports:
- "5708:5708" # unique port for this DS
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ..:/opt/lofar/tango:rw
environment:
- TANGO_HOST=${TANGO_HOST}
entrypoint:
- /usr/local/bin/wait-for-it.sh
- ${TANGO_HOST}
- --timeout=30
- --strict
- --
- 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
- python3 -u /opt/lofar/tango/devices/devices/boot.py LTS -v -ORBendPoint giop:tcp:0:5708 -ORBendPointPublish giop:tcp:${HOSTNAME}:5708
- l2ss-boot Boot LTS -v -ORBendPoint giop:tcp:0:5708 -ORBendPointPublish giop:tcp:${HOSTNAME}:5708
restart: unless-stopped
......@@ -26,19 +26,18 @@ services:
- control
ports:
- "5705:5705" # unique port for this DS
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}
working_dir: /opt/lofar/tango
entrypoint:
- /usr/local/bin/wait-for-it.sh
- ${TANGO_HOST}
- --timeout=30
- --strict
- --
- 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
- python3 -u /opt/lofar/tango/devices/devices/docker_device.py LTS -v -ORBendPoint giop:tcp:0:5705 -ORBendPointPublish giop:tcp:${HOSTNAME}:5705
- l2ss-docker-device Docker LTS -v -ORBendPoint giop:tcp:0:5705 -ORBendPointPublish giop:tcp:${HOSTNAME}:5705
restart: unless-stopped
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment