Che: [chectl] How to update Che server?

Created on 8 Jun 2020  ยท  14Comments  ยท  Source: eclipse/che

Summary

I would like to update the Che sever version from 7.12 to 7.13

Relevant information

On a Centos 7 machine I installed a multi-user instance of Eclipse Che version 7.12. The Che instance is running on Kubernetes using Minikube.
The installation has been done via the chectl management tool. In particular using the following command:

chectl server:start --platform=minikube --installer=operator --multiuser --domain=<public_ip>.nip.io --cheimage=quay.io/eclipse/che-server:7.12.0 --che-operator-cr-patch-yaml=patchTls.yaml

For me is not clear how I can update the Che instance running on my Centos 7 machine to version 7.13.
At the following link: https://github.com/che-incubator/chectl#chectl-serverupdate I have seen that the chectl tool provides the command chectl server:update but I cannot find the option --cheimage.

I appreciate any help!
Thank you

arechectl areux kinquestion

Most helpful comment

Hi @sleshchenko, I edited eclipse-che CR in order to set cheImage , cheImageTag and cheVersion to "". Then I have execute again the command chectl server:update... and it works. My eclipse che instance has been updated to version 7.14.1.
Thank you.

All 14 comments

chectl server:update will update to the latest released version - https://github.com/ibuziuk/chectl#chectl-serverupdate

update to a particular version e.g 7.13.0 or rolling back is not supported atm.
why do you plan to update to 7.13.0, not to the latest 7.14.1 ?

Hi @ibuziuk, thank you for your response. For me it's ok to update the Eclipse Che version to the latest 7.14.1. From your response I have understood that I have to use the command chectl server:update.

I have tried it with the following options:
chectl server:update --installer=operator --platform=minikube

During the update I received the following messages on the console:
`Set current context to 'minikube'

โœ” Verify Kubernetes API...OK
โœ” ๐Ÿ‘€ Looking for an already existing Eclipse Che instance
โœ” Verify if Eclipse Che is deployed into namespace "che"
โœ” Found running Eclipse Che deployment
โœ” Found running postgres deployment
โœ” Found running keycloak deployment
โœ” Found running plugin registry deployment
โœ” Check Eclipse Che server status...RUNNING (auth enabled)
โœ” โœˆ๏ธ Minikube preflight checklist
โœ” Verify if kubectl is installed
โœ” Verify if minikube is installed
โœ” Verify if minikube is running
โ†“ Start minikube [skipped]
โ†’ Minikube is already running.
โœ” Check Kubernetes version: Found v1.16.2.
โœ” Verify if minikube ingress addon is enabled
โ†“ Enable minikube ingress addon [skipped]
โ†’ Ingress addon is already enabled.
โ†“ Check if cluster accessible [skipped]
โœ” ๐Ÿƒโ€ Running the Eclipse Che operator Update
โœ” Checking versions compatibility before updating
Found deployed Eclipse Che with operator [quay.io/eclipse/che-operator]:7.12.1.
You are going to update it to [quay.io/eclipse/che-operator]:7.12.1.
Note that Eclipse Che operator will update component images (server, plugin registry) only if their values
are not overridden in eclipse-che Custom Resource. So, you may need to remove them manually.
Press q to quit or any key to continue: `

If I have understood correctly the che-operator is set to 7.12.1.
Should I use the option --che-operator-image=quay.io/eclipse/che-operator:latest?

Please note that when I installed Eclipse Che the first time I have also used the option:
--devfile-registry-url=<url-to-custom-devfile-registry> and I would like that the url to the custom devfile registry is not overwritten during the update process. Thank you.

@tolusha PTAL ^
@sdagostini I would expect that the command will be just chectl server:update without any args

@sdagostini
pls update chectl first: chectl update stable
Then it is possible to update Eclipse Che: chectl server:update --installer=operator --platform=minikube

No urls will be overridden during updating.

Hi @tolusha, I updated chectl first and them I updated Eclipse Che as you have indicated to me.
It seams that the update works because I received the following messages:

  Current Kubernetes context: 'minikube'
 โœ” Verify Kubernetes API...OK
 โœ” ๐Ÿ‘€  Looking for an already existing Eclipse Che instance
 โœ” Verify if Eclipse Che is deployed into namespace "che"
     โœ” Found running Eclipse Che deployment
     โœ” Found running postgres deployment
     โœ” Found running keycloak deployment
     โœ” Found running plugin registry deployment
โœ” Check Eclipse Che server status...RUNNING (auth enabled)
โœ” โœˆ๏ธ  Minikube preflight checklist
    โœ” Verify if kubectl is installed
    โœ” Verify if minikube is installed
    โœ” Verify if minikube is running
    โ†“ Start minikube [skipped]
      โ†’ Minikube is already running.
    โœ” Check Kubernetes version: Found v1.16.2.
    โœ” Verify if minikube ingress addon is enabled
    โ†“ Enable minikube ingress addon [skipped]
       โ†’ Ingress addon is already enabled.
    โ†“ Check if cluster accessible [skipped]
โœ” ๐Ÿƒโ€  Running the Eclipse Che operator Update
โœ” Checking versions compatibility before updating
  Found deployed Eclipse Che with operator [quay.io/eclipse/che-operator]:7.12.1.
  You are going to update it to [quay.io/eclipse/che-operator]:7.14.1.
  Note that Eclipse Che operator will update component images (server, plugin registry) only if their values
  are not overridden in eclipse-che Custom Resource. So, you may need to remove them manually.
  Press q to quit or any key to continue:

   Updating...
