-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcharmcraft.yaml
More file actions
179 lines (171 loc) · 6.81 KB
/
Copy pathcharmcraft.yaml
File metadata and controls
179 lines (171 loc) · 6.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
name: github-runner-image-builder
title: Github runner image builder
summary: Provide Github runners with images available to use.
description: |
A [Juju](https://juju.is/) [charm](https://juju.is/docs/olm/charmed-operators) managing
runner images for
[self-hosted runners for GitHub Actions](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners).
A single unit of this charm provides pre-built images for Github runner operator to spawn and
register the self-hosted runners on Github. The charm will periodically rebuild and provide the
latest version of the images.
links:
contact: https://github.com/orgs/canonical/teams/is-charms
documentation: https://discourse.charmhub.io/t/github-runner-image-builder-documentation-overview/15390
issues: https://github.com/canonical/github-runner-image-builder-operator/issues
source: https://github.com/canonical/github-runner-image-builder-operator
website: https://charmhub.io/github-runner-image-builder
type: charm
parts:
charm:
build-snaps:
- rustup
build-packages:
- libffi-dev # for cffi
- libssl-dev # for cryptography
- rust-all # for cryptography
- pkg-config # for cryptography
- cython3 # for building PyYAML from source
- libyaml-dev # for PyYAML C extension
- python3-dev # for Python C extensions
charm-python-packages:
- "wheel>=0.45"
- pip
- setuptools
override-build: |
rustup default stable
craftctl default
app:
plugin: nil
override-build: |
cd /root/project
tar -cvzf app.tar.gz app
cp app.tar.gz /root/stage
organize:
app.tar.gz: app.tar.gz
prime:
- app.tar.gz
bases:
- build-on:
- name: ubuntu
channel: "22.04"
architectures:
- amd64
run-on:
- name: ubuntu
channel: "22.04"
architectures:
- amd64
actions:
run:
description: Trigger an image builder run immediately.
config:
options:
architecture:
type: string
description: |
The image architecture to build for using external builder. Can be one of "amd64", "arm64", "s390x",
"ppc64le" (alternatively "ppc64el") or "armhf" (alternatively "arm", 32-bit ARM).
Support for "s390x", "ppc64el" and "armhf" is considered experimental.
Note: "armhf" images are built on arm64 (aarch64) hardware running a 32-bit userspace, and use
the GitHub runner binary published by the canonical/github-actions-runner fork.
base-image:
type: string
default: noble
description: |
The base ubuntu OS image to use for the runners. Codename (e.g. "noble") or version tag
(e.g. 24.04) is supported as input. Currently only supports LTS versions of focal and
higher, i.e. focal, jammy, noble, resolute.
build-flavor:
type: string
default: ""
description: |
The flavor to use when launching a builder VM machine. Will default to
minimum matching flavor: 2 vCPU, 1G Memory, 20G Disk.
build-network:
type: string
default: ""
description: |
The network to launch the builder VM machine on. Will default to whatever
network with accessible subnet is available.
build-interval:
type: int
default: 6
description: |
The interval in hours between each scheduled image builds.
openstack-auth-url:
type: string
default: ""
description: |
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-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>.
openstack-project-domain-name:
type: string
default: ""
description: |
The project_domain_name section of the clouds.yaml contents, used to find the OpenStack
project-domain to use to store images. See https://docs.openstack.org/python-\
openstackclient/queens/configuration/index.html for more information.
openstack-project-name:
type: string
default: ""
description: |
The project_name section of the clouds.yaml contents, used to find the OpenStack project to
use to store images. See https://docs.openstack.org/python-openstackclient/queens/\
configuration/index.html for more information.
openstack-user-domain-name:
type: string
default: ""
description: |
The user_domain_name section of the clouds.yaml contents, used to find the OpenStack
user domain to authenticate the client. See https://docs.openstack.org/python-\
openstackclient/queens/configuration/index.html for more information.
openstack-user-name:
type: string
default: ""
description: |
The username section of the clouds.yaml contents, used to find the OpenStack user to \
authenticate the client. See https://docs.openstack.org/python-openstackclient/queens/\
configuration/index.html for more information.
revision-history-limit:
type: int
default: 5
description: Number of image revisions to keep before deletion.
runner-version:
type: string
default: ""
description: |
The GitHub runner version to use, e.g. 2.317.0. Empty default value will fetch the latest
version by default. See https://github.com/actions/runner/releases.
script-url:
type: string
default: ""
description: |
URL to external script to run during cloud-init. Allows user-defined customization scripts
to be run. This script is run as root, within the cloud-init user-data script.
script-secret-id:
type: secret
description: |
Environment variables to be loaded for execution of the script-url. Juju user secret ID
should be passed in in the format of secret:<secret-id>.
See https://juju.is/docs/juju/manage-secrets.
script-secret:
type: string
default: ""
description: |
Environment variables to be loaded for execution of the script-url. Multiple secrets can be
passed in, delimited by space. i.e. firstsecret=first secondsecret=second
provides:
image:
interface: github_runner_image_v0
cos-agent:
interface: cos_agent