Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init.sh script modified to accomodate oc syntax changes in v 3.4 #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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..."
Expand Down Expand Up @@ -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=<my-iot-ocp-project-name>"
exit 1;
fi

# Validate Zeppelin Base
if [ ! -z ${USER_ZEPPELIN_BASE} ]; then

Expand Down
2 changes: 1 addition & 1 deletion support/templates/decisionserver63-basic-s2i.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down
2 changes: 1 addition & 1 deletion support/templates/fis-generic-template-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand Down
22 changes: 1 addition & 21 deletions support/templates/postgresql-persistent.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -102,7 +82,7 @@
"containers": [
{
"name": "postgresql",
"image": " ",
"image": "registry.access.redhat.com/rhscl/postgresql-94-rhel7:latest",
"ports": [
{
"containerPort": 5432,
Expand Down
2 changes: 1 addition & 1 deletion support/templates/rhel-zeppelin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down
2 changes: 1 addition & 1 deletion support/templates/software-sensor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down