diff --git a/.gitignore b/.gitignore index 1794cad1..fd0f40da 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ data logs/ tmp/ .vscode/ +/coolstore-ui/package-lock.json diff --git a/README.md b/README.md index 7e43356d..72333dff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Red Hat Cool Store Microservice Demo [![Build Status](https://travis-ci.org/jbossdemocentral/coolstore-microservice.svg?branch=master)](https://travis-ci.org/jbossdemocentral/coolstore-microservice) +Red Hat Cool Store Microservice Demo [![Build Status](https://travis-ci.org/jbossdemocentral/coolstore-microservice.svg?branch=stable-ocp-3.9)](https://travis-ci.org/jbossdemocentral/coolstore-microservice) ==================================== This is an example demo showing a retail store consisting of several microservices based on [Red Hat OpenShift Application Runtimes](https://www.redhat.com/en/resources/openshift-application-runtimes-datasheet) (Spring Boot, WildFly Swarm, Vert.x, JBoss EAP and Node.js) deployed to [OpenShift](https://access.redhat.com/documentation/en/openshift-container-platform). @@ -63,8 +63,9 @@ Troubleshooting ``` oc login -u system:admin - oc create -n openshift -f https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_examples/files/examples/v3.7/xpaas-streams/fis-image-streams.json - oc create -n openshift -f https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_examples/files/examples/v3.7/xpaas-streams/jboss-image-streams.json + oc create -n openshift -f https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_examples/files/examples/v3.9/xpaas-streams/fis-image-streams.json + oc create -n openshift -f https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_examples/files/examples/v3.9/xpaas-streams/jboss-image-streams.json ``` + * If you attempt to deploy any of the services, and nothing happens, it may just be taking a while to download the Docker builder images. Visit the OpenShift web console and navigate to Browse->Events and look for errors, and re-run the 'oc delete ; oc create' commands to re-install the images (as outlined at the beginning.) diff --git a/cart-service/README.md b/cart-service/README.md new file mode 100644 index 00000000..923cddb3 --- /dev/null +++ b/cart-service/README.md @@ -0,0 +1,11 @@ +Required Environment Variables + +CATALOG_ENDPOINT +PRICING_ENDPOINT + +KIE_SERVER_USER +KIE_SERVER_PASSWORD +KIE_CONTAINER_DEPLOYMENT + +DATAGRID_HOST +DATAGRID_PORT diff --git a/catalog-service/README.md b/catalog-service/README.md new file mode 100644 index 00000000..25d956c3 --- /dev/null +++ b/catalog-service/README.md @@ -0,0 +1,6 @@ +Required Environment Variables + +DB_NAME +DB_SERVER +DB_USERNAME +DB_PASSWORD diff --git a/coolstore-gw/README.md b/coolstore-gw/README.md index a3961795..731830f9 100644 --- a/coolstore-gw/README.md +++ b/coolstore-gw/README.md @@ -3,6 +3,12 @@ This service is the CoolStore Gateway which acts as an API aggregator towards other services using Apache Camel (Fuse Integration Services) and Spring Boot. -This service connects to Cart service, Catalog service and inventory service +This service connects to Cart service, Catalog service and inventory service - \ No newline at end of file +Required Environment Variables + +CART_ENDPOINT=cart:8080 +CATALOG_ENDPOINT=catalog:8080 +INVENTORY_ENDPOINT=inventory:8080 +RATING_ENDPOINT=rating:8080 +REVIEW_ENDPOINT=review:8080 diff --git a/coolstore-gw/src/main/resources/static/swagger-ui.js b/coolstore-gw/src/main/resources/static/swagger-ui.js index 6e750c2d..5b5de5bb 100644 --- a/coolstore-gw/src/main/resources/static/swagger-ui.js +++ b/coolstore-gw/src/main/resources/static/swagger-ui.js @@ -21476,169 +21476,169 @@ function request(RequestConstructor, method, url) { module.exports = request; },{}],162:[function(require,module,exports){ - -/** - * Expose `Emitter`. - */ - -if (typeof module !== 'undefined') { - module.exports = Emitter; -} - -/** - * Initialize a new `Emitter`. - * - * @api public - */ - -function Emitter(obj) { - if (obj) return mixin(obj); -}; - -/** - * Mixin the emitter properties. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -function mixin(obj) { - for (var key in Emitter.prototype) { - obj[key] = Emitter.prototype[key]; - } - return obj; -} - -/** - * Listen on the given `event` with `fn`. - * - * @param {String} event - * @param {Function} fn - * @return {Emitter} - * @api public - */ - -Emitter.prototype.on = -Emitter.prototype.addEventListener = function(event, fn){ - this._callbacks = this._callbacks || {}; - (this._callbacks['$' + event] = this._callbacks['$' + event] || []) - .push(fn); - return this; -}; - -/** - * Adds an `event` listener that will be invoked a single - * time then automatically removed. - * - * @param {String} event - * @param {Function} fn - * @return {Emitter} - * @api public - */ - -Emitter.prototype.once = function(event, fn){ - function on() { - this.off(event, on); - fn.apply(this, arguments); - } - - on.fn = fn; - this.on(event, on); - return this; -}; - -/** - * Remove the given callback for `event` or all - * registered callbacks. - * - * @param {String} event - * @param {Function} fn - * @return {Emitter} - * @api public - */ - -Emitter.prototype.off = -Emitter.prototype.removeListener = -Emitter.prototype.removeAllListeners = -Emitter.prototype.removeEventListener = function(event, fn){ - this._callbacks = this._callbacks || {}; - - // all - if (0 == arguments.length) { - this._callbacks = {}; - return this; - } - - // specific event - var callbacks = this._callbacks['$' + event]; - if (!callbacks) return this; - - // remove all handlers - if (1 == arguments.length) { - delete this._callbacks['$' + event]; - return this; - } - - // remove specific handler - var cb; - for (var i = 0; i < callbacks.length; i++) { - cb = callbacks[i]; - if (cb === fn || cb.fn === fn) { - callbacks.splice(i, 1); - break; - } - } - return this; -}; - -/** - * Emit `event` with the given args. - * - * @param {String} event - * @param {Mixed} ... - * @return {Emitter} - */ - -Emitter.prototype.emit = function(event){ - this._callbacks = this._callbacks || {}; - var args = [].slice.call(arguments, 1) - , callbacks = this._callbacks['$' + event]; - - if (callbacks) { - callbacks = callbacks.slice(0); - for (var i = 0, len = callbacks.length; i < len; ++i) { - callbacks[i].apply(this, args); - } - } - - return this; -}; - -/** - * Return array of callbacks for `event`. - * - * @param {String} event - * @return {Array} - * @api public - */ - -Emitter.prototype.listeners = function(event){ - this._callbacks = this._callbacks || {}; - return this._callbacks['$' + event] || []; -}; - -/** - * Check if this emitter has `event` handlers. - * - * @param {String} event - * @return {Boolean} - * @api public - */ - -Emitter.prototype.hasListeners = function(event){ - return !! this.listeners(event).length; -}; + +/** + * Expose `Emitter`. + */ + +if (typeof module !== 'undefined') { + module.exports = Emitter; +} + +/** + * Initialize a new `Emitter`. + * + * @api public + */ + +function Emitter(obj) { + if (obj) return mixin(obj); +}; + +/** + * Mixin the emitter properties. + * + * @param {Object} obj + * @return {Object} + * @api private + */ + +function mixin(obj) { + for (var key in Emitter.prototype) { + obj[key] = Emitter.prototype[key]; + } + return obj; +} + +/** + * Listen on the given `event` with `fn`. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.on = +Emitter.prototype.addEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + (this._callbacks['$' + event] = this._callbacks['$' + event] || []) + .push(fn); + return this; +}; + +/** + * Adds an `event` listener that will be invoked a single + * time then automatically removed. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.once = function(event, fn){ + function on() { + this.off(event, on); + fn.apply(this, arguments); + } + + on.fn = fn; + this.on(event, on); + return this; +}; + +/** + * Remove the given callback for `event` or all + * registered callbacks. + * + * @param {String} event + * @param {Function} fn + * @return {Emitter} + * @api public + */ + +Emitter.prototype.off = +Emitter.prototype.removeListener = +Emitter.prototype.removeAllListeners = +Emitter.prototype.removeEventListener = function(event, fn){ + this._callbacks = this._callbacks || {}; + + // all + if (0 == arguments.length) { + this._callbacks = {}; + return this; + } + + // specific event + var callbacks = this._callbacks['$' + event]; + if (!callbacks) return this; + + // remove all handlers + if (1 == arguments.length) { + delete this._callbacks['$' + event]; + return this; + } + + // remove specific handler + var cb; + for (var i = 0; i < callbacks.length; i++) { + cb = callbacks[i]; + if (cb === fn || cb.fn === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; +}; + +/** + * Emit `event` with the given args. + * + * @param {String} event + * @param {Mixed} ... + * @return {Emitter} + */ + +Emitter.prototype.emit = function(event){ + this._callbacks = this._callbacks || {}; + var args = [].slice.call(arguments, 1) + , callbacks = this._callbacks['$' + event]; + + if (callbacks) { + callbacks = callbacks.slice(0); + for (var i = 0, len = callbacks.length; i < len; ++i) { + callbacks[i].apply(this, args); + } + } + + return this; +}; + +/** + * Return array of callbacks for `event`. + * + * @param {String} event + * @return {Array} + * @api public + */ + +Emitter.prototype.listeners = function(event){ + this._callbacks = this._callbacks || {}; + return this._callbacks['$' + event] || []; +}; + +/** + * Check if this emitter has `event` handlers. + * + * @param {String} event + * @return {Boolean} + * @api public + */ + +Emitter.prototype.hasListeners = function(event){ + return !! this.listeners(event).length; +}; },{}]},{},[1])(1) }); diff --git a/coolstore-ui/README.md b/coolstore-ui/README.md new file mode 100644 index 00000000..1be7372d --- /dev/null +++ b/coolstore-ui/README.md @@ -0,0 +1,25 @@ +Required Environment Variables + +COOLSTORE_GW_ENDPOINT + +OR + +COOLSTORE_GW_SERVICE AND OPENSHIFT_BUILD_NAMESPACE + +--- + +SECURE_COOLSTORE_GW_ENDPOINT + +OR + +SECURE_COOLSTORE_GW_SERVICE AND OPENSHIFT_BUILD_NAMESPACE + +--- + +For SSO: + +SSO_URL +SSO_REALM +SSO_PUBLIC_KEY +SSO_CLIENT_ID + diff --git a/inventory-service/README.md b/inventory-service/README.md new file mode 100644 index 00000000..59f56507 --- /dev/null +++ b/inventory-service/README.md @@ -0,0 +1,10 @@ +Required Environment Variables + +APPLICATION_NAME=inventory + +DB_SERVICE_PREFIX_MAPPING="${APPLICATION_NAME}-postgresql=DB" +DB_JNDI="java:jboss/datasources/InventoryDS" + +DB_USERNAME +DB_PASSWORD +DB_DATABASE diff --git a/openshift/coolstore-template.yaml b/openshift/coolstore-template.yaml index c74715ea..25a6d7e5 100644 --- a/openshift/coolstore-template.yaml +++ b/openshift/coolstore-template.yaml @@ -28,6 +28,9 @@ objects: name: web-ui labels: app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice spec: tags: - name: latest @@ -37,6 +40,9 @@ objects: name: web-ui labels: app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice spec: output: to: @@ -70,10 +76,13 @@ objects: name: web-ui labels: app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice spec: replicas: 1 selector: - app: web-ui + application: web-ui deploymentconfig: web-ui strategy: resources: {} @@ -82,6 +91,9 @@ objects: metadata: labels: app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice deploymentconfig: web-ui spec: containers: @@ -105,7 +117,7 @@ objects: initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 1 - timeoutSeconds: 5 + timeoutSeconds: 5 readinessProbe: failureThreshold: 10 httpGet: @@ -137,6 +149,9 @@ objects: metadata: labels: app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice name: web-ui spec: ports: @@ -150,6 +165,11 @@ objects: kind: Route metadata: name: web-ui + labels: + app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice spec: to: kind: Service @@ -161,6 +181,9 @@ objects: name: coolstore-gw labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: {} status: dockerImageRepository: "" @@ -170,6 +193,9 @@ objects: name: coolstore-gw labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: output: to: @@ -204,6 +230,9 @@ objects: name: coolstore-gw labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: replicas: 1 selector: @@ -215,6 +244,9 @@ objects: metadata: labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice deploymentconfig: coolstore-gw name: coolstore-gw spec: @@ -259,6 +291,9 @@ objects: metadata: labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice hystrix.enabled: "true" name: coolstore-gw spec: @@ -274,6 +309,9 @@ objects: name: coolstore-gw labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: to: kind: Service @@ -285,6 +323,9 @@ objects: name: inventory labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice spec: tags: - name: latest @@ -294,6 +335,9 @@ objects: name: inventory labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice spec: output: to: @@ -325,6 +369,9 @@ objects: name: inventory labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -336,6 +383,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory name: inventory spec: @@ -348,9 +398,9 @@ objects: fieldRef: fieldPath: metadata.namespace - name: MQ_CLUSTER_PASSWORD - value: 7mzX0pLV03 + value: ${MQ_CLUSTER_PASSWORD} - name: JGROUPS_CLUSTER_PASSWORD - value: CqUo3fYDTv + value: ${JGROUPS_CLUSTER_PASSWORD} - name: AUTO_DEPLOY_EXPLODED value: "false" - name: DB_SERVICE_PREFIX_MAPPING @@ -430,6 +480,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"inventory-postgresql","namespace":"","kind":"Service"}]' labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory spec: ports: @@ -444,7 +497,10 @@ objects: name: inventory-postgresql labels: app: inventory + application: inventory comp-type: database + coolstore: inventory-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -455,7 +511,10 @@ objects: metadata: labels: app: inventory + application: inventory comp-type: database + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory-postgresql name: inventory-postgresql spec: @@ -510,6 +569,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory-postgresql spec: ports: @@ -524,6 +586,9 @@ objects: name: catalog labels: app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice spec: tags: - name: latest @@ -531,6 +596,11 @@ objects: kind: BuildConfig metadata: name: catalog + labels: + app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice spec: output: to: @@ -562,6 +632,9 @@ objects: name: catalog labels: app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -573,15 +646,18 @@ objects: metadata: labels: app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice deploymentconfig: catalog name: catalog spec: containers: - env: - name: JWS_ADMIN_USERNAME - value: Skq3VtCd + value: ${JWS_ADMIN_USERNAME} - name: JWS_ADMIN_PASSWORD - value: oktt6yhw + value: ${JWS_ADMIN_PASSWORD} - name: DB_USERNAME value: ${CATALOG_DB_USERNAME} - name: DB_PASSWORD @@ -606,7 +682,7 @@ objects: command: - /bin/bash - -c - - curl -s -u Skq3VtCd:oktt6yhw 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' + - curl -s -u ${JWS_ADMIN_USERNAME}:${JWS_ADMIN_PASSWORD} 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName' |grep -iq 'stateName *= *STARTED' initialDelaySeconds: 15 periodSeconds: 5 @@ -639,6 +715,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"catalog-mongodb","namespace":"","kind":"Service"}]' labels: app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice name: catalog spec: ports: @@ -652,6 +731,9 @@ objects: metadata: labels: app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice name: catalog-mongodb spec: ports: @@ -668,7 +750,10 @@ objects: metadata: labels: app: catalog + application: catalog comp-type: database + coolstore: catalog-service + demo: coolstore-microservice name: catalog-mongodb spec: replicas: 1 @@ -683,7 +768,10 @@ objects: metadata: labels: app: catalog + application: catalog comp-type: database + coolstore: catalog-service + demo: coolstore-microservice deploymentconfig: catalog-mongodb spec: containers: @@ -763,6 +851,9 @@ objects: name: rating labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice spec: tags: - name: latest @@ -770,6 +861,11 @@ objects: kind: BuildConfig metadata: name: rating + labels: + app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice spec: output: to: @@ -801,6 +897,9 @@ objects: name: rating labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice spec: replicas: 0 selector: @@ -812,6 +911,9 @@ objects: metadata: labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice deploymentconfig: rating name: rating spec: @@ -878,6 +980,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"rating-mongodb","namespace":"","kind":"Service"}]' labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice name: rating spec: ports: @@ -891,6 +996,9 @@ objects: metadata: labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice name: rating-mongodb spec: ports: @@ -907,7 +1015,10 @@ objects: metadata: labels: app: rating + application: rating comp-type: database + coolstore: rating-service + demo: coolstore-microservice name: rating-mongodb spec: replicas: 0 @@ -941,7 +1052,10 @@ objects: metadata: labels: app: rating + application: rating comp-type: database + coolstore: rating-service + demo: coolstore-microservice deploymentconfig: rating-mongodb spec: containers: @@ -1021,6 +1135,9 @@ objects: name: rating-config labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice data: rating-config.yaml: |- rating.http.port: 8080 @@ -1036,6 +1153,9 @@ objects: name: cart labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice spec: tags: - name: latest @@ -1045,6 +1165,9 @@ objects: name: cart labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice spec: output: to: @@ -1076,6 +1199,9 @@ objects: name: cart labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -1087,6 +1213,9 @@ objects: metadata: labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice deploymentconfig: cart name: cart spec: @@ -1160,6 +1289,9 @@ objects: metadata: labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice name: cart spec: ports: @@ -1173,6 +1305,11 @@ objects: kind: ImageStream metadata: name: pricing + labels: + app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice spec: tags: - name: latest @@ -1180,6 +1317,11 @@ objects: kind: BuildConfig metadata: name: pricing + labels: + app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice spec: output: to: @@ -1211,6 +1353,11 @@ objects: kind: DeploymentConfig metadata: name: pricing + labels: + app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice spec: replicas: 0 selector: @@ -1221,16 +1368,19 @@ objects: template: metadata: labels: + app: pricing application: pricing + coolstore: pricing-service + demo: coolstore-microservice deploymentconfig: pricing name: pricing spec: containers: - env: - name: MQ_CLUSTER_PASSWORD - value: 7mzX0pLV03 + value: ${MQ_CLUSTER_PASSWORD} - name: JGROUPS_CLUSTER_PASSWORD - value: CqUo3fYDTv + value: ${JGROUPS_CLUSTER_PASSWORD} - name: AUTO_DEPLOY_EXPLODED value: "false" - name: KIE_CONTAINER_DEPLOYMENT @@ -1312,6 +1462,9 @@ objects: description: The pricing service's http port. labels: app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice name: pricing spec: ports: @@ -1328,6 +1481,9 @@ objects: name: review labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice spec: tags: - name: latest @@ -1335,6 +1491,11 @@ objects: kind: BuildConfig metadata: name: review + labels: + app: review + application: review + coolstore: review-service + demo: coolstore-microservice spec: output: to: @@ -1366,6 +1527,9 @@ objects: name: review labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice spec: replicas: 0 selector: @@ -1377,6 +1541,9 @@ objects: metadata: labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice deploymentconfig: review name: review spec: @@ -1455,6 +1622,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"review-postgresql","namespace":"","kind":"Service"}]' labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice name: review spec: ports: @@ -1468,8 +1638,11 @@ objects: metadata: name: review-postgresql labels: - comp-type: database app: review + application: review + comp-type: database + coolstore: review-service + demo: coolstore-microservice spec: replicas: 0 selector: @@ -1480,7 +1653,10 @@ objects: metadata: labels: app: review + application: review comp-type: database + coolstore: review-service + demo: coolstore-microservice deploymentconfig: review-postgresql name: review-postgresql spec: @@ -1535,6 +1711,9 @@ objects: metadata: labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice name: review-postgresql spec: ports: @@ -1548,6 +1727,9 @@ objects: name: review-config labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice data: review-config.yml: |- project: @@ -1566,8 +1748,10 @@ objects: kind: ImageStream metadata: labels: - component: turbine-server app: netflix + application: netflix + component: turbine-server + demo: coolstore-microservice name: turbine-server spec: dockerImageRepository: docker.io/siamaksade/turbine-server # temporary till fabric8 images remove privillegd requirement @@ -1580,23 +1764,27 @@ objects: kind: DeploymentConfig metadata: labels: - component: turbine-server app: netflix + application: netflix + component: turbine-server + demo: coolstore-microservice name: turbine-server spec: replicas: 0 selector: deploymentconfig: turbine-server component: turbine-server - app: netflix + application: netflix strategy: type: Recreate template: metadata: labels: - deploymentconfig: turbine-server - component: turbine-server app: netflix + application: netflix + component: turbine-server + demo: coolstore-microservice + deploymentconfig: turbine-server spec: containers: - image: 'turbine-server' @@ -1644,8 +1832,10 @@ objects: kind: Service metadata: labels: - component: turbine-server app: netflix + application: netflix + component: turbine-server + demo: coolstore-microservice name: turbine-server spec: ports: @@ -1656,13 +1846,15 @@ objects: selector: deploymentconfig: turbine-server component: turbine-server - app: netflix + application: netflix - apiVersion: v1 kind: Route metadata: labels: - component: turbine-server app: netflix + application: netflix + component: turbine-server + demo: coolstore-microservice name: turbine-server spec: port: @@ -1676,8 +1868,10 @@ objects: kind: ImageStream metadata: labels: - component: hystrix-dashboard app: netflix + application: netflix + component: hystrix-dashboard + demo: coolstore-microservice name: hystrix-dashboard spec: dockerImageRepository: docker.io/siamaksade/hystrix-dashboard # temporary till fabric8 images remove privillegd requirement @@ -1690,23 +1884,27 @@ objects: kind: DeploymentConfig metadata: labels: - component: hystrix-dashboard app: netflix + application: netflix + component: hystrix-dashboard + demo: coolstore-microservice name: hystrix-dashboard spec: replicas: 0 selector: deploymentconfig: hystrix-dashboard component: hystrix-dashboard - app: netflix + application: netflix strategy: type: Recreate template: metadata: labels: - deploymentconfig: hystrix-dashboard - component: hystrix-dashboard app: netflix + application: netflix + component: hystrix-dashboard + demo: coolstore-microservice + deploymentconfig: hystrix-dashboard spec: containers: - image: 'hystrix-dashboard' @@ -1754,8 +1952,10 @@ objects: kind: Service metadata: labels: - component: hystrix-dashboard app: netflix + application: netflix + component: hystrix-dashboard + demo: coolstore-microservice annotations: service.alpha.openshift.io/dependencies: '[{"name":"turbine-server","namespace":"","kind":"Service"}]' name: hystrix-dashboard @@ -1768,13 +1968,15 @@ objects: selector: deploymentconfig: hystrix-dashboard component: hystrix-dashboard - app: netflix + application: netflix - apiVersion: v1 kind: Route metadata: labels: - component: hystrix-dashboard app: netflix + application: netflix + component: hystrix-dashboard + demo: coolstore-microservice name: hystrix-dashboard spec: port: @@ -1792,7 +1994,7 @@ parameters: - displayName: Git branch/tag reference name: GIT_REF required: true - value: master + value: stable-ocp-3.9 - description: Maven mirror url. If nexus is deployed locally, use nexus url (e.g. http://nexus.ci:8081/content/groups/public/) displayName: Maven mirror url name: MAVEN_MIRROR_URL @@ -1802,6 +2004,16 @@ parameters: - description: Bower mirror url. If nexus is deployed locally, use nexus url (e.g. http://nexus.ci:8081/repository/bower-mirror/) displayName: Bower mirror url name: BOWER_MIRROR +- description: MQ cluster password + displayName: MQ cluster password + value: 7mzX0pLV03 + name: MQ_CLUSTER_PASSWORD + required: true +- description: JGroups cluster password + displayName: JGroups cluster password + value: CqUo3fYDTv + name: JGROUPS_CLUSTER_PASSWORD + required: true - description: Inventory Service database user name displayName: Inventory Database username from: user[a-zA-Z0-9]{3} @@ -1826,6 +2038,14 @@ parameters: generate: expression name: CATALOG_DB_PASSWORD required: true +- description: JWS user name + value: Skq3VtCd + name: JWS_ADMIN_USERNAME + required: true +- description: JWS user password + value: oktt6yhw + name: JWS_ADMIN_PASSWORD + required: true - description: Decision Server Username name: KIE_SERVER_USER required: true diff --git a/openshift/scripts/README.md b/openshift/scripts/README.md index db039751..5dc0d8db 100644 --- a/openshift/scripts/README.md +++ b/openshift/scripts/README.md @@ -2,4 +2,4 @@ Demo Provisioning script ====================== The provisioning script is **DEPRECATED** and not maintained anymore. We recommended to use the -Ansible deployer for demos instead: https://github.com/siamaksade/openshift-demos-ansible +Ansible deployer for demos instead: https://github.com/siamaksade/openshift-demos-ansible \ No newline at end of file diff --git a/openshift/scripts/README.old.md b/openshift/scripts/README.old.md index 4120afc9..c03036b0 100644 --- a/openshift/scripts/README.old.md +++ b/openshift/scripts/README.old.md @@ -59,14 +59,6 @@ OPTIONS: --run-verify Run verify after provisioning ``` -**NOTE:** OpenShift 3.7 by default uses an older version of Jenkins. Import all Jenkins image tags in order to use the newer Jenkins image -for this demo: -``` -$ oc login -u system:admin -$ oc import-image jenkins --from="registry.access.redhat.com/openshift3/jenkins-2-rhel7" --confirm --all -n openshift -$ oc login -u USER -``` - Example ============ Provision a minimal demo on a local cluster without persistent storage: diff --git a/openshift/scripts/provision-demo.sh b/openshift/scripts/provision-demo.sh index 41883bc3..a1ba5c0f 100755 --- a/openshift/scripts/provision-demo.sh +++ b/openshift/scripts/provision-demo.sh @@ -178,7 +178,7 @@ PRJ_DEVELOPER=developer-$PRJ_SUFFIX # config GITHUB_ACCOUNT=${GITHUB_ACCOUNT:-jbossdemocentral} -GITHUB_REF=${GITHUB_REF:-master} +GITHUB_REF=${GITHUB_REF:-stable-ocp-3.9} GITHUB_URI=https://github.com/$GITHUB_ACCOUNT/coolstore-microservice.git COOLSTORE_IMAGES_NAMESPACE=${COOLSTORE_IMAGES_NAMESPACE:-coolstore-builds} @@ -464,14 +464,7 @@ EOM # Deploy Jenkins function deploy_jenkins() { echo_header "Deploying Jenkins..." - - # import jenkins image tags - if [ $LOGGEDIN_USER == 'system:admin' ] ; then - oc $ARG_OC_OP import-image jenkins:v3.7 --from="registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.7" --confirm -n openshift 2>/dev/null - sleep 10 - fi - - oc $ARG_OC_OP new-app jenkins-ephemeral -l app=jenkins -p MEMORY_LIMIT=1Gi --param=JENKINS_IMAGE_STREAM_TAG=jenkins:v3.7 -n ${PRJ_CI[0]} + oc $ARG_OC_OP new-app jenkins-ephemeral -l app=jenkins -p MEMORY_LIMIT=1Gi -n ${PRJ_CI[0]} sleep 2 oc $ARG_OC_OP set resources dc/jenkins --limits=cpu=1,memory=2Gi --requests=cpu=200m,memory=1Gi -n ${PRJ_CI[0]} } @@ -734,7 +727,7 @@ function verify_deployments_in_projects() { function deploy_guides() { echo_header "Deploying Demo Guides" - local _DEMO_CONTENT_URL_PREFIX="https://raw.githubusercontent.com/siamaksade/coolstore-demo-guides/openshift-3.7" + local _DEMO_CONTENT_URL_PREFIX="https://raw.githubusercontent.com/siamaksade/coolstore-demo-guides/openshift-3.9" local _DEMO_URLS="$_DEMO_CONTENT_URL_PREFIX/$WORKSHOP_YAML" oc $ARG_OC_OP new-app --name=guides --docker-image=osevg/workshopper:latest -n ${PRJ_CI[0]} \ @@ -795,6 +788,8 @@ function echo_header() { # MAIN: DEPLOY DEMO # ################################################################################ +set -x + if [ "$LOGGEDIN_USER" == 'system:admin' ] && [ -z "$ARG_USERNAME" ] ; then # for verify and delete, --project-suffix is enough if [ "$ARG_COMMAND" == "delete" ] || [ "$ARG_COMMAND" == "verify" ] && [ -z "$ARG_PROJECT_SUFFIX" ]; then diff --git a/openshift/templates/agileintegration/coolstore-fis-cicd.yaml b/openshift/templates/agileintegration/coolstore-fis-cicd.yaml index f0a14873..7b34048e 100644 --- a/openshift/templates/agileintegration/coolstore-fis-cicd.yaml +++ b/openshift/templates/agileintegration/coolstore-fis-cicd.yaml @@ -15,7 +15,10 @@ objects: metadata: name: coolstore-gw-pre labels: + app: coolstore-gw application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: output: to: @@ -48,7 +51,10 @@ objects: metadata: name: coolstore-gw-pre labels: + app: coolstore-gw application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: replicas: 1 selector: @@ -59,7 +65,10 @@ objects: template: metadata: labels: + app: coolstore-gw application: coolstore-gw + coolstore: gw + demo: coolstore-microservice deploymentconfig: coolstore-gw-pre name: coolstore-gw-pre spec: @@ -101,6 +110,8 @@ objects: labels: app: coolstore-gw application: coolstore-gw-pre + coolstore: gw + demo: coolstore-microservice hystrix.enabled: "true" name: coolstore-gwgreen spec: @@ -114,6 +125,11 @@ objects: kind: ImageStream metadata: name: coolstore-gwgreen + labels: + app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: {} status: dockerImageRepository: "" @@ -122,7 +138,10 @@ objects: metadata: name: coolstore-gwgreen labels: + app: coolstore-gw application: coolstore-gw + coolstore: gw + demo: coolstore-microservice spec: to: kind: Service diff --git a/openshift/templates/agileintegration/coolstore-fis-pipeline.yaml b/openshift/templates/agileintegration/coolstore-fis-pipeline.yaml index 1fa1c1ae..0ca9f889 100644 --- a/openshift/templates/agileintegration/coolstore-fis-pipeline.yaml +++ b/openshift/templates/agileintegration/coolstore-fis-pipeline.yaml @@ -1,6 +1,8 @@ apiVersion: v1 kind: Template labels: + app: coolstore-gw-pre + application: coolstore-gw-pre demo: coolstore-microservice template: gateway-pipeline metadata: @@ -10,7 +12,11 @@ objects: kind: BuildConfig metadata: labels: + app: coolstore-gw-pre + application: coolstore-gw-pre build: ${PIPELINE_NAME} + coolstore: gw + demo: coolstore-microservice name: ${PIPELINE_NAME} annotations: pipeline.alpha.openshift.io/uses: '[{"name": "coolstore-gw-pre", "namespace": "${DEV_PROJECT}", "kind": "BuildConfig"},{"name": "coolstore-gw-pre", "namespace": "${DEV_PROJECT}", "kind": "DeploymentConfig"},,{"name": "coolstore-gw", "namespace": "${DEV_PROJECT}", "kind": "DeploymentConfig"}]' diff --git a/openshift/templates/coolstore-builds-template.yaml b/openshift/templates/coolstore-builds-template.yaml index 775127fe..15626a1e 100644 --- a/openshift/templates/coolstore-builds-template.yaml +++ b/openshift/templates/coolstore-builds-template.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Template labels: demo: coolstore-microservice + template: coolstore-builds metadata: annotations: description: CoolStore demo microservices application buildconfigs template @@ -15,8 +16,11 @@ objects: metadata: name: web-ui labels: - comp-required: "true" app: web-ui + application: web-ui + comp-required: "true" + coolstore: ui + demo: coolstore-microservice spec: tags: - name: latest @@ -25,8 +29,11 @@ objects: metadata: name: web-ui labels: - comp-required: "true" app: web-ui + application: web-ui + comp-required: "true" + coolstore: ui + demo: coolstore-microservice spec: output: to: @@ -64,8 +71,11 @@ objects: metadata: name: coolstore-gw labels: - comp-required: "true" app: coolstore-gw + application: coolstore-gw + comp-required: "true" + coolstore: gw + demo: coolstore-microservice status: dockerImageRepository: "" - apiVersion: v1 @@ -73,8 +83,11 @@ objects: metadata: name: coolstore-gw labels: - comp-required: "true" app: coolstore-gw + application: coolstore-gw + comp-required: "true" + coolstore: gw + demo: coolstore-microservice spec: output: to: @@ -113,6 +126,9 @@ objects: name: inventory labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice spec: tags: - name: latest @@ -122,6 +138,9 @@ objects: name: inventory labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice spec: output: to: @@ -157,8 +176,11 @@ objects: metadata: name: catalog labels: - comp-required: "true" app: catalog + application: catalog + comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice spec: tags: - name: latest @@ -167,8 +189,11 @@ objects: metadata: name: catalog labels: - comp-required: "true" app: catalog + application: catalog + comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice spec: output: to: @@ -205,6 +230,9 @@ objects: name: cart labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice spec: tags: - name: latest @@ -214,6 +242,9 @@ objects: name: cart labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice spec: output: to: @@ -249,6 +280,9 @@ objects: name: pricing labels: app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice spec: tags: - name: latest @@ -258,6 +292,9 @@ objects: name: pricing labels: app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice spec: output: to: @@ -295,6 +332,9 @@ objects: name: rating labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice spec: tags: - name: latest @@ -304,6 +344,9 @@ objects: name: rating labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice spec: output: to: @@ -332,6 +375,9 @@ objects: name: review labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice spec: tags: - name: latest @@ -341,6 +387,9 @@ objects: name: review labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice spec: output: to: @@ -372,7 +421,7 @@ parameters: displayName: Git branch/tag reference name: GIT_REF required: true - value: master + value: stable-ocp-3.9 - description: Maven mirror url. If nexus is deployed locally, use nexus url (e.g. http://nexus.ci:8081/content/groups/public/) displayName: Maven mirror url name: MAVEN_MIRROR_URL diff --git a/openshift/templates/coolstore-deployments-template.yaml b/openshift/templates/coolstore-deployments-template.yaml index f748a833..383ad1d4 100644 --- a/openshift/templates/coolstore-deployments-template.yaml +++ b/openshift/templates/coolstore-deployments-template.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Template labels: demo: coolstore-microservice + template: coolstore-deployments metadata: annotations: description: CoolStore demo microservices deployments persistent template @@ -26,11 +27,14 @@ objects: name: web-ui labels: app: web-ui + application: web-ui comp-required: "true" + coolstore: ui + demo: coolstore-microservice spec: replicas: 1 selector: - app: web-ui + application: web-ui deploymentconfig: web-ui strategy: resources: {} @@ -39,6 +43,9 @@ objects: metadata: labels: app: web-ui + application: web-ui + coolstore: ui + demo: coolstore-microservice deploymentconfig: web-ui spec: containers: @@ -102,7 +109,10 @@ objects: metadata: labels: app: web-ui + application: web-ui comp-required: "true" + coolstore: ui + demo: coolstore-microservice name: web-ui spec: ports: @@ -118,7 +128,10 @@ objects: name: web-ui labels: app: web-ui + application: web-ui comp-required: "true" + coolstore: ui + demo: coolstore-microservice spec: host: web-ui-${HOSTNAME_SUFFIX} to: @@ -131,7 +144,10 @@ objects: name: coolstore-gw labels: app: coolstore-gw + application: coolstore-gw comp-required: "true" + coolstore: gw + demo: coolstore-microservice spec: replicas: 1 selector: @@ -143,6 +159,9 @@ objects: metadata: labels: app: coolstore-gw + application: coolstore-gw + coolstore: gw + demo: coolstore-microservice deploymentconfig: coolstore-gw name: coolstore-gw spec: @@ -207,8 +226,11 @@ objects: metadata: labels: app: coolstore-gw - hystrix.enabled: "true" + application: coolstore-gw comp-required: "true" + coolstore: gw + demo: coolstore-microservice + hystrix.enabled: "true" name: coolstore-gw spec: ports: @@ -223,7 +245,10 @@ objects: name: coolstore-gw labels: app: coolstore-gw + application: coolstore-gw comp-required: "true" + coolstore: gw + demo: coolstore-microservice spec: host: gw-${HOSTNAME_SUFFIX} to: @@ -236,6 +261,9 @@ objects: name: inventory labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice uses-database: "true" spec: replicas: 1 @@ -248,6 +276,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory name: inventory spec: @@ -260,9 +291,9 @@ objects: fieldRef: fieldPath: metadata.namespace - name: MQ_CLUSTER_PASSWORD - value: 7mzX0pLV03 + value: ${MQ_CLUSTER_PASSWORD} - name: JGROUPS_CLUSTER_PASSWORD - value: CqUo3fYDTv + value: ${JGROUPS_CLUSTER_PASSWORD} - name: AUTO_DEPLOY_EXPLODED value: "false" - name: DB_SERVICE_PREFIX_MAPPING @@ -344,6 +375,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"inventory-postgresql","namespace":"","kind":"Service"}]' labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory spec: ports: @@ -357,6 +391,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory spec: host: inventory-${HOSTNAME_SUFFIX} @@ -370,7 +407,10 @@ objects: name: inventory-postgresql labels: app: inventory + application: inventory comp-type: database + coolstore: inventory-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -381,7 +421,10 @@ objects: metadata: labels: app: inventory + application: inventory comp-type: database + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory-postgresql name: inventory-postgresql spec: @@ -448,6 +491,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory-postgresql spec: ports: @@ -460,6 +506,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory-postgresql-pv spec: accessModes: @@ -474,7 +523,10 @@ objects: name: catalog labels: app: catalog + application: catalog comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice uses-database: "true" spec: replicas: 1 @@ -487,15 +539,18 @@ objects: metadata: labels: app: catalog + application: catalog + coolstore: catalog-service + demo: coolstore-microservice deploymentconfig: catalog name: catalog spec: containers: - env: - name: JWS_ADMIN_USERNAME - value: Skq3VtCd + value: ${JWS_ADMIN_USERNAME} - name: JWS_ADMIN_PASSWORD - value: oktt6yhw + value: ${JWS_ADMIN_PASSWORD} - name: DB_USERNAME value: ${CATALOG_DB_USERNAME} - name: DB_PASSWORD @@ -565,7 +620,10 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"catalog-mongodb","namespace":"","kind":"Service"}]' labels: app: catalog + application: catalog comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice name: catalog spec: ports: @@ -579,7 +637,10 @@ objects: metadata: labels: app: catalog + application: catalog comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice name: catalog spec: host: catalog-${HOSTNAME_SUFFIX} @@ -592,7 +653,10 @@ objects: metadata: labels: app: catalog + application: catalog comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice name: catalog-mongodb spec: ports: @@ -609,8 +673,11 @@ objects: metadata: labels: app: catalog + application: catalog comp-type: database comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice name: catalog-mongodb spec: replicas: 1 @@ -625,7 +692,10 @@ objects: metadata: labels: app: catalog + application: catalog comp-type: database + coolstore: catalog-service + demo: coolstore-microservice deploymentconfig: catalog-mongodb spec: containers: @@ -708,7 +778,10 @@ objects: metadata: labels: app: catalog + application: catalog comp-required: "true" + coolstore: catalog-service + demo: coolstore-microservice name: catalog-mongodb-pv spec: accessModes: @@ -723,6 +796,9 @@ objects: name: rating labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice uses-database: "true" spec: replicas: 1 @@ -735,6 +811,9 @@ objects: metadata: labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice deploymentconfig: rating name: rating spec: @@ -801,6 +880,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"rating-mongodb","namespace":"","kind":"Service"}]' labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice name: rating spec: ports: @@ -814,6 +896,9 @@ objects: metadata: labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice name: rating spec: host: rating-${HOSTNAME_SUFFIX} @@ -827,6 +912,9 @@ objects: name: rating-config labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice data: rating-config.yaml: |- rating.http.port: 8080 @@ -839,6 +927,9 @@ objects: metadata: labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice name: rating-mongodb spec: ports: @@ -855,7 +946,10 @@ objects: metadata: labels: app: rating + application: rating comp-type: database + coolstore: rating-service + demo: coolstore-microservice name: rating-mongodb spec: replicas: 1 @@ -888,8 +982,11 @@ objects: template: metadata: labels: - app: rating + application: rating + application: rating comp-type: database + coolstore: rating-service + demo: coolstore-microservice deploymentconfig: rating-mongodb spec: containers: @@ -972,6 +1069,9 @@ objects: metadata: labels: app: rating + application: rating + coolstore: rating-service + demo: coolstore-microservice name: rating-mongodb-pv spec: accessModes: @@ -986,6 +1086,9 @@ objects: name: cart labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -997,6 +1100,9 @@ objects: metadata: labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice deploymentconfig: cart name: cart spec: @@ -1074,6 +1180,9 @@ objects: metadata: labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice name: cart spec: ports: @@ -1087,6 +1196,9 @@ objects: metadata: labels: app: cart + application: cart + coolstore: cart-service + demo: coolstore-microservice name: cart spec: host: cart-${HOSTNAME_SUFFIX} @@ -1101,6 +1213,9 @@ objects: name: pricing labels: app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -1111,16 +1226,19 @@ objects: template: metadata: labels: + app: pricing application: pricing + coolstore: pricing-service + demo: coolstore-microservice deploymentconfig: pricing name: pricing spec: containers: - env: - name: MQ_CLUSTER_PASSWORD - value: 7mzX0pLV03 + value: ${MQ_CLUSTER_PASSWORD} - name: JGROUPS_CLUSTER_PASSWORD - value: CqUo3fYDTv + value: ${JGROUPS_CLUSTER_PASSWORD} - name: AUTO_DEPLOY_EXPLODED value: "false" - name: KIE_CONTAINER_DEPLOYMENT @@ -1202,6 +1320,9 @@ objects: description: The pricing service's http port. labels: app: pricing + application: pricing + coolstore: pricing-service + demo: coolstore-microservice name: pricing spec: ports: @@ -1214,7 +1335,10 @@ objects: kind: Route metadata: labels: + app: pricing application: pricing + coolstore: pricing-service + demo: coolstore-microservice name: pricing spec: host: pricing-${HOSTNAME_SUFFIX} @@ -1229,6 +1353,9 @@ objects: name: review labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice uses-database: "true" spec: replicas: 1 @@ -1241,6 +1368,9 @@ objects: metadata: labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice deploymentconfig: review name: review spec: @@ -1319,6 +1449,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"review-postgresql","namespace":"","kind":"Service"}]' labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice name: review spec: ports: @@ -1331,7 +1464,10 @@ objects: kind: Route metadata: labels: + app: review application: review + coolstore: review-service + demo: coolstore-microservice name: review spec: host: review-${HOSTNAME_SUFFIX} @@ -1345,7 +1481,10 @@ objects: name: review-postgresql labels: app: review + application: review comp-type: database + coolstore: review-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -1356,7 +1495,10 @@ objects: metadata: labels: app: review + application: review comp-type: database + coolstore: review-service + demo: coolstore-microservice deploymentconfig: review-postgresql name: review-postgresql spec: @@ -1412,6 +1554,9 @@ objects: metadata: labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice name: review-postgresql-pv spec: accessModes: @@ -1424,6 +1569,9 @@ objects: metadata: labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice name: review-postgresql spec: ports: @@ -1437,6 +1585,9 @@ objects: name: review-config labels: app: review + application: review + coolstore: review-service + demo: coolstore-microservice data: review-config.yml: |- project: @@ -1457,6 +1608,7 @@ objects: app: datagrid application: datagrid comp: datagrid + demo: coolstore-microservice name: datagrid spec: replicas: 1 @@ -1467,7 +1619,9 @@ objects: template: metadata: labels: + app: datagrid application: datagrid + demo: coolstore-microservice deploymentConfig: datagrid name: datagrid spec: @@ -1491,7 +1645,7 @@ objects: - name: MEMCACHED_CACHE value: default - name: JGROUPS_CLUSTER_PASSWORD - value: BlonpvoQ + value: ${DATAGRID_JGROUPS_CLUSTER_PASSWORD} image: jboss-datagrid65-openshift imagePullPolicy: Always livenessProbe: @@ -1553,6 +1707,7 @@ objects: labels: app: datagrid application: datagrid + demo: coolstore-microservice name: datagrid-hotrod spec: ports: @@ -1573,6 +1728,21 @@ parameters: displayName: Hostname suffix used for routes name: HOSTNAME_SUFFIX required: true +- description: MQ cluster password + displayName: MQ cluster password + value: 7mzX0pLV03 + name: MQ_CLUSTER_PASSWORD + required: true +- description: JGroups cluster password + displayName: JGroups cluster password + value: CqUo3fYDTv + name: JGROUPS_CLUSTER_PASSWORD + required: true +- description: Datagrid JGroups cluster password + displayName: Datagrid JGroups cluster password + value: BlonpvoQ + name: DATAGRID_JGROUPS_CLUSTER_PASSWORD + required: true - description: Inventory Service database user name from: user[a-zA-Z0-9]{3} generate: expression @@ -1593,6 +1763,14 @@ parameters: generate: expression name: CATALOG_DB_PASSWORD required: true +- description: JWS user name + value: Skq3VtCd + name: JWS_ADMIN_USERNAME + required: true +- description: JWS user password + value: oktt6yhw + name: JWS_ADMIN_PASSWORD + required: true - description: Decision Server Username name: KIE_SERVER_USER required: true diff --git a/openshift/templates/coolstore-sso-template.yaml b/openshift/templates/coolstore-sso-template.yaml index 02c1dbc5..7a46b6c8 100644 --- a/openshift/templates/coolstore-sso-template.yaml +++ b/openshift/templates/coolstore-sso-template.yaml @@ -9,6 +9,10 @@ metadata: version: 1.3.2 name: sso-service labels: + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice template: sso-service xpaas: 1.3.2 objects: @@ -19,11 +23,14 @@ objects: - port: 8080 targetPort: 8080 selector: - deploymentConfig: "sso" + deploymentConfig: sso metadata: - name: "sso" + name: sso labels: - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice annotations: description: The web server's http port. service.alpha.openshift.io/dependencies: '[{"name":"sso-postgresql","namespace":"","kind":"Service"}]' @@ -34,11 +41,14 @@ objects: - port: 8443 targetPort: 8443 selector: - deploymentConfig: "sso" + deploymentConfig: sso metadata: name: secure-sso labels: - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice annotations: description: The web server's https port. service.alpha.openshift.io/dependencies: '[{"name":"sso-postgresql","namespace":"","kind":"Service"}]' @@ -53,29 +63,38 @@ objects: metadata: name: sso-postgresql labels: - application: "sso" + app: sso + application: sso component: "database" + coolstore: sso-service + demo: coolstore-microservice annotations: description: The database server port. - kind: Route apiVersion: v1 id: "sso-http" metadata: - name: "sso" + name: sso labels: - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice annotations: description: Route for application's http service. spec: to: - name: "sso" + name: sso - kind: Route apiVersion: v1 id: "sso-https" metadata: name: secure-sso labels: - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice annotations: description: Route for application's https service. spec: @@ -87,7 +106,11 @@ objects: apiVersion: v1 metadata: labels: + app: sso + application: sso build: sso + coolstore: sso-service + demo: coolstore-microservice name: sso spec: tags: @@ -98,9 +121,12 @@ objects: - kind: DeploymentConfig apiVersion: v1 metadata: - name: "sso" + name: sso labels: - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice spec: strategy: type: Recreate @@ -109,26 +135,29 @@ objects: imageChangeParams: automatic: true containerNames: - - "sso" + - sso from: kind: ImageStreamTag name: sso:latest - type: ConfigChange replicas: 1 selector: - deploymentConfig: "sso" + deploymentConfig: sso template: metadata: - name: "sso" + name: sso labels: - deploymentConfig: "sso" - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice + deploymentConfig: sso spec: serviceAccountName: "sso-service-account" terminationGracePeriodSeconds: 75 containers: - - name: "sso" - image: "sso" + - name: sso + image: sso imagePullPolicy: Always volumeMounts: - name: eap-keystore-volume @@ -234,8 +263,11 @@ objects: metadata: name: "sso-postgresql" labels: - application: "sso-postgresql" + app: sso + application: sso + coolstore: sso-service component: database + demo: coolstore-microservice spec: strategy: type: Recreate @@ -257,9 +289,12 @@ objects: metadata: name: "sso-postgresql" labels: - deploymentConfig: "sso-postgresql" - application: "sso" + app: sso + application: sso component: "database" + coolstore: sso-service + demo: coolstore-microservice + deploymentConfig: "sso-postgresql" spec: terminationGracePeriodSeconds: 60 containers: @@ -296,7 +331,10 @@ objects: metadata: name: "sso-service-account" labels: - application: "sso" + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice sercrets: - name: "sso-app-secret" - kind: Secret @@ -304,6 +342,11 @@ objects: name: sso-app-secret metadata: name: sso-app-secret + labels: + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice annotations: description: Default secret file with name 'jboss' and password 'mykeystorepass' data: @@ -313,6 +356,11 @@ objects: apiVersion: v1 metadata: name: sso-config-files + labels: + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice data: client.js: |2 var request = require('request'); @@ -374,7 +422,7 @@ objects: auth: { bearer: token }, - json: { + json: { clientId: coolstore_gw_client_id, enabled: true, protocol: "openid-connect", @@ -572,7 +620,11 @@ objects: apiVersion: v1 metadata: labels: + app: sso + application: sso build: sso + coolstore: sso-service + demo: coolstore-microservice name: sso spec: output: @@ -595,6 +647,11 @@ objects: apiVersion: v1 metadata: name: sso-config-client + labels: + app: sso + application: sso + coolstore: sso-service + demo: coolstore-microservice spec: containers: - name: sso-config diff --git a/openshift/templates/gogs-persistent-template.yaml b/openshift/templates/gogs-persistent-template.yaml index 56943d81..d7d5a48c 100644 --- a/openshift/templates/gogs-persistent-template.yaml +++ b/openshift/templates/gogs-persistent-template.yaml @@ -5,6 +5,9 @@ metadata: description: The Gogs git server (https://gogs.io/) tags: instant-app,gogs,go,golang name: gogs +labels: + demo: coolstore-microservice + template: gogs-persistent objects: - kind: Service apiVersion: v1 @@ -12,6 +15,10 @@ objects: annotations: description: Exposes the database server name: ${APPLICATION_NAME}-postgresql + labels: + app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice spec: ports: - name: postgresql @@ -25,6 +32,10 @@ objects: annotations: description: Defines how to deploy the database name: ${APPLICATION_NAME}-postgresql + labels: + app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice spec: replicas: 1 selector: @@ -34,6 +45,9 @@ objects: template: metadata: labels: + app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice name: ${APPLICATION_NAME}-postgresql name: ${APPLICATION_NAME}-postgresql spec: @@ -102,6 +116,8 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"${APPLICATION_NAME}-postgresql","namespace":"","kind":"Service"}]' labels: app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice name: ${APPLICATION_NAME} spec: ports: @@ -110,7 +126,7 @@ objects: protocol: TCP targetPort: 3000 selector: - app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} deploymentconfig: ${APPLICATION_NAME} sessionAffinity: None type: ClusterIP @@ -123,6 +139,8 @@ objects: description: Route for application's http service. labels: app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice name: ${APPLICATION_NAME} spec: host: ${HOSTNAME} @@ -133,11 +151,13 @@ objects: metadata: labels: app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice name: ${APPLICATION_NAME} spec: replicas: 1 selector: - app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} deploymentconfig: ${APPLICATION_NAME} strategy: resources: {} @@ -153,6 +173,8 @@ objects: creationTimestamp: null labels: app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice deploymentconfig: ${APPLICATION_NAME} spec: containers: @@ -226,6 +248,8 @@ objects: metadata: labels: app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice name: ${APPLICATION_NAME} spec: tags: @@ -251,6 +275,10 @@ objects: apiVersion: v1 metadata: name: gogs-data + labels: + app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice spec: accessModes: - ReadWriteOnce @@ -261,6 +289,10 @@ objects: apiVersion: v1 metadata: name: gogs-postgres-data + labels: + app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice spec: accessModes: - ReadWriteOnce @@ -271,6 +303,10 @@ objects: apiVersion: v1 metadata: name: gogs-config + labels: + app: ${APPLICATION_NAME} + application: ${APPLICATION_NAME} + demo: coolstore-microservice data: other: | export USER="gogs" diff --git a/openshift/templates/imagebuild-pipeline-template.yaml b/openshift/templates/imagebuild-pipeline-template.yaml index 90ee830b..572ccb07 100644 --- a/openshift/templates/imagebuild-pipeline-template.yaml +++ b/openshift/templates/imagebuild-pipeline-template.yaml @@ -4,6 +4,9 @@ metadata: annotations: description: This template creates a pipelie to pre-build coolstore images in a builder project name: coolstore-imagebuild-template +labels: + demo: coolstore-microservice + template: imagebuild-pipeline objects: - apiVersion: v1 kind: BuildConfig @@ -11,14 +14,18 @@ objects: name: coolstore-imagebuild-pipeline annotations: pipeline.alpha.openshift.io/uses: '[{"name": "jenkins", "namespace": "", "kind": "DeploymentConfig"}]' + labels: + app: coolstore-imagebuild-pipeline + application: coolstore-imagebuild-pipeline + demo: coolstore-microservice spec: triggers: - type: GitHub github: - secret: wDmoEUkbBp + secret: ${GITHUB_WEBHOOK_SECRET} - type: Generic generic: - secret: wDmoEUkbBp + secret: ${GENERIC_WEBHOOK_SECRET} runPolicy: SerialLatestOnly source: type: None @@ -50,7 +57,7 @@ objects: def objects = openshift.process(pipeline_template, "--param", "GIT_URI=${github_repo}", "--param", "GIT_REF=${env.GITHUB_REF}", "--param", "MAVEN_MIRROR_URL=${env.MAVEN_MIRROR_URL}") openshift.selector( 'bc', [ demo: 'coolstore-microservice' ] ).delete() - + try { openshift.create(objects) } catch (e) { @@ -86,9 +93,21 @@ parameters: - displayName: Git Branch/Tag name: GITHUB_REF required: true - value: master + value: stable-ocp-3.9 - description: Maven mirror url. If nexus is deployed locally, use nexus url (e.g. http://nexus.ci:8081/content/groups/public/) displayName: Maven mirror url name: MAVEN_MIRROR_URL value: https://mirror.openshift.com/nexus/content/groups/public/ - required: true \ No newline at end of file + required: true +- description: GitHub webhook secret + displayName: GitHub Webhook Secret + from: '[a-zA-Z0-9]{8}' + generate: expression + name: GITHUB_WEBHOOK_SECRET + required: true +- description: Generic webhook secret + displayName: Generic Webhook Secret + from: '[a-zA-Z0-9]{8}' + generate: expression + name: GENERIC_WEBHOOK_SECRET + required: true diff --git a/openshift/templates/inventory-bluegreen-template.yaml b/openshift/templates/inventory-bluegreen-template.yaml index 630078fe..8750fe57 100644 --- a/openshift/templates/inventory-bluegreen-template.yaml +++ b/openshift/templates/inventory-bluegreen-template.yaml @@ -17,8 +17,11 @@ objects: name: inventory-blue labels: app: inventory - variant: blue + application: inventory + coolstore: inventory-service + demo: coolstore-microservice uses-database: "true" + variant: blue spec: replicas: 1 selector: @@ -30,8 +33,11 @@ objects: metadata: labels: app: inventory - variant: blue + application: inventory + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory-blue + variant: blue name: inventory-blue spec: containers: @@ -43,9 +49,9 @@ objects: fieldRef: fieldPath: metadata.namespace - name: MQ_CLUSTER_PASSWORD - value: 7mzX0pLV03 + value: ${MQ_CLUSTER_PASSWORD} - name: JGROUPS_CLUSTER_PASSWORD - value: CqUo3fYDTv + value: ${JGROUPS_CLUSTER_PASSWORD} - name: AUTO_DEPLOY_EXPLODED value: "false" - name: DB_SERVICE_PREFIX_MAPPING @@ -128,6 +134,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"inventory-postgresql","namespace":"","kind":"Service"}]' labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice variant: blue name: inventory-blue spec: @@ -144,8 +153,11 @@ objects: name: inventory-green labels: app: inventory - variant: green + application: inventory + coolstore: inventory-service + demo: coolstore-microservice uses-database: "true" + variant: green spec: replicas: 1 selector: @@ -157,8 +169,11 @@ objects: metadata: labels: app: inventory - variant: green + application: inventory + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory-green + variant: green name: inventory-green spec: containers: @@ -170,9 +185,9 @@ objects: fieldRef: fieldPath: metadata.namespace - name: MQ_CLUSTER_PASSWORD - value: 7mzX0pLV03 + value: ${MQ_CLUSTER_PASSWORD} - name: JGROUPS_CLUSTER_PASSWORD - value: CqUo3fYDTv + value: ${JGROUPS_CLUSTER_PASSWORD} - name: AUTO_DEPLOY_EXPLODED value: "false" - name: DB_SERVICE_PREFIX_MAPPING @@ -254,6 +269,9 @@ objects: service.alpha.openshift.io/dependencies: '[{"name":"inventory-postgresql","namespace":"","kind":"Service"}]' labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice variant: green name: inventory-green spec: @@ -268,6 +286,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice variant: green name: inventory spec: @@ -286,7 +307,10 @@ objects: name: inventory-postgresql labels: app: inventory + application: inventory comp-type: database + coolstore: inventory-service + demo: coolstore-microservice spec: replicas: 1 selector: @@ -297,7 +321,10 @@ objects: metadata: labels: app: inventory + application: inventory comp-type: database + coolstore: inventory-service + demo: coolstore-microservice deploymentconfig: inventory-postgresql name: inventory-postgresql spec: @@ -364,6 +391,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory-postgresql spec: ports: @@ -376,6 +406,9 @@ objects: metadata: labels: app: inventory + application: inventory + coolstore: inventory-service + demo: coolstore-microservice name: inventory-postgresql-pv spec: accessModes: @@ -408,3 +441,13 @@ parameters: generate: expression name: INVENTORY_DB_PASSWORD required: true +- description: MQ cluster password + displayName: MQ cluster password + value: 7mzX0pLV03 + name: MQ_CLUSTER_PASSWORD + required: true +- description: JGroups cluster password + displayName: JGroups cluster password + value: CqUo3fYDTv + name: JGROUPS_CLUSTER_PASSWORD + required: true diff --git a/openshift/templates/inventory-pipeline-template-simple.yaml b/openshift/templates/inventory-pipeline-template-simple.yaml index 42b3a900..9182d356 100644 --- a/openshift/templates/inventory-pipeline-template-simple.yaml +++ b/openshift/templates/inventory-pipeline-template-simple.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Template labels: demo: coolstore-microservice - template: inventory-pipeline + template: inventory-pipeline-simple metadata: name: inventory-pipeline objects: @@ -10,7 +10,11 @@ objects: kind: BuildConfig metadata: labels: + app: inventory + application: inventory build: ${PIPELINE_NAME} + coolstore: inventory-service + demo: coolstore-microservice name: ${PIPELINE_NAME} annotations: pipeline.alpha.openshift.io/uses: '[{"name": "jenkins", "namespace": "", "kind": "DeploymentConfig"}]' @@ -96,7 +100,7 @@ objects: } } } - } + } type: JenkinsPipeline triggers: - github: diff --git a/openshift/templates/inventory-pipeline-template.yaml b/openshift/templates/inventory-pipeline-template.yaml index 535e349a..f1218512 100644 --- a/openshift/templates/inventory-pipeline-template.yaml +++ b/openshift/templates/inventory-pipeline-template.yaml @@ -10,7 +10,11 @@ objects: kind: BuildConfig metadata: labels: + app: inventory + application: inventory build: ${PIPELINE_NAME} + coolstore: inventory-service + demo: coolstore-microservice name: ${PIPELINE_NAME} annotations: pipeline.alpha.openshift.io/uses: '[{"name": "jenkins", "namespace": "", "kind": "DeploymentConfig"}]' @@ -55,7 +59,7 @@ objects: openshift.withCluster() { openshift.tag("${env.INVENTORY_DEV_PROJECT}/inventory:latest", "${env.COOLSTORE_TEST_PROJECT}/inventory:test") } - } + } } } diff --git a/openshift/templates/inventory-template.json b/openshift/templates/inventory-template.json index 3a262aca..06a883ee 100644 --- a/openshift/templates/inventory-template.json +++ b/openshift/templates/inventory-template.json @@ -10,7 +10,7 @@ } }, "labels": { - "app": "inventory", + "application": "inventory", "hystrix.enabled": "true" }, "parameters": [{ @@ -160,7 +160,7 @@ "name": "${APPLICATION_NAME}", "labels": { "deploymentConfig": "${APPLICATION_NAME}", - "app": "${APPLICATION_NAME}" + "application": "${APPLICATION_NAME}" } }, "spec": { @@ -341,7 +341,7 @@ "metadata": { "name": "${APPLICATION_NAME}-postgresql", "labels": { - "app": "${APPLICATION_NAME}" + "application": "${APPLICATION_NAME}" }, "annotations": { "description": "The database server's port." @@ -354,7 +354,7 @@ "metadata": { "name": "${APPLICATION_NAME}-postgresql", "labels": { - "app": "${APPLICATION_NAME}", + "application": "${APPLICATION_NAME}", "comp-type": "database" } }, @@ -389,7 +389,7 @@ "name": "${APPLICATION_NAME}-postgresql", "labels": { "deploymentConfig": "${APPLICATION_NAME}-postgresql", - "app": "${APPLICATION_NAME}", + "application": "${APPLICATION_NAME}", "comp-type": "database" } }, @@ -443,4 +443,4 @@ } } ] -} \ No newline at end of file +} diff --git a/openshift/templates/netflix-oss-list.yaml b/openshift/templates/netflix-oss-list.yaml index adb911e3..f1651ac6 100644 --- a/openshift/templates/netflix-oss-list.yaml +++ b/openshift/templates/netflix-oss-list.yaml @@ -8,6 +8,8 @@ items: metadata: labels: app: turbine-server + application: turbine-server + demo: coolstore-microservice group: netflix-oss name: turbine-server spec: @@ -22,12 +24,14 @@ items: metadata: labels: app: turbine-server + application: turbine-server + demo: coolstore-microservice group: netflix-oss name: turbine-server spec: replicas: 1 selector: - app: turbine-server + application: turbine-server group: netflix-oss deploymentconfig: turbine-server strategy: @@ -36,6 +40,8 @@ items: metadata: labels: app: turbine-server + application: turbine-server + demo: coolstore-microservice group: netflix-oss deploymentconfig: turbine-server spec: @@ -100,6 +106,8 @@ items: metadata: labels: app: turbine-server + application: turbine-server + demo: coolstore-microservice group: netflix-oss name: turbine-server spec: @@ -109,7 +117,7 @@ items: protocol: TCP targetPort: 8080 selector: - app: turbine-server + application: turbine-server group: netflix-oss deploymentconfig: turbine-server - apiVersion: v1 @@ -117,6 +125,8 @@ items: metadata: labels: app: turbine-server + application: turbine-server + demo: coolstore-microservice group: netflix-oss name: turbine-server spec: @@ -132,6 +142,8 @@ items: metadata: labels: app: hystrix-dashboard + application: hystrix-dashboard + demo: coolstore-microservice group: netflix-oss name: hystrix-dashboard spec: @@ -146,12 +158,14 @@ items: metadata: labels: app: hystrix-dashboard + application: hystrix-dashboard + demo: coolstore-microservice group: netflix-oss name: hystrix-dashboard spec: replicas: 1 selector: - app: hystrix-dashboard + application: hystrix-dashboard group: netflix-oss deploymentconfig: hystrix-dashboard strategy: @@ -160,6 +174,8 @@ items: metadata: labels: app: hystrix-dashboard + application: hystrix-dashboard + demo: coolstore-microservice group: netflix-oss deploymentconfig: hystrix-dashboard spec: @@ -219,6 +235,8 @@ items: metadata: labels: app: hystrix-dashboard + application: hystrix-dashboard + demo: coolstore-microservice group: netflix-oss annotations: service.alpha.openshift.io/dependencies: '[{"name":"turbine-server","namespace":"","kind":"Service"}]' @@ -230,7 +248,7 @@ items: protocol: TCP targetPort: 8080 selector: - app: hystrix-dashboard + application: hystrix-dashboard deploymentconfig: hystrix-dashboard group: netflix-oss - apiVersion: v1 @@ -238,6 +256,8 @@ items: metadata: labels: app: hystrix-dashboard + application: hystrix-dashboard + demo: coolstore-microservice group: netflix-oss name: hystrix-dashboard spec: diff --git a/review-service/src/main/fabric8/inventory-db-deployment.yml b/review-service/src/main/fabric8/inventory-db-deployment.yml index d502484f..75f71969 100644 --- a/review-service/src/main/fabric8/inventory-db-deployment.yml +++ b/review-service/src/main/fabric8/inventory-db-deployment.yml @@ -3,7 +3,7 @@ kind: DeploymentConfig metadata: name: inventory-database labels: - app: inventory-database + application: inventory-database annotations: openshift.io/generated-by: OpenShiftNewApp spec: @@ -23,12 +23,12 @@ spec: replicas: 1 test: false selector: - app: inventory-database + application: inventory-database deploymentconfig: inventory-database template: metadata: labels: - app: inventory-database + application: inventory-database deploymentconfig: inventory-database spec: volumes: diff --git a/review-service/src/main/fabric8/inventory-deployment.yml b/review-service/src/main/fabric8/inventory-deployment.yml index fb84aa8b..24a0cec5 100644 --- a/review-service/src/main/fabric8/inventory-deployment.yml +++ b/review-service/src/main/fabric8/inventory-deployment.yml @@ -11,7 +11,7 @@ spec: template: metadata: labels: - app: inventory + application: inventory deploymentconfig: inventory spec: containers: