Skip to content

Commit aae08b6

Browse files
authored
docs: add how to use other runners (#18)
SE-6589 Signed-off-by: Gabor Boros <gabor@opencraft.com>
1 parent f19a668 commit aae08b6

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

docs/user-guides/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This section contains step-by-step guides for specific tasks and scenarios when
77
- **[Using AWS WAF and ALB](using-aws-waf-and-alb.md)** - Configuring AWS WAF and Application Load Balancer with your cluster
88
- **[Instance Maintenance Mode](instance-maintenance-mode.md)** - Putting an instance into maintenance mode
99
- **[Setting Up Cron Jobs](setting-up-cron-jobs.md)** - Configuring cron jobs for Open edX instances
10+
- **[Use More Performant Runners](use-more-performant-runners.md)** - Using Blacksmith runners for faster builds
1011
- **[Pull Request Sandboxes](pull-request-sandboxes.md)** - Using sandbox environments for pull requests
1112
- **[Multi-Domain Setup](multi-domain-setup.md)** - Serving an instance under multiple domains
1213
- **[Migrating Instances from Grove](migrating-instances-from-grove.md)** - Step-by-step checklist to help instance migration
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Use More Performant Runners
2+
3+
This guide describes how to use higher-performance runners for your build and build-all GitHub Actions. OpenCraft uses [Blacksmith](https://blacksmith.sh/), a drop-in replacement for GitHub-hosted runners.
4+
5+
## Prerequisites
6+
7+
- The [Blacksmith GitHub App](https://github.com/apps/blacksmith-sh) must be installed for your GitHub organization. Blacksmith is available for organizations only, not personal repositories.
8+
- Your cluster must have been created from the Launchpad cluster template with the build workflows.
9+
10+
## Changing the Runner Label
11+
12+
The build and build-all workflows use a `RUNNER_WORKFLOW_LABEL` input that controls which runner executes the jobs. By default, clusters use `ubuntu-latest` (GitHub-hosted runners). To use Blacksmith, set the label to a Blacksmith runner tag such as `blacksmith-8vcpu-ubuntu-2404`. We use `blacksmith-8vcpu-ubuntu-2404` as it provides a reasonably fast build for the MFE and platform as well.
13+
14+
### Option 1: Set Default When Creating a New Cluster
15+
16+
When generating a new cluster with cookiecutter, choose a Blacksmith runner for `runner_workflow_label` instead of `ubuntu-latest`, use the runner label you wish to use.
17+
18+
### Option 2: Edit Workflow Defaults in Your Cluster Repository
19+
20+
For existing clusters, edit the workflow files in your cluster repository to change the default value of `RUNNER_WORKFLOW_LABEL`:
21+
22+
1. In your cluster repo (e.g. `open-craft/launchpad-my-cluster`), open `.github/workflows/build.yml` and `.github/workflows/build-all.yml`.
23+
24+
2. Change the default for the `RUNNER_WORKFLOW_LABEL` input from `ubuntu-latest` (or `self-hosted`) to a Blacksmith runner tag, for example:
25+
26+
```yaml
27+
RUNNER_WORKFLOW_LABEL:
28+
description: 'The label of the runner workflow to run'
29+
required: false
30+
default: "blacksmith-8vcpu-ubuntu-2404" # Blacksmith: 8 vCPU, 32 GB, Ubuntu 24.04
31+
type: string
32+
```
33+
34+
3. Commit and push. All future build and build-all runs will use Blacksmith unless overridden when manually triggering a workflow.
35+
36+
### Option 3: Override When Manually Triggering
37+
38+
When you run the **Build** or **Build All Images** workflow from the GitHub Actions UI (workflow_dispatch), you can override the runner label by changing the `RUNNER_WORKFLOW_LABEL` input to `blacksmith-8vcpu-ubuntu-2404` (or another Blacksmith tag) before starting the run. This does not require editing any files.
39+
40+
## Blacksmith Runner Tags (OpenCraft Example)
41+
42+
OpenCraft typically uses the following Blacksmith runners for Docker builds:
43+
44+
| Runner Tag | vCPU | Memory | Use Case |
45+
| --------------------------------- | ---- | ------ | ----------------------------- |
46+
| `blacksmith-2vcpu-ubuntu-2404` | 2 | 8 GB | Quick, light builds |
47+
| `blacksmith-8vcpu-ubuntu-2404` | 4 | 16 GB | Standard Open edX image builds |
48+
| `blacksmith-8vcpu-ubuntu-2404` | 8 | 32 GB | Faster builds, heavier images |
49+
| `blacksmith-16vcpu-ubuntu-2404` | 16 | 64 GB | Large or parallelized builds |
50+
51+
For Ubuntu 22.04, use the `ubuntu-2204` variants (e.g. `blacksmith-4vcpu-ubuntu-2204`). See the [Blacksmith Instance Types](https://docs.blacksmith.sh/blacksmith-runners/overview) documentation for the full list.
52+
53+
## Other Workflows Using Runners
54+
55+
The `create-instance`, `update-instance`, and `delete-instance` workflows also accept `RUNNER_WORKFLOW_LABEL`. If you want those to use Blacksmith as well, edit their defaults in your cluster repo in the same way as for build and build-all.
56+
57+
## Related Documentation
58+
59+
- [User Guides Overview](index.md) - All user guides
60+
- [Instance Provisioning](../instances/provisioning.md) - Instance creation and builds
61+
- [Instance Configuration](../instances/configuration.md) - Instance manifests
62+
63+
## See Also
64+
65+
- [Blacksmith Documentation](https://docs.blacksmith.sh/) - Runner types, pricing, setup
66+
- [Pull Request Sandboxes](pull-request-sandboxes.md) - Sandbox environments for PRs

mkdocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ nav:
3737
- Pull Request Sandboxes: user-guides/pull-request-sandboxes.md
3838
- Multi-Domain Setup: user-guides/multi-domain-setup.md
3939
- Migrating Instances from Grove: user-guides/migrating-instances-from-grove.md
40+
- Use More Performant Runners: user-guides/use-more-performant-runners.md
4041
theme:
4142
name: material
4243
logo: images/opencraft-logo.svg

0 commit comments

Comments
 (0)