โœ” ๐Ÿƒโ€  Running the Eclipse Che operator Update
  โœ” Copying operator resources...done.
  โœ” Updating ServiceAccount che-operator in namespace che...updated.
  โœ” Updating Role che-operator in namespace che...updated.
  โœ” Updating ClusterRole che-operator...updated.
  โœ” Updating RoleBinding che-operator in namespace che...updated.
  โœ” Updating ClusterRoleBinding che-operator...updated.
  โœ” Updating Eclipse Che cluster CRD checlusters.org.eclipse.che...updated.
  โœ” Waiting 5 seconds for the new Kubernetes resources to get flushed...done
  โœ” Updating deployment che-operator in namespace che...updated.
  โœ” Waiting newer operator to be run
  Command server:update has completed successfully.

But if I connect to the Eclipse Che dashboard, at the bottom of the interface it is still indicated Eclipse Che 7.12.1.
I try to give you more information.
If I execute the command: kubectl get pods -n che I have the result below:

   NAME                   READY   STATUS    RESTARTS   AGE
  che-5488977875-6jpjm            1/1     Running   2          40m
  che-devfile-registry-55d7b9fb75-nhhvg   1/1     Running   0          14d
  che-operator-57c7cd7c99-j9v2b           1/1     Running   0          18m
  keycloak-fdb5cccb8-g64ks                1/1     Running   0          40m
  plugin-registry-658bb57ff5-rbpqm        1/1     Running   0          27d
  postgres-77b8c6684-mq4vl                1/1     Running   0          27d

It I execute the command: kubectl describe pod che-5488977875-6jpjm -n che the Image is set as below:

   Image:          quay.io/eclipse/che-server:7.12.0

It I execute the command: kubectl describe pod che-operator-57c7cd7c99-j9v2b -n che the Image is set as below:

    Image:           quay.io/eclipse/che-operator:7.14.1

It I execute the command: KUBE_EDITOR="nano" kubectl edit CheCluster -n che the cheImage and cheImageTag are set as below (in the server part):

  cheImage: quay.io/eclipse/che-server
  cheImageTag: 7.12.0

and the cheClusterRunning, cheURL and cheVersion are set as below (in the status part):

  cheClusterRunning: Available
  cheURL: http://che-che.<public_ip>.nip.io
  cheVersion: 7.12.0

Thank you!

@sdagostini
I see, thank you for response

@tolusha thank you. I give you this other information (if can help).
I noticed that if I execute the command docker images on my Centos 7 machine I have the images quay.io/eclipse/che-operator:7.14.1 and quay.io/eclipse/che-server:7.12.1 but it is missing the image quay.io/eclipse/che-server:7.14.1

@sdagostin Please pay attention on the chectl message

Note that Eclipse Che operator will update component images (server, plugin registry) only if their values are not overridden in eclipse-che Custom Resource. So, you may need to remove them manually.

Could you check your eclipse-che CR and remove images you don't want to set explicitly? kubectl edit checluster eclipse-che -n che
P.S. Sorry about that unclear manual inconvenient step you should do once, there was a time when images were hard-coded in the CR, now it's moved to che-operator side. So, after update should work fine just with chectl server:update ...

Hi @sleshchenko, thank you for your response. I checked the eclipse-che CR using the command you mensioned and yes, in the elipse-che CR I can see that in the server part
the cheImage and cheImageTag are set as below:

  cheImage: quay.io/eclipse/che-server
  cheImageTag: 7.12.0

and in the status part the cheVersion is set to 7.12.0. Just to see if I have uderstood correctly or not. Do I have to remove manually the cheImage,cheImageTag and cheVersion field manually once opened the CR with the command kubectl edit checluster eclipse-che -n che and save it?

Do I have to remove manually the cheImage,cheImageTag ... and save it ?

You can remove or set them to ""
I also see other images settings https://github.com/eclipse/che-operator/blob/master/deploy/crds/org_v1_che_cr.yaml#L20:
devfileRegistryImage, pluginRegistryImage, postgresImage, pvcJobsImage, identityProviderImage you probably need to modify them as well.

cheVersion

I have no idea how it's used. @mmorhun Could you help do it in the right way? Maybe provide patch command that will unset all needed fields?

Hi @sleshchenko, I edited eclipse-che CR in order to set cheImage , cheImageTag and cheVersion to "". Then I have execute again the command chectl server:update... and it works. My eclipse che instance has been updated to version 7.14.1.
Thank you.

@sdagostini Do you think this issue could be closed or you would like to see some UX improvement like the following chectl message

Note that Eclipse Che operator will update component images (server, plugin registry) only if their values
are not overridden in eclipse-che Custom Resource. So, you may need to remove them manually.
Press q to quit or any key to continue

is reformulated to make clearer what to do?

@sleshchenko I think that the issue can be closed. Yes, if possible, it could be useful to improve the UX updating the chectl message you mentioned to make it clearer. For example, could be added on the message a reference to the command that must be performed to edit the CR (this can help the people that are not expert of Eclipse Che). Thank you.

I'm closing it since that question is answered and issue is solved but there is create another issue to improve UX https://github.com/eclipse/che/issues/17171

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmytro-ndp picture dmytro-ndp  ยท  3Comments

JamesDrummond picture JamesDrummond  ยท  3Comments

Ohrimenko1988 picture Ohrimenko1988  ยท  3Comments

vanzhiganov picture vanzhiganov  ยท  3Comments

AndrienkoAleksandr picture AndrienkoAleksandr  ยท  3Comments