-
Notifications
You must be signed in to change notification settings - Fork 169
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
procedures: Migration to devworkspace engine #2159
Changes from all commits
f7fd96b
2f8e763
b252cd8
79f3fe8
e0402d2
4739686
4848a2e
1675388
c75d2a5
13fdc85
99f6d2b
f95698e
a4a823a
5fabedf
23f538d
70a240a
60faaae
816781b
07ad4f9
9dea068
34d60bd
6221b9b
c030d4f
448a42f
83cda22
82eb83e
84a5b1d
c4f58f1
10e8655
bd3c49a
1082018
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[id="migration-to-devworkspace-engine"] | ||
|
||
:navtitle: Migration to DevWorkspace engine | ||
:keywords: administration-guide, migration, devworkspace | ||
:page-aliases: .:migration-to-devworskpace-engine | ||
|
||
include::partial$proc_migration-to-devworkspace-engine.adoc[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,263 @@ | ||
|
||
[id="migration-to-devworkspace-engine_{context}"] | ||
= Migration to {devworkspace} engine. | ||
|
||
This procedure describes how to migrate to {devworkspace} engine using https://docs.openshift.com/container-platform/latest/operators/understanding/olm/olm-understanding-olm.html[OLM] to support the Devfile 2.0.0 file format and mentions how to do so on existing instances. | ||
|
||
.Prerequisites | ||
|
||
* The `{orch-cli}` tool is available. | ||
* An instance of {prod-short} deployed using xref:installation-guide:installing-che-on-openshift-4-using-operatorhub.adoc[Operator Hub] from `{prod-stable-channel}` channel on OpenShift cluster version greater or equal to 4.8 | ||
* OpenShift OAuth is enabled. See xref:configuring-openshift-oauth.adoc[]. | ||
* Bundled PostgreSQL | ||
|
||
.Procedure | ||
|
||
. All workspaces must be stopped and changes pushed back to Git repositories. | ||
|
||
. Backup {prod-short} data. See xref:managing-backups-using-chectl.adoc[]. | ||
|
||
include::partial$snip_scaling-down-che.adoc[] | ||
|
||
. Create the script to get all {prod-short} users: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than displaying a script that the user should edit, could we have a script that can receive parameters and that the user can download without modifications? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User should not edit any scrits but copy/paster into console to run. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then the step should be "Download the script from following URL" (URL preferably including the release version) rather than "Select, copy and paste a script we display in the content of the script in the docs". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script depends on doc templates like {prod-namespace} and {prod-checluster}. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we have a script where {orch-cli}, {prod-namespace} and {prod-checluster} are arguments? Now we would be embedding untestable code inside the docs, it feels weird. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These parameters are something that users should not care about. |
||
+ | ||
[source,shell,subs="+attributes"] | ||
---- | ||
cat >get-all-{prod-id}-users.sh<<EOF | ||
#!/bin/bash | ||
set -e | ||
|
||
ALL_USERS_DUMP={prod-id}-users.txt | ||
IDENTITY_PROVIDER_URL=\$({orch-cli} get checluster {prod-checluster} -n {prod-namespace} -o jsonpath="{.status.keycloakURL}" ) | ||
IDENTITY_PROVIDER_SECRET=\$({orch-cli} get checluster/{prod-checluster} -n {prod-namespace} -o jsonpath="{.spec.auth.identityProviderSecret}") | ||
IDENTITY_PROVIDER_PASSWORD=\$(if [ -z "\$IDENTITY_PROVIDER_SECRET" ] || [ \$IDENTITY_PROVIDER_SECRET = "null" ]; then {orch-cli} get checluster/{prod-checluster} -n {prod-namespace} -o jsonpath="{.spec.auth.identityProviderPassword}"; else {orch-cli} get secret \$IDENTITY_PROVIDER_SECRET -n {prod-namespace} -o jsonpath="{.data.password}" | base64 -d; fi) | ||
IDENTITY_PROVIDER_USERNAME=\$(if [ -z "\$IDENTITY_PROVIDER_SECRET" ] || [ \$IDENTITY_PROVIDER_SECRET = "null" ]; then {orch-cli} get checluster/{prod-checluster} -n {prod-namespace} -o jsonpath="{.spec.auth.IdentityProviderAdminUserName}"; else {orch-cli} get secret \$IDENTITY_PROVIDER_SECRET -n {prod-namespace} -o jsonpath="{.data.user}" | base64 -d; fi) | ||
IDENTITY_PROVIDER_REALM=\$({orch-cli} get checluster {prod-checluster} -n {prod-namespace} -o jsonpath="{.spec.auth.identityProviderRealm}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An observation is that the scripts would work only if Eclipse Che / CRW is installed in the recomended namespace e.g. |
||
|
||
refreshToken() { | ||
IDENTITY_PROVIDER_TOKEN=\$(curl -ks \ | ||
-d "client_id=admin-cli" \ | ||
-d "username=\${IDENTITY_PROVIDER_USERNAME}" \ | ||
-d "password=\${IDENTITY_PROVIDER_PASSWORD}" \ | ||
-d "grant_type=password" \ | ||
"\${IDENTITY_PROVIDER_URL}/realms/master/protocol/openid-connect/token" | jq -r ".access_token") | ||
} | ||
|
||
run() { | ||
rm -f \${ALL_USERS_DUMP} | ||
refreshToken | ||
ALL_USERS=\$(curl -ks -H "Authorization: bearer \${IDENTITY_PROVIDER_TOKEN}" "\${IDENTITY_PROVIDER_URL}/\${IDENTITY_PROVIDER_USERNAME}/realms/\${IDENTITY_PROVIDER_REALM}/users") | ||
ALL_USERS_IDS=(\$(echo "\${ALL_USERS}" | jq ".[] | .id" | tr "\r\n" " ")) | ||
|
||
for USER_ID in "\${ALL_USERS_IDS[@]}"; do | ||
refreshToken | ||
|
||
USER_ID=\$(echo "\${USER_ID}" | tr -d "\"") | ||
FEDERATED_IDENTITY=\$(curl -ks -H "Authorization: bearer \${IDENTITY_PROVIDER_TOKEN}" "\${IDENTITY_PROVIDER_URL}/\${IDENTITY_PROVIDER_USERNAME}/realms/\${IDENTITY_PROVIDER_REALM}/users/\${USER_ID}/federated-identity") | ||
IDENTITY_PROVIDER=\$(echo "\${FEDERATED_IDENTITY}" | jq -r ".[] | select(.identityProvider == \"openshift-v4\")") | ||
if [ -n "\${IDENTITY_PROVIDER}" ]; then | ||
USER_PROFILE=\$(echo "\${ALL_USERS}" | jq -r ".[] | select(.id == \"\${USER_ID}\")") | ||
USER_EMAIL=\$(echo "\${USER_PROFILE}" | jq -r ".email") | ||
USER_NAME=\$(echo "\${USER_PROFILE}" | jq -r ".username") | ||
USER_FIRST_NAME=\$(echo "\${USER_PROFILE}" | jq -r ".firstName") | ||
USER_LAST_NAME=\$(echo "\${USER_PROFILE}" | jq -r ".lastName") | ||
|
||
OPENSHIFT_USER_ID=\$(echo "\${IDENTITY_PROVIDER}" | jq ".userId" | tr -d "\"") | ||
echo "[INFO] Find {prod-short} user: \${USER_ID} and corresponding OpenShift user: \${OPENSHIFT_USER_ID}" | ||
echo "\${USER_ID} \${OPENSHIFT_USER_ID} username:\$(echo \${USER_NAME} | base64) email:\$(echo \${USER_EMAIL} | base64) firstName:\$(echo \${USER_FIRST_NAME} | base64) lastName:\$(echo \${USER_LAST_NAME} | base64) " >> \${ALL_USERS_DUMP} | ||
fi | ||
done | ||
} | ||
|
||
run | ||
echo "[INFO] Done." | ||
EOF | ||
|
||
bash get-all-{prod-id}-users.sh | ||
---- | ||
|
||
include::partial$snip_scaling-down-keycloak.adoc[] | ||
|
||
include::partial$snip_finding-che-database-name.adoc[] | ||
|
||
include::partial$snip_dumping-che-database.adoc[] | ||
|
||
include::partial$snip_terminate-connections-to-postgresql-database.adoc[] | ||
|
||
include::partial$snip_droping-che-database.adoc[] | ||
|
||
include::partial$snip_creating-che-database.adoc[] | ||
|
||
. Migrate {prod-short} users: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
DUMP="che.sql" | ||
ALL_USERS_DUMP={prod-id}-users.txt | ||
while IFS= read -r line | ||
do | ||
IDS=($line) | ||
USER_ID=${IDS[0]} | ||
OPENSHIFT_USER_ID=${IDS[1]} | ||
|
||
sed -i -e "s|${USER_ID}|${OPENSHIFT_USER_ID}|g" "${DUMP}" | ||
|
||
echo "[INFO] Migrated User ID from \"${USER_ID}\" to \"${OPENSHIFT_USER_ID}\"" | ||
done < "${ALL_USERS_DUMP}" | ||
---- | ||
|
||
include::partial$snip_restoring-che-database.adoc[] | ||
|
||
. Migrate users profiles: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
ALL_USERS_DUMP={prod-id}-users.txt | ||
while IFS= read -r line | ||
do | ||
IDS=($line) | ||
OPENSHIFT_USER_ID=${IDS[1]} | ||
USER_NAME=$(echo ${IDS[2]} | cut -d ":" -f 2- | base64 -d) | ||
USER_EMAIL=$(echo ${IDS[3]} | cut -d ":" -f 2- | base64 -d) | ||
USER_FIRST_NAME=$(echo ${IDS[4]} | cut -d ":" -f 2- | base64 -d) | ||
USER_LAST_NAME=$(echo ${IDS[5]} | cut -d ":" -f 2- | base64 -d) | ||
|
||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql ${CHE_POSTGRES_DB} -tAc \"INSERT INTO profile(userid) VALUES ('${OPENSHIFT_USER_ID}');\"" | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql ${CHE_POSTGRES_DB} -tAc \"INSERT INTO profile_attributes(user_id,name, value) VALUES ('${OPENSHIFT_USER_ID}', 'preferred_username', '${USER_NAME}');\"" | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql ${CHE_POSTGRES_DB} -tAc \"INSERT INTO profile_attributes(user_id,name, value) VALUES ('${OPENSHIFT_USER_ID}', 'email', '${USER_EMAIL}');\"" | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql ${CHE_POSTGRES_DB} -tAc \"INSERT INTO profile_attributes(user_id,name, value) VALUES ('${OPENSHIFT_USER_ID}', 'firstName', '${USER_FIRST_NAME}');\"" | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql ${CHE_POSTGRES_DB} -tAc \"INSERT INTO profile_attributes(user_id,name, value) VALUES ('${OPENSHIFT_USER_ID}', 'lastName', '${USER_LAST_NAME}');\"" | ||
|
||
echo "[INFO] Added profile for \"${OPENSHIFT_USER_ID}\"" | ||
done < "${ALL_USERS_DUMP}" | ||
---- | ||
|
||
. Delete Cluster Service Version: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} delete csv $({orch-cli} get subscription {prod-id} -n {prod-namespace} -o jsonpath="{.status.currentCSV}") -n {prod-namespace} | ||
---- | ||
|
||
. Delete Subscription: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} delete subscription {prod-id} -n {prod-namespace} | ||
---- | ||
|
||
. Enable {devworkspace} engine: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/devWorkspace/enable", "value": true}]' | ||
---- | ||
|
||
. Enable single-host exposure strategy: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json -p \ | ||
'[{"op": "replace", "path": "/spec/server/serverExposureStrategy", "value": "single-host"}]' | ||
---- | ||
|
||
. Delete {identity-provider} route: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} delete route keycloak -n {prod-namespace} | ||
---- | ||
|
||
. Delete {identity-provider} service: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} delete service keycloak -n {prod-namespace} | ||
---- | ||
|
||
. Delete {identity-provider} deployment: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} delete deployment keycloak -n {prod-namespace} | ||
---- | ||
|
||
ifeval::["{project-context}" == "che"] | ||
. To deploy {prod} from `{prod-next-channel}` channel, create a catalog source: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} apply -f - <<EOF | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: CatalogSource | ||
metadata: | ||
name: {prod-next-channel-catalog-source} | ||
namespace: openshift-operators | ||
spec: | ||
image: {prod-next-channel-catalog-source-image} | ||
sourceType: grpc | ||
updateStrategy: | ||
registryPoll: | ||
interval: 5m | ||
EOF | ||
---- | ||
endif::[] | ||
|
||
. Create a new subscription: | ||
+ | ||
ifeval::["{project-context}" == "che"] | ||
To deploy from the `{prod-stable-channel}` channel: | ||
+ | ||
endif::[] | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} apply -f - <<EOF | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: {prod-id} | ||
namespace: openshift-operators | ||
spec: | ||
channel: {prod-stable-channel} | ||
installPlanApproval: Automatic | ||
name: {prod-stable-channel-package} | ||
source: {prod-stable-channel-catalog-source} | ||
sourceNamespace: openshift-marketplace | ||
EOF | ||
---- | ||
+ | ||
ifeval::["{project-context}" == "che"] | ||
To deploy from the `{prod-next-channel}` channel: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} apply -f - <<EOF | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: {prod-id} | ||
namespace: openshift-operators | ||
spec: | ||
channel: {prod-next-channel} | ||
installPlanApproval: Automatic | ||
name: {prod-next-channel-package} | ||
source: {prod-next-channel-catalog-source} | ||
sourceNamespace: openshift-operators | ||
EOF | ||
---- | ||
endif::[] | ||
|
||
. Wait until Operator is ready: | ||
+ | ||
:k8s-component: {prod-operator} | ||
:k8s-namespace: openshift-operators | ||
include::partial$snip_waiting-for-component.adoc[] | ||
|
||
. Wait until {prod-short} is ready: | ||
+ | ||
:k8s-component: {prod-deployment} | ||
:k8s-namespace: {prod-namespace} | ||
include::partial$snip_waiting-for-component.adoc[] | ||
|
||
include::partial$snip_verification-che-working.adoc[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
. Create {prod-short} database: | ||
tolusha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql postgres -tAc \"CREATE DATABASE $CHE_POSTGRES_DB\"" | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
. Drop {prod-short} database: | ||
tolusha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "dropdb $CHE_POSTGRES_DB" | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
. Dump {prod-short} database: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "pg_dump $CHE_POSTGRES_DB > /tmp/che.sql" | ||
---- | ||
|
||
. Copy {prod-short} database to a local file system: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} cp {prod-namespace}/$({orch-cli} get pods -l app.kubernetes.io/component=postgres -n {prod-namespace} --no-headers=true -o custom-columns=":metadata.name"):/tmp/che.sql che.sql | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
. Find {prod-short} database name: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
CHE_POSTGRES_DB=$({orch-cli} get cm/che -n {prod-namespace} -o jsonpath='{.data.CHE_JDBC_URL}' | awk -F '/' '{print $NF}') | ||
if [ -z "$CHE_POSTGRES_DB" ] || [ $CHE_POSTGRES_DB = "null" ]; then CHE_POSTGRES_DB="dbche"; fi | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
POSTGRES_SECRET=$({orch-cli} get checluster/{prod-checluster} -n {prod-namespace} -o json | jq -r '.spec.database.chePostgresSecret') | ||
CHE_USER_NAME=$(if [ -z "$POSTGRES_SECRET" ] || [ $POSTGRES_SECRET = "null" ]; then {orch-cli} get checluster/{prod-checluster} -n {prod-namespace} -o json | jq -r '.spec.database.chePostgresUser'; else {orch-cli} get secret $POSTGRES_SECRET -n {prod-namespace} -o json | jq -r '.data.user' | base64 -d; fi) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
. Find PostgreSQL pod: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
POSTGRES_POD=$({orch-cli} get pods -n {prod-namespace} | grep postgres | awk '{print $1}') | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
. Copy {prod-short} database from a local file system: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} cp che.sql {prod-namespace}/$({orch-cli} get pods -l app.kubernetes.io/component=postgres -n {prod-namespace} --no-headers=true -o custom-columns=":metadata.name"):/tmp/che.sql | ||
---- | ||
|
||
. Restore {prod-short} database: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql $CHE_POSTGRES_DB < /tmp/che.sql" | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
. Scale down the {prod-short} deployment: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} scale deployment {prod-deployment} --replicas=0 -n {prod-namespace} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it would be great to use some env var for namespace. Otherwise, it will work only for defaults installations, and will not work for specific setups like dogfooding / Developer Sandbox There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It make perfect sense but all documentation is based on the fact that Eclipse Che is deployed in {prod-namespace} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume if namespace is different, then user must change it in the scrips manually. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably introduce NAMESPACE env var, it is really error-prone to expect from an admin to patch the scripts manually There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fully agree with @ibuziuk. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so into which repo will we move the script(s) so that they can evolve outside the docs, and not be beholden to doc-related validation rules? Also then we can tell a user "set your namespace variable, curl this URL, run this script, and you're done!" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we use https://github.com/devfile/devworkspace-operator-docs - maybe a subfolder like https://github.com/devfile/devworkspace-operator-docs/tree/main/migration/ -- or do we need a new repo? |
||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
. Scale down the {identity-provider} deployment: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} scale deployment keycloak --replicas=0 -n {prod-namespace} | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
. Terminate connections to PostgreSQL database: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{orch-cli} exec deploy/postgres -n {prod-namespace} -- bash -c "psql -c \"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = '${CHE_POSTGRES_DB}'\"" | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
. Open Dashboard: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
{prod-cli} dashboard:open -n {prod-namespace} | ||
---- | ||
|
||
. Log in the {prod}. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
while [[ $({orch-cli} get pod -l app.kubernetes.io/component={k8s-component} -n {k8s-namespace} -o go-template='{{len .items}}') == 0 ]] | ||
do | ||
echo "Waiting..." | ||
sleep 10s | ||
done | ||
{orch-cli} wait --for=condition=ready pod -l app.kubernetes.io/component={k8s-component} -n {k8s-namespace} --timeout=120s | ||
---- |
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.
Is admin of Eclipse Che obligated to push back to Git repositories and then all stop workspaces?
Shouldn't workspace be stopped automatically?
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 am not aware of such possibility. This is a general recommendation about working workspaces.
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.
@tolusha @skabashnyuk folks, what is the SOP for stopping all running che-server workspaces? atm the implementation for automatic stopping works only after the engine switch from che-server to devWorkpace - eclipse-che/che#20631
According to the procedure from this PR, the workspaces are expected to be stopped before the engine switch, so wondering how admin is expected to proceed in this case?