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 1 commit
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
18 changes: 15 additions & 3 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 Down Expand Up @@ -256,14 +262,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