-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ubuntu Jammy (22.04 LTS) runner (#85)
* add ubuntu jammy * Update baremetal-remove.yml copy/paste change apply to delete * capitalization
- Loading branch information
1 parent
a417f00
commit 380e73e
Showing
9 changed files
with
439 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Test Ubuntu Jammy runner | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "images/ubuntu-jammy.Dockerfile" | ||
- "images/**.sh" | ||
- "images/docker/*" | ||
- "images/software/*" | ||
- "images/supervisor/*" | ||
|
||
jobs: | ||
build: | ||
name: Build test image | ||
runs-on: [self-hosted, jammy] | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Packages | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: "images/ubuntu-jammy.Dockerfile" | ||
push: true | ||
tags: ghcr.io/some-natalie/kubernoodles/ubuntu-jammy:latest | ||
|
||
deploy: | ||
name: Deploy test image to `test-runners` namespace | ||
runs-on: [self-hosted, jammy] | ||
needs: [build] | ||
environment: test | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Write out the kubeconfig info | ||
run: | | ||
echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config | ||
- name: Deploy | ||
run: | | ||
kubectl apply -f deployments/test-ubuntu-jammy.yml | ||
env: | ||
KUBECONFIG: /tmp/config | ||
|
||
- name: Remove kubeconfig info | ||
run: rm -f /tmp/config | ||
|
||
- name: Wait 5 minutes to let the new pod come up | ||
run: sleep 300 | ||
|
||
test: | ||
name: Run tests! | ||
runs-on: [self-hosted, test-ubuntu-jammy] | ||
needs: [deploy] | ||
|
||
steps: | ||
- name: Sudo test | ||
run: sudo echo "sudo is working" | ||
|
||
- name: Docker test | ||
run: | | ||
docker run hello-world | ||
docker network inspect bridge | ||
docker info | ||
- name: Docker compose test | ||
run: | | ||
docker-compose --version | ||
- name: Print environmental variables | ||
run: printenv | ||
|
||
remove-deploy: | ||
name: Delete test image deployment | ||
runs-on: [self-hosted, jammy] | ||
needs: [test] | ||
environment: test | ||
if: always() | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Write out the kubeconfig info | ||
run: | | ||
echo ${{ secrets.DEPLOY_ACCOUNT }} | base64 -d > /tmp/config | ||
- name: Deploy | ||
run: | | ||
kubectl delete -f deployments/test-ubuntu-jammy.yml | ||
env: | ||
KUBECONFIG: /tmp/config | ||
|
||
- name: Remove kubeconfig info | ||
run: rm -f /tmp/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: RunnerDeployment | ||
metadata: | ||
name: ubuntu-jammy | ||
namespace: runners | ||
spec: | ||
replicas: 1 | ||
template: | ||
spec: | ||
organization: universal-exports-ltd | ||
# env: | ||
# - name: DISABLE_RUNNER_UPDATE # Disables automatic runner updates | ||
# value: "true" | ||
ephemeral: true | ||
image: ghcr.io/some-natalie/kubernoodles/ubuntu-jammy:latest # change this to the version you really want! | ||
imagePullPolicy: Always | ||
imagePullSecrets: | ||
- name: ghcr | ||
dockerdWithinRunnerContainer: true | ||
dockerMTU: 1450 | ||
resources: | ||
limits: | ||
cpu: "4000m" | ||
memory: "8Gi" | ||
requests: | ||
cpu: "200m" | ||
memory: "200Mi" | ||
labels: | ||
- docker | ||
- ubuntu | ||
- jammy | ||
- ubuntu-latest # overlaps w/ hosted runners on GHEC, can use in GHES and GHAE | ||
securityContext: | ||
runAsUser: 1000 | ||
seccompProfile: | ||
type: RuntimeDefault | ||
runAsNonRoot: true | ||
--- | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: HorizontalRunnerAutoscaler | ||
metadata: | ||
name: ubuntu-jammy-autoscaling | ||
namespace: runners | ||
spec: | ||
scaleTargetRef: | ||
name: ubuntu-jammy | ||
minReplicas: 1 | ||
maxReplicas: 3 | ||
scaleDownDelaySecondsAfterScaleOut: 60 | ||
metrics: | ||
- type: PercentageRunnersBusy | ||
scaleUpThreshold: "0.75" | ||
scaleDownThreshold: "0.3" | ||
scaleUpFactor: "1.5" | ||
scaleDownFactor: "0.7" |
Oops, something went wrong.