From 33b7effc647c61f4b7aa235f0a7531019d7a5e0a Mon Sep 17 00:00:00 2001 From: jbride Date: Tue, 14 Feb 2017 15:00:22 -0700 Subject: [PATCH 1/2] https://github.com/redhat-gpe/bxms_architecture_workshop/issues/5 --- init.sh | 17 ++++++++++++--- support/templates/postgresql-persistent.json | 22 +------------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/init.sh b/init.sh index 36bc5df..6bf55eb 100755 --- a/init.sh +++ b/init.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_BASE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -IOT_OCP_PROJECT="iot-ocp" MQ_USER="iotuser" MQ_PASSWORD="iotuser" KIE_USER="kieuser" @@ -249,9 +248,12 @@ function do_ocp_components() { echo "Setting up OpenShift IoT Example Project" echo - echo "Creating Project: ${IOT_OCP_PROJECT}..." + echo "Using Project: ${IOT_OCP_PROJECT}..." echo - oc new-project ${IOT_OCP_PROJECT} --description="Showcases an Intelligent Internet-of-Things (IoT) Gateway on Red Hat’s OpenShift Container Platform" --display-name="Internet of Things (IoT) OpenShift Demo Project" >/dev/null 2>&1 + + # JA Bride: Not needed for GPTE OCP environment because student would have already registered for an OCP project via GPTE CloudForms + # oc new-project ${IOT_OCP_PROJECT} --description="Showcases an Intelligent Internet-of-Things (IoT) Gateway on Red Hat’s OpenShift Container Platform" --display-name="Internet of Things (IoT) OpenShift Demo Project" >/dev/null 2>&1 + oc project ${IOT_OCP_PROJECT} echo echo "Creating ImageStreams..." @@ -466,12 +468,21 @@ do --restart-from=*) RESTART_OPTION="${i#*=}" shift;; + --ocp-project=*) + IOT_OCP_PROJECT="${i#*=}" + shift;; -h|--help|*) usage exit esac done +# Validate OCP project +if [ x${IOT_OCP_PROJECT} == "x" ]; then + echo "Must invoke this script using an argument of: --ocp-project=" + exit 1; +fi + # Validate Zeppelin Base if [ ! -z ${USER_ZEPPELIN_BASE} ]; then diff --git a/support/templates/postgresql-persistent.json b/support/templates/postgresql-persistent.json index 3a6f302..3af69e1 100644 --- a/support/templates/postgresql-persistent.json +++ b/support/templates/postgresql-persistent.json @@ -67,26 +67,6 @@ "strategy": { "type": "Recreate" }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:latest", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - } - }, - { - "type": "ConfigChange" - } - ], "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" @@ -102,7 +82,7 @@ "containers": [ { "name": "postgresql", - "image": " ", + "image": "registry.access.redhat.com/rhscl/postgresql-94-rhel7:latest", "ports": [ { "containerPort": 5432, From 277b94b521a57779073fa7b70e593e347004bd30 Mon Sep 17 00:00:00 2001 From: jbride Date: Tue, 14 Feb 2017 15:23:06 -0700 Subject: [PATCH 2/2] https://github.com/redhat-gpe/bxms_architecture_workshop/issues/5 --- support/templates/decisionserver63-basic-s2i.json | 2 +- support/templates/fis-generic-template-build.json | 2 +- support/templates/rhel-zeppelin.json | 2 +- support/templates/software-sensor-template.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/support/templates/decisionserver63-basic-s2i.json b/support/templates/decisionserver63-basic-s2i.json index 7271e2f..51de144 100644 --- a/support/templates/decisionserver63-basic-s2i.json +++ b/support/templates/decisionserver63-basic-s2i.json @@ -49,7 +49,7 @@ { "description": "Git source URI for application", "name": "SOURCE_REPOSITORY_URL", - "value": "https://github.com/sabre1041/iot-ocp.git", + "value": "https://github.com/gpe-mw-training/iot-ocp.git", "required": true }, { diff --git a/support/templates/fis-generic-template-build.json b/support/templates/fis-generic-template-build.json index ccd1922..4271c45 100644 --- a/support/templates/fis-generic-template-build.json +++ b/support/templates/fis-generic-template-build.json @@ -19,7 +19,7 @@ { "name": "GIT_REPO", "required": true, - "value": "https://github.com/sabre1041/iot-ocp.git", + "value": "https://github.com/gpe-mw-training/iot-ocp.git", "description": "Git repository, required" }, { diff --git a/support/templates/rhel-zeppelin.json b/support/templates/rhel-zeppelin.json index 2e00512..5fafa59 100644 --- a/support/templates/rhel-zeppelin.json +++ b/support/templates/rhel-zeppelin.json @@ -26,7 +26,7 @@ { "description": "Git source URI for application", "name": "SOURCE_REPOSITORY_URL", - "value": "https://github.com/sabre1041/iot-ocp.git", + "value": "https://github.com/gpe-mw-training/iot-ocp.git", "required": true }, { diff --git a/support/templates/software-sensor-template.json b/support/templates/software-sensor-template.json index f10835e..af43dce 100644 --- a/support/templates/software-sensor-template.json +++ b/support/templates/software-sensor-template.json @@ -35,7 +35,7 @@ { "description": "Git source URI for application", "name": "SOURCE_REPOSITORY_URL", - "value": "https://github.com/sabre1041/iot-ocp.git", + "value": "https://github.com/gpe-mw-training/iot-ocp.git", "required": true }, {