debuginfod: initial ansible/openshift work
This commit is contained in:
parent
c6c5bb0b54
commit
496735b1a3
7 changed files with 230 additions and 0 deletions
56
playbooks/openshift-apps/debuginfod.yml
Normal file
56
playbooks/openshift-apps/debuginfod.yml
Normal 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
|
33
roles/openshift-apps/debuginfod/files/buildconfig.yml
Normal file
33
roles/openshift-apps/debuginfod/files/buildconfig.yml
Normal 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: {}
|
76
roles/openshift-apps/debuginfod/files/deploymentconfig.yml
Normal file
76
roles/openshift-apps/debuginfod/files/deploymentconfig.yml
Normal 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
|
||||
|
||||
|
10
roles/openshift-apps/debuginfod/files/imagestream.yml
Normal file
10
roles/openshift-apps/debuginfod/files/imagestream.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
apiVersion: v1
|
||||
items:
|
||||
- apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: debuginfod
|
||||
labels:
|
||||
build: debuginfod
|
||||
kind: List
|
||||
metadata: {}
|
14
roles/openshift-apps/debuginfod/files/route.yml
Normal file
14
roles/openshift-apps/debuginfod/files/route.yml
Normal 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
|
15
roles/openshift-apps/debuginfod/files/service.yml
Normal file
15
roles/openshift-apps/debuginfod/files/service.yml
Normal 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
|
26
roles/openshift-apps/debuginfod/files/storage.yml
Normal file
26
roles/openshift-apps/debuginfod/files/storage.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue