Skip to content
Snippets Groups Projects
Commit 30cae5fa authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'master' into L2SS-287-python-packaging

parents a8db638d 7bd3b86f
No related branches found
No related tags found
1 merge request!146L2SS-287: implement python packaging
...@@ -13,7 +13,8 @@ ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES ...@@ -13,7 +13,8 @@ ATTACH_COMPOSE_FILE_ARGS := $(foreach yml,$(filter-out tango.yml,$(COMPOSE_FILES
# But we allow to overwrite it. # But we allow to overwrite it.
NETWORK_MODE ?= tangonet 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)) ifneq (,$(wildcard /run/WSL))
# Microsoft Windows Subsystem for Linux # Microsoft Windows Subsystem for Linux
HOSTNAME ?= host.docker.internal HOSTNAME ?= host.docker.internal
...@@ -21,6 +22,10 @@ else ...@@ -21,6 +22,10 @@ else
HOSTNAME ?= $(shell hostname -f) HOSTNAME ?= $(shell hostname -f)
endif 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"... # If the first make argument is "start" or "stop"...
ifeq (start,$(firstword $(MAKECMDGOALS))) ifeq (start,$(firstword $(MAKECMDGOALS)))
SERVICE_TARGET = true SERVICE_TARGET = true
...@@ -113,6 +118,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \ ...@@ -113,6 +118,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \
TANGO_HOST=$(TANGO_HOST) \ TANGO_HOST=$(TANGO_HOST) \
MYSQL_HOST=$(MYSQL_HOST) \ MYSQL_HOST=$(MYSQL_HOST) \
HOSTNAME=$(HOSTNAME) \ HOSTNAME=$(HOSTNAME) \
LOG_HOSTNAME=$(LOG_HOSTNAME) \
NETWORK_MODE=$(NETWORK_MODE) \ NETWORK_MODE=$(NETWORK_MODE) \
XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) \ XAUTHORITY_MOUNT=$(XAUTHORITY_MOUNT) \
CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \ CONTAINER_NAME_PREFIX=$(CONTAINER_NAME_PREFIX) \
...@@ -130,7 +136,7 @@ pull: ## pull the images from the Docker hub ...@@ -130,7 +136,7 @@ pull: ## pull the images from the Docker hub
build: ## rebuild images build: ## rebuild images
# docker-compose does not support build dependencies, so manage those here # 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 -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 build-nocache: ## rebuild images from scratch
# docker-compose does not support build dependencies, so manage those here # docker-compose does not support build dependencies, so manage those here
......
...@@ -20,7 +20,7 @@ services: ...@@ -20,7 +20,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -45,7 +45,7 @@ services: ...@@ -45,7 +45,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -70,7 +70,7 @@ services: ...@@ -70,7 +70,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
...@@ -94,7 +94,7 @@ services: ...@@ -94,7 +94,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
......
...@@ -26,7 +26,7 @@ services: ...@@ -26,7 +26,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -19,7 +19,7 @@ services: ...@@ -19,7 +19,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -36,7 +36,7 @@ services: ...@@ -36,7 +36,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -31,7 +31,7 @@ services: ...@@ -31,7 +31,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -64,7 +64,7 @@ services: ...@@ -64,7 +64,7 @@ services:
logging: logging:
driver: syslog driver: syslog
options: options:
syslog-address: udp://${HOSTNAME}:1514 syslog-address: udp://${LOG_HOSTNAME}:1514
syslog-format: rfc3164 syslog-format: rfc3164
tag: "{{.Name}}" tag: "{{.Name}}"
restart: unless-stopped restart: unless-stopped
...@@ -9,8 +9,12 @@ if [ -z "$LOFAR20_DIR" ]; then ...@@ -9,8 +9,12 @@ if [ -z "$LOFAR20_DIR" ]; then
LOFAR20_DIR=$(readlink -f "${LOFAR20_DIR_RELATIVE}") LOFAR20_DIR=$(readlink -f "${LOFAR20_DIR_RELATIVE}")
fi fi
# Start and stop sequence
cd "$LOFAR20_DIR/docker-compose" || exit 1 cd "$LOFAR20_DIR/docker-compose" || exit 1
# Make sure builds are recent, and use our building parameters.
make build
# Start and stop sequence
make stop device-sdp device-recv device-sst device-unb2 device-xst sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim make stop device-sdp device-recv device-sst device-unb2 device-xst sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
make start databaseds dsconfig elk make start databaseds dsconfig elk
......
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