Initial bodhi stuff

Signed-off-by: Ricky Elrod <relrod@redhat.com>
This commit is contained in:
Ricky Elrod
2018-04-12 22:32:19 +00:00
parent b1bd250ca8
commit 7cff09ba36
6 changed files with 151 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: bodhi-web
name: bodhi-web
spec:
runPolicy: Serial
source:
dockerfile: |-
FROM fedora:latest
LABEL \
name="bodhi-web" \
vendor="Fedora Infrastructure" \
license="MIT"
RUN curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
RUN dnf install -y bodhi-server python2-gunicorn
EXPOSE 8080
ENTRYPOINT python-gunicorn --bind 0.0.0.0:8080 --access-logfile=- /usr/share/bodhi/bodhi.wsgi
type: Dockerfile
strategy:
type: Docker
output:
to:
kind: ImageStreamTag
name: bodhi-web:latest
kind: List
metadata: {}

View File

@@ -0,0 +1,71 @@
apiVersion: v1
items:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: bodhi
service: web
name: bodhi-web
spec:
replicas: 2
selector:
deploymentconfig: bodhi-web
strategy:
activeDeadlineSeconds: 21600
recreateParams:
timeoutSeconds: 600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
app: bodhi-web
deploymentconfig: bodhi-web
spec:
containers:
- name: bodhi-web
image: bodhi-web:latest
ports:
- containerPort: 8080
resources: {}
volumeMounts:
- name: config-volume
mountPath: /etc/bodhi
readOnly: true
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
volumes:
- name: config-volume
configMap:
name: bodhi-configmap
triggers:
- imageChangeParams:
automatic: true
containerNames:
- bodhi-web
from:
kind: ImageStreamTag
name: bodhi-web:latest
namespace: bodhi
type: ImageChange
- type: ConfigChange
kind: List
metadata: {}

View File

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

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Route
metadata:
name: bodhi-web
labels:
app: bodhi
spec:
port:
targetPort: web
to:
kind: Service
name: bodhi-web
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: bodhi-web
labels:
app: bodhi
service: web
namespace: bodhi
spec:
ports:
- name: web
port: 8080
targetPort: 8080
selector:
deploymentconfig: bodhi-web

View File

@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: bodhi-configmap
labels:
app: bodhi
data:
production.ini: |-
{% include "{{ ansible }}/roles/bodhi2/base/templates/production.ini.j2" %}