Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
geryonghost committed Dec 12, 2023
1 parent 4661ff0 commit f7c9619
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
steps:
- name: Check Docker installation
run: docker --version
- name: Start Docker daemon
run: sudo systemctl start docker
- name: Check Docker Info
run: docker info

# - run: sudo -i
# - name: Setup Docker
Expand Down
55 changes: 55 additions & 0 deletions actions/runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM --platform= summerwind/actions-runner-dind:latest




# FROM mcr.microsoft.com/dotnet/runtime-deps:6.0 as build

# # Replace value with the latest runner release version
# # source: https://github.com/actions/runner/releases
# # ex: 2.303.0
# ARG RUNNER_VERSION="2.311.0"
# ARG RUNNER_ARCH="arm64"
# # Replace value with the latest runner-container-hooks release version
# # source: https://github.com/actions/runner-container-hooks/releases
# # ex: 0.3.1
# ARG RUNNER_CONTAINER_HOOKS_VERSION="0.5.0"

# ENV DEBIAN_FRONTEND=noninteractive
# ENV RUNNER_MANUALLY_TRAP_SIG=1
# ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1

# RUN apt update -y && apt install curl unzip -y

# # Add Docker's official GPG key:
# RUN apt-get update && \
# apt-get install ca-certificates curl gnupg -y && \
# install -m 0755 -d /etc/apt/keyrings && \
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
# chmod a+r /etc/apt/keyrings/docker.gpg && \
# # Add the repository to Apt sources:
# echo \
# "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
# $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
# tee /etc/apt/sources.list.d/docker.list > /dev/null && \
# apt-get update && \
# apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# RUN adduser --disabled-password --gecos "" --uid 1001 runner \
# && groupadd docker --gid 123 \
# && usermod -aG sudo runner \
# && usermod -aG docker runner \
# && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
# && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers

# WORKDIR /home/runner

# RUN curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${RUNNER_ARCH}-${RUNNER_VERSION}.tar.gz \
# && tar xzf ./runner.tar.gz \
# && rm runner.tar.gz

# RUN curl -f -L -o runner-container-hooks.zip https://github.com/actions/runner-container-hooks/releases/download/v${RUNNER_CONTAINER_HOOKS_VERSION}/actions-runner-hooks-k8s-${RUNNER_CONTAINER_HOOKS_VERSION}.zip \
# && unzip ./runner-container-hooks.zip -d ./k8s \
# && rm runner-container-hooks.zip

# USER runner
10 changes: 8 additions & 2 deletions kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ ssh and kubectl via ssh
# Local Docker Registry
`docker run -d -p 5000:5000 --restart=always --name=comtilyhub registry`

# Create Docker for Actions Runner
```
cd /Users/geryonghost/gitrepos/comtily/actions/runner
docker build --tag localhost:5000/actions_runner .
docker push localhost:5000/actions_runner
```

# Create Docker for Not Scrap Yet
```
cd /Users/geryonghost/gitrepos/notscrapyet/app
Expand Down Expand Up @@ -103,8 +110,7 @@ helm upgrade --install arc \
helm upgrade --install arc-runner-set \
oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set \
--namespace github-actions-runners \
--set githubConfigUrl="https://github.com/comtily" \
--set githubConfigSecret=gha-arc
-f gha-runner-controller.yaml
```
Expand Down
39 changes: 9 additions & 30 deletions kubernetes/gha-runner-controller.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
replicaCount: 1
webhookPort: 9443
syncPeriod: 1m
defaultScaleDownDelay: 5m
enableLeaderElection: true

authSecret:
enabled: true
create: false
name: "controller-manager"

image:
repository: "summerwind/actions-runner-controller"
actionsRunnerRepositoryAndTag: "summerwind/actions-runner:ubuntu-20.04"
dindSidecarRepositoryAndTag: "docker:dind"
pullPolicy: IfNotPresent

serviceAccount:
create: true

service:
type: ClusterIP
port: 443

certManagerEnabled: true

logFormat: text

githubWebhookServer:
enabled: false
githubConfigUrl: "https://github.com/comtily"

githubConfigSecret: gha-arc
template:
spec:
containers:
- name: runner
image: localhost:5000/actions_runner
command: ["/home/runner/run.sh"]

0 comments on commit f7c9619

Please sign in to comment.