The aim of this chart is to deploy all the receive workflows. This chart was developed to be as generic as possible by providing appropriate parameters to customise what it deploys. It is implemented as a StatefulSet to provide stable DNS-based IP addresses. This chart helps with reducing the number of helm charts that need to be maintained for SDP deployments.
Currently, it works with the vis-receive workflow. We will be carrying out further testing and adding functionality if required to make it compatible with other receive workflows.
minikube start --vm-driver=virtualbox
There are few setups we need to do before running the workflow.
As an example we will use cbf-sdp visibility. First need to download the
sim-vis.ms.tar.gz from the
CBF-SDP Emulator Repository.
Extract the file:
tar -xf sim-vis.ms.tar
Create a persistent volume, to do that create a file called
pvc.yaml and add the following:
kind: PersistentVolume apiVersion: v1 metadata: name: pv-local labels: type: local spec: storageClassName: local capacity: storage: 5Gi accessModes: - ReadWriteOnce hostPath: path: "<path to sim-vis.ms" --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: local-pvc spec: storageClassName: local accessModes: - ReadWriteOnce resources: requests: storage: 5Gi selector: matchLabels: type: local
Note - Make sure to update the hostPath.
Create receive namespace
kubectl create namespace receive
Create persistent volume by executing the following command:
kubectl create -f pvc.yaml -n receive
After cloning the SDP Helm Deployer Charts repository,
To add all the required parameters to start the cbf receiver, need to create a temporary yaml file.
test.yaml file and add the following
command: - emu-recv - -o - payload.method=icd - -o - reader.num_chan=0 - -o - reader.num_repeats=1 - -o - reader.num_timestamps=0 - -o - reader.start_chan=0 - -o - reception.num_ports=1 - -o - reception.outputfilename=/mnt/data/output.ms - -o - reception.receiver_port_start=41000 - -o - transmission.channels_per_stream=4 - -o - transmission.rate=147500 - -o - reception.datamodel=/mnt/data/sim-vis.ms duration: 20 image: nexus.engageska-portugal.pt/ska-docker/cbf_sdp_emulator length: 10 model: name: sim-vis.ms payload: method: icd pvc: name: local-pvc path: /mnt/data reader: num_chan: 0 num_repeats: 1 num_timestamps: 0 start_chan: 0 reception: num_ports: 1 outputfilename: output.ms receiver_port_start: '41000' recv_emu: emu-recv replicas: 1 results: push: false transmission: channels_per_stream: 4 rate: '147500' version: latest
Install the chart
helm install recv receive -n receive -f test.yaml
The deployment can be monitored using k9s or by running
kubectl get all -n receive NAME READY STATUS RESTARTS AGE pod/recv-receive-0 1/1 Running 0 24s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/receive ClusterIP None <none> <none> 24s NAME READY AGE statefulset.apps/recv-receive 1/1 24s
which shows the receive pod and the network service. Once the receive pod enters the running state, we can check if the container has been deployed correctly by running
kubectl logs <podname> -n receive
which, if the receive application has been successfully launched should show
1|2021-08-23T15:29:13.790Z|INFO|MainThread|__init__|utils.py#74||Attempting to build model from /mnt/data/sim-vis.ms Successful readonly open of default-locked table /mnt/data/sim-vis.ms: 22 columns, 1330 rows ... 1|2021-08-23T15:29:13.905Z|INFO|MainThread|_create_ms|msutils.py#471||Creating MS at output.ms for 4 stations and 4 channels starting at 149.900 MHz Successful read/write open of default-locked table /output.ms/OBSERVATION: 9 columns, 0 rows ... 1|2021-08-23T15:29:13.945Z|INFO|MainThread|__init__|spead2_receivers.py#85||Creating stream with 1 UDP readers to receive data for 4 channels ... 1|2021-08-23T15:29:13.946Z|INFO|MainThread|_setup_streams|spead2_receivers.py#99||Started udp_reader on port 41000