From 1d93c0089a1706eb6c46e1ffef42bdde81e362a5 Mon Sep 17 00:00:00 2001 From: Sergii Leshchenko Date: Mon, 5 Feb 2018 18:12:50 +0200 Subject: [PATCH] Fix configuration properties names in deploy scripts --- .../openshift/files/scripts/che-config | 18 +++++++-------- .../openshift/files/scripts/deploy_che.sh | 22 +++++++++---------- .../modules/openshift/files/scripts/ocp.sh | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dockerfiles/init/modules/openshift/files/scripts/che-config b/dockerfiles/init/modules/openshift/files/scripts/che-config index 713d8963bbc..d5b23f80a2a 100644 --- a/dockerfiles/init/modules/openshift/files/scripts/che-config +++ b/dockerfiles/init/modules/openshift/files/scripts/che-config @@ -6,17 +6,17 @@ CHE_API: ${HTTP_PROTOCOL}://che-${OPENSHIFT_NAMESPACE_URL}/api CHE_WEBSOCKET_ENDPOINT: ${WS_PROTOCOL}://che-${OPENSHIFT_NAMESPACE_URL}/api/websocket CHE_DEBUG_SERVER: ${CHE_DEBUG_SERVER} CHE_INFRASTRUCTURE_ACTIVE: openshift -CHE_INFRA_OPENSHIFT_BOOTSTRAPPER_BINARY__URL: ${HTTP_PROTOCOL}://che-${OPENSHIFT_NAMESPACE_URL}/agent-binaries/linux_amd64/bootstrapper/bootstrapper -CHE_INFRA_OPENSHIFT_MACHINE__START__TIMEOUT__MIN: "5" -CHE_INFRA_OPENSHIFT_MASTER__URL: ${CHE_INFRA_OPENSHIFT_MASTER__URL} -CHE_INFRA_OPENSHIFT_OAUTH__TOKEN: ${CHE_INFRA_OPENSHIFT_OAUTH__TOKEN} -CHE_INFRA_OPENSHIFT_PASSWORD: ${CHE_INFRA_OPENSHIFT_PASSWORD} +CHE_INFRA_KUBERNETES_BOOTSTRAPPER_BINARY__URL: ${HTTP_PROTOCOL}://che-${OPENSHIFT_NAMESPACE_URL}/agent-binaries/linux_amd64/bootstrapper/bootstrapper +CHE_INFRA_KUBERNETES_MACHINE__START__TIMEOUT__MIN: "5" +CHE_INFRA_KUBERNETES_MASTER__URL: ${CHE_INFRA_KUBERNETES_MASTER__URL} +CHE_INFRA_KUBERNETES_OAUTH__TOKEN: ${CHE_INFRA_KUBERNETES_OAUTH__TOKEN} +CHE_INFRA_KUBERNETES_PASSWORD: ${CHE_INFRA_KUBERNETES_PASSWORD} CHE_INFRA_OPENSHIFT_PROJECT: ${CHE_INFRA_OPENSHIFT_PROJECT} -CHE_INFRA_OPENSHIFT_PVC_STRATEGY: ${CHE_INFRA_OPENSHIFT_PVC_STRATEGY} -CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS: ${CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS} +CHE_INFRA_KUBERNETES_PVC_STRATEGY: ${CHE_INFRA_KUBERNETES_PVC_STRATEGY} +CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS: ${CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS} CHE_INFRA_OPENSHIFT_TLS__ENABLED: ${ENABLE_SSL} -CHE_INFRA_OPENSHIFT_TRUST__CERTS: "false" -CHE_INFRA_OPENSHIFT_USERNAME: ${CHE_INFRA_OPENSHIFT_USERNAME} +CHE_INFRA_KUBERNETES_TRUST__CERTS: "false" +CHE_INFRA_KUBERNETES_USERNAME: ${CHE_INFRA_KUBERNETES_USERNAME} CHE_KEYCLOAK_AUTH__SERVER__URL: ${CHE_KEYCLOAK_AUTH__SERVER__URL} CHE_KEYCLOAK_CLIENT__ID: ${CHE_KEYCLOAK_CLIENT__ID} CHE_KEYCLOAK_GITHUB_ENDPOINT: ${KEYCLOAK_GITHUB_ENDPOINT} diff --git a/dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh b/dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh index 49ddae7c518..f170fe0e911 100755 --- a/dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh +++ b/dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh @@ -126,7 +126,7 @@ if [ "${OPENSHIFT_FLAVOR}" == "minishift" ]; then # Set minishift configuration # ---------------------- DEFAULT_CHE_INFRA_OPENSHIFT_PROJECT="" - DEFAULT_CHE_INFRA_OPENSHIFT_PVC_STRATEGY="unique" + DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY="unique" DEFAULT_OPENSHIFT_ENDPOINT="https://${MINISHIFT_IP}:8443/" DEFAULT_OPENSHIFT_USERNAME="developer" DEFAULT_OPENSHIFT_PASSWORD="developer" @@ -139,14 +139,14 @@ if [ "${OPENSHIFT_FLAVOR}" == "minishift" ]; then DEFAULT_ENABLE_SSL="false" DEFAULT_CHE_LOG_LEVEL="INFO" DEFAULT_CHE_PREDEFINED_STACKS_RELOAD="false" - DEFAULT_CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS="true" + DEFAULT_CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS="true" elif [ "${OPENSHIFT_FLAVOR}" == "osio" ]; then # ---------------------- # Set osio configuration # ---------------------- if [ -z "${OPENSHIFT_TOKEN+x}" ]; then echo "[CHE] **ERROR** Env var OPENSHIFT_TOKEN is unset. You need to set it with your OSO token to continue. To retrieve your token: https://console.starter-us-east-2.openshift.com/console/command-line. Aborting"; exit 1; fi DEFAULT_CHE_INFRA_OPENSHIFT_PROJECT=${CHE_OPENSHIFT_PROJECT:-${DEFAULT_CHE_OPENSHIFT_PROJECT}} - DEFAULT_CHE_INFRA_OPENSHIFT_PVC_STRATEGY="common" + DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY="common" DEFAULT_OPENSHIFT_ENDPOINT="https://api.starter-us-east-2.openshift.com" DEFAULT_CHE_OPENSHIFT_PROJECT="$(oc get projects -o=custom-columns=NAME:.metadata.name --no-headers | grep "\\-che$")" DEFAULT_OPENSHIFT_ROUTING_SUFFIX="8a09.starter-us-east-2.openshiftapps.com" @@ -155,13 +155,13 @@ elif [ "${OPENSHIFT_FLAVOR}" == "osio" ]; then DEFAULT_ENABLE_SSL="true" DEFAULT_CHE_LOG_LEVEL="INFO" DEFAULT_CHE_PREDEFINED_STACKS_RELOAD="true" - DEFAULT_CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS="false" + DEFAULT_CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS="false" elif [ "${OPENSHIFT_FLAVOR}" == "ocp" ]; then # ---------------------- # Set ocp configuration # ---------------------- DEFAULT_CHE_INFRA_OPENSHIFT_PROJECT="" - DEFAULT_CHE_INFRA_OPENSHIFT_PVC_STRATEGY="unique" + DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY="unique" DEFAULT_OPENSHIFT_USERNAME="developer" DEFAULT_OPENSHIFT_PASSWORD="developer" DEFAULT_CHE_OPENSHIFT_PROJECT="eclipse-che" @@ -170,7 +170,7 @@ elif [ "${OPENSHIFT_FLAVOR}" == "ocp" ]; then DEFAULT_ENABLE_SSL="true" DEFAULT_CHE_LOG_LEVEL="INFO" DEFAULT_CHE_PREDEFINED_STACKS_RELOAD="true" - DEFAULT_CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS="true" + DEFAULT_CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS="true" fi # -------------------------------------------------------- @@ -201,10 +201,10 @@ fi CHE_OAUTH_GITHUB_CLIENTID=${CHE_OAUTH_GITHUB_CLIENTID:-} CHE_OAUTH_GITHUB_CLIENTSECRET=${CHE_OAUTH_GITHUB_CLIENTSECRET:-} CHE_INFRA_OPENSHIFT_PROJECT=${CHE_INFRA_OPENSHIFT_PROJECT:-${DEFAULT_CHE_INFRA_OPENSHIFT_PROJECT}} -if [ -z ${CHE_INFRA_OPENSHIFT_USERNAME+x} ]; then CHE_INFRA_OPENSHIFT_USERNAME=$OPENSHIFT_USERNAME; fi -if [ -z ${CHE_INFRA_OPENSHIFT_PASSWORD+x} ]; then CHE_INFRA_OPENSHIFT_PASSWORD=$OPENSHIFT_PASSWORD; fi -if [ -z ${CHE_INFRA_OPENSHIFT_OAUTH__TOKEN+x} ]; then CHE_INFRA_OPENSHIFT_OAUTH__TOKEN=$OPENSHIFT_TOKEN; fi -CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS=${CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS:-${DEFAULT_CHE_INFRA_OPENSHIFT_PVC_PRECREATE__SUBPATHS}} +if [ -z ${CHE_INFRA_KUBERNETES_USERNAME+x} ]; then CHE_INFRA_KUBERNETES_USERNAME=$OPENSHIFT_USERNAME; fi +if [ -z ${CHE_INFRA_KUBERNETES_PASSWORD+x} ]; then CHE_INFRA_KUBERNETES_PASSWORD=$OPENSHIFT_PASSWORD; fi +if [ -z ${CHE_INFRA_KUBERNETES_OAUTH__TOKEN+x} ]; then CHE_INFRA_KUBERNETES_OAUTH__TOKEN=$OPENSHIFT_TOKEN; fi +CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS=${CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS:-${DEFAULT_CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS}} OPENSHIFT_ROUTING_SUFFIX=${OPENSHIFT_ROUTING_SUFFIX:-${DEFAULT_OPENSHIFT_ROUTING_SUFFIX}} DEFAULT_OPENSHIFT_NAMESPACE_URL="${CHE_OPENSHIFT_PROJECT}.${OPENSHIFT_ROUTING_SUFFIX}" @@ -218,7 +218,7 @@ CHE_DEBUG_SERVER=${CHE_DEBUG_SERVER:-${DEFAULT_CHE_DEBUG_SERVER}} OC_SKIP_TLS=${OC_SKIP_TLS:-${DEFAULT_OC_SKIP_TLS}} CHE_APPLY_RESOURCE_QUOTAS=${CHE_APPLY_RESOURCE_QUOTAS:-${DEFAULT_CHE_APPLY_RESOURCE_QUOTAS}} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY:-${DEFAULT_IMAGE_PULL_POLICY}} -CHE_INFRA_OPENSHIFT_PVC_STRATEGY=${CHE_INFRA_OPENSHIFT_PVC_STRATEGY:-${DEFAULT_CHE_INFRA_OPENSHIFT_PVC_STRATEGY}} +CHE_INFRA_KUBERNETES_PVC_STRATEGY=${CHE_INFRA_KUBERNETES_PVC_STRATEGY:-${DEFAULT_CHE_INFRA_KUBERNETES_PVC_STRATEGY}} CHE_HOST="${OPENSHIFT_NAMESPACE_URL}" if [ "${ENABLE_SSL}" == "true" ]; then HTTP_PROTOCOL="https" diff --git a/dockerfiles/init/modules/openshift/files/scripts/ocp.sh b/dockerfiles/init/modules/openshift/files/scripts/ocp.sh index e6b3714caff..5e9de8bb5da 100755 --- a/dockerfiles/init/modules/openshift/files/scripts/ocp.sh +++ b/dockerfiles/init/modules/openshift/files/scripts/ocp.sh @@ -61,7 +61,7 @@ export OPENSHIFT_FLAVOR="ocp" DEFAULT_OPENSHIFT_ENDPOINT="https://${OC_PUBLIC_HOSTNAME}:8443" export OPENSHIFT_ENDPOINT=${OPENSHIFT_ENDPOINT:-${DEFAULT_OPENSHIFT_ENDPOINT}} -export CHE_INFRA_OPENSHIFT_MASTER__URL=${CHE_INFRA_OPENSHIFT_MASTER__URL:-${OPENSHIFT_ENDPOINT}} +export CHE_INFRA_KUBERNETES_MASTER__URL=${CHE_INFRA_KUBERNETES_MASTER__URL:-${OPENSHIFT_ENDPOINT}} DEFAULT_ENABLE_SSL="false" export ENABLE_SSL=${ENABLE_SSL:-${DEFAULT_ENABLE_SSL}}