bodhi: Use a base container image to be more efficient.
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
parent
cac31d7323
commit
de5c73901c
2 changed files with 43 additions and 18 deletions
|
@ -77,6 +77,9 @@
|
||||||
key: fedmsg-bodhi.crt
|
key: fedmsg-bodhi.crt
|
||||||
privatefile: fedmsg-certs/keys/bodhi-bodhi-web-temp-bodhi.app.os.fedoraproject.org.crt
|
privatefile: fedmsg-certs/keys/bodhi-bodhi-web-temp-bodhi.app.os.fedoraproject.org.crt
|
||||||
when: env != "staging"
|
when: env != "staging"
|
||||||
|
- role: openshift/imagestream
|
||||||
|
app: bodhi
|
||||||
|
imagename: bodhi-base
|
||||||
- role: openshift/imagestream
|
- role: openshift/imagestream
|
||||||
app: bodhi
|
app: bodhi
|
||||||
imagename: bodhi-web
|
imagename: bodhi-web
|
||||||
|
|
|
@ -4,15 +4,15 @@ items:
|
||||||
kind: BuildConfig
|
kind: BuildConfig
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
build: bodhi-web
|
build: bodhi-base
|
||||||
name: bodhi-web
|
name: bodhi-base
|
||||||
spec:
|
spec:
|
||||||
runPolicy: Serial
|
runPolicy: Serial
|
||||||
source:
|
source:
|
||||||
dockerfile: |-
|
dockerfile: |-
|
||||||
FROM fedora:29
|
FROM fedora:29
|
||||||
LABEL \
|
LABEL \
|
||||||
name="bodhi-web" \
|
name="bodhi-base" \
|
||||||
vendor="Fedora Infrastructure" \
|
vendor="Fedora Infrastructure" \
|
||||||
license="MIT"
|
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 curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
|
||||||
|
@ -21,7 +21,7 @@ items:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# While dnf has a --nodocs, it doesen't have a --docs...
|
# While dnf has a --nodocs, it doesen't have a --docs...
|
||||||
RUN sed -i '/nodocs/d' /etc/dnf/dnf.conf
|
RUN sed -i '/nodocs/d' /etc/dnf/dnf.conf
|
||||||
RUN dnf install -y bodhi-server-{{bodhi_version}} bodhi-docs-{{bodhi_version}} python3-pyramid_sawing
|
RUN dnf install -y bodhi-server-{{bodhi_version}}
|
||||||
# We can drop this block once Bodhi 4.0.0 is deployed to production.
|
# We can drop this block once Bodhi 4.0.0 is deployed to production.
|
||||||
{% if env == "production" %}
|
{% if env == "production" %}
|
||||||
# Put the fedmsg config in place
|
# Put the fedmsg config in place
|
||||||
|
@ -37,8 +37,39 @@ items:
|
||||||
RUN rm -f /etc/krb5.conf && \
|
RUN rm -f /etc/krb5.conf && \
|
||||||
ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \
|
ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \
|
||||||
ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab
|
ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab
|
||||||
EXPOSE 8080
|
|
||||||
ENV USER=openshift
|
ENV USER=openshift
|
||||||
|
type: Dockerfile
|
||||||
|
strategy:
|
||||||
|
type: Docker
|
||||||
|
dockerStrategy:
|
||||||
|
noCache: false
|
||||||
|
output:
|
||||||
|
to:
|
||||||
|
kind: ImageStreamTag
|
||||||
|
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 -y bodhi-docs-{{bodhi_version}} python3-pyramid_sawing
|
||||||
|
# We can drop this block once Bodhi 4.0.0 is deployed to production.
|
||||||
|
EXPOSE 8080
|
||||||
ENTRYPOINT bash /etc/bodhi/start.sh
|
ENTRYPOINT bash /etc/bodhi/start.sh
|
||||||
type: Dockerfile
|
type: Dockerfile
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -66,23 +97,14 @@ items:
|
||||||
runPolicy: Serial
|
runPolicy: Serial
|
||||||
source:
|
source:
|
||||||
dockerfile: |-
|
dockerfile: |-
|
||||||
FROM fedora:29
|
FROM bodhi-base
|
||||||
LABEL \
|
LABEL \
|
||||||
name="bodhi-consumer" \
|
name="bodhi-consumer" \
|
||||||
vendor="Fedora Infrastructure" \
|
vendor="Fedora Infrastructure" \
|
||||||
license="MIT"
|
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
|
# We only need the composer here because the consumer does not conditionally import the
|
||||||
{% if env == "staging" %}
|
# composer code. This should be fixed in a future Bodhi release.
|
||||||
RUN curl -o /etc/yum.repos.d/infra-tags-stg.repo https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags-stg.repo
|
RUN dnf install -y bodhi-composer-{{bodhi_version}}
|
||||||
{% endif %}
|
|
||||||
# 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-composer-{{bodhi_version}} bodhi-server-{{bodhi_version}}
|
|
||||||
# Set up krb5
|
|
||||||
RUN rm -f /etc/krb5.conf && \
|
|
||||||
ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \
|
|
||||||
ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab
|
|
||||||
ENV USER=openshift
|
|
||||||
ENTRYPOINT /usr/bin/fedora-messaging consume
|
ENTRYPOINT /usr/bin/fedora-messaging consume
|
||||||
type: Dockerfile
|
type: Dockerfile
|
||||||
strategy:
|
strategy:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue