Skip to content

Commit

Permalink
Make scratch area of startup script configurable for blueapi container (
Browse files Browse the repository at this point in the history
#327)

Currently, we have a linkam plan in i22-bluesky that makes an .xml file,
and then sets a PV value to retrieveing this xml.

Currently the blueapi container on p38 is failing to make this .xml file
because, although the correct location from Diamond workstations is
mounted into it, it's mounted in a different containerPath. This is a
problem, because it adds extra complexity to the bit of code in
i22-bluesky which needs to 1. create the xml file and 2. set the IOC to
look at it. The complexity being, that we now need to keep track of two
filepaths (one inside the container, one out).

Seeing as though we are currently reliant on the filesystem, it is not
much of a crime to demand that for now, the container scratch area is
configurable.
  • Loading branch information
rosesyrett authored Oct 31, 2023
1 parent e3c4a78 commit 4ead63b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .devcontainer/container-startup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash

SCRATCH_AREA="/blueapi-plugins/scratch"
if [[ -z "${SCRATCH_AREA}" ]]; then
SCRATCH_AREA="/blueapi-plugins/scratch"
fi

mkdir -p ${SCRATCH_AREA}

Expand Down
3 changes: 3 additions & 0 deletions helm/blueapi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ spec:
- "/config/secret.yaml"
{{- end }}
- "serve"
env:
- name: SCRATCH_AREA
value: {{ .Values.scratch.containerPath }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit 4ead63b

Please sign in to comment.