Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6a3c8d3
test: migrate pytest-operator to jubilant
yanksyoon Apr 16, 2026
2fac78e
Remove unused functools import from test_upgrade.py
yanksyoon Apr 16, 2026
65bca40
Disable too-many-locals pylint warning for test_charm_another_app_doe…
yanksyoon Apr 16, 2026
a53df9b
Address PR review comments
yanksyoon Apr 16, 2026
5962c15
Remove invalid encoding arg from basicConfig when using handlers
yanksyoon Apr 16, 2026
db4e2d3
test: use os-agnostic workflow
yanksyoon Apr 16, 2026
953578e
chore: disable deploy logs
yanksyoon Apr 16, 2026
b461eb4
Merge branch 'main' into chore/migrate-to-jubilant
yanksyoon Apr 21, 2026
ecb787e
test: resolve review comments - migrate fixtures to jubilant sync API
yanksyoon Apr 21, 2026
1708a98
test: remove invalid log=False from jubilant deploy calls
yanksyoon Apr 21, 2026
c76d28e
test: fix black formatting and remove invalid log=False from deploy c…
yanksyoon Apr 21, 2026
120754e
test: fix type annotation for base_machine_constraint in app_on_charm…
yanksyoon Apr 21, 2026
c0a2322
ci: trigger ci
yanksyoon Apr 22, 2026
71c2d6b
refactor: migrate to openstack-password-secret for authentication
yanksyoon Apr 22, 2026
888b000
fix: cast config secret id to str for mypy compatibility
yanksyoon Apr 22, 2026
7fefe62
refactor: migrate to openstack-password-secret for secure password ha…
yanksyoon Apr 22, 2026
b7b4815
docs: fix vale lint errors
yanksyoon Apr 22, 2026
659d6ac
test: use fix/pip-break-flag-workarounds integration test
yanksyoon Apr 22, 2026
f17980f
ci: trigger ci
yanksyoon Apr 22, 2026
b30b969
revert: ci use main
yanksyoon Apr 22, 2026
ac26388
test: restore 100% unit test coverage after openstack password secret…
yanksyoon Apr 22, 2026
9763100
fix: correct black formatting and bandit nosec tags in tests
yanksyoon Apr 22, 2026
473ff2e
fix: restore openstack-password fallback for upgrade test
yanksyoon Apr 23, 2026
ef9bffd
Revert "fix: restore openstack-password fallback for upgrade test"
yanksyoon Apr 23, 2026
6d5418e
fix: grant and set openstack-password-secret after charm refresh in u…
yanksyoon Apr 23, 2026
23ea8e5
ci: debug
yanksyoon Apr 24, 2026
648d6d8
ci: add debug logging
yanksyoon Apr 24, 2026
016585a
ci: longer tmate
yanksyoon Apr 26, 2026
9911bc2
fix: pass os environ to subprocess
yanksyoon Apr 26, 2026
badcd02
test: use juju 4.0
yanksyoon Apr 26, 2026
5ec9484
chore: remove os environ passing
yanksyoon Apr 26, 2026
a3ebff0
fix: use sudo for juju log read and bash for logrotate stderr capture
yanksyoon Apr 26, 2026
2fb6cff
fix: ssh issues
yanksyoon Apr 26, 2026
ea57902
fix: ssh dir
yanksyoon Apr 26, 2026
d368889
test: remove juju add key
yanksyoon Apr 27, 2026
23680bc
test: juju ssh key fixture
yanksyoon Apr 27, 2026
d09648e
test: use juju ssh key fixture
yanksyoon Apr 27, 2026
a1d3dca
test: verify ssh key added
yanksyoon Apr 27, 2026
cfc82e9
fix: setup proxy environment on relation joined hook
yanksyoon Apr 27, 2026
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
13 changes: 7 additions & 6 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ name: Integration tests
on:
pull_request:
schedule:
- cron: "0 15 * * SAT"
- cron: "0 15 * * SAT"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number ||
github.ref }}
cancel-in-progress: true

