Skip to content

Commit

Permalink
Merge pull request #12 from epics-containers/update
Browse files Browse the repository at this point in the history
Refresh to latest epics-containers framework
  • Loading branch information
gilesknap authored Mar 15, 2024
2 parents 3dff324 + fc3a04c commit 7b64736
Show file tree
Hide file tree
Showing 464 changed files with 1,014 additions and 881,035 deletions.
14 changes: 14 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 3.2.1
_src_path: gh:epics-containers/ec-services-template
beamline: bl45p
cluster_name: pollux
cluster_namespace: bl45p
cluster_type: dls_shared
description: beamline bl45p IOC Instances and Services
git_platform: github.com
github_org: epics-containers
logging_url: https://graylog2.diamond.ac.uk/search?rangetype=relative&fields=message%2Csource&width=1489&highlightMessage=&relative=172800&q=pod_name%3A{service_name}*
node_type: test-rig
repo_uri: [email protected]:epics-containers/bl45p.git
type: beamline
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Look for updates to python and docker dependencies.

version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
36 changes: 36 additions & 0 deletions .github/workflows/ci_verify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# CI to verify all the instances specified in this repo have valid configs.
# The intention here is to verify that any mounted config folder will work
# with the container image specified in values.yaml
#
# At present this will only work with IOCs because it uses ibek. To support
# other future services that don't use ibek, we will need to add a standard
# entrypoint for validating the config folder mounted at /config.

ROOT=$(realpath $(dirname ${0})/../..)
set -xe

# use docker if available else use podman
if ! docker version &>/dev/null; then docker=podman; else docker=docker; fi

for service in ${ROOT}/services/*
do
# Skip if subfolder has no config to validate
if [ ! -f "${service}/config/ioc.yaml" ]; then
continue
fi

# Get the container image that this service uses from values.yaml if supplied
image=$(cat ${service}/values.yaml | sed -rn 's/^ +image: (.*)/\1/p')

if [ -n "${image}" ]; then
echo "Validating ${service} with ${image}"

# This will fail and exit if the ioc.yaml is invalid
$docker run --rm --entrypoint bash \
-v ${service}/config:/config ${image} \
-c 'ibek runtime generate /config/ioc.yaml /epics/ibek-defs/*'

fi
done
11 changes: 5 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ on:
jobs:
verify_ioc_instances:
runs-on: ubuntu-latest
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v3
with:
python-version: "3.10"

- run: |
bash ./ci_verify.sh
- name: run IOC checks
run: |
bash .github/workflows/ci_verify.sh
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@
**/*.bob
edm/bobs
**/*copy
iocs/bl45p-ea-ioc-01/config/make_db.sh
iocs/bl45p-ea-ioc-01/config/st.cmd

# this file is placed in the folder for running CI tests
/ci_test/values.yaml
60 changes: 4 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,8 @@
Beamline BL45P the test epics-containers Beamline
=================================================
# beamline bl45p IOC Instances and Services

This repository contains the configuration files for the IOC instances
running on the test beamline BL45P at DLS.
This repository holds the a definition of beamline bl45p IOC Instances and services. Each sub folder of the `services` directory contains a helm chart for a specific service or IOC.

NOTE: in order to take advantage of version control, you must deploy these services using the edge-containers-cli. This will ensure that the services are deployed from a specific tag of this repository and that the version number is recorded in the cluster.

It is a reference implementation of a beamline for
[epics-containers](https://github.com/epics-containers).


Experimenting with epics containers on a Workstation
----------------------------------------------------

If you would like to try out epics-containers locally in a devcontainer
without requiring Kubernetes, [see here](iocs/bl45p-ea-ioc-90/README.md)


Experimenting with epics containers on a K8S Cluster
----------------------------------------------------

Inside DLS you can experiment with BL45P by setting up your environment
as follows:

1. Set up a python virtual environment if you do not already have one.

```bash
module load python/3.10
python -m venv ~/.local/epics-containers
source ~/.local/epics-containers/bin/activate
```

2. Set up your environment for BL45P

```bash
# get bl45p environment file
curl https://raw.githubusercontent.com/epics-containers/bl45p/main/environment.sh -o ~/.local/bin/bl45p

# set up the environment
source ~/.local/bl45p

# You will asked for kubernetes credentials which are same as your linux login.

# You may also need to ask the cloud team for access to the kubernetes namespace bl45p on pollux.
```

3. Now if everything is working you should be able to see the IOC instances
running on the bl45p kubernetes cluster:

```bash
ec ps
```

4. And also take a look at what other commands are available:

```bash
ec --help
ec ioc --help
```
See https://github.com/epics-containers/edge-containers-cli for more information.

28 changes: 0 additions & 28 deletions beamline-chart/.helmignore

This file was deleted.

25 changes: 0 additions & 25 deletions beamline-chart/Chart.yaml.jinja

This file was deleted.

130 changes: 0 additions & 130 deletions beamline-chart/templates/deployment.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions beamline-chart/templates/ioc-volume.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions beamline-chart/templates/ioc.yaml

This file was deleted.

Loading

0 comments on commit 7b64736

Please sign in to comment.