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

Merge branch 'master' into L2SS-1052

parents 7d7c7031 4173b1f9
No related branches found
No related tags found
1 merge request!480Resolve L2SS-1052 "Reroute to loki"
Showing
with 137 additions and 830 deletions
......@@ -65,7 +65,7 @@ stages:
docker_store_images_master_tag:
extends: .base_docker_store_images
rules:
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) && $CI_COMMIT_TAG
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) || $CI_COMMIT_TAG
# Download all remote images and store them on our image registry if .env changes
# on a merge request
......@@ -85,7 +85,7 @@ docker_store_images_changes:
docker_build_image_all:
extends: .base_docker_images
rules:
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) && $CI_COMMIT_TAG
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) || $CI_COMMIT_TAG
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 lofar-device-base latest
......@@ -94,33 +94,34 @@ docker_build_image_all:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh grafana latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh loki latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh logstash latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh jupyter latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh jupyter-lab latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apsct-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh ccd-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apspu-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh recv-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh sdptr-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh unb2-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-antennafield latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apsct latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-ccd latest
- 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-boot 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-ccd latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-configuration 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-antennafield 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 latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-observation-control latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-psoc latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-pcon latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-psoc latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-recv latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-sdp latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-temperature-manager 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-unb2 latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-bst latest
- 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
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh archiver-timescale latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh hdbpp latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh hdbppts-cm latest
......@@ -199,11 +200,11 @@ docker_build_image_jupyter:
refs:
- merge_requests
changes:
- docker-compose/jupyter.yml
- docker-compose/jupyter/*
- docker-compose/jupyter-lab.yml
- docker-compose/jupyterlab/*
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 jupyter $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh jupyter-lab $tag
docker_build_image_apsct_sim:
extends: .base_docker_images_except
only:
......@@ -292,6 +293,17 @@ docker_build_image_device_ccd:
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-ccd $tag
docker_build_image_device_configuration:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/device-configuration.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-configuration $tag
docker_build_image_device_apspu:
extends: .base_docker_images_except
only:
......@@ -651,7 +663,7 @@ wheel_packaging:
image: ubuntu:bionic
when: manual
rules:
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) && $CI_COMMIT_TAG
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) || $CI_COMMIT_TAG
before_script:
- apt-get update
- apt-get install ansible -y
......
......@@ -17,6 +17,13 @@
}
}
},
"Configuration": {
"STAT": {
"Configuration": {
"STAT/Configuration/1": {}
}
}
},
"Observation": {
"STAT": {
"Observation": {
......
......@@ -254,32 +254,32 @@
],
"Control_to_RECV_mapping": [
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "1", "25", "1", "27", "1", "29", "0", "-1",
"0", "-1", "0", "-1", "1", "31", "1", "33", "1", "35", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "1", "25", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "1", "27", "1", "29", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "1", "31", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "1", "33", "1", "35", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1"
],
"Power_to_RECV_mapping": [
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "1", "24", "1", "26", "1", "28", "0", "-1",
"0", "-1", "0", "-1", "1", "30", "1", "32", "1", "34", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "1", "24", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "1", "26", "1", "28", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "1", "30", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "1", "32", "1", "34", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1"
],
"Antenna_to_SDP_Mapping": [
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "2", "0", "2", "1", "2", "2", "0", "-1",
"0", "-1", "0", "-1", "2", "3", "2", "4", "2", "5", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "2", "12", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "2", "13", "2", "14", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "2", "15", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "2", "16", "2", "17", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1"
],
"Antenna_Field_Reference_ETRS": [
......@@ -399,56 +399,56 @@
"Control_to_RECV_mapping": [
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "1", "3", "1", "5", "0", "-1",
"1", "7", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"1", "9", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "11",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "13", "1", "15",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "17", "0", "-1"
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"1", "1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "3",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "5",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "7", "0", "-1",
"1", "9", "0", "-1", "1", "11", "1", "13", "1", "15", "1", "17"
],
"Power_to_RECV_mapping": [
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "0", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "1", "2", "1", "4", "0", "-1",
"1", "6", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"1", "8", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "10",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "12", "1", "14",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "16", "0", "-1"
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"1", "0", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "2",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "4",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "6", "0", "-1",
"1", "8", "0", "-1", "1", "10", "1", "12", "1", "14", "1", "16"
],
"Antenna_to_SDP_Mapping": [
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "0", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "1", "0", "2", "0", "-1",
"0", "3", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "4", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "5",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "0", "1", "1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "1", "2", "0", "-1"
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1",
"0", "0", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "1",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "2",
"0", "-1", "0", "-1", "0", "-1", "0", "-1", "0", "3", "0", "-1",
"0", "4", "0", "-1", "0", "5", "0", "6", "0", "7", "0", "8"
],
"Antenna_Field_Reference_ETRS": [
"3826923.942", "460915.117", "5064643.229"
......
......@@ -14,7 +14,7 @@ Station Control software related to Tango devices.
* [User documentation (ReadTheDocs (Sphinx / ReStructuredText))](tangostationcontrol/docs/README.md)
* [Docker compose documentation](docker-compose/README.md)
* [Timescaledb](docker-compose/timescaledb/README.md)
* [Jupyter startup files](docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/README.md)
* [Jupyter startup files](docker-compose/jupyterlab/ipython-profiles/stationcontrol-jupyter/startup/README.md)
* [Tango Prometheus exporter](https://git.astron.nl/lofar2.0/ska-tango-grafana-exporter)
* [Developer Documentation](#development)
* [Deployments](deploy/README.md)
......@@ -71,7 +71,7 @@ automatically be restarted on reboot or failure. Stop them explicitly to bring
them down (`make stop <container>`).
Most notably, you will have web interfaces available at:
- http://localhost:8888 (Jupyter Notebook)
- http://localhost:8888 (Jupyter Lab)
- http://localhost:3000 (Grafana).
# Development
......@@ -106,6 +106,8 @@ Next change the version in the following places:
# Release Notes
* 0.5.0 Add `Configuration` device
* 0.4.1 Fix for missing SDP attributes for spectral inversion
* 0.4.0 Have most containers report health status and add `make await` command
* 0.3.1 Fix for applying boot device dsconfig
* 0.3.0 Initial version of deployment scripts and functionality
......
......@@ -100,7 +100,7 @@ function configure_tango_db()
function start_support_images()
{
(cd ${HOME_DIR}/docker-compose && make start jupyter)
(cd ${HOME_DIR}/docker-compose && make start jupyter-lab)
}
function start_lofar_images()
......
#
# 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: device-configuration
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: .
dockerfile: 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-configuration
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- control
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 STAT/Configuration/1
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-configuration-device 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
#
# Docker compose file that launches Jupyter Lab for interactive iTango sessions over HTTP.
#
# Connect by surfing to http://localhost:8889/
# Connect by surfing to http://localhost:8888/
# View logs through 'docker logs -f -t jupyter-lab'
#
# Defines:
......@@ -33,10 +33,10 @@ services:
environment:
- TANGO_HOST=${TANGO_HOST}
ports:
- "8889:8889"
- "8888:80"
user: ${CONTAINER_EXECUTION_UID}
working_dir: /jupyter-notebooks
entrypoint:
- /opt/lofar/tango/bin/start-ds.sh
- jupyter lab --port=8889 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password=
- jupyter lab --port=80 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password=
restart: unless-stopped
#
# Docker compose file that launches Jupyter Notebook for interactive iTango sessions over HTTP.
#
# Connect by surfing to http://localhost:8888/
# View logs through 'docker logs -f -t jupyter'
#
# Defines:
# - jupyter: Jupyter Notebook with iTango support
#
version: '2.1'
services:
jupyter:
build:
context: jupyter
args:
CONTAINER_EXECUTION_UID: ${CONTAINER_EXECUTION_UID}
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}jupyter
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"
user: ${CONTAINER_EXECUTION_UID}
working_dir: /jupyter-notebooks
entrypoint:
- /opt/lofar/tango/bin/start-ds.sh
- /usr/bin/tini -- /usr/local/bin/jupyter-notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password=
restart: unless-stopped
ARG SOURCE_IMAGE
FROM ${SOURCE_IMAGE}
# UID if the user that this container will run under. This is needed to give directories
# that are needed for temporary storage the proper owner and access rights.
ARG CONTAINER_EXECUTION_UID=1000
# Create new user with uid but only if uid not used
RUN sudo adduser --disabled-password --system --uid ${CONTAINER_EXECUTION_UID} --no-create-home --home ${HOME} user || exit 0
RUN sudo chown ${CONTAINER_EXECUTION_UID} -R ${HOME}
# Add compiler to install python packages which come with C++ code
RUN sudo apt-get update -y
RUN sudo apt-get install -y g++ gcc python3-dev
# start-ds file synchronization requirements
RUN sudo apt-get install -y rsync
# Install git to install pip requirements from git
RUN sudo apt-get install -y git
# Install dependencies of our scripts (bin/start-ds.sh)
RUN sudo apt-get install -y rsync
COPY requirements.txt ./
RUN sudo pip3 install -r requirements.txt
# Install some version of the casacore measures tables, to allow basic delay computation analysis in the notebooks
RUN sudo apt-get install -y casacore-data
# see https://github.com/jupyter/nbconvert/issues/1434
RUN sudo bash -c "echo DEFAULT_ARGS += [\\\"--no-sandbox\\\"] >> /usr/local/lib/python3.7/dist-packages/pyppeteer/launcher.py"
RUN sudo apt-get update -y
RUN sudo apt-get install -y git gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libcairo-gobject2 libxinerama1 libgtk2.0-0 libpangoft2-1.0-0 libthai0 libpixman-1-0 libxcb-render0 libharfbuzz0b libdatrie1 libgraphite2-3 libgbm1
# Allow Download as -> PDF via LaTeX
RUN sudo apt-get install -y texlive-xetex texlive-fonts-recommended texlive-latex-recommended cm-super
# Configure jupyter_bokeh
RUN sudo mkdir -p /usr/share/jupyter /usr/etc
RUN sudo chmod a+rwx /usr/share/jupyter /usr/etc
RUN sudo jupyter nbextension install --sys-prefix --symlink --py jupyter_bokeh
RUN sudo jupyter nbextension enable jupyter_bokeh --py --sys-prefix
# Install profiles for ipython & jupyter
COPY ipython-profiles /opt/ipython-profiles/
RUN sudo chown ${CONTAINER_EXECUTION_UID} -R /opt/ipython-profiles
COPY jupyter-kernels /usr/local/share/jupyter/kernels/
# Install patched jupyter executable
COPY jupyter-notebook /usr/local/bin/jupyter-notebook
# Add Tini. Tini operates as a process subreaper for jupyter. This prevents kernel crashes.
ENV TINI_VERSION v0.6.0
ENV JUPYTER_RUNTIME_DIR=/tmp
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN sudo chmod +x /usr/bin/tini
USER ${CONTAINER_EXECUTION_UID}
# pyppeteer-install installs in the homedir, so run it as the user that will execute the notebook
RUN pyppeteer-install
from tango import *
# Create shortcuts for our devices
apsct = DeviceProxy("STAT/APSCT/1")
ccd = DeviceProxy("STAT/CCD/1")
apspu = DeviceProxy("STAT/APSPU/1")
recv = DeviceProxy("STAT/RECV/1")
sdp = DeviceProxy("STAT/SDP/1")
bst = DeviceProxy("STAT/BST/1")
sst = DeviceProxy("STAT/SST/1")
xst = DeviceProxy("STAT/XST/1")
unb2 = DeviceProxy("STAT/UNB2/1")
boot = DeviceProxy("STAT/Boot/1")
tilebeam = DeviceProxy("STAT/TileBeam/1")
pcon = DeviceProxy("STAT/PCON/1")
psoc = DeviceProxy("STAT/PSOC/1")
beamlet = DeviceProxy("STAT/Beamlet/1")
digitalbeam = DeviceProxy("STAT/DigitalBeam/1")
antennafield = DeviceProxy("STAT/AntennaField/1")
docker = DeviceProxy("STAT/Docker/1")
temperaturemanager = DeviceProxy("STAT/TemperatureManager/1")
# Put them in a list in case one wants to iterate
devices = [apsct, ccd, apspu, recv, sdp, bst, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, antennafield, temperaturemanager, docker, pcon, psoc]
import tangostationcontrol
This is the IPython startup directory
.py and .ipy files in this directory will be run *prior* to any code or files specified
via the exec_lines or exec_files configurables whenever you load this profile.
Files will be run in lexicographical order, so you can control the execution order of files
with a prefix, e.g.::
00-first.py
50-middle.py
99-last.ipy
{
"argv": [
"python",
"-m",
"ipykernel",
"-f",
"{connection_file}",
"--profile-dir",
"/opt/ipython-profiles/stationcontrol-jupyter/"
],
"language": "python",
"display_name": "StationControl"
}
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# An adjustment of the `jupyter-notebook' executable patched to:
# - log to the ELK stack
#
# We go straight for the notebook executable here, as the "jupyter" command
# execvp's into the requested notebook subcommand, erasing all configuration
# we set here.
import re
import sys
from notebook.notebookapp import main
from logstash_async.handler import AsynchronousLogstashHandler, LogstashFormatter
import logging
if __name__ == '__main__':
# log to the tcp_input of logstash in our ELK stack
handler = AsynchronousLogstashHandler("elk", 5959, database_path='/tmp/pending_log_messages.db')
# add to logger of Jupyter traitlets Application. As that logger is configured not to propagate
# messages upward, we need to configure it directly.
logger = logging.getLogger("NotebookApp")
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
ipython >=7.27.0,!=7.28.0 # BSD
jupyter
ipykernel
jupyter_bokeh
matplotlib
jupyterplot
nbconvert
notebook-as-pdf
python-logstash-async
PyMySQL[rsa]
psycopg2-binary >= 2.9.2 #LGPL
sqlalchemy
pyvisa
pyvisa-py
opcua
numpy
scipy
pabeam@git+https://git.astron.nl/mevius/grate # Apache2
lofar-station-client@git+https://git.astron.nl/lofar2.0/lofar-station-client # Apache2
......@@ -17,6 +17,7 @@ digitalbeam = DeviceProxy("STAT/DigitalBeam/1")
antennafield = DeviceProxy("STAT/AntennaField/1")
docker = DeviceProxy("STAT/Docker/1")
temperaturemanager = DeviceProxy("STAT/TemperatureManager/1")
configuration = DeviceProxy("STAT/Configuration/1")
# Put them in a list in case one wants to iterate
devices = [apsct, ccd, apspu, recv, sdp, bst, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, antennafield, temperaturemanager, docker, pcon, psoc]
devices = [apsct, ccd, apspu, recv, sdp, bst, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, antennafield, temperaturemanager, docker, pcon, psoc, configuration]
......@@ -17,6 +17,8 @@
},
"stat/ccd/1": {
},
"stat/configuration/1": {
},
"stat/apspu/1": {
},
"stat/beamlet/1": {
......
......@@ -76,7 +76,9 @@ 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-ccd device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-pcon device-antennafield device-temperature-manager device-observation device-observation-control)
# Devices list is used to explitly word split when supplied to commands, must
# disable shellcheck SC2086 for each case.
DEVICES=(device-boot device-apsct device-ccd device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-pcon device-antennafield device-temperature-manager device-observation device-observation-control device-configuration)
SIMULATORS=(sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim ccd-sim)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment