--- kind: Template apiVersion: v1 metadata: name: startx-couchbase-deploy-template annotations: openshift.io/display-name: Couchbase database (ephemeral deploy workflow) description: Deployement workflow of a nosql database using ephemeral storage for logs records. Use couchbase with various underlying linux distribution. See https://hub.docker.com/r/startx/sv-couchbase iconClass: icon-couchbase tags: startx,os,fedora,couchbase,nosql openshift.io/provider-display-name: STARTX openshift.io/documentation-url: https://hub.docker.com/r/startx/sv-couchbase openshift.io/support-url: https://gitlab.com/startx1/containers/issues/new message: |- Your database ${APP_NAME} will be soon deployed. Monitor the deployement for database availability and Follow created route to browse running application Database : ${APP_NAME} Stage : ${APP_STAGE} labels: template: startx-couchbase-deploy-template provider: startx objects: - kind: ImageStream apiVersion: v1 metadata: name: "${APP_NAME}" annotations: openshift.io/display-name: Startx Couchbase Database openshift.io/generated-by: STARTX labels: app: "${APP_NAME}" stage: "${APP_STAGE}" spec: tags: - name: ${APP_STAGE} annotations: openshift.io/display-name: Startx Couchbase Database (Fedora rawhide) description: Couchbase server for NoSQL database running under Fedora rawhide iconClass: icon-mysql-database tags: builder,startx,fedora,couchbase,database supports: db version: rawhide sampleRepo: https://gitlab.com/startx1/containers-example-couchbase.git from: kind: DockerImage name: startx/sv-couchbase:${BUILDER_TAG} - kind: Secret apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" stringData: COUCHBASE_PASSWORD: "${COUCHBASE_PASSWORD}" COUCHBASE_USER: "${COUCHBASE_USER}" - kind: DeploymentConfig apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" annotations: openshift.io/generated-by: STARTX spec: strategy: type: Rolling rollingParams: updatePeriodSeconds: 1 intervalSeconds: 1 timeoutSeconds: 120 maxUnavailable: 25% maxSurge: 25% triggers: - type: ImageChange imageChangeParams: automatic: true containerNames: - "${APP_NAME}" from: kind: ImageStreamTag name: "${APP_NAME}:${APP_STAGE}" - type: ConfigChange replicas: 1 test: false selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" template: metadata: labels: app: "${APP_NAME}" type: "${APP_STAGE}" provider: startx template: startx-couchbase-deploy-template deploymentconfig: "${APP_NAME}" annotations: openshift.io/generated-by: STARTX spec: containers: - name: "${APP_NAME}" image: " " command: - "/bin/sx-couchbase" args: - run env: - name: COUCHBASE_PASSWORD valueFrom: secretKeyRef: name: "${APP_NAME}" key: COUCHBASE_PASSWORD - name: COUCHBASE_USER valueFrom: secretKeyRef: name: "${APP_NAME}" key: COUCHBASE_USER - name: COUCHBASE_BUCKETS value: "${COUCHBASE_BUCKETS}" ports: - containerPort: 8091 protocol: TCP - protocol: TCP containerPort: 8092 - protocol: TCP containerPort: 8093 - protocol: TCP containerPort: 8094 - protocol: TCP containerPort: 11207 - protocol: TCP containerPort: 11210 - protocol: TCP containerPort: 11211 - protocol: TCP containerPort: 18091 - protocol: TCP containerPort: 18092 - protocol: TCP containerPort: 18093 - protocol: TCP containerPort: 18094 volumeMounts: - name: "${APP_NAME}-data" mountPath: "/opt/couchbase/var" livenessProbe: exec: command: - "/bin/sx-couchbase" - isLive initialDelaySeconds: 5 timeoutSeconds: 2 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 readinessProbe: exec: command: - "/bin/sx-couchbase" - isReady initialDelaySeconds: 2 timeoutSeconds: 2 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 resources: limits: cpu: 12000m memory: 2048Mi requests: cpu: 200m memory: 1024Mi terminationMessagePath: "/dev/termination-log" imagePullPolicy: Always volumes: - name: "${APP_NAME}-data" emptyDir: medium: "" restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst - kind: Service apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" annotations: openshift.io/generated-by: STARTX spec: ports: - name: cluster-webapi protocol: TCP port: 8091 targetPort: 8091 - name: cluster-viewxdcr protocol: TCP port: 8092 targetPort: 8092 - name: cluster-query protocol: TCP port: 8093 targetPort: 8093 - name: cluster-fts protocol: TCP port: 8094 targetPort: 8094 - name: data-moxi-ssl protocol: TCP port: 11207 targetPort: 11207 - name: data-moxi protocol: TCP port: 11210 targetPort: 11210 - name: data-legacy protocol: TCP port: 11211 targetPort: 11211 - name: cluster-webapi-ssl protocol: TCP port: 18091 targetPort: 18091 - name: cluster-viewxdcr-ssl protocol: TCP port: 18092 targetPort: 18092 - name: cluster-query-ssl protocol: TCP port: 18093 targetPort: 18093 - name: cluster-fts-ssl protocol: TCP port: 18094 targetPort: 18094 selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" type: ClusterIP sessionAffinity: None parameters: - name: APP_NAME displayName: Application name description: The name of the created application value: couchbase required: true - name: APP_STAGE displayName: Application stage description: "Stage of the application deployed (ex: dev, test, prod, example, demo, poc, ...)" value: example required: true - name: COUCHBASE_USER displayName: Couchbase user description: Default user to create value: demo from: "[A-Z0-9]{8}" generate: expression - name: COUCHBASE_PASSWORD displayName: Couchbase root password description: The couchbase admin password to use. Generated if not provided from: "[A-Z0-9]{16}" generate: expression - name: COUCHBASE_BUCKETS displayName: Couchbase bucket description: list of the default's bucket to create - name: BUILDER_TAG displayName: Startx image release description: "Image tag of the startx couchbase image used. Could be : latest, fc34, fc33, fc32, fc31, fc30, fc29, fc28, alpine3, ubi8, centos8, centos7, centos6, alma8, rocky8" value: latest required: true