Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Charts/odin-xspress/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
15 changes: 15 additions & 0 deletions Charts/odin-xspress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v2
name: odin-xspress
description: IOC and Odin deployment for Xspress

type: application
version: 0.1.0
home: https://github.com/diamondlightsource/odin-helm-charts

dependencies:
- name: ioc-instance
version: 5.0.0
repository: "oci://ghcr.io/epics-containers/charts"
import-values:
- child: ioc-instance
parent: ioc-instance
295 changes: 295 additions & 0 deletions Charts/odin-xspress/deployment/fp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
[
{
"fr_setup": {
"fr_ready_cnxn": "tcp://127.0.0.1:10001",
"fr_release_cnxn": "tcp://127.0.0.1:10002"
},
"meta_endpoint": "tcp://*:10008"
},
{
"plugin": {
"load": {
"index": "xspress",
"name": "XspressProcessPlugin",
"library": "/odin/lib/libXspressProcessPlugin.so"
}
}
},
{
"plugin": {
"load": {
"index": "xspresslist",
"name": "XspressListModeProcessPlugin",
"library": "/odin/lib/libXspressListModeProcessPlugin.so"
}
}
},
{
"plugin": {
"load": {
"index": "view",
"name": "LiveViewPlugin",
"library": "/odin/lib/libLiveViewPlugin.so"
}
}
},
{
"plugin": {
"load": {
"index": "blosc",
"name": "BloscPlugin",
"library": "/odin/lib/libBloscPlugin.so"
}
}
},
{
"plugin": {
"load": {
"index": "hdf",
"name": "FileWriterPlugin",
"library": "/odin/lib/libHdf5Plugin.so"
}
}
},
{
"plugin": {
"connect": {
"index": "xspress",
"connection": "frame_receiver"
}
}
},
{
"plugin": {
"connect": {
"index": "view",
"connection": "xspress"
}
}
},
{
"plugin": {
"connect": {
"index": "blosc",
"connection": "xspress"
}
}
},
{
"plugin": {
"connect": {
"index": "hdf",
"connection": "blosc"
}
}
},
{
"xspress": {
"live_view": "view"
}
},
{
"view": {
"live_view_socket_addr": "tcp://0.0.0.0:15500",
"dataset_name": "live",
"frame_frequency": 0,
"per_second": 20
}
},
{{- $alpha := "ABCDEFGHIJKLMNOPQRSTUVWXYZ" }}
{{- $twoLetters := gt (int $.Values.odinDataCount) 26 }}
{{- $prefix := ternary (index $alpha (int (div .idx 26)) | printf "%c") "" $twoLetters }}
{{- $suffix := index $alpha (int (mod .idx 26)) | printf "%c" }}
{{- $postfix := printf "_%s%s" $prefix $suffix }}
{
"hdf": {
"process": {
"number": 1,
"rank": 0
},
"file": {
"postfix": "{{ $postfix }}"
}
}
},
{
"hdf": {
"file": {
"first_number": 1
}
}
},
{{- $channelsPerFile := int (div (int $.Values.numChannels) (int $.Values.odinDataCount)) }}
{{- $startChannel := int (mul .idx $channelsPerFile) }}
{{- range $i := until $channelsPerFile }}
{{- $channelIdx := add $startChannel $i }}
{
"hdf": {
"dataset": {
"mca_{{ $channelIdx }}": {
"datatype": "uint32",
"dims": [
1,
4096
],
"chunks": [
1,
1,
4096
],
"compression": "blosc"
}
}
}
},
{{- end }}
{
"store": {
"index": "mca",
"value": [
{
"plugin": {
"disconnect": "all"
}
},
{
"plugin": {
"disconnect": {
"index": "xspresslist",
"connection": "frame_receiver"
}
}
},
{
"plugin": {
"connect": {
"index": "xspress",
"connection": "frame_receiver"
}
}
},
{
"plugin": {
"connect": {
"index": "view",
"connection": "xspress"
}
}
},
{
"plugin": {
"connect": {
"index": "blosc",
"connection": "xspress"
}
}
},
{
"plugin": {
"connect": {
"index": "hdf",
"connection": "blosc"
}
}
},
{{- range $i := until $channelsPerFile }}
{{- $channelIdx := add $startChannel $i }}
{
"hdf": {
"dataset": {
"mca_{{ $channelIdx }}": {
"datatype": "uint32",
"chunks": [
256,
1,
4096
],
"dims": [
1,
4096
],
"compression": "blosc",
"indexes": true
}
}
}
},
{{- end }}
{
"hdf": {
"delete_datasets": true
}
}
]
}
},
{
"store": {
"index": "list",
"value": [
{
"plugin": {
"disconnect": "all"
}
},
{
"plugin": {
"disconnect": {
"index": "xspress",
"connection": "frame_receiver"
}
}
},
{
"plugin": {
"connect": {
"index": "xspresslist",
"connection": "frame_receiver"
}
}
},
{
"plugin": {
"connect": {
"index": "hdf",
"connection": "xspresslist"
}
}
},
{
"xspresslist": {
"channels": [
{{- $channelsPerFileList := int (add1 $channelsPerFile) }}
{{- $startChannelList := int (mul .idx $channelsPerFileList) }}
{{- range $i := until $channelsPerFileList }}
{{- $channelIdx := add $startChannelList $i }}
{{ $channelIdx }}{{ if lt (add1 $i) $channelsPerFileList }},{{ end }}
{{- end }}
],
"frame_size": 4194304
}
},
{
"hdf": {
"dataset": {
{{- range $i := until $channelsPerFileList }}
{{- $channelIdx := add $startChannelList $i }}
"raw_{{ $channelIdx }}": {
"datatype": "uint64",
"chunks": [
524288
]
}{{ if lt (add1 $i) $channelsPerFileList }},{{ end }}
{{- end }}
}
}
},
{
"hdf": {
"delete_datasets": true
}
}
]
}
}
]
12 changes: 12 additions & 0 deletions Charts/odin-xspress/deployment/fp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"

export HDF5_PLUGIN_PATH=/odin/h5plugin

sleep 5

/odin/bin/frameProcessor \
--ctrl=tcp://0.0.0.0:10004 \
--config=$SCRIPT_DIR/fp{{ .idx | add1 }}.json \
--log-config $SCRIPT_DIR/log4cxx.xml
17 changes: 17 additions & 0 deletions Charts/odin-xspress/deployment/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"decoder_type": "Xspress",
"decoder_path": "/odin/lib",
"rx_type": "zmq",
"rx_address": "{{ .Values.detectorName }}-xspress-control",
"rx_ports": "1515{{ .idx }},",
"shared_buffer_name": "odin_buf_{{ .idx }}",
"max_buffer_mem": {{ .Values.sharedMemorySize | int64 }},
"frame_ready_endpoint": "tcp://127.0.0.1:10001",
"frame_release_endpoint": "tcp://127.0.0.1:10002",
"decoder_config": {
"enable_packet_logging": false,
"frame_timeout_ms": 1000
}
}
]
11 changes: 11 additions & 0 deletions Charts/odin-xspress/deployment/fr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"

sleep 5

/odin/bin/frameReceiver \
--io-threads 1 \
--ctrl=tcp://0.0.0.0:10000 \
--config=$SCRIPT_DIR/fr{{ .idx | add1 }}.json \
--log-config $SCRIPT_DIR/log4cxx.xml
Loading
Loading