--- apiVersion: v1 kind: Template labels: template: ionic-showcase-server metadata: name: datasync-showcase-server annotations: openshift.io/display-name: Data Sync Showcase description: |- This template allows for the deployment of the Data Sync Example Showcase App. The Data Sync Example Showcase App contains an example Node.js server implementation that connects to a PostgreSQL Database. The deployed App can be used with the Ionic Showcase application. For more information, see https://github.com/aerogear/ionic-showcase/ tags: sync, mobile, nodejs iconClass: icon-nodejs openshift.io/provider-display-name: Red Hat, Inc. openshift.io/documentation-url: https://docs.aerogear.org/aerogear/latest/data-sync.html#sync-server-openshift openshift.io/support-url: https://access.redhat.com template.openshift.io/bindable: 'false' objects: - apiVersion: v1 kind: Secret metadata: labels: app: ionic-showcase-server annotations: template.openshift.io/expose-database_name: "{.data['database-name']}" template.openshift.io/expose-password: "{.data['database-password']}" template.openshift.io/expose-username: "{.data['database-user']}" description: |- OpenShift template for Data Sync Server and PostgreSQL database width persistent storage. To get more information, visit https://github.com/aerogear/ionic-showcase/ name: "${DATABASE_SERVICE_NAME}" stringData: database-name: "${POSTGRESQL_DATABASE}" database-password: "${POSTGRESQL_PASSWORD}" database-user: "${POSTGRESQL_USER}" - apiVersion: v1 kind: Service metadata: labels: app: ionic-showcase-server annotations: template.openshift.io/expose-uri: postgres://{.spec.clusterIP}:{.spec.ports[?(.name=="postgresql")].port} name: "${DATABASE_SERVICE_NAME}" spec: ports: - name: postgresql nodePort: 0 port: 5432 protocol: TCP targetPort: 5432 selector: name: "${DATABASE_SERVICE_NAME}" sessionAffinity: None type: ClusterIP status: loadBalancer: {} - apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: app: ionic-showcase-server name: "${DATABASE_SERVICE_NAME}" spec: accessModes: - ReadWriteOnce resources: requests: storage: "${VOLUME_CAPACITY}" - apiVersion: v1 kind: DeploymentConfig metadata: labels: app: ionic-showcase-server annotations: template.alpha.openshift.io/wait-for-ready: 'true' name: "${DATABASE_SERVICE_NAME}" spec: replicas: 1 selector: name: "${DATABASE_SERVICE_NAME}" strategy: type: Recreate template: metadata: labels: name: "${DATABASE_SERVICE_NAME}" spec: containers: - capabilities: {} env: - name: POSTGRESQL_USER valueFrom: secretKeyRef: key: database-user name: "${DATABASE_SERVICE_NAME}" - name: POSTGRESQL_PASSWORD valueFrom: secretKeyRef: key: database-password name: "${DATABASE_SERVICE_NAME}" - name: POSTGRESQL_DATABASE valueFrom: secretKeyRef: key: database-name name: "${DATABASE_SERVICE_NAME}" image: " " imagePullPolicy: IfNotPresent livenessProbe: exec: command: - "/usr/libexec/check-container" - "--live" initialDelaySeconds: 120 timeoutSeconds: 10 name: postgresql ports: - containerPort: 5432 protocol: TCP readinessProbe: exec: command: - "/usr/libexec/check-container" initialDelaySeconds: 5 timeoutSeconds: 1 resources: limits: memory: "${MEMORY_LIMIT}" securityContext: capabilities: {} privileged: false terminationMessagePath: "/dev/termination-log" volumeMounts: - mountPath: "/var/lib/pgsql/data" name: "${DATABASE_SERVICE_NAME}-data" dnsPolicy: ClusterFirst restartPolicy: Always volumes: - name: "${DATABASE_SERVICE_NAME}-data" persistentVolumeClaim: claimName: "${DATABASE_SERVICE_NAME}" triggers: - imageChangeParams: automatic: true containerNames: - postgresql from: kind: ImageStreamTag name: postgresql:${POSTGRESQL_VERSION} namespace: "${NAMESPACE}" lastTriggeredImage: '' type: ImageChange - type: ConfigChange status: {} - apiVersion: v1 kind: ImageStream metadata: annotations: openshift.io/generated-by: OpenShiftNewApp creationTimestamp: null labels: app: ionic-showcase-server name: node spec: lookupPolicy: local: false tags: - annotations: openshift.io/imported-from: node:8 from: kind: DockerImage name: node:8 generation: null importPolicy: {} name: "8" referencePolicy: type: "" status: dockerImageRepository: "" - apiVersion: v1 kind: ImageStream metadata: annotations: openshift.io/generated-by: OpenShiftNewApp creationTimestamp: null labels: app: ionic-showcase-server name: ionic-showcase-server spec: lookupPolicy: local: false status: dockerImageRepository: "" - apiVersion: v1 kind: BuildConfig metadata: annotations: openshift.io/generated-by: OpenShiftNewApp creationTimestamp: null labels: app: ionic-showcase-server name: ionic-showcase-server spec: nodeSelector: null output: to: kind: ImageStreamTag name: ionic-showcase-server:latest postCommit: {} resources: {} source: contextDir: server git: uri: https://github.com/aerogear/ionic-showcase type: Git strategy: dockerStrategy: from: kind: ImageStreamTag name: node:8 type: Docker triggers: - type: ConfigChange - imageChange: {} type: ImageChange status: lastVersion: 0 - apiVersion: v1 kind: Secret metadata: name: showcase-mqtt-credentials data: MQTT_PASSWORD: ${AMQ_USER_PASSWORD} - apiVersion: v1 kind: DeploymentConfig metadata: annotations: openshift.io/generated-by: OpenShiftNewApp creationTimestamp: null labels: app: ionic-showcase-server name: ionic-showcase-server spec: replicas: 1 selector: app: ionic-showcase-server deploymentconfig: ionic-showcase-server strategy: resources: {} template: metadata: annotations: openshift.io/generated-by: OpenShiftNewApp creationTimestamp: null labels: app: ionic-showcase-server deploymentconfig: ionic-showcase-server spec: containers: - env: - name: DB_HOSTNAME value: "${DATABASE_SERVICE_NAME}" - name: MQTT_USERNAME value: "${AMQ_USERNAME}" - name: MQTT_PORT value: "5671" - name: MQTT_PROTOCOL value: "tls" - name: MQTT_PASSWORD valueFrom: secretKeyRef: name: showcase-mqtt-credentials key: MQTT_PASSWORD image: ionic-showcase-server:latest name: ionic-showcase-server ports: - containerPort: 4000 protocol: TCP resources: {} volumeMounts: - mountPath: /usr/src/app/files name: files-storage volumes: - name: files-storage persistentVolumeClaim: claimName: postgresql test: false triggers: - type: ConfigChange - imageChangeParams: automatic: true containerNames: - ionic-showcase-server from: kind: ImageStreamTag name: ionic-showcase-server:latest type: ImageChange status: availableReplicas: 0 latestVersion: 0 observedGeneration: 0 replicas: 0 unavailableReplicas: 0 updatedReplicas: 0 - apiVersion: v1 kind: Service metadata: annotations: openshift.io/generated-by: OpenShiftNewApp creationTimestamp: null labels: app: ionic-showcase-server name: ionic-showcase-server spec: ports: - name: 4000-tcp port: 4000 protocol: TCP targetPort: 4000 selector: app: ionic-showcase-server deploymentconfig: ionic-showcase-server status: loadBalancer: {} - apiVersion: v1 kind: Route metadata: labels: app: ionic-showcase-server name: "${SERVER_SERVICE_NAME}" spec: host: "" to: kind: Service name: "${SERVER_SERVICE_NAME}" - apiVersion: enmasse.io/v1beta1 kind: AddressSpace metadata: name: showcase spec: type: brokered plan: brokered-single-broker - apiVersion: enmasse.io/v1beta1 kind: Address metadata: name: showcase.tasks # must have be in format
.