bodhi: version 5.2 in production, also enable celery-beat in production

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2020-03-23 09:13:59 +01:00 committed by Pierre-Yves Chibon
parent 6d1a2f1373
commit 3b92a8e3c7
7 changed files with 7 additions and 175 deletions

View file

@ -12,5 +12,5 @@ nagios_Check_Services:
# Set some bodhi variables here.
# Since they are used when running playbooks against the master nodes.
#
bodhi_version: 5.1.1-1.fc30
bodhi_version: 5.2.0-1.fc30
bodhi_openshift_pods: 2

View file

@ -11,5 +11,5 @@ nagios_Check_Services:
# Set some bodhi variables here.
# Since they are used when running playbooks against the master nodes.
#
bodhi_version: 5.1.1-1.fc30
bodhi_version: 5.2.0-1.fc30
bodhi_openshift_pods: 1

View file

@ -91,18 +91,6 @@
- role: openshift/imagestream
app: bodhi
imagename: bodhi-base
- role: openshift/imagestream
app: bodhi
imagename: bodhi-web
- role: openshift/imagestream
app: bodhi
imagename: bodhi-consumer
- role: openshift/imagestream
app: bodhi
imagename: bodhi-celery
- role: openshift/imagestream
app: bodhi
imagename: bodhi-celery-beat
- role: openshift/object
app: bodhi
template: buildconfig.yml

View file

@ -184,7 +184,7 @@
user: apache
job: "/usr/bin/bodhi-approve-testing /etc/bodhi/production.ini > /dev/null"
cron_file: bodhi-approve-testing-job
state: "{{ (env == 'production')|ternary('present', 'absent') }}"
state: absent
tags:
- config
- bodhi
@ -198,7 +198,7 @@
user: apache
job: "/usr/bin/bodhi-check-policies >& /dev/null"
cron_file: bodhi-check-policies-job
state: "{{ (env == 'production')|ternary('present', 'absent') }}"
state: absent
tags:
- config
- bodhi
@ -212,7 +212,7 @@
user: root
job: "/usr/bin/bodhi-clean-old-composes 2>&1 | logger -t bodhi-clean-old-composes"
cron_file: bodhi-clean-old-composes
state: "{{ (env == 'production')|ternary('present', 'absent') }}"
state: absent
tags:
- config
- bodhi
@ -226,7 +226,7 @@
user: apache
job: "/usr/bin/bodhi-expire-overrides /etc/bodhi/production.ini 2>&1 | logger -t bodhi-expire-overrides"
cron_file: bodhi-expire-overrides-job
state: "{{ (env == 'production')|ternary('present', 'absent') }}"
state: absent
tags:
- config
- bodhi

View file