jobs:
integration-tests:
uses:
canonical/operator-workflows/.github/workflows/integration_test.yaml@main
uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main
secrets: inherit
with:
juju-channel: 3.6/stable
juju-channel: 4/stable
provider: lxd
modules: '["test_charm", "test_upgrade"]'
self-hosted-runner: true
Expand All @@ -25,8 +24,10 @@ jobs:
builder-runner-label: X64
pre-run-script: |
-c "./tests/integration/aproxy_prerouting_workaround.sh"
tmate-debug: true
tmate-timeout: 120
allure-report:
if: ${{ !cancelled() && github.event_name == 'schedule' }}
needs:
- integration-tests
- integration-tests
uses: canonical/operator-workflows/.github/workflows/allure_report.yaml@main
2 changes: 2 additions & 0 deletions .vale/styles/config/vocabularies/local/accept.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
aproxy
chroot
cron
opentelemetry
pipx
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tox # runs 'format', 'lint', and 'unit' environments


The integration tests (both of the charm and the app)
require options to be passed via the command line (see `tests/conftest.py`) and
require options to be passed through the command line (see `tests/conftest.py`) and
environment variables `OPENSTACK_PASSWORD` to be able to deploy the charm and/or upload images to OpenStack.

## Build the charm
Expand Down
53 changes: 33 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
<!-- vale Canonical.007-Headings-sentence-case = NO -->

# GitHub runner image builder operator

<!-- vale Canonical.007-Headings-sentence-case = YES -->
<!-- Use this space for badges -->

