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

Run dashboard in a dedicated deployment with helm chart #18093

Merged
merged 8 commits into from
Oct 19, 2020

Conversation

sleshchenko
Copy link
Member

@sleshchenko sleshchenko commented Oct 12, 2020

What does this PR do?

Run dashboard in a dedicated deployment.
Note that after this PR Che Server tomcat will continue serving dashboard resources as well due backward compatibility reason. Tomcat will stop serving dashboard resources only after two sprints after we move helm + che operator to new deployment way.

Screenshot/screencast of this PR

Screenshot_20201012_154933

What issues does this PR fix or reference?

It fixes #18076

How to test this PR?

I checked that Dashboard and Dashboard Next are accessible and work as expected in different combination Singlehost/Multihost/DefaultHost/Gateway + Single/Multi-user

  • note that I generated certificates with chectl before I executed helm command: (chectl server:start --platform=minikube --installer=helm && helm delete che)
  • custom che server image is used to make sure that dashboard is loaded from Apache server but not Tomcat;
Singlehost
Singlehost Single-User Che
export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
helm upgrade --install che \
  --force \
  --namespace che \
  --set global.cheDomain=192.168.99.100.nip.io \
  --set global.ingressDomain=192.168.99.100.nip.io \
  --set cheImage=sleshchenko/che-server:cut-dashboard \
  --set global.serverStrategy=single-host \
  --set global.tls.useSelfSignedCerts=true \
  -f ${CHART_DIR}/values/tls.yaml \
  ${CHART_DIR}
Singlehost Mutli-User Che
export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
helm upgrade --install che \
  --force \
  --namespace che \
  --set global.cheDomain=192.168.99.100.nip.io \
  --set global.ingressDomain=192.168.99.100.nip.io \
  --set cheImage=sleshchenko/che-server:cut-dashboard \
  --set global.serverStrategy=single-host \
  --set global.tls.useSelfSignedCerts=true \
  -f ${CHART_DIR}/values/tls.yaml \
  -f ${CHART_DIR}/values/multi-user.yaml \
  ${CHART_DIR}
SingleHost Gateway
SingleHost Gateway Single-User Che
export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
helm upgrade --install che \
    --force \
    --namespace che \
    --set global.cheDomain=192.168.99.100.nip.io \
    --set global.ingressDomain=192.168.99.100.nip.io \
    --set cheImage=sleshchenko/che-server:cut-dashboard \
    --set global.tls.useSelfSignedCerts=true \
    --set global.serverStrategy=single-host \
    --set cheSinglehostGateway.deploy=true \
    --set global.singleHostExposure=gateway \
    -f ${CHART_DIR}/values/tls.yaml \
    ${CHART_DIR}
SingleHost Gateway Mutli-User Che
export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
helm upgrade --install che \
    --force \
    --namespace che \
    --set global.cheDomain=192.168.99.100.nip.io \
    --set global.ingressDomain=192.168.99.100.nip.io \
    --set cheImage=sleshchenko/che-server:cut-dashboard \
    --set global.tls.useSelfSignedCerts=true \
    --set global.serverStrategy=single-host \
    --set cheSinglehostGateway.deploy=true \
    --set global.singleHostExposure=gateway \
    -f ${CHART_DIR}/values/tls.yaml \
    -f ${CHART_DIR}/values/multi-user.yaml \
    ${CHART_DIR}
Multi Host
MultiHost Single-User Che
  export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
  helm upgrade --install che \
  --force \
  --namespace che \
  --set global.cheDomain=192.168.99.100.nip.io \
  --set global.ingressDomain=192.168.99.100.nip.io \
  --set cheImage=sleshchenko/che-server:cut-dashboard \
  --set global.serverStrategy=multi-host \
  --set global.tls.useSelfSignedCerts=true \
  -f ${CHART_DIR}/values/tls.yaml \
  ${CHART_DIR}
MultiHost Mutli-User Che
  export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
  helm upgrade --install che \
    --force \
    --namespace che \
    --set global.cheDomain=192.168.99.100.nip.io \
    --set global.ingressDomain=192.168.99.100.nip.io \
    --set cheImage=sleshchenko/che-server:cut-dashboard \
    --set global.serverStrategy=multi-host \
    --set global.tls.useSelfSignedCerts=true \
    -f ${CHART_DIR}/values/tls.yaml \
    -f ${CHART_DIR}/values/multi-user.yaml \
    ${CHART_DIR}
Default Host

Note: it's without TLS, seems that does not work with TLS properly.

