init.sh script modified to accomodate oc syntax changes in v 3.4#37
Open
nandanj wants to merge 2 commits intosabre1041:masterfrom
Open
init.sh script modified to accomodate oc syntax changes in v 3.4#37nandanj wants to merge 2 commits intosabre1041:masterfrom
nandanj wants to merge 2 commits intosabre1041:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#!/bin/bash
SCRIPT_BASE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
MQ_USER="iotuser"
MQ_PASSWORD="iotuser"
KIE_USER="kieuser"
KIE_PASSWORD="kieuser1!"
GIT_BRANCH="master"
POSTGRESQL_APP_NAME="postgresql"
POSTGRESQL_USERNAME="postgresiot"
POSTGRESQL_PASSWORD="postgresiot"
POSTGRESQL_DATABASE="iot"
BUILD_CHECK_INTERVAL=5
BUILD_CHECK_TIMES=60
DEPLOYMENT_CHECK_INTERVAL=10
DEPLOYMENT_CHECK_TIMES=60
CURRENT_STAGE=
POSTGRESQL_LABEL="iotphase=postgresql"
AMQ_LABEL="iotphase=amq"
KIE_LABEL="iotphase=kie"
FIS_LABEL="iotphase=fis"
SOFTWARE_SENSOR_LABEL="iotphase=software-sensor"
ZEPPELIN_LABEL="iotphase=zeppelin"
ZEPPELIN_RHEL_BASE_IMAGESTREAM="rhel7:7.2"
ZEPPELIN_CENTOS_BASE_IMAGESTREAM="centos:7"
ZEPPELIN_BASE_IMAGESTREAM=${ZEPPELIN_RHEL_BASE_IMAGESTREAM}
trap exit_message EXIT
function exit_message() {
}
Show script usage
usage() {
echo "
Usage: $0 [options]
Options:
--zeppelin-base=<rhel7|centos> : Base used to build Zeppelin Image (Default: rhel7)
--restart-from : Phase to restart execution
-h|--help : Show script usage
"
}
function check_restart() {
}
function validate_build_success() {
}
function wait_for_running_build() {
BUILD_NAME="$1-1"
COUNTER=0
}
function wait_for_application_deployment() {
}
function validate_build_deploy() {
APP_NAME=$1
}
Begin Chained Components
function do_ocp_components() {
}
function do_postgresql() {
}
function do_amq() {
}
function do_kie() {
}
function do_fis() {
}
function do_software_sensor() {
}
function do_build_zeppelin() {
}
function do_configure_zeppelin() {
}
Prerequisites
oc whoami >/dev/null 2>&1 || { echo "Cannot validate connectivity to OpenShift. Ensure oc client tool installed and logged in" ; exit 1; }
RESTART_OPTION=
Process Input
for i in "$@"
do
case $i in
--zeppelin-base=)
USER_ZEPPELIN_BASE="${i#=}"
shift;;
--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
fi
if [ ! -z ${RESTART_OPTION} ]; then
else
# Normal Execution
do_ocp_components
fi
echo "============================================="
echo
echo "OpenShift IoT Example Project Setup Complete."
echo
echo "============================================="
echo
CURRENT_STAGE=