Skip to content

Commit a62cecf

Browse files
authored
chore: Better documentation of ARM64 usage (#245)
Fix #243
1 parent 1ad318f commit a62cecf

File tree

6 files changed

+34
-1
lines changed

6 files changed

+34
-1
lines changed

API.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
175175
label: 'customized-windows-fargate',
176176
vpc: vpc,
177177
securityGroup: runnerSg,
178-
imageBuiler: myWindowsBuilder,
178+
imageBuidler: myWindowsBuilder,
179179
});
180180

181181
// create the runner infrastructure
@@ -184,6 +184,23 @@ new GitHubRunners(stack, 'runners', {
184184
});
185185
```
186186

187+
The runner OS and architecture is determined by the image it is set to use. For example, to create a CodeBuild runner provider for ARM64 set the `architecture` property for the image builder to `Architecture.ARM64` and use the `LINUX_ARM64_DOCKERFILE_PATH` constant.
188+
189+
```typescript
190+
new GitHubRunners(stack, 'runners', {
191+
providers: [
192+
new FargateRunnerProvider(this, 'fargate runner', {
193+
labels: ['arm64', 'fargate'],
194+
imageBuidler: new CodeBuildImageBuilder(this, 'image builder', {
195+
architecture: Architecture.ARM64,
196+
os: Os.LINUX,
197+
dockerfilePath: FargateRunner.LINUX_ARM64_DOCKERFILE_PATH,
198+
}),
199+
}),
200+
],
201+
});
202+
```
203+
187204
## Architecture
188205

189206
![Architecture diagram](architecture.svg)

src/providers/codebuild.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export interface CodeBuildRunnerProviderProps extends RunnerProviderProps {
3131
/**
3232
* Image builder for CodeBuild image with GitHub runner pre-configured. A user named `runner` is expected to exist with access to Docker-in-Docker.
3333
*
34+
* The image builder determines the OS and architecture of the runner.
35+
*
3436
* @default image builder with `CodeBuildRunner.LINUX_X64_DOCKERFILE_PATH` as Dockerfile
3537
*/
3638
readonly imageBuilder?: IImageBuilder;

src/providers/ec2.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ export interface Ec2RunnerProviderProps extends RunnerProviderProps {
133133
/**
134134
* AMI builder that creates AMIs with GitHub runner pre-configured. On Linux, a user named `runner` is expected to exist with access to Docker.
135135
*
136+
* The AMI builder determines the OS and architecture of the runner.
137+
*
136138
* @default AMI builder for Ubuntu Linux on the same subnet as configured by {@link vpc} and {@link subnetSelection}
137139
*/
138140
readonly amiBuilder?: IAmiBuilder;

src/providers/fargate.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export interface FargateRunnerProviderProps extends RunnerProviderProps {
3232
/**
3333
* Provider running an image to run inside CodeBuild with GitHub runner pre-configured. A user named `runner` is expected to exist.
3434
*
35+
* The image builder determines the OS and architecture of the runner.
36+
*
3537
* @default image builder with `FargateRunner.LINUX_X64_DOCKERFILE_PATH` as Dockerfile
3638
*/
3739
readonly imageBuilder?: IImageBuilder;

src/providers/lambda.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export interface LambdaRunnerProviderProps extends RunnerProviderProps {
3434
*
3535
* The default command (`CMD`) should be `["runner.handler"]` which points to an included `runner.js` with a function named `handler`. The function should start the GitHub runner.
3636
*
37+
* The image builder determines the OS and architecture of the runner.
38+
*
3739
* @see https://github.com/CloudSnorkel/cdk-github-runners/tree/main/src/providers/docker-images/lambda
3840
* @default image builder with LambdaRunner.LINUX_X64_DOCKERFILE_PATH as Dockerfile
3941
*/

0 commit comments

Comments
 (0)