Default Host Single-User Che
export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
helm upgrade --install che \
    --force \
    --namespace che \
    --set global.cheDomain=192.168.99.100 \
    --set global.ingressDomain=192.168.99.100 \
    --set cheImage=sleshchenko/che-server:cut-dashboard \
    --set global.tls.useSelfSignedCerts=false \
    --set global.serverStrategy=default-host \
${CHART_DIR}
Default Host Mutli-User Che
export CHART_DIR=/home/sleshche/projects/che/deploy/kubernetes/helm/che
helm upgrade --install che \
    --force \
    --namespace che \
    --set global.cheDomain=192.168.99.100 \
    --set global.ingressDomain=192.168.99.100 \
    --set cheImage=sleshchenko/che-server:cut-dashboard \
    --set global.tls.useSelfSignedCerts=false \
    --set global.serverStrategy=default-host \
    -f ${CHART_DIR}/values/multi-user.yaml \
    ${CHART_DIR}

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@che-bot che-bot added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. labels Oct 12, 2020
@sleshchenko sleshchenko force-pushed the separateDashboard branch 2 times, most recently from c5273ec to 767139d Compare October 12, 2020 08:59
@che-bot
Copy link
Contributor

che-bot commented Oct 12, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@che-bot
Copy link
Contributor

che-bot commented Oct 12, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@sleshchenko sleshchenko marked this pull request as ready for review October 12, 2020 12:45
@sleshchenko sleshchenko requested review from sparkoo and metlos October 12, 2020 12:46
@sleshchenko sleshchenko changed the title Run dashboard in a dedicated deployment Run dashboard in a dedicated deployment with helm chart Oct 12, 2020
@che-bot
Copy link
Contributor

che-bot commented Oct 12, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@che-bot
Copy link
Contributor

che-bot commented Oct 12, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

http:
routers:
che-dashboard:
rule: "PathPrefix(`/dashboard/`)"
Copy link
Member

Choose a reason for hiding this comment

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

does it work without end slash?

Copy link
Member Author

Choose a reason for hiding this comment

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

Checking, I assume that if we miss end slash, then we'll get broken redirects, like /dashboardanythings -> /dashboard since it's currently done by Che Server.

Copy link
Member Author

@sleshchenko sleshchenko Oct 13, 2020

Choose a reason for hiding this comment

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

Screenshot_20201013_103025

First Dashboard ingress with end /, the second without. Do you see any issue with end slash?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added end slash to ingress http path as well.

@sparkoo
Copy link
Member

sparkoo commented Oct 12, 2020

What about put dashboard yamls to custom-charts? We would avoid the need of dashboard- file prefix.

@sleshchenko
Copy link
Member Author

What about put dashboard yamls to custom-charts? We would avoid the need of dashboard- file prefix.

I thought about it and decided not to move it there since the current custom chart is used for a bit independent components that can be optional if external is configured. I don't see a good case where dashboard can be deployed independently from Che Server, as well as Che Server without Dashboard. It's a kind of cyclic dependency.
But If you have a strong opinion that we should move the dashboard to custom charts, I can try to do it.
@sparkoo WDYT?

@sparkoo
Copy link
Member

sparkoo commented Oct 13, 2020

@sleshchenko not a strong opinion about that. I just think it would make things cleaner, not mixing 2 "independent" deployments in one folder. One usecase I can think of now is swap between dashboard and dashboard-next, where you could easily control with simple boolean values what to deploy/use.

if you think it does not make sense, I'm ok with current state as well.

@che-bot
Copy link
Contributor

che-bot commented Oct 13, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@sleshchenko
Copy link
Member Author

One usecase I can think of now is swap between dashboard and dashboard-next, where you could easily control with simple boolean values what to deploy/use.

Good example, but we are not going to support different deployments for Dashboard and Dashboard Next. They are going to be run in one deployment. It's declared in #17647 (comment)

@che-bot
Copy link
Contributor

che-bot commented Oct 13, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@sparkoo
Copy link
Member

sparkoo commented Oct 13, 2020

One usecase I can think of now is swap between dashboard and dashboard-next, where you could easily control with simple boolean values what to deploy/use.

Good example, but we are not going to support different deployments for Dashboard and Dashboard Next. They are going to be run in one deployment. It's declared in #17647 (comment)

Another example might be to be able to deploy che-server only for tests. But we're not doing that atm... As I've said, I'm not against the current PR. If you think it's better as is, let's do it.

@che-bot
Copy link
Contributor

che-bot commented Oct 19, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@sleshchenko sleshchenko merged commit beaca7c into master Oct 19, 2020
@sleshchenko sleshchenko deleted the separateDashboard branch October 19, 2020 13:06
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run dashboard via a separate deployment with helm chart
6 participants