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

Fixes to ocp script #9493

Merged
2 commits merged into from
Apr 19, 2018
Merged
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
21 changes: 15 additions & 6 deletions deploy/openshift/ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export OPENSHIFT_USERNAME=${OPENSHIFT_USERNAME:-${DEFAULT_OPENSHIFT_USERNAME}}
DEFAULT_OPENSHIFT_PASSWORD="developer"
export OPENSHIFT_PASSWORD=${OPENSHIFT_PASSWORD:-${DEFAULT_OPENSHIFT_PASSWORD}}

DEFAULT_IMAGE_PULL_POLICY="Always"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY:-${DEFAULT_IMAGE_PULL_POLICY}}

DEFAULT_UPDATE_STRATEGY="Recreate"
export UPDATE_STRATEGY=${UPDATE_STRATEGY:-${DEFAULT_UPDATE_STRATEGY}}

DNS_PROVIDERS=(
xip.io
nip.codenvy-stg.com
Expand All @@ -65,9 +71,6 @@ export ENABLE_SSL=${ENABLE_SSL:-${DEFAULT_ENABLE_SSL}}
DEFAULT_CHE_IMAGE_TAG="nightly"
export CHE_IMAGE_TAG=${CHE_IMAGE_TAG:-${DEFAULT_CHE_IMAGE_TAG}}

DEFAULT_IMAGE_PULL_POLICY="Always"
export IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY:-${DEFAULT_IMAGE_PULL_POLICY}}

DEFAULT_CHE_IMAGE_REPO="eclipse/che-server"
export CHE_IMAGE_REPO=${CHE_IMAGE_REPO:-${DEFAULT_CHE_IMAGE_REPO}}

Expand Down Expand Up @@ -256,14 +259,20 @@ deploy_che_to_ocp() {
wait_for_postgres
$OC_BINARY new-app -f ${BASE_DIR}/templates/multi/keycloak-template.yaml -p ROUTING_SUFFIX=${OC_PUBLIC_IP}.${DNS_PROVIDER} ${KEYCLOAK_PARAM}
wait_for_keycloak
export CHE_MULTIUSER_PARAM="-p CHE_MULTIUSER=true"
fi
CHE_VAR_ARRAY=$(env | grep "CHE_.")
CHE_VAR_ARRAY=$(env | grep "^CHE_.")
if [ ${#CHE_VAR_ARRAY[@]} > 0 ]; then
ENV="-e ${CHE_VAR_ARRAY}"
fi

$OC_BINARY new-app -f ${BASE_DIR}/templates/che-server-template.yaml -p ROUTING_SUFFIX=${OC_PUBLIC_IP}.${DNS_PROVIDER} -p IMAGE_CHE=${CHE_IMAGE_REPO} -p CHE_VERSION=${CHE_IMAGE_TAG} ${CHE_MULTIUSER_PARAM} ${ENV}
$OC_BINARY new-app -f ${BASE_DIR}/templates/che-server-template.yaml \
-p ROUTING_SUFFIX=${OC_PUBLIC_IP}.${DNS_PROVIDER} \
-p IMAGE_CHE=${CHE_IMAGE_REPO} \
-p CHE_VERSION=${CHE_IMAGE_TAG} \
-p PULL_POLICY=${IMAGE_PULL_POLICY} \
-p STRATEGY=${UPDATE_STRATEGY} \
-p CHE_MULTIUSER=${CHE_MULTIUSER} \
${ENV}
$OC_BINARY set volume dc/che --add -m /data --name=che-data-volume --claim-name=che-data-volume
echo "Waiting for Che to boot..."
wait_for_che
Expand Down