Skip to content

Commit

Permalink
Merge pull request #2 from epics-containers/dev
Browse files Browse the repository at this point in the history
Switch to generating helm charts from yaml
  • Loading branch information
gilesknap authored Jun 13, 2022
2 parents 2de0d13 + 9775b2f commit ee3c81c
Show file tree
Hide file tree
Showing 45 changed files with 5,106 additions and 150,682 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/bl_buiild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,23 @@ jobs:

- name: push each ioc helm chart
run: |
pip install ibek >=0.9.1
# tar up any config folders that require it
./tar_config_src.sh
# helm tags must be SemVar. Use 0.0.0-b0 for testing the latest non-tagged build
# helm tags must be SemVar. Use 0.0.1-b0 for testing the latest non-tagged build
if [ "${GITHUB_REF_TYPE}" == "tag" ] ; then
TAG=${GITHUB_REF_NAME}
else
TAG="0.0.0-b0"
TAG="0.0.1-b0"
fi
# make helm charts from ibek entity yaml files
for ioc in $(ls *.yaml) ; do
ibek build-helm "${ioc}"
done
# All IOCS that have changes since last pushed to the helm registry
# will have version ${TAG} pushed
for ioc_root in $(ls -d iocs/*/) ; do
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
**/charts
**/*.bob
edm/bobs
iocs/bl45p-mo-ioc-01/
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cSpell.words": [
"ACCL",
"autohome",
"deviocstats",
"DHLM",
"DLLM",
"FEEDRATE",
"HOMEVISSTR",
"NAXES",
"PARENTPORT",
"VELO",
"VMAX"
]
}
4 changes: 2 additions & 2 deletions bl45p-chart/Chart.yaml → beamline-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: bl45p-chart
name: beamline-chart
description: |
main motion IOC for the bl45p test beamline
IOC for the bl45p test beamline
type: application

Expand Down
File renamed without changes.
5 changes: 0 additions & 5 deletions bl45p-ea-ioc-01.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions bl45p-ea-ioc-02.yaml

This file was deleted.

241 changes: 241 additions & 0 deletions bl45p-mo-ioc-01.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# yaml-language-server: $schema=file://ibek/pmac.ibek.entities.schema.json
ioc_name: bl45p-mo-ioc-01
description: motion IOC for the test beamline p45 in G13
generic_ioc_image: ghcr.io/epics-containers/ioc-pmac:1.1.2.run

# TODO need to make use of lists / strings consistent
# ANSWERS - script \n separated string, include,define are lists
# currently include_args is a list, define_args is a string, script is a list
# script should be a string, not sure about include_args but it could be a , and CR
# separate string?

# TODO would be good to have 'databases: include_all' for auto-substitution modules.
# ANSWERS - use wildcards in include args

entities:
- type: epics.EPICS_CA_MAX_ARRAY_BYTES
max_bytes: 6000000

- type: pmac.PmacAsynIPPort
name: BRICK1port
IP: 172.23.59.21

- type: deviocstats.iocAdminSoft
IOC: BL45P-MO-IOC-01

- type: pmac.Geobrick
name: BRICK1
# NOTE: validation cannot check the object type (NEVER FIX)
PORT: BRICK1port
P: BL45P-MO-STEP-01
# NOTE: There is no honouring defaults in Database files
# in fact we repeat the defaults in the definitions YAML
# ANSWER OK!
numAxes: 8
idlePoll: 100
movingPoll: 500

- type: pmac.DlsPmacAsynMotor
name: STAGE1.THETA_TOP
Controller: BRICK1
axis: 2
P: BL45P-MO-STAGE-01
M: :THETA:TOP
ACCL: 0.1
MRES: 0.087890625
VELO: 90
# NOTE: VMAX is a string because we usually use $(VELO)
# ? Would a Union be better - what about other number args
VMAX: "1080"
HOMEVISSTR: Absolute Encoder
EGU: deg

- type: pmac.DlsPmacAsynMotor
name: STAGE1.THETA_BOT
Controller: BRICK1
ACCL: 0.1
axis: 3
P: BL45P-MO-STAGE-01
M: :THETA:BOT
DESC: Theta bottom
EGU: deg
HOMEVISSTR: Absolute Encoder
MRES: 0.087890625
PREC: 3
VELO: 90
VMAX: "1080"

- type: pmac.DlsPmacAsynMotor
name: CHOP1.HOR
Controller: BRICK1
axis: 4
P: BL45P-MO-CHOP-01
M: :ENDAT
DESC: Hor EnDat chopper
EGU: deg
HOMEVIS: 0
HOMEVISSTR: Absolute Encoder
MRES: 0.000043
PREC: 5
VELO: 43

- type: pmac.DlsPmacAsynMotor
name: CHOP1.VER
Controller: BRICK1
ACCL: 0.01
axis: 5
P: BL45P-MO-CHOP-01
M: :BISS
DESC: Ver Biss chopper
EGU: deg
HOMEVIS: 0
HOMEVISSTR: Absolute Encoder
MRES: 0.000687
PREC: 5
VELO: 720

- type: pmac.DlsPmacAsynMotor
name: STAGE1.X
Controller: BRICK1
axis: 6
P: BL45P-MO-STAGE-01
M: :X
DESC: Sample X
DHLM: 19
DLLM: 0.0
EGU: mm
MRES: 0.0001
PREC: 3
VELO: 5

- type: pmac.DlsPmacAsynMotor
name: STAGE1.Y_TOP
Controller: BRICK1
axis: 7
P: BL45P-MO-STAGE-01
M: :Y:TOP
DESC: Sample Y top
DHLM: 4
DLLM: -1
EGU: mm
MRES: 0.0005
PREC: 3
VELO: 5

- type: pmac.DlsPmacAsynMotor
name: STAGE1.Y_BOT
Controller: BRICK1
P: BL45P-MO-STAGE-01
M: :Y:BOT
axis: 8
DESC: Sample Y bottom
DHLM: 4
DLLM: -1
EGU: mm
MRES: 0.0005
PREC: 3
VELO: 5

- type: pmac.CS
name: BRICK1.CS1
CS: 1
Controller: BRICK1

# NOTE: objects must be defined before references to them.
# Vscode schema checks do NOT pick this up and the apischema error is v bad.
- type: pmac.CS
name: BRICK1.CS2
CS: 2
Controller: BRICK1

- type: pmac.CS
name: BRICK1.CS3
CS: 3
Controller: BRICK1

- type: pmac.DlsCsPmacAsynMotor
name: STAGE1.CS.THETA
CsController: BRICK1.CS2
axis: 7
P: BL45P-MO-STAGE-01
M: :THETA:POS
ACCL: 0.1
MRES: 0.0001
VELO: 30
DESC: Theta position
DHLM: 10000
DLLM: -10000
EGU: deg
PREC: 3
TWV: 5

- type: pmac.DlsCsPmacAsynMotor
name: STAGE1.CS.THETA_SKEW
CsController: BRICK1.CS2
axis: 8
P: BL45P-MO-STAGE-01
M: :THETA:SKEW
ACCL: 0.1
DESC: Theta skew
DHLM: 360
DLLM: -360
EGU: deg
MRES: 0.0001
PREC: 3
TWV: 5
VELO: 10

- type: pmac.DlsCsPmacAsynMotor
name: STAGE1.CS.Y
CsController: BRICK1.CS3
axis: 7
P: BL45P-MO-STAGE-01
M: :CS:Y
DESC: CS Y
DHLM: 4
DLLM: -1
EGU: mm
MRES: 0.0001
PREC: 3
TWV: 0.5
VELO: 5

- type: pmac.DlsCsPmacAsynMotor
name: STAGE1.CS.Y_STRETCH
CsController: BRICK1.CS3
axis: 8
P: BL45P-MO-STAGE-01
M: :CS:Y:STRETCH
DESC: CS Y stretch
DHLM: 2
DLLM: -2
EGU: mm
MRES: 0.0001
PREC: 3
TWV: 0.5
VELO: 5

- type: pmac.pmacDisableLimitsCheck
Controller: BRICK1
Axis: 2

- type: pmac.pmacDisableLimitsCheck
Controller: BRICK1
Axis: 3

- type: pmac.pmacDisableLimitsCheck
Controller: BRICK1
Axis: 4

- type: pmac.pmacDisableLimitsCheck
Controller: BRICK1
Axis: 5

- type: pmac.autohome
Controller: BRICK1
P: BL45P-MO-STAGE-01
PLC: 10
GRP2: Theta
GRP3: X
GRP4: Y top
GRP5: Y bottom
20 changes: 10 additions & 10 deletions edm/bl45p-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ thisdir=$(realpath $(dirname ${BASH_SOURCE[0]}))

# if there is a no cagateway running on p45-ws001 at 172.23.59.64
# use addresses for all nodes in the p45 beamline instead
export EPICS_CA_ADDR_LIST=${EPICS_CA_ADDR_LIST:-"172.23.59.101 172.23.59.1"}
export EPICS_CA_ADDR_LIST="172.23.59.101 172.23.59.1 172.23.245.116"

# if there is a local install of edm run it (deprecated for RHEL8 !!)
#
# if [ ! -z $(which edm 2> /dev/null) ]
# then
# export EDMDATAFILES=$(echo $EDMDATAFILES | sed s+/screens+${thisdir}+g)
# echo launching native edm with paths: $EDMDATAFILES
# edm -noedit -x ${start}
# exit 0
# fi
# if there is a local install of edm (that does not throw an error!)
# TODO fix this to detect RHEL 8 and not use edm
if [ edm -h 2> /dev/null ]
then
export EDMDATAFILES=$(echo $EDMDATAFILES | sed s+/screens+${thisdir}+g)
echo launching native edm with paths: $EDMDATAFILES
edm -noedit -x ${start}
exit 0
fi

if [ -z $(which podman 2> /dev/null) ]
then
Expand Down
12 changes: 6 additions & 6 deletions edm/bl45p-mo-ioc-01/BL45P-MO-IOC-01Top.edl
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ bgColor index 3
botShadowColor index 11
buttonLabel ""
displayFileName {
0 "SAMP01.edl"
0 "STAGE1.edl"
}
fgColor index 43
font "arial-bold-r-14.0"
Expand All @@ -349,7 +349,7 @@ fgColor index 43
font "arial-bold-r-14.0"
fontAlign "center"
value {
"SAMP01"
"STAGE1"
}
visInvert
visMax "2"
Expand All @@ -374,7 +374,7 @@ fgColor index 43
font "arial-bold-r-14.0"
fontAlign "center"
value {
"SAMP01"
"STAGE1"
}
visMax "2"
visMin "1"
Expand Down Expand Up @@ -414,7 +414,7 @@ bgColor index 3
botShadowColor index 11
buttonLabel ""
displayFileName {
0 "CHOP01.edl"
0 "CHOP1.edl"
}
fgColor index 43
font "arial-bold-r-14.0"
Expand All @@ -440,7 +440,7 @@ fgColor index 43
font "arial-bold-r-14.0"
fontAlign "center"
value {
"CHOP01"
"CHOP1"
}
visInvert
visMax "2"
Expand All @@ -465,7 +465,7 @@ fgColor index 43
font "arial-bold-r-14.0"
fontAlign "center"
value {
"CHOP01"
"CHOP1"
}
visMax "2"
visMin "1"
Expand Down
Loading

0 comments on commit ee3c81c

Please sign in to comment.