-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from epics-containers/simplify
Simplify
- Loading branch information
Showing
17 changed files
with
113 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# A launcher for the phoebus to view the generated OPIs | ||
|
||
thisdir=$(realpath $(dirname $0)) | ||
workspace=$(realpath ${thisdir}/..) | ||
|
||
# update settings.ini with CA and PVA ports | ||
cat ${workspace}/opi/settings.ini | | ||
sed -r \ | ||
-e "s|5064|${EPICS_CA_SERVER_PORT:-5064}|" \ | ||
-e "s|5075|${EPICS_PVA_SERVER_PORT:-5075}|" \ | ||
-e "s|5065|${EPICS_CA_REPEATER_PORT:-5065}|" > /tmp/settings.ini | ||
|
||
settings=" | ||
-resource ${workspace}/opi/auto-generated/index.bob | ||
-settings /tmp/settings.ini | ||
" | ||
|
||
if which phoebus.sh &>/dev/null ; then | ||
echo "Using phoebus.sh from PATH" | ||
set -x | ||
phoebus.sh ${settings} "${@}" | ||
|
||
elif module load phoebus 2>/dev/null; then | ||
echo "Using phoebus module" | ||
set -x | ||
phoebus.sh ${settings} "${@}" | ||
|
||
else | ||
echo "No local phoebus install found, using a container" | ||
|
||
# prefer podman but use docker if USE_DOCKER is set | ||
if podman version &> /dev/null && [[ -z $USE_DOCKER ]] | ||
then docker=podman; UIDGID=0:0 | ||
else docker=docker; UIDGID=$(id -u):$(id -g) | ||
fi | ||
echo "Using $docker as container runtime" | ||
|
||
# ensure local container users can access X11 server | ||
xhost +SI:localuser:$(id -un) | ||
|
||
# settings for container launch | ||
x11="-e DISPLAY --net host" | ||
args="--rm -it --security-opt=label=none --user ${UIDGID}" | ||
mounts="-v=/tmp:/tmp -v=${workspace}:/workspace -v=${workspace}/..:/workspaces" | ||
image="ghcr.io/epics-containers/ec-phoebus:latest" | ||
|
||
settings=" | ||
-resource /workspace/opi/auto-generated/index.bob | ||
-settings /tmp/settings.ini | ||
" | ||
|
||
set -x | ||
$docker run ${mounts} ${args} ${x11} ${image} ${settings} "${@}" | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# NOTE: port numbers are defaults only | ||
# this script to be processed with sed to replace port numbers | ||
# see phoebus-launch.sh | ||
|
||
# point at local host for channel access | ||
org.phoebus.pv.ca/addr_list=127.0.0.1 | ||
org.phoebus.pv.ca/server_port=5064 | ||
org.phoebus.pv.ca/repeater_port=5065 | ||
org.phoebus.pv.ca/name_servers=127.0.0.1:5064 | ||
# point at local host for pvAccess name server | ||
org.phoebus.pv.pva/epics_pva_name_servers=127.0.0.1:5075 | ||
org.phoebus.pv.pva/server_port=5075 |
Oops, something went wrong.