MDAPI: Update openshift to use nfs storage and fedora-messaging

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2019-01-23 14:59:50 +01:00
parent f4abd29037
commit e0712a00b2
6 changed files with 46 additions and 6 deletions

View file

@ -26,6 +26,11 @@
template: buildconfig.yml
objectname: buildconfig.yml
- role: openshift/object
app: mdapi
file: storage.yml
objectname: storage.yml
- role: openshift/object
app: mdapi
template: configmap.yml

View file

@ -22,10 +22,18 @@ spec:
readOnly: true
- mountPath: /var/tmp
name: data-volume
- mountPath: /etc/fedora-messaging/
name: fedora-messaging-config-volume
readOnly: true
restartPolicy: Never
volumes:
- configMap:
- name: config-volume
configMap:
defaultMode: 420
name: mdapi-configmap
name: config-volume
- name: data-volume
persistentVolumeClaim:
claimName: mdapi-storage
- name: fedora-messaging-config-volume
configMap:
name: fedora-messaging-configmap

View file

@ -46,6 +46,8 @@ spec:
configMap:
name: mdapi-configmap
- name: data-volume
persistentVolumeClaim:
claimName: mdapi-storage
triggers:
- type: ImageChange
imageChangeParams:

View file

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mdapi-storage
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View file

@ -7,9 +7,9 @@ metadata:
spec:
source:
git:
uri: https://pagure.io/forks/cverna/mdapi.git
uri: https://pagure.io/mdapi.git
{% if env == 'staging' %}
ref: "container_app"
ref: "master"
{% else %}
ref: "production"
{% endif %}

View file

@ -17,3 +17,18 @@ data:
KOJI_REPO = 'https://koji.fedoraproject.org/repos/'
DL_SERVER = 'http://dl.phx2.fedoraproject.org'
{% endif %}
config.toml: |-
amqp_url = "amqps://messaging-bridge{{ env_suffix }}.fedoraproject.org:@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/%2Fpubsub"
publish_exchange = "amq.topic"
[tls]
ca_cert = "/etc/pki/rabbitmq/ca/rabbitmq-ca.crt"
keyfile = "/etc/pki/rabbitmq/key/rabbitmq-NAME_OF_CERT.key"
certfile = "/etc/pki/rabbitmq/crt/rabbitmq-NAME_OF_CERT.crt"
[client_properties]
app = "mdapi"
[qos]
prefetch_size = 0
prefetch_count = 25