Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit d6c2ab6

Browse files
authored
Merge pull request #8 from fullstack-devops/bugfix/documentation
add podman deployment.yml and docu
2 parents 5933c55 + 4cdf551 commit d6c2ab6

File tree

2 files changed

+77
-43
lines changed

2 files changed

+77
-43
lines changed

README.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ Software builds can be built there using a [Nexus Repository](https://de.sonatyp
66

77
Support: If you need help or a feature just open an issue!
88

9-
Available Containers:
9+
Package / Images: ghcr.io/fullstack-devops/github-actions-runner
10+
11+
Available Tags:
1012
| Name (tag) | Installed Tools/ Software | Description |
1113
|-------------------------|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
1214
| `base-latest` | libffi-dev, libicu-dev, build-essential, libssl-dev, ca-certificates, jq, sed, grep, git, curl, wget, zip | Base runner with nothing fancy installed <br> [Dockerfile](images/base/Dockerfile) |
@@ -42,57 +44,47 @@ For the helm values see the [values.yaml](helm/values.yaml), section `envValues`
4244

4345
## Examples
4446

45-
### docker or podman
47+
### docker
4648

4749
If you are using `docker` or `podman` the options and commands are basically the same.
4850

4951
Run registerd to an Organisation:
5052
```bash
51-
podman run -e GH_ORG=fullstack-devops -e GH_ACCESS_TOKEN=ghp_**** github-runner-base:latest
53+
docker run -e GH_ORG=fullstack-devops -e GH_ACCESS_TOKEN=ghp_**** github-runner-base:latest
5254
```
5355

5456
Run registerd to an Organisation and Repo:
5557
```bash
56-
podman run -e GH_ORG=fullstack-devops -e GH_REPO=github-runner-testing -e GH_ACCESS_TOKEN=ghp_**** github-runner-base:latest
58+
docker run -e GH_ORG=fullstack-devops -e GH_REPO=github-runner-testing -e GH_ACCESS_TOKEN=ghp_**** github-runner-base:latest
5759
```
5860

5961
> Replace the `ghp_****` with your own valid personal access token
6062
6163
### docker-compose
6264

63-
```yaml
64-
version: "3"
65-
66-
services:
67-
github-runner:
68-
image: github-runner-base:latest
69-
environment:
70-
GH_ORG: fullstack-devops
71-
GH_ACCESS_TOKEN: ghp_****
65+
```bash
66+
cd examples/docker-compose
67+
docker-compose up -d
7268
```
7369

74-
Build images with kaniko:
75-
```yaml
76-
version: "3"
77-
78-
volumes:
79-
kaniko_workspace:
80-
driver: local
81-
82-
services:
83-
github-action-runner:
84-
image: ghcr.io/fullstack-devops/github-actions-runner:base-latest
85-
environment:
86-
GH_ORG: fullstack-devops
87-
GH_ACCESS_TOKEN: ghp_****
88-
KANIKO_ENABLED: "true"
89-
volumes:
90-
- kaniko_workspace:/kaniko/workspace
91-
92-
github-action-runner-kaniko:
93-
image: ghcr.io/fullstack-devops/github-actions-runner:kaniko-sidecar-latest
94-
volumes:
95-
- kaniko_workspace:/kaniko/workspace
70+
### podman
71+
72+
Setup exchange directory (only nessesarry until podman supports emptyDir volumes)
73+
```bash
74+
mkdir /tmp/delme
75+
```
76+
77+
Starting GitHub runner with podman
78+
```bash
79+
cd examples/podman
80+
81+
podman play kube deployment.yml
82+
```
83+
84+
Removing GitHub runner an dumps
85+
```bash
86+
podman pod rm gh-runner-kaniko -f
87+
rm -rf /tmp/delme
9688
```
9789

9890
### kubernetes pod
@@ -101,27 +93,34 @@ services:
10193
apiVersion: v1
10294
kind: Pod
10395
metadata:
104-
name: gha-runner-kaniko
96+
name: gh-runner-kaniko
10597
spec:
10698
volumes:
10799
- name: workspace-volume
108100
emptyDir: {}
109101
containers:
110-
- name: github-actions-runner
111-
image: ghcr.io/fullstack-devops/github-actions-runner:base-latest
102+
- name: kaniko
103+
image: ghcr.io/fullstack-devops/github-actions-runner:kaniko-sidecar-latest
112104
resources: {}
113105
volumeMounts:
114106
- name: workspace-volume
115-
mountPath: /kaniko/workspace/
116-
imagePullPolicy: Never
107+
mountPath: /kaniko/workspace/
108+
imagePullPolicy: IfNotPresent
117109
tty: true
118-
- name: kaniko-sidecar
119-
image: ghcr.io/fullstack-devops/github-actions-runner:kaniko-sidecar-latest
110+
- name: github-actions-runner
111+
image: ghcr.io/fullstack-devops/github-actions-runner:base-latest
120112
resources: {}
113+
env:
114+
- name: GH_ORG
115+
value: "fullstack-devops"
116+
- name: KANIKO_ENABLED
117+
value: true
118+
- name: GH_ACCESS_TOKEN
119+
value: "ghp_*****"
121120
volumeMounts:
122121
- name: workspace-volume
123122
mountPath: /kaniko/workspace/
124-
imagePullPolicy: Never
123+
imagePullPolicy: IfNotPresent
125124
restartPolicy: Never
126125
```
127126

examples/podman/deployment.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: gh-runner-kaniko
5+
spec:
6+
volumes:
7+
- name: workspace-volume
8+
# emptyDir: {}
9+
hostPath:
10+
path: /tmp/delme
11+
type: Directory
12+
containers:
13+
- name: kaniko
14+
image: ghcr.io/fullstack-devops/github-actions-runner:kaniko-sidecar-latest
15+
resources: {}
16+
volumeMounts:
17+
- name: workspace-volume
18+
mountPath: /kaniko/workspace/
19+
imagePullPolicy: IfNotPresent
20+
tty: true
21+
- name: github-actions-runner
22+
image: ghcr.io/fullstack-devops/github-actions-runner:base-latest
23+
resources: {}
24+
env:
25+
- name: GH_ORG
26+
value: "fullstack-devops"
27+
- name: KANIKO_ENABLED
28+
value: true
29+
- name: GH_ACCESS_TOKEN
30+
value: "ghp_*****"
31+
volumeMounts:
32+
- name: workspace-volume
33+
mountPath: /kaniko/workspace/
34+
imagePullPolicy: IfNotPresent
35+
restartPolicy: Never

0 commit comments

Comments
 (0)