Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Changes to containerise hyperion and enable deployment to kubernetes #1511

Closed
wants to merge 6 commits into from

Conversation

rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Aug 6, 2024

  • New build_docker_image.sh script to build an image on the cli
  • New run_in_podman.sh script to run the image from podman
  • Github CI workflow to build container image on release and manual execution and push to GHCR registry
  • Helm charts to deploy container images to kubernetes
  • Hyperion now has --version option to report the current version
  • The current version is now set automatically on pip install

Fixes DiamondLightSource/mx-bluesky#250 DiamondLightSource/mx-bluesky#242

These changes are still pending scicomp request SCHD-5532 to create the required user for kubernetes on i03.
There will also need to be some changes to GDA restart_hyperion() logic which are TBD - this will probably involve implementing the shutdown() hook (which seems to be only partially implemented), however alternatively the pods can be scaled up/down to achieve a restart.

Link to dodal PR (if required): DiamondLightSource/dodal#725

(remember to update setup.cfg with the dodal commit tag if you need it for tests to pass!)

To test:

  • Hyperion should still build
  • Releases should now build, tag and push container images with :latest and : tags
  • Hyperion should still work as normal in non-containerised deployment
  • hyperion --version should now print the version of hyperion
  • It should be possible to run a dev image of hyperion in podman locally
  • It should be possible to run a dev image of hyperion in kubernetes (modulo non-availabililty of some PVs outside of beamline that prevent instantiation) and log into the console via k8s terminal
  • It should be possible to deploy production in k8s (once service account with permissions created as above)

…and podman

* New build_docker_image.sh script to build an image on the cli
* New run_in_podman.sh script to run the image from podman
* Github CI workflow to build container image on release and manual execution and push to GHCR registry
* Helm charts to deploy container images to kubernetes
* Hyperion now has --version option to report the current version
* The current version is now set automatically on pip install
Add editable dodal to image and helmcharts
Allow the appversion to be specified at deployment
Allow existing helmcharts to be upgraded
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Containerize hyperion
1 participant