[indico-web] Import OSCP template from https://github.com/indico/indico-containers



commit 982068c6ce08b5b2013ec5359401202e036941d4
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Nov 26 16:18:35 2019 +0100

    Import OSCP template from https://github.com/indico/indico-containers

 oscp.yml | 805 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 805 insertions(+)
---
diff --git a/oscp.yml b/oscp.yml
new file mode 100644
index 0000000..5cef7ee
--- /dev/null
+++ b/oscp.yml
@@ -0,0 +1,805 @@
+apiVersion: v1
+kind: Template
+metadata:
+  name: indico
+  annotations:
+    description: "Indico Openshift template"
+    tags: "events, conferences"
+parameters:
+  - name: USE_EXTERNAL_DB
+    description: Whether an external DB will be used ('y' or 'n').
+    value: "y"
+objects:
+
+### Image streams
+
+- apiVersion: v1
+  kind: ImageStream
+  metadata:
+    creationTimestamp: null
+    name: indico-worker
+  spec: {}
+
+- apiVersion: v1
+  kind: ImageStream
+  metadata:
+    creationTimestamp: null
+    name: indico-worker-custom
+  spec: {}
+
+- apiVersion: v1
+  kind: ImageStream
+  metadata:
+    creationTimestamp: null
+    name: indico-static
+  spec: {}
+
+- apiVersion: v1
+  kind: ImageStream
+  metadata:
+    creationTimestamp: null
+    name: indico-krbclient
+  spec: {}
+
+- apiVersion: v1
+  kind: ImageStream
+  metadata:
+    creationTimestamp: null
+    name: indico-redis
+  spec:
+    tags:
+    - annotations: null
+      from:
+        kind: DockerImage
+        name: redis
+      generation: null
+      importPolicy: {}
+      name: latest
+
+### Build configurations
+
+- apiVersion: v1
+  kind: BuildConfig
+  metadata:
+    creationTimestamp: null
+    name: indico-static
+  spec:
+    nodeSelector: null
+    output:
+      to:
+        kind: ImageStreamTag
+        name: indico-static:latest
+    postCommit: {}
+    resources:
+      limits:
+        cpu: 400m
+        memory: 2Gi
+      requests:
+        cpu: 100m
+        memory: 512Mi
+    runPolicy: Serial
+    source:
+      contextDir: indico/static/
+      git:
+        ref: master
+        uri: https://github.com/indico/indico-containers.git
+      type: Git
+    strategy:
+      dockerStrategy:
+        noCache: true
+      type: Docker
+    triggers:
+    - type: ConfigChange
+    - type: ImageChange
+  status:
+    lastVersion: 0
+
+
+- apiVersion: v1
+  kind: BuildConfig
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web
+    name: indico-worker
+  spec:
+    nodeSelector: null
+    output:
+      to:
+        kind: ImageStreamTag
+        name: 'indico-worker-custom:stable'
+    postCommit: {}
+    resources:
+      limits:
+        cpu: 400m
+        memory: 2Gi
+      requests:
+        cpu: 100m
+        memory: 512Mi
+    runPolicy: Serial
+    source:
+      dockerfile: |
+        # the FROM line is ignored
+        FROM getindico/indico:2.1.3
+
+        ENV INDICO_VIRTUALENV="/opt/indico/.venv/bin"
+        ARG pip="${INDICO_VIRTUALENV}/pip"
+        ARG plugins=""
+
+        USER root
+        RUN IFS=',' read -ra PLUGIN_ARRAY <<< "$plugins"; \
+        for plugin in "${PLUGIN_ARRAY[@]}"; do \
+            ${pip} install $plugin; \
+        done
+      type: Dockerfile
+    strategy:
+      dockerStrategy:
+        from:
+          kind: ImageStreamTag
+          name: 'indico:stable'
+        noCache: true
+      type: Docker
+  status:
+    lastVersion: 0
+
+- apiVersion: v1
+  kind: BuildConfig
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web
+    name: indico-krbclient
+  spec:
+    nodeSelector: null
+    output:
+      to:
+        kind: ImageStreamTag
+        name: indico-krbclient:latest
+    postCommit: {}
+    resources:
+      limits:
+        cpu: 400m
+        memory: 2Gi
+      requests:
+        cpu: 100m
+        memory: 512Mi
+    runPolicy: Serial
+    source:
+      contextDir: indico/krbclient/
+      git:
+        ref: master
+        uri: https://github.com/indico/indico-containers.git
+      type: Git
+    strategy:
+      dockerStrategy:
+        noCache: true
+      type: Docker
+    triggers:
+    - type: ConfigChange
+    - type: ImageChange
+  status:
+    lastVersion: 0
+
+### Persistent Volume claims
+
+- apiVersion: v1
+  kind: PersistentVolumeClaim
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web-claim0
+    name: indico-web-claim0
+  spec:
+    accessModes:
+    - ReadWriteOnce
+    resources:
+      requests:
+        storage: 100Mi
+  status: {}
+
+- apiVersion: v1
+  kind: PersistentVolumeClaim
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web-claim1
+    name: indico-web-claim1
+  spec:
+    accessModes:
+    - ReadWriteOnce
+    resources:
+      requests:
+        storage: 100Mi
+  status: {}
+
+- apiVersion: v1
+  kind: PersistentVolumeClaim
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: customization
+    name: customization
+  spec:
+    accessModes:
+    - ReadWriteOnce
+    resources:
+      requests:
+        storage: 100Mi
+  status: {}
+
+- apiVersion: v1
+  kind: PersistentVolumeClaim
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-redis-claim0
+    name: indico-redis-claim0
+  spec:
+    accessModes:
+    - ReadWriteOnce
+    resources:
+      requests:
+        storage: 100Mi
+  status: {}
+
+- apiVersion: v1
+  kind: PersistentVolumeClaim
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: krbclient
+    name: krbclient
+  spec:
+    accessModes:
+    - ReadWriteOnce
+    resources:
+      requests:
+        storage: 10Mi
+  status: {}
+
+### Deployment configurations
+
+- apiVersion: v1
+  kind: DeploymentConfig
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web
+    name: indico-web
+  spec:
+    replicas: 1
+    selector:
+      io.kompose.service: indico-web
+    strategy:
+      resources: {}
+    template:
+      metadata:
+        creationTimestamp: null
+        labels:
+          io.kompose.service: indico-web
+      spec:
+        containers:
+        - name: krbclient
+          image: ' '
+          env:
+          - name: KEYTAB_USER
+          - name: KEYTAB_PWD
+          resources:
+            limits:
+              cpu: 400m
+              memory: 100Mi
+            requests:
+              cpu: 200m
+              memory: 50Mi
+          volumeMounts:
+          - mountPath: /var/run/keytab
+            name: krbclient
+        - name: indico-web
+          image: ' '
+          args:
+          - ./opt/indico/run_indico.sh
+          livenessProbe:
+            exec:
+              command:
+              - curl
+              - 127.0.0.1:59999/contact
+            initialDelaySeconds: 120
+            timeoutSeconds: 20
+          readinessProbe:
+            exec:
+              command:
+              - curl
+              - 127.0.0.1:59999/contact
+            initialDelaySeconds: 60
+            timeoutSeconds: 20
+          env:
+          - name: SERVICE_PROTOCOL
+            valueFrom:
+              configMapKeyRef:
+                key: serviceprotocol
+                name: settings
+          - name: SERVICE_HOSTNAME
+            valueFrom:
+              configMapKeyRef:
+                key: servicehost
+                name: settings
+          - name: SERVICE_PORT
+            valueFrom:
+              configMapKeyRef:
+                key: serviceport
+                name: settings
+          - name: PGHOST
+            valueFrom:
+              configMapKeyRef:
+                key: pghost
+                name: settings
+          - name: PGUSER
+            valueFrom:
+              configMapKeyRef:
+                key: pguser
+                name: settings
+          - name: PGPASSWORD
+            valueFrom:
+              configMapKeyRef:
+                key: pgpassword
+                name: settings
+          - name: PGDATABASE
+            valueFrom:
+              configMapKeyRef:
+                key: pgdatabase
+                name: settings
+          - name: PGPORT
+            valueFrom:
+              configMapKeyRef:
+                key: pgport
+                name: settings
+          - name: SENTRY_DSN
+            valueFrom:
+              configMapKeyRef:
+                key: sentrydsn
+                name: settings
+          - name: SECRET_KEY
+            valueFrom:
+              configMapKeyRef:
+                key: secretkey
+                name: settings
+          - name: INDICO_STORAGE_DICT
+            valueFrom:
+                configMapKeyRef:
+                  key: storage
+                  name: settings
+          - name: ATTACHMENT_STORAGE
+            valueFrom:
+                configMapKeyRef:
+                  key: attachmentstorage
+                  name: settings
+          - name: SMTP_SERVER
+          - name: SMTP_PORT
+          - name: SMTP_LOGIN
+          - name: SMTP_PASSWORD
+          - name: SMTP_USE_TLS
+          - name: INDICO_SUPPORT_EMAIL
+          - name: INDICO_PUBLIC_SUPPORT_EMAIL
+          - name: INDICO_NO_REPLY_EMAIL
+          - name: INDICO_DEFAULT_TIMEZONE
+          - name: INDICO_DEFAULT_LOCALE
+          - name: INDICO_ROUTE_OLD_URLS
+          - name: INDICO_CHECKIN_APP_CLIENT_ID
+          - name: INDICO_CUSTOMIZATION_DIR
+          - name: INDICO_CUSTOMIZATION_DEBUG
+          - name: INDICO_LOGO_URL
+          - name: REDIS_CACHE_URL
+            value: redis://indico-redis:6379/1
+          - name: CELERY_BROKER
+            value: redis://indico-redis:6379/0
+          - name: SQLALCHEMY_DATABASE_URI
+          - name: C_FORCE_ROOT
+            value: "true"
+          - name: USE_EXTERNAL_DB
+            value: ${USE_EXTERNAL_DB}
+          ports:
+          - containerPort: 59999
+          resources:
+            limits:
+              cpu: 800m
+              memory: 2Gi
+            requests:
+              cpu: 400m
+              memory: 512Mi
+          volumeMounts:
+          - mountPath: /opt/indico/archive
+            name: indico-web-claim0
+          - mountPath: /opt/indico/custom
+            name: customization
+          - mountPath: /opt/indico/tmp
+            name: indico-web-tmpfs0
+          - mountPath: /var/run/keytab
+            name: krbclient
+        restartPolicy: Always
+        volumes:
+        - name: indico-web-claim0
+          persistentVolumeClaim:
+            claimName: indico-web-claim0
+        - name: indico-web-claim1
+          persistentVolumeClaim:
+            claimName: indico-web-claim1
+        - name: customization
+          persistentVolumeClaim:
+            claimName: customization
+        - name: krbclient
+          persistentVolumeClaim:
+            claimName: krbclient
+        - emptyDir:
+            medium: Memory
+          name: indico-web-tmpfs0
+    test: false
+    triggers:
+    - type: ConfigChange
+    - type: ImageChange
+      imageChangeParams:
+        automatic: true
+        containerNames:
+        - indico-web
+        from:
+          kind: ImageStreamTag
+          name: indico-worker-custom:stable
+    - type: ImageChange
+      imageChangeParams:
+        automatic: true
+        containerNames:
+        - krbclient
+        from:
+          kind: ImageStreamTag
+          name: indico-krbclient:latest
+  status: {}
+
+- apiVersion: v1
+  kind: DeploymentConfig
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-celery
+    name: indico-celery
+  spec:
+    replicas: 1
+    selector:
+      io.kompose.service: indico-celery
+    strategy:
+      resources: {}
+    template:
+      metadata:
+        creationTimestamp: null
+        labels:
+          io.kompose.service: indico-celery
+      spec:
+        containers:
+        - args:
+          - ./opt/indico/run_celery.sh
+          env:
+          - name: SERVICE_PROTOCOL
+            valueFrom:
+              configMapKeyRef:
+                key: serviceprotocol
+                name: settings
+          - name: SERVICE_HOSTNAME
+            valueFrom:
+              configMapKeyRef:
+                key: servicehost
+                name: settings
+          - name: SERVICE_PORT
+            valueFrom:
+              configMapKeyRef:
+                key: serviceport
+                name: settings
+          - name: PGHOST
+            valueFrom:
+              configMapKeyRef:
+                key: pghost
+                name: settings
+          - name: PGUSER
+            valueFrom:
+              configMapKeyRef:
+                key: pguser
+                name: settings
+          - name: PGPASSWORD
+            valueFrom:
+              configMapKeyRef:
+                key: pgpassword
+                name: settings
+          - name: PGDATABASE
+            valueFrom:
+              configMapKeyRef:
+                key: pgdatabase
+                name: settings
+          - name: PGPORT
+            valueFrom:
+              configMapKeyRef:
+                key: pgport
+                name: settings
+          - name: SENTRY_DSN
+            valueFrom:
+              configMapKeyRef:
+                key: sentrydsn
+                name: settings
+          - name: SECRET_KEY
+            valueFrom:
+              configMapKeyRef:
+                key: secretkey
+                name: settings
+          - name: INDICO_STORAGE_DICT
+            valueFrom:
+                configMapKeyRef:
+                  key: storage
+                  name: settings
+          - name: ATTACHMENT_STORAGE
+            valueFrom:
+                configMapKeyRef:
+                  key: attachmentstorage
+                  name: settings
+          - name: AUTH_PROVIDERS
+            valueFrom:
+                configMapKeyRef:
+                  key: authproviders
+                  name: settings
+          - name: IDENTITY_PROVIDERS
+            valueFrom:
+                configMapKeyRef:
+                  key: identityproviders
+                  name: settings
+          - name: LOCAL_IDENTITIES
+            valueFrom:
+                configMapKeyRef:
+                  key: localidentities
+                  name: settings
+          - name: SMTP_SERVER
+          - name: SMTP_PORT
+          - name: SMTP_LOGIN
+          - name: SMTP_PASSWORD
+          - name: SMTP_USE_TLS
+          - name: INDICO_DEFAULT_TIMEZONE
+          - name: INDICO_DEFAULT_LOCALE
+          - name: INDICO_ROUTE_OLD_URLS
+          - name: INDICO_CHECKIN_APP_CLIENT_ID
+          - name: INDICO_CUSTOMIZATION_DIR
+          - name: INDICO_CUSTOMIZATION_DEBUG
+          - name: INDICO_LOGO_URL
+          - name: REDIS_CACHE_URL
+            value: redis://indico-redis:6379/1
+          - name: CELERY_BROKER
+            value: redis://indico-redis:6379/0
+          - name: SQLALCHEMY_DATABASE_URI
+          - name: C_FORCE_ROOT
+            value: "true"
+          image: ' '
+          name: indico-celery
+          resources:
+            limits:
+              memory: 1Gi
+            requests:
+              memory: 512Mi
+          volumeMounts:
+          - mountPath: /opt/indico/tmp
+            name: indico-celery-tmpfs0
+        restartPolicy: Always
+        volumes:
+        - emptyDir:
+            medium: Memory
+          name: indico-celery-tmpfs0
+    test: false
+    triggers:
+    - type: ConfigChange
+    - type: ImageChange
+      imageChangeParams:
+        automatic: true
+        containerNames:
+        - indico-celery
+        from:
+          kind: ImageStreamTag
+          name: indico-worker-custom:stable
+  status: {}
+
+- apiVersion: v1
+  kind: DeploymentConfig
+  metadata:
+    labels:
+      io.kompose.service: indico-static
+    name: indico-static
+  spec:
+    replicas: 1
+    selector:
+      io.kompose.service: indico-static
+    template:
+      metadata:
+        labels:
+          io.kompose.service: indico-static
+      spec:
+        containers:
+        - name: indico-static
+          image: ' '
+          resources:
+            limits:
+              cpu: 800m
+              memory: 1Gi
+            requests:
+              cpu: 400m
+              memory: 512Mi
+    test: false
+    triggers:
+    - type: ConfigChange
+    - type: ImageChange
+      imageChangeParams:
+        automatic: true
+        containerNames:
+        - indico-static
+        from:
+          kind: ImageStreamTag
+          name: indico-static:latest
+
+- apiVersion: v1
+  kind: DeploymentConfig
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-redis
+    name: indico-redis
+  spec:
+    replicas: 1
+    selector:
+      io.kompose.service: indico-redis
+    strategy:
+      resources: {}
+    template:
+      metadata:
+        creationTimestamp: null
+        labels:
+          io.kompose.service: indico-redis
+      spec:
+        containers:
+        - image: ' '
+          name: indico-redis
+          livenessProbe:
+            exec:
+              command:
+              - redis-cli
+              - PING
+          readinessProbe:
+            exec:
+              command:
+              - redis-cli
+              - PING
+          resources: {}
+          volumeMounts:
+          - mountPath: /data
+            name: indico-redis-claim0
+        restartPolicy: Always
+        volumes:
+        - name: indico-redis-claim0
+          persistentVolumeClaim:
+            claimName: indico-redis-claim0
+    test: false
+    triggers:
+    - type: ConfigChange
+    - type: ImageChange
+      imageChangeParams:
+        automatic: true
+        containerNames:
+        - indico-redis
+        from:
+          kind: ImageStreamTag
+          name: indico-redis:latest
+  status: {}
+
+### Services
+
+- apiVersion: v1
+  kind: Service
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web
+    name: indico-web
+  spec:
+    ports:
+    - name: "59999"
+      port: 59999
+      targetPort: 59999
+    selector:
+      io.kompose.service: indico-web
+  status:
+    loadBalancer: {}
+
+- apiVersion: v1
+  kind: Service
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-celery
+    name: indico-celery
+  spec:
+    ports:
+    - name: "8888"
+      port: 8888
+      targetPort: 8888
+    selector:
+      io.kompose.service: indico-celery
+  status:
+    loadBalancer: {}
+
+- apiVersion: v1
+  kind: Service
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-redis
+    name: indico-redis
+  spec:
+    clusterIP: None
+    ports:
+    - name: headless
+      port: 55555
+      targetPort: 0
+    selector:
+      io.kompose.service: indico-redis
+  status:
+    loadBalancer: {}
+
+- apiVersion: v1
+  kind: Service
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-static
+    name: indico-static
+  spec:
+    clusterIP: None
+    ports:
+    - name: headless
+      port: 8080
+      targetPort: 8080
+    selector:
+      io.kompose.service: indico-static
+  status:
+    loadBalancer: {}
+
+### Routes
+
+- apiVersion: v1
+  kind: Route
+  metadata:
+    creationTimestamp: null
+    labels:
+      io.kompose.service: indico-web
+    name: indico-web
+  spec:
+    port:
+      targetPort: 59999
+    to:
+      kind: Service
+      name: indico-web
+      weight: null
+    tls:
+      termination: edge
+      insecureEdgeTerminationPolicy: Redirect
+  status:
+    ingress: null
+
+
+### PodAutoscaler
+### in order to make it work the cluster needs to be run with --metrics flag (oc cluster --metrics)
+### it is also necessary to have hawkular openshift agent installed within the cluster
+### http://www.hawkular.org/blog/2017/03/25/collecting-application-metrics-openshift.html
+
+- apiVersion: autoscaling/v1
+  kind: HorizontalPodAutoscaler
+  metadata:
+    name: indico-web-autoscaler
+  spec:
+    scaleTargetRef:
+      kind: DeploymentConfig
+      name: indico-web
+      apiVersion: v1
+      subresource: scale
+    minReplicas: 1
+    maxReplicas: 5
+    cpuUtilization:
+      targetPercentage: 80


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]