@ -39,9 +39,7 @@ task_routes = {
'clean_old_composes': {'queue': 'has_koji_mount'},
}
{% if env == "staging" %}
# Periodic tasks
beat_schedule = {
"approve-testing": {
"task": "approve_testing",
@ -63,4 +61,3 @@ beat_schedule = {
}
beat_schedule_filename = "/tmp/celery-beat-schedule"
{% endif %}

View file

@ -18,7 +18,7 @@ items:
RUN curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
# While dnf has a --nodocs, it doesen't have a --docs...
RUN sed -i '/nodocs/d' /etc/dnf/dnf.conf
RUN dnf install -y bodhi-server-{{bodhi_version}} && \
RUN dnf install -y bodhi-server-{{bodhi_version}} bodhi-docs-{{bodhi_version}} python3-pyramid_sawing && \
curl -o /usr/lib/python3.7/site-packages/bodhi/server/templates/errors.html https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/bodhi/errors.html
# Set up krb5
RUN rm -f /etc/krb5.conf && \
@ -36,114 +36,3 @@ items:
name: bodhi-base:latest
kind: List
metadata: {}
---
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: bodhi-web
name: bodhi-web
spec:
runPolicy: Serial
source:
dockerfile: |-
FROM bodhi-base
LABEL \
name="bodhi-web" \
vendor="Fedora Infrastructure" \
license="MIT"
#RUN dnf install --refresh -y bodhi-docs-{{bodhi_version}} python3-pyramid_sawing
RUN dnf install --refresh -y https://kojipkgs.fedoraproject.org//packages/bodhi/5.1.0/2.fc30.infra/noarch/bodhi-docs-5.1.0-2.fc30.infra.noarch.rpm python3-pyramid_sawing
EXPOSE 8080
ENTRYPOINT bash /etc/bodhi/start.sh
type: Dockerfile
strategy:
type: Docker
dockerStrategy:
from:
kind: "ImageStreamTag"
name: "bodhi-base:latest"
noCache: false
triggers:
- type: "imageChange"
imageChange: {}
output:
to:
kind: ImageStreamTag
name: bodhi-web:latest
kind: List
metadata: {}
---
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: bodhi-consumer
name: bodhi-consumer
spec:
runPolicy: Serial
source:
dockerfile: |-
FROM bodhi-base
LABEL \
name="bodhi-consumer" \
vendor="Fedora Infrastructure" \
license="MIT"
ENTRYPOINT /usr/bin/fedora-messaging consume
type: Dockerfile
strategy:
type: Docker
dockerStrategy:
from:
kind: "ImageStreamTag"
name: "bodhi-base:latest"
noCache: false
triggers:
- type: "imageChange"
imageChange: {}
output:
to:
kind: ImageStreamTag
name: bodhi-consumer:latest
kind: List
metadata: {}
---
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: bodhi-celery
name: bodhi-celery
spec:
runPolicy: Serial
source:
dockerfile: |-
FROM bodhi-base
LABEL \
name="bodhi-celery" \
vendor="Fedora Infrastructure" \
license="MIT"
ENTRYPOINT /usr/bin/celery worker -A bodhi.server.tasks.app -l info -Q celery
type: Dockerfile
strategy:
type: Docker
dockerStrategy:
from:
kind: "ImageStreamTag"
name: "bodhi-base:latest"
noCache: false
triggers:
- type: "imageChange"
imageChange: {}
output:
to:
kind: ImageStreamTag
name: bodhi-celery:latest
kind: List
metadata: {}

View file

@ -57,13 +57,9 @@ items:
spec:
containers:
- name: bodhi-web
{% if env == "staging" %}
image: bodhi-base:latest
command: ["bash"]
args: ["/etc/bodhi/start.sh"]
{% else %}
image: bodhi-web:latest
{% endif %}
ports:
- containerPort: 8080
resources: {}
@ -95,22 +91,14 @@ items:
timeoutSeconds: 10
initialDelaySeconds: 5
httpGet:
{% if env == "staging" %}
path: /healthz/ready
{% else %}
path: /
{% endif %}
port: 8080
livenessProbe:
timeoutSeconds: 10
initialDelaySeconds: 30
periodSeconds: 30
httpGet:
{% if env == "staging" %}
path: /healthz/live
{% else %}
path: /
{% endif %}
port: 8080
volumes:
- name: config-volume
@ -140,11 +128,7 @@ items:
- bodhi-web
from:
kind: ImageStreamTag
{% if env == "staging" %}
name: bodhi-base:latest
{% else %}
name: bodhi-web:latest
{% endif %}
namespace: bodhi
type: ImageChange
- type: ConfigChange
@ -189,13 +173,9 @@ items:
spec:
containers:
- name: bodhi-consumer
{% if env == "staging" %}
image: bodhi-base:latest
command: ["/usr/bin/fedora-messaging"]
args: ["consume"]
{% else %}
image: bodhi-consumer:latest
{% endif %}
resources: {}
volumeMounts:
- name: config-volume
@ -245,11 +225,7 @@ items:
- bodhi-consumer
from:
kind: ImageStreamTag
{% if env == "staging" %}
name: bodhi-base:latest
{% else %}
name: bodhi-consumer:latest
{% endif %}
namespace: bodhi
type: ImageChange
- type: ConfigChange
@ -294,13 +270,9 @@ items:
spec:
containers:
- name: bodhi-celery
{% if env == "staging" %}
image: bodhi-base:latest
command: ["/usr/bin/celery"]
args: ["worker", "-A", "bodhi.server.tasks.app", "-l", "info", "-Q", "celery"]
{% else %}
image: bodhi-celery:latest
{% endif %}
resources: {}
volumeMounts:
- name: config-volume
@ -350,17 +322,12 @@ items:
- bodhi-celery
from:
kind: ImageStreamTag
{% if env == "staging" %}
name: bodhi-base:latest
{% else %}
name: bodhi-celery:latest
{% endif %}
namespace: bodhi
type: ImageChange
- type: ConfigChange
kind: List
metadata: {}
{% if env == "staging" %}
---
apiVersion: v1
items:
@ -397,14 +364,10 @@ items:
spec:
containers:
- name: bodhi-celery-beat
{% if env == "staging" %}
image: bodhi-base:latest
workingDir: "/tmp"
command: ["/usr/bin/celery"]
args: ["beat", "-A", "bodhi.server.tasks.app", "-l", "info"]
{% else %}
image: bodhi-celery-beat:latest
{% endif %}
resources: {}
volumeMounts:
- name: config-volume
@ -454,14 +417,9 @@ items:
- bodhi-celery-beat
from:
kind: ImageStreamTag
{% if env == "staging" %}
name: bodhi-base:latest
{% else %}
name: bodhi-celery-beat:latest
{% endif %}
namespace: bodhi
type: ImageChange
- type: ConfigChange
kind: List
metadata: {}
{% endif %}