A Juju charm that provides the GitHub runner workload embedded snapshot image to the
A Juju charm that provides the GitHub runner workload embedded snapshot image to the
[GitHub runner](https://charmhub.io/github-runner) charm. This charm is deployed as a VM and works
on top of OpenStack infrastructure.

Like any Juju charm, this charm supports one-line deployment, configuration, integration, scaling,
and more. For Charmed GitHub runner image builder, this includes support for configuring:
* Multi-arch
* Multi Ubuntu bases
* Juju/MicroK8s snap channels
* External scripts

For information about how to deploy, integrate, and manage this charm, see the Official
- Multi-arch
- Multi Ubuntu bases
- Juju/MicroK8s snap channels
- External scripts

For information about how to deploy, integrate, and manage this charm, see the Official
[CharmHub Documentation](https://charmhub.io/github-runner-image-builder).

## Get started

<!--Briefly summarize what the user will achieve in this guide.-->

Deploy GitHub runner image builder with GitHub runners.

<!--Indicate software and hardware prerequisites-->

You'll need a working [OpenStack installation](https://microstack.run/docs/single-node) with
flavors with a minimum of 2 CPU cores, 8GB RAM and 10GB disk.

### Set up

Follow [MicroStack's single-node](https://microstack.run/docs/single-node) starting guide to set
Follow [MicroStack's single-node](https://microstack.run/docs/single-node) starting guide to set
up MicroStack.

Follow the [tutorial on GitHub runner](https://charmhub.io/github-runner) to deploy the GitHub
Expand All @@ -38,11 +44,13 @@ runner.
Deploy the charm.

```
juju add-secret openstack-password password=<OPENSTACK-PASSWORD>
OPENSTACK_PASSWORD_SECRET=$(juju show-secret openstack-password --format json | jq -r 'keys[0]')

juju deploy github-runner-image-builder \
--config experimental-external-build=True \
--config experimental-external-build-network=<OPENSTACK-NETWORK-NAME> \
--config build-network=<OPENSTACK-NETWORK-NAME> \
--config openstack-auth-url=<OPENSTACK-AUTH-URL> \
--config openstack-password=<OPENSTACK-PASSWORD> \
--config openstack-password-secret=$OPENSTACK_PASSWORD_SECRET \
--config openstack-project-domain-name=<OPENSTACK-PROJECT-DOMAIN-NAME> \
--config openstack-project-name=<OPENSTACK-PROJECT-NAME> \
--config openstack-user-name=<OPENSTACK-USER-NAME>
Expand All @@ -51,17 +59,20 @@ juju integrate github-runner-image-builder github-runner
```

### Basic operations

<!--Brief walkthrough of performing standard configurations or operations-->

After having deployed and integrated the charm with the GitHub runner charm, the image should start
to build and be provided to the GitHub runner automatically. The whole process takes around 10
minutes.

## Integrations
<!-- Information about particularly relevant interfaces, endpoints or libraries related to the charm. For example, peer relation endpoints required by other charms for integration.-->
* image: The image relation provides the OpenStack image ID to the GitHub runners.
* cos-agent: The COS agent subordinate charm provides observability using the Canonical
Observability Stack (COS).

<!-- Information about particularly relevant interfaces, endpoints or libraries related to the charm. For example, peer relation endpoints required by other charms for integration.-->

- image: The image relation provides the OpenStack image ID to the GitHub runners.
- cos-agent: The COS agent subordinate charm provides observability using the Canonical
Observability Stack (COS).

For a full list of integrations, please refer to the [Charmhub documentation](https://charmhub.io/github-runner-image-builder/integrations).

Expand All @@ -71,11 +82,13 @@ This repository contains the charm in the root directory and the `github-runner-
application in the `app` directory. Refer to [Contributing](CONTRIBUTING.md) for more information.

## Learn more
* [Read more](https://charmhub.io/github-runner-image-builder) <!--Link to the charm's official documentation-->
* [Developer documentation](https://github.com/canonical/github-runner-image-builder-operator/blob/main/CONTRIBUTING.md) <!--Link to any developer documentation-->
* [Troubleshooting](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)

- [Read more](https://charmhub.io/github-runner-image-builder) <!--Link to the charm's official documentation-->
- [Developer documentation](https://github.com/canonical/github-runner-image-builder-operator/blob/main/CONTRIBUTING.md) <!--Link to any developer documentation-->
- [Troubleshooting](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)

## Project and community
* [Issues](https://github.com/canonical/github-runner-image-builder-operator/issues) <!--Link to GitHub issues (if applicable)-->
* [Contributing](https://github.com/canonical/github-runner-image-builder-operator/blob/main/CONTRIBUTING.md) <!--Link to any contribution guides-->
* [Matrix](https://matrix.to/#/#charmhub-charmdev:ubuntu.com) <!--Link to contact info (if applicable), e.g. Matrix channel-->

- [Issues](https://github.com/canonical/github-runner-image-builder-operator/issues) <!--Link to GitHub issues (if applicable)-->
- [Contributing](https://github.com/canonical/github-runner-image-builder-operator/blob/main/CONTRIBUTING.md) <!--Link to any contribution guides-->
- [Matrix](https://matrix.to/#/#charmhub-charmdev:ubuntu.com) <!--Link to contact info (if applicable), e.g. Matrix channel-->
14 changes: 2 additions & 12 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ parts:
tar -cvzf app.tar.gz app
cp app.tar.gz /root/stage
organize:
app.tar.gz: app.tar.gz
app.tar.gz: app.tar.gz
prime:
- app.tar.gz

- app.tar.gz

bases:
- build-on:
Expand Down Expand Up @@ -107,22 +106,13 @@ config:
The auth_url section of the clouds.yaml contents, used to authenticate the OpenStack \
client (e.g. http://my-openstack-deployment/openstack-keystone). See https://docs.\
openstack.org/python-openstackclient/queens/configuration/index.html for more information.
openstack-password:
type: string
default: ""
description: |
The password section of the clouds.yaml contents, used to authenticate the OpenStack \
client (e.g. myverysecurepassword). See https://docs.openstack.org/python-openstackclient/\
queens/configuration/index.html for more information.
DEPRECATED: Use openstack-password-secret instead for better security.
openstack-password-secret:
type: secret
description: |
The password section of the clouds.yaml contents, used to authenticate the OpenStack
client. A Juju user secret ID should be passed in the format of secret:<secret-id>.
The secret must contain a 'password' key with the OpenStack password as its value.
Example: juju add-secret openstack-password password=<value>.
This option takes precedence over openstack-password if both are set.
openstack-project-domain-name:
type: string
default: ""
Expand Down
Loading
Loading