Skip to content
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

Chang server:stop behavior and added server:delete #76

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

l0rd
Copy link
Collaborator

@l0rd l0rd commented Apr 1, 2019

With this PR the command server:stop:

  • calls Che server shutdown endpoint (/api/system/stop?shutdown=true)
  • scales down the deployment to zero (as well as keycloak and postgres if needed)

In this PR is also included a new command: server:delete. It rapidly purges all Che resources (deployments, pods, services, routes, cm, pvc etc...) to start from scratch.

Some other changes included in this PR:

  • Automatically find out if it's Kubernetes or OpenShift (currently only stop and delete commands)
  • server:stop is the first command that supports authenticated Che API (user has to provide the access token as a param, I would like to create a new auth:token command that would help with that)
  • Added 2 end2end tests for minikube and minishift: I would like to setup a circleCi job that use them for PR validation
  • Added an option to use verbose Listr renderer for all commands because it's better for automated tests

@l0rd
Copy link
Collaborator Author

l0rd commented Apr 1, 2019

Fixes #71 and #56

@l0rd l0rd force-pushed the fix-server-stop branch from 0b6b930 to 88b4a22 Compare April 1, 2019 10:05
@l0rd l0rd changed the title Changed server:stop behavior and added server:delete Chang server:stop behavior and added server:delete Apr 1, 2019
@benoitf
Copy link
Collaborator

benoitf commented Apr 1, 2019

Hello,

I tried on minikube

server:start then server:stop and now server:start but it's stuck at

  ❯ ✅  Post installation checklist
    ❯ Che pod bootstrap
      ⠦ scheduling
        downloading images

@benoitf
Copy link
Collaborator

benoitf commented Apr 1, 2019

kubectl get all --namespace che

$ kubectl get all --namespace che
NAME               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
service/che-host   ClusterIP   10.103.228.218   <none>        8080/TCP,8087/TCP   15m

NAME                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/che   0/0     0            0           15m

NAME                             DESIRED   CURRENT   READY   AGE
replicaset.apps/che-5959c547b6   0         0         0       15m

@l0rd
Copy link
Collaborator Author

l0rd commented Apr 1, 2019

@benoitf you are right. I had not made the changes needed to support this scenario in this PR: server:start never check if che server was already deployed or not.

The only way to restart Che is kubectl scale deployment che --replicas=1. But that doesn't make this PR consistent so I will try to look how much changes are needed to support your scenario. If it needs too much work I would rather do it in another PR.

@benoitf
Copy link
Collaborator

benoitf commented Apr 1, 2019

ok, I was not able to test on minishift as each time it pulls all images it takes me at least one hour :-)

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked on minishift - works well

@l0rd
Copy link
Collaborator Author

l0rd commented Apr 1, 2019

I am going to merge this PR since fixing server:start properly doesn't look so easy. I have opened #77 to track that.

@l0rd l0rd merged commit 66ce104 into che-incubator:master Apr 1, 2019
@l0rd l0rd deleted the fix-server-stop branch April 1, 2019 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants