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

Merge branch 'master' into L2SS-691-image-support-for-timescaledb

parents ff273be6 38424a2d
No related branches found
No related tags found
1 merge request!281Resolve L2SS-691 "Image support for timescaledb"
Showing
with 158 additions and 141 deletions
......@@ -99,6 +99,7 @@ docker_build_image_all:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apspu latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-tilebeam latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-beamlet latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-digitalbeam latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-boot latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-docker latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-observation_control latest
......@@ -274,6 +275,17 @@ docker_build_image_device_beamlet:
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-beamlet $tag
docker_build_image_device_digitalbeam:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/device-digitalbeam.yml
- docker-compose/lofar-device-base/*
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-digitalbeam $tag
docker_build_image_device_boot:
extends: .base_docker_images_except
only:
......
......@@ -49,6 +49,16 @@
}
}
},
"DigitalBeam": {
"STAT": {
"DigitalBeam": {
"STAT/DigitalBeam/1": {
"properties": {
}
}
}
}
},
"boot": {
"STAT": {
"Boot": {
......
......@@ -106,6 +106,16 @@
}
}
},
"DigitalBeam": {
"STAT": {
"DigitalBeam": {
"STAT/DigitalBeam/1": {
"properties": {
}
}
}
}
},
"RECV": {
"STAT": {
"RECV": {
......
{
"servers": {
"RECV": {
"1": {
"RECV": {
"STAT/RECV/1": {
"properties": {
"OPC_Server_Name": [
"host.docker.internal"
]
}
}
}
}
},
"SDP": {
"1": {
"SDP": {
"STAT/SDP/1": {
"properties": {
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"example_device": {
"1": {
"example_device": {
"STAT/example_device/1": {
"properties": {
"OPC_Server_Name": [
"host.docker.internal"
],
"OPC_Server_Port": [
"4842"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"ini_device": {
"1": {
"ini_device": {
"STAT/ini_device/1": {
"properties": {
"OPC_Server_Name": [
"host.docker.internal"
],
"OPC_Server_Port": [
"4844"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"APSCTL": {
"1": {
"APSCTL": {
"STAT/APSCTL/1": {
"properties": {
"OPC_Server_Name": [
"ltspi.astron.nl"
],
"OPC_Server_Port": [
"4844"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SST": {
"1": {
"SST": {
"STAT/SST/1": {
"properties": {
"Statistics_Client_UDP_Port": [
"5001"
],
"Statistics_Client_TCP_Port": [
"5101"
],
"OPC_Server_Name": [
"dop36.astron.nl"
],
"OPC_Server_Port": [
"4840"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"SNMP": {
"1": {
"SNMP": {
"STAT/SNMP/1": {
"properties": {
"SNMP_community": [
"public"
],
"SNMP_host": [
"192.168.178.17"
],
"SNMP_timeout": [
"5.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'
services:
device-digitalbeam:
image: device-digitalbeam
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-digitalbeam
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- control
ports:
- "5713:5713" # unique port for this DS
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ..:/opt/lofar/tango:rw
environment:
- TANGO_HOST=${TANGO_HOST}
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-digitalbeam DigitalBeam STAT -v -ORBendPoint giop:tcp:0:5713 -ORBendPointPublish giop:tcp:${HOSTNAME}:5713
restart: unless-stopped
......@@ -9,7 +9,8 @@ unb2 = DeviceProxy("STAT/UNB2/1")
boot = DeviceProxy("STAT/Boot/1")
tilebeam = DeviceProxy("STAT/TileBeam/1")
beamlet = DeviceProxy("STAT/Beamlet/1")
digitalbeam = DeviceProxy("STAT/DigitalBeam/1")
docker = DeviceProxy("STAT/Docker/1")
# Put them in a list in case one wants to iterate
devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, tilebeam, beamlet, docker]
devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, docker]
......@@ -14,13 +14,13 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1
# 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.
make build device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-tilebeam
make build device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam
make build sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
make build databaseds dsconfig elk integration-test
make build archiver-timescale hdbppts-cm hdbppts-es
# Start and stop sequence
make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-tilebeam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim hdbppts-es hdbppts-cm archiver-timescale
make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim hdbppts-es hdbppts-cm archiver-timescale
make start databaseds dsconfig elk
# Give dsconfig and databaseds time to start
......@@ -38,7 +38,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
# Give the simulators time to start
sleep 5
make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-tilebeam device-beamlet
make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-tilebeam device-beamlet device-digitalbeam
# Archive devices -> starting order is important
make start archiver-timescale hdbppts-cm hdbppts-es
......
digitalbeam
====================
``digitalbeam == DeviceProxy("STAT/DigitalBeam/1")``
......@@ -21,6 +21,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st
devices/using
devices/tilebeam
devices/beamlet
devices/digitalbeam
devices/boot
devices/docker
devices/recv
......
......@@ -37,6 +37,7 @@ console_scripts =
l2ss-apspu = tangostationcontrol.devices.apspu:main
l2ss-tilebeam = tangostationcontrol.devices.tilebeam:main
l2ss-beamlet = tangostationcontrol.devices.sdp.beamlet:main
l2ss-digitalbeam = tangostationcontrol.devices.sdp.digitalbeam:main
l2ss-boot = tangostationcontrol.devices.boot:main
l2ss-docker-device = tangostationcontrol.devices.docker_device:main
l2ss-observation = tangostationcontrol.devices.observation:main
......
......@@ -242,6 +242,7 @@ class Boot(lofar_device):
"STAT/XST/1",
"STAT/Beamlet/1",
"STAT/TileBeam/1", # Accesses RECV and Beamlet
"STAT/DigitalBeam/1",
],
)
......
# -*- coding: utf-8 -*-
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
""" DigitalBeam Device Server for LOFAR2.0
"""
# PyTango imports
#from tango.server import device_property
#from tango import AttrWriteType
# Additional import
from tangostationcontrol.common.entrypoint import entry
#from tangostationcontrol.clients.attribute_wrapper import attribute_wrapper
from tangostationcontrol.devices.lofar_device import lofar_device
#import numpy
__all__ = ["DigitalBeam", "main"]
class DigitalBeam(lofar_device):
pass
# -----------------
# Device Properties
# -----------------
# ----------
# Attributes
# ----------
# ----------
# Summarising Attributes
# ----------
# --------
# Overloaded functions
# --------
# --------
# Commands
# --------
# ----------
# Run server
# ----------
def main(**kwargs):
"""Main function of the SST Device module."""
return entry(DigitalBeam, **kwargs)
# -*- coding: utf-8 -*-
#
# This file is part of the LOFAR 2.0 Station Software
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
from .base import AbstractTestBases
class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
def setUp(self):
"""Intentionally recreate the device object in each test"""
super().setUp("STAT/DigitalBeam/1")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment