Skip to content

Commit

Permalink
Fix configuration properties names in deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sleshchenko committed Feb 5, 2018
1 parent 33c6232 commit 1d93c00
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions dockerfiles/init/modules/openshift/files/scripts/che-config
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
22 changes: 11 additions & 11 deletions dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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

# --------------------------------------------------------
Expand Down Expand Up @@ -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}"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/init/modules/openshift/files/scripts/ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit 1d93c00

Please sign in to comment.