-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update deploy_che script #9513
Update deploy_che script #9513
Conversation
deploy/openshift/deploy_che.sh
Outdated
ENV vars: this script automatically detect envs vars beginning with "CHE_" and passes them to Che deployments: | ||
CHE_IMAGE_REPO - Che server Docker image, defaults to "eclipse-che-server" | ||
CHE_IMAGE_TAG - Set che-server image tag, defaults to "nightly" | ||
CHE_INFRA_KUBERNETES_PROJECT - namespace for workspace objects (defaults to eclipse-che). A separate ws namespace can be used only if username/password or token is provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHE_INFRA_KUBERNETES_NAMESPACE
is used for Kubernetes Infra.
CHE_INFRA_OPENSHIFT_PROJECT
is used for OpenShift Infra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
deploy/openshift/deploy_che.sh
Outdated
${ENV} | ||
|
||
if [ ${UPDATE_STRATEGY} == "Recreate" ]; then | ||
${OC_BINARY} apply -f ${BASE_DIR}/templates/pvc/che-server-pvc.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the formatting is broken here. Please check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
deploy/openshift/ocp.sh
Outdated
--rolling - rolling update strategy (Recreate is the default one) | ||
--wait-che - track Che deployment progress until pod is healthy | ||
--debug - deploy Che in a debug mode, create and expose debug route | ||
--image-che= - override default Che image. Example --image-che=org/repo:tag. Tag is mandatory! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like =
symbol is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, makes sense - the format is in the example anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Please take a look my minor comments
deploy/openshift/deploy_che.sh
Outdated
ENV vars: this script automatically detect envs vars beginning with "CHE_" and passes them to Che deployments: | ||
CHE_IMAGE_REPO - Che server Docker image, defaults to "eclipse-che-server" | ||
CHE_IMAGE_TAG - Set che-server image tag, defaults to "nightly" | ||
CHE_INFRA_OPENSHIFT_PROJECT - namespace for workspace objects (defaults to eclipse-che). A separate ws namespace can be used only if username/password or token is provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say that default value is not eclipse-che
but the same as CHE_OPENSHIFT_PROJECT
or specified with --p
parameter
deploy/openshift/deploy_che.sh
Outdated
printInfo "Che successfully deployed and will be soon available at ${HTTP_PROTOCOL}://${CHE_ROUTE}" | ||
exposeDebugService | ||
if [ "${WAIT_FOR_CHE}" == "true" ]; then | ||
wait_for_che |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add two spaces here
deploy/openshift/ocp.sh
Outdated
--rolling - rolling update strategy (Recreate is the default one) | ||
--wait-che - track Che deployment progress until pod is healthy | ||
--debug - deploy Che in a debug mode, create and expose debug route | ||
--image-che - override default Che image. Example --image-che=org/repo:tag. Tag is mandatory! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like information about -p, --project parameter is missing.
deploy/openshift/deploy_che.sh
Outdated
# -------------------------------------------------------- | ||
HELP=" | ||
--help - script help menu | ||
--project | -p - OpenShift namespace to deploy Che (defaults to eclipse-che) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add example the same as for --image-che, because it is not clear that value should be separated with =
* Update OpenShift Origin version to 3.9 * Deploy script uses templates * Pass args to deploy script * Remove old scripts and yamls * Add missing args to ocp.sh help and and help to deploy_che.sh * Small fixes * Remove mistakenly added file * Remove mistakenly added file * Remove -a in docker ps to get registry container * Do not pass args but export envs in ocp.sh * Messed envs a bit * Delete test service that is used to compute routing suffix * Remove unnecessary port from Keycloak route * Fixes * Fixes * Typo * Minor fixes
What does this PR do?
After #9190 has been merged, existing deploy_che.sh and everything not in
deploy/openshift/templates
directory should go away (helper scripts and yamls) and start using new templates (deploy_che.sh).This PR:
ocp.sh
anddeploy_che.sh
are left. Both have help menus and are quite clear to follow the deployment logicdeploy_che.sh
templates friendly, i.e. deployment happens by applying templates.deploy_che.sh
so that once can override most commonly used ENVS and params like update strategy, pull policy, deployment image, https support, multi user flavor, etc.deploy_che.sh
to grab all local env variables beginning withCHE_
and pass them to Che deployment. Envs and params are printed before templates are applied.ROUTING_SUFFIX
is exported (for example,ocp.sh
does that), it is used as is.deploy_che.sh
. The script deploys Che with a set of envs and params to any OpenShift cluster be it MiniShift, a local Origin, OSD, OCP or OSO. There's just one pre-req: one needs to be logged in oc, i.e. have an active session (oc whoami
is the test command in the script). So, when deploying, say, to OSO or OCP/OSD, all one needs to do is to login to cluster usingoc
and run./deploy_che.sh
with a set of commands. It is possible that the desired namespace name already exists (in someone else's account) - it is possible to provide own with-p | --project
parameter.Tested with Origin (oc cluster up locally) and OSO Pro.