Skip to content

Commit

Permalink
Merge pull request #870 from stackhpc/yoga-publish-on-push
Browse files Browse the repository at this point in the history
yoga: Build kayobe image on push, make TF aio volume configurable
  • Loading branch information
markgoddard authored Jan 15, 2024
2 parents 645f119 + 87810cb commit 379f525
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/stackhpc-build-kayobe-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
name: Build kayobe image

on:
push:
branches:
# NOTE(upgrade): Reference only the current release branch here.
- stackhpc/yoga

workflow_call:
inputs:
http_proxy:
Expand Down Expand Up @@ -32,7 +37,7 @@ env:
jobs:
build-kayobe-image:
name: Build kayobe image
if: inputs.if
if: inputs.if || github.repository == 'stackhpc/stackhpc-kayobe-config' && github.event_name == 'push'
runs-on: ubuntu-20.04
permissions:
contents: read
Expand Down
8 changes: 8 additions & 0 deletions releasenotes/notes/kayobe-image-f1227adacb28f40b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
features:
- |
StackHPC Kayobe Configuration container images for CI/CD with `Kayobe
Automation <https://github.com/stackhpc/kayobe-automation>`_ are now
published to GitHub Container Registry (GHCR) at
ghcr.io/stackhpc/stackhpc-kayobe-config. The image is tagged with the name
of the release branch, e.g. ``stackhpc/yoga``.
7 changes: 6 additions & 1 deletion terraform/aio/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ variable "aio_vm_subnet" {
type = string
}

variable "aio_vm_volume_size" {
type = number
default = 35
}

locals {
image_is_uuid = length(regexall("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", var.aio_vm_image)) > 0
}
Expand All @@ -59,7 +64,7 @@ resource "openstack_compute_instance_v2" "kayobe-aio" {
block_device {
uuid = local.image_is_uuid ? var.aio_vm_image: data.openstack_images_image_v2.image[0].id
source_type = "image"
volume_size = 35
volume_size = var.aio_vm_volume_size
boot_index = 0
destination_type = "volume"
delete_on_termination = true
Expand Down

0 comments on commit 379f525

Please sign in to comment.