debuginfod: initial ansible/openshift work

This commit is contained in:
Frank Ch. Eigler 2021-03-15 17:50:11 -04:00 committed by pingou
parent c6c5bb0b54
commit 496735b1a3
7 changed files with 230 additions and 0 deletions

View file

@ -0,0 +1,56 @@
- name: make the app be real
hosts: os_masters_stg[0]:os_masters[0]
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- role: openshift/project
app: debuginfod
description: Fedora debuginfod server
appowners:
- fche
- amerey
tags:
- apply-appowners
- role: openshift/object
app: debuginfod
file: buildconfig.yml
objectname: buildconfig.yml
- role: openshift/object
app: debuginfod
file: imagestream.yml
objectname: imagestream.yml
- role: openshift/object
app: debuginfod
file: service.yml
objectname: service.yml
- role: openshift/object
app: debuginfod
file: deploymentconfig.yml
objectname: deploymentconfig.yml
- role: openshift/object
app: debuginfod
file: storage.yml
objectname: storage.yml
- role: openshift/route
app: debuginfod
routename: debuginfod
host: "debuginfod{{ env_suffix }}.fedoraproject.org"
serviceport: 8002-tcp
servicename: debuginfod
- role: openshift/start-build
app: debuginfod
buildname: debuginfod-build
objectname: debuginfod-build

View file

@ -0,0 +1,33 @@
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: debuginfod-build
name: debuginfod-build
spec:
runPolicy: Serial
source:
dockerfile: |-
FROM fedora:33
LABEL \
maintainer="Frank Ch. Eigler <fche@redhat.com>" \
name="debuginfod" \
vendor="Fedora Infrastructure"
WORKDIR /
EXPOSE 8002
RUN dnf -y install bsdtar elfutils-debuginfod && \
dnf autoremove -y
type: Dockerfile
strategy:
type: Docker
output:
to:
kind: ImageStreamTag
name: debuginfod:latest
triggers:
- type: ConfigChange
- type: ImageChange
kind: List
metadata: {}

View file

@ -0,0 +1,76 @@
---
apiVersion: v1
kind: DeploymentConfig
metadata:
name: debuginfod
labels:
app: debuginfod
spec:
replicas: 1
selector:
app: debuginfod
deploymentconfig: debuginfod
strategy:
type: Recreate
template:
metadata:
labels:
app: debuginfod
deploymentconfig: debuginfod
spec:
selector:
app: debuginfod
deploymentconfig: debuginfod
containers:
- name: debuginfod
image: debuginfod:latest
command: ["/usr/bin/debuginfod",
"-vvvvv",
"-d", "/tmp/db.sqlite",
"-t", "3600",
"-g", "604800",
"-R", "/mnt",
"-I", "zsh.*\\.fc(30|31|32|33|34|35)\\..*\\.rpm$"]
ports:
- containerPort: 8002
resources:
requests:
memory: 1000Mi
volumeMounts:
- name: debuginfod-volume
mountPath: /var/cache/debuginfod
readOnly: false
- name: koji-volume
mountPath: /mnt
readOnly: true
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /metrics
port: 8002
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
periodSeconds: 30
httpGet:
path: /metrics
port: 8002
volumes:
- name: debuginfod-volume
persistentVolumeClaim:
claimName: debuginfod-volume
- name: koji-volume
persistentVolumeClaim:
claimName: koji-volume
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames: ["debuginfod"]
from:
kind: ImageStreamTag
name: debuginfod:latest

View file

@ -0,0 +1,10 @@
apiVersion: v1
items:
- apiVersion: v1
kind: ImageStream
metadata:
name: debuginfod
labels:
build: debuginfod
kind: List
metadata: {}

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: Route
metadata:
name: debuginfod
labels:
app: debuginfod
spec:
host: debuginfod.fedoraproject.org
to:
kind: Service
name: debuginfod
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect

View file

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: debuginfod
name: debuginfod
spec:
ports:
- name: http
port: 8002
protocol: TCP
targetPort: 8002
selector:
app: debuginfod
deploymentconfig: debuginfod

View file

@ -0,0 +1,26 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: koji-volume
spec:
storageClassName: ""
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 1Mi
volumeName: koji-volume
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: debuginfod-volume
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 300Gi
volumeName: debuginfod-volume