Skip to content
Snippets Groups Projects
Commit 45fef143 authored by Taya Snijder's avatar Taya Snijder
Browse files

first attempt at adding new temperature_manager device

parent 6e900f35
No related branches found
No related tags found
1 merge request!314Resolve L2SS-696 "Temperature management device"
Showing
with 101 additions and 5 deletions
......@@ -109,6 +109,7 @@ docker_build_image_all:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-sst latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-unb2 latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-xst latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-temperature-manager latest
docker_build_image_elk:
extends: .base_docker_images_except
only:
......@@ -386,6 +387,17 @@ docker_build_image_device_xst:
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-xst $tag
docker_build_image_device_temperature_manager:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/device-temperature-manager.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-temperature-manager $tag
newline_at_eof:
stage: linting
before_script:
......
......@@ -21,6 +21,14 @@
}
}
},
},
"Temperature_manager": {
"STAT": {
"Temperature_manager": {
"STAT/Temperature_manager/1": {}
}
}
},
"TileBeam": {
"STAT": {
"TileBeam": {
......
......@@ -116,6 +116,16 @@
}
}
},
"Temperature_manager": {
"STAT": {
"Temperature_manager": {
"STAT/Temperature_manager/1": {
"properties": {
}
}
}
}
},
"RECV": {
"STAT": {
"RECV": {
......
#
# Requires:
# - lofar-device-base.yml
#
version: '2'
volumes:
iers-data: {}
services:
device-pdu:
image: device-temperature-manager
# 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: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-temperature-manager
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- control
ports:
- "5717:5717" # 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-temperature-manager Temperature_manager STAT -v -ORBendPoint giop:tcp:0:5717 -ORBendPointPublish giop:tcp:${HOSTNAME}:5717
restart: unless-stopped
......@@ -12,6 +12,7 @@ pdu = DeviceProxy("STAT/PDU/1")
beamlet = DeviceProxy("STAT/Beamlet/1")
digitalbeam = DeviceProxy("STAT/DigitalBeam/1")
docker = DeviceProxy("STAT/Docker/1")
temperature_manager = DeviceProxy("STAT/Temperature_manager/1")
# Put them in a list in case one wants to iterate
devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, docker]
......@@ -20,7 +20,7 @@ sleep 1 # dsconfig container must be up and running...
# shellcheck disable=SC2016
echo '/usr/local/bin/wait-for-it.sh ${TANGO_HOST} --strict --timeout=300 -- true' | make run dsconfig bash -
DEVICES="device-boot device-apsct device-apspu device-sdp device-pdu device-recv device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-pdu"
DEVICES="device-boot device-apsct device-apspu device-sdp device-pdu device-recv device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-pdu device-temperature-manager"
SIMULATORS="sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim"
# Build only the required images, please do not build everything that makes CI
......
temperature-manager
====================
``temperature_manager == DeviceProxy("STAT/Temperature_manager/1")``
......@@ -28,6 +28,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st
devices/recv
devices/sdp
devices/sst-xst
devices/temperature-manager
devices/configure
configure_station
alerting
......
......@@ -50,6 +50,7 @@ console_scripts =
l2ss-statistics-writer = tangostationcontrol.statistics_writer.statistics_writer:main
l2ss-unb2 = tangostationcontrol.devices.unb2:main
l2ss-xst = tangostationcontrol.devices.sdp.xst:main
l2ss-temperature-manager = tangostationcontrol.devices.temperature_manager:main
# The following entry points should eventually be removed / replaced
l2ss-cold-start = tangostationcontrol.toolkit.lts_cold_start:main
......
......@@ -244,6 +244,7 @@ class Boot(lofar_device):
"STAT/Beamlet/1",
"STAT/TileBeam/1", # Accesses RECV and Beamlet
"STAT/DigitalBeam/1",
"STAT/Temperature_manager/1",
],
)
......
......@@ -16,11 +16,11 @@ import logging
logger = logging.getLogger()
__all__ = ["PDU", "main"]
__all__ = ["temperature_manager", "main"]
@device_logging_to_python()
class PDU(lofar_device):
class temperature_manager(lofar_device):
# -----------------
# Device Properties
# -----------------
......@@ -53,5 +53,5 @@ class PDU(lofar_device):
# Run server
# ----------
def main(**kwargs):
"""Main function of the PDU module."""
return entry(PDU, **kwargs)
"""Main function of the temperature manager module."""
return entry(temperature_manager, **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/Temperature_manager/1")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment