Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blueapi nexus rabbitmq #11

Merged
merged 2 commits into from
Nov 12, 2024
Merged
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
16 changes: 16 additions & 0 deletions services/daq-blueapi/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: daq-blueapi
description: blueapi

version: 0.6.0

# When we deploy with the edge-containers-cli we override this on the command line.
# Direct deployment with Helm will use the default beta value.
appVersion: 0.0.1b1

type: application

dependencies:
- name: blueapi
version: "0.6.0"
repository: "oci://ghcr.io/diamondlightsource/charts"
14 changes: 14 additions & 0 deletions services/daq-blueapi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
daq-blueapi Helm Chart
=====================

Installs a blueapi instance.

Deploy this chart to the cluster by setting up your cluster namespace connection
using environment.sh and then executing the following commands:

```bash
# lists the latest versions of all services
ec list
# deploy daq-blueapi with specified version
ec deploy daq-blueapi VERSION
```
59 changes: 59 additions & 0 deletions services/daq-blueapi/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
blueapi:
hostNetwork: false
resources:
limits:
cpu: 1000m
memory: 500Mi
requests:
cpu: 500m
memory: 100Mi
nodeSelector:
kubernetes.io/hostname: bl47p-ea-serv-01.diamond.ac.uk
tolerations:
- key: nodetype
operator: Equal
value: training-rig
effect: NoSchedule
- key: beamline
operator: Equal
value: bl47p
effect: NoSchedule
ingress:
create: true
host: p47-blueapi.diamond.ac.uk
extraEnvVars:
- name: BEAMLINE
value: p47

- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: rabbitmq-password
key: rabbitmq-password
worker:
env:
sources:
- kind: dodal
module: dodal.beamlines.training_rig
# TODO: Make training rig plans repository
- kind: planFunctions
module: blueapi.startup
events:
broadcast_status_events: False
stomp:
auth:
username: p47
password: ${RABBITMQ_PASSWORD}
host: daq-rabbitmq
scratch:
root: /exports/mybeamline/p47/scratch/blueapi

initContainer:
scratch:
root: /exports/mybeamline/p47/scratch/blueapi
repositories:
- name: dodal
remote_url: https://github.com/DiamondLightSource/dodal.git
- name: blueapi
remote_url: https://github.com/DiamondLightSource/blueapi.git
scratchHostPath: /exports/mybeamline/p47/scratch/blueapi
16 changes: 16 additions & 0 deletions services/daq-nexus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: daq-nexus
description: nexus

version: 3.5.0

# When we deploy with the edge-containers-cli we override this on the command line.
# Direct deployment with Helm will use the default beta value.
appVersion: 0.0.1b1

type: application

dependencies:
- name: nexus-file-converter
version: "3.5.0"
repository: "https://sonatypenexus.diamond.ac.uk/repository/daq-helm/"
57 changes: 57 additions & 0 deletions services/daq-nexus/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
nexus-file-converter:
beamline: p47
template:
entry/:
NX_class@: NXentry
instrument/:
NX_class@: NXinstrument
name: p47

volumes:
- name: nexus-template
configMap:
name: nexus-template
items:
- key: template.yaml
path: template.yaml
- name: nexus-data
hostPath:
path: /exports/mybeamline/p47/data/
type: DirectoryOrCreate

volumeMounts:
- name: nexus-data
mountPath: /exports/mybeamline/p47/data/
mountPropagation: HostToContainer
- name: nexus-template
mountPath: /templates

application:
server:
port: 8084
spring:
profiles:
active: rabbitmq
rabbitmq:
host: daq-rabbitmq
username: p47
files:
output:
directory:
staticDirectory: /exports/mybeamline/p47/data/2024/cm11111-1
nameTemplate: <DATA_SESSION>
devices:
types:
det: NX_DETECTOR
sample_stage: NX_COLLECTION
sample_stage.x: NX_POSITIONER
sample_stage.theta: NX_POSITIONER
containerEnvVars:
- name: SPRING_RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: rabbitmq-password
key: rabbitmq-password
securityContext:
runAsUser: 37500 # p47-detector
runAsGroup: 37500
16 changes: 16 additions & 0 deletions services/daq-rabbitmq/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: daq-rabbitmq
description: RabbitMQ instance for DAQ services

version: 11.16.2

# When we deploy with the edge-containers-cli we override this on the command line.
# Direct deployment with Helm will use the default beta value.
appVersion: 0.0.1b1

type: application

dependencies:
- name: rabbitmq
version: 11.16.2
repository: oci://registry-1.docker.io/bitnamicharts
14 changes: 14 additions & 0 deletions services/daq-rabbitmq/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
daq-rabbitmq Helm Chart
=====================

Installs a RabbitMQ instance for use a message bus.

Deploy this chart to the cluster by setting up your cluster namespace connection
using environment.sh and then executing the following commands:

```bash
# lists the latest versions of all services
ec list
# deploy daq-rabbitmq with specified version
ec deploy daq-rabbitmq VERSION
```
16 changes: 16 additions & 0 deletions services/daq-rabbitmq/templates/rabbitmq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: rabbitmq-password
namespace: p47-beamline
spec:
encryptedData:
rabbitmq-password: AgBuFYh/3RtlhL9Q+LGx5US4jAugqU92ucm8ZE3V1Tw9NvRyZnLQg45bhaQalzvnE/Lh/BjDyybPhVU2Un5GYTVyF4bsGeuBOV39f2V0O+sMjpF6S0L/EU5IAKnPmfqjyLFkCt7LA+7dEwK04p2gE3ssM+ahNzEO6fHIho46oHmtGsm1VjlD3o5YbV+fheWb++09Q+j9I+uWz4eCd9pwDqHDWtlOloJ8FH5PXb1YSPB1+OrQp2Z2o8vbwn5mLTLSqwMABAl7npqkM+maMaY7U1E3DE5h7vAG7SQwddzdZaW8U9KTXK2MDwTJNm0ls2GxV2EYAUJTdvI6BOqYuEV1BSXr2UfuSpvhF4r83MgfFQaWVGHgdbE5TZntj+MuTFQsF3TKRvL7g1+gF/7VMMw46fgHWxVGOHFxjJDnm5XH+9BvcLdxo8Y+HzniN4Io9Y12qQvE9cddCez5svYrtrV5wYIrBFaeptrHads7Xh6f4PUPepNOPVdzDkraUPEAoyl8Gg7JPXeBOtBG8am82ac65m096kzu01wrggjrtmhCTv3Wtz085YapwlTQ4ZLSZOHdWsTKz6QUPqxdBxthOMoPuWeNoFsK1q9EyntQfDBcuR6TDZL/DBnXrU7FvJBQtkH0b0XgFEhGd66eYleyPT+zCz/Qe6a2YQGRK2X0+rkBqK/4EUFgLtKNKSseeSMhw4hvi/AZVew=
template:
data: null
metadata:
creationTimestamp: null
name: rabbitmq-password
namespace: p47-beamline

27 changes: 27 additions & 0 deletions services/daq-rabbitmq/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
rabbitmq:
auth:
username: p47
existingPasswordSecret: rabbitmq-password
extraPlugins: rabbitmq_stomp
persistence:
enabled: false
rbac:
create: false
serviceAccount:
create: false
name: default-full-access-mounted # TODO: use only required permissions
extraContainerPorts:
- name: stomp
containerPort: 61613
service:
type: ClusterIP
extraPorts:
- name: stomp
port: 61613
targetPort: stomp
metrics: # TODO: Enable monitoring stack in namespace
enabled: true
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "8080"