Skip to content

Commit 1857f18

Browse files
author
Erwan BERNARD
authored
Merge pull request #39 from scality/feature/RELENG-4568/patch-rebooting-errors
[RELENG-4568] patch-rebooting-errors
2 parents 949f5c8 + 16102cb commit 1857f18

22 files changed

+276
-42
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.env
2+
.gitignore
3+
config_example.yml
4+
docker-compose.yml
5+
Dockerfile
6+
README.md

.github/workflows/tests.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ jobs:
2323

2424
- name: Set up Docker Buildk
2525
uses: docker/setup-buildx-action@v1
26+
27+
- name: Cache Docker layers
28+
uses: actions/cache@v2
2629
with:
27-
buildkitd-flags: --debug
30+
path: /tmp/.buildx-cache
31+
# Key is named differently to avoid collision
32+
key: ${{ runner.os }}-multi-buildx-${{ github.sha }}
33+
restore-keys: |
34+
${{ runner.os }}-multi-buildx
2835
2936
- name: Login to Registry
3037
uses: docker/login-action@v1
@@ -40,6 +47,16 @@ jobs:
4047
file: ./test.Dockerfile
4148
push: true
4249
tags: "ghcr.io/${{ github.repository }}:${{ github.sha }}"
50+
cache-from: type=local,src=/tmp/.buildx-cache
51+
# Note the mode=max here
52+
# More: https://github.com/moby/buildkit#--export-cache-options
53+
# And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
54+
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
55+
56+
- name: Move cache
57+
run: |
58+
rm -rf /tmp/.buildx-cache
59+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
4360
4461
lint:
4562
runs-on: ubuntu-latest
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: redis
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 11.3.4
5+
digest: sha256:59dd6d6aaa362dc8d29b59ca16413dfc304b0daa940b4aa06c8b01ba67cba927
6+
generated: "2021-09-20T14:16:25.327127092+02:00"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
dependencies:
3+
- name: redis
4+
version: "11.3.4"
5+
repository: "https://charts.bitnami.com/bitnami"

charts/openstack-actions-runner/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ spec:
3737
args: ["--settings-file", "/app/config/settings.yml"]
3838
resources:
3939
{{- toYaml .Values.resources | nindent 12 }}
40+
env:
41+
- name: REDIS_PASSWORD
42+
valueFrom:
43+
secretKeyRef:
44+
name: {{ .Values.redis.fullnameOverride }}
45+
key: redis-password
4046
envFrom:
4147
- configMapRef:
4248
name: {{ .Release.Name }}-config

charts/openstack-actions-runner/templates/settings.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ data:
1212
{{ .Values.runnerPool | toYaml | indent 6 }}
1313
extra_runner_timer:
1414
{{ .Values.extraRunnerTimer | toYaml | indent 6 }}
15+
redis:
16+
host: {{ .Values.redis.fullnameOverride }}-master
17+
port: {{ .Values.redis.redisPort }}

charts/openstack-actions-runner/values.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ cloudNineRegion: ""
7171
# The python module, used for configuration
7272
# example:
7373
# 'runners_manager.settings.settings_local'
74-
pythonConfigModule: "runners_manager.settings.settings_tests"
74+
pythonConfigModule: ""
7575

7676
# Represent the infos about each group of runners
7777
# Define by:
@@ -93,3 +93,12 @@ runnerPool: []
9393
extraRunnerTimer:
9494
minutes: 10
9595
hours: 0
96+
97+
98+
# Redis database config
99+
redis:
100+
fullnameOverride: redis
101+
redisPort: 6379
102+
networkPolicy:
103+
enabled: true
104+

config_example.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ runner_pool: []
3232
extra_runner_timer:
3333
minutes: 10
3434
hours: 0
35+
36+
# Define the credentials to connect your redis database
37+
redis:
38+
host: redis
39+
port: 6379

constraints.txt

Whitespace-only changes.

docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: "3.9"
2+
services:
3+
web:
4+
build: .
5+
command:
6+
- python3
7+
- /app/runners_manager/start.py
8+
- --settings-file=/app/settings.yaml
9+
volumes:
10+
- ./runners_manager:/app/runners_manager
11+
- ./settings.yaml:/app/settings.yaml
12+
depends_on:
13+
- redis
14+
env_file:
15+
- .env
16+
environment:
17+
- PYTHONUNBUFFERED=0
18+
- PYTHONIOENCODING=UTF-8
19+
redis:
20+
image: "redis:alpine"

0 commit comments

Comments
 (0)