feat: configure epics env in deployments
This commit is contained in:
@@ -44,3 +44,23 @@ init_service_env() {
|
||||
# Host running shellbox, i.e. the host the ioc itself runs on
|
||||
IOC_HOST=sls-vserv-bd-01${AGEBD_ENV_SUFFIX_LOWER}
|
||||
}
|
||||
|
||||
# Sets up EPICS_CA_ADDR_LIST so caget/caput/etc. can actually reach IOCs from
|
||||
# this non-interactive shell (the gitea runner, like a systemd --user unit,
|
||||
# doesn't inherit an interactive login shell's environment).
|
||||
#
|
||||
# cas_12_epics.sh can only fall back to the CA gateway when its broadcast-address
|
||||
# auto-detection fails (e.g. non-accelerator-network hosts) if PSI_GFA_FACILITY is
|
||||
# set, so we need to set that explicitly.
|
||||
#
|
||||
# Usage: setup_epics_env <dev|prod>
|
||||
setup_epics_env() {
|
||||
local ENV=$1
|
||||
|
||||
export PSI_GFA_FACILITY=SLS
|
||||
. /etc/profile.d/cas_12_epics.sh
|
||||
|
||||
if [ "${ENV}" = "dev" ]; then
|
||||
export EPICS_CA_ADDR_LIST="$EPICS_CA_ADDR_LIST 129.129.146.255"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
source "$(dirname "$0")/common.sh"
|
||||
init_service_env "${1:-}" "${2:-}"
|
||||
setup_epics_env "${AGEBD_ENV}"
|
||||
DO_RESTART_SERVICE=$3
|
||||
|
||||
NOW=$(date +%Y-%m-%dT%H:%M:%S%Z)
|
||||
|
||||
Reference in New Issue
Block a user