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

Keycloak uses H2 database in Che on Helm Kubernetes deployment #13919

Closed
4 of 23 tasks
mkuznyetsov opened this issue Jul 19, 2019 · 6 comments
Closed
4 of 23 tasks

Keycloak uses H2 database in Che on Helm Kubernetes deployment #13919

mkuznyetsov opened this issue Jul 19, 2019 · 6 comments
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. status/in-progress This issue has been taken by an engineer and is under active development.
Milestone

Comments

@mkuznyetsov
Copy link
Contributor

mkuznyetsov commented Jul 19, 2019

Describe the bug

Currently Multiuser Che, deployed via Helm charts, will be using H2 database, and ignore the database configuration provided in the chart (which should make it to use PostgreSQL DB).
We should look into our entrypoint to see the fix for that
https://github.com/eclipse/che/blob/331a63cd06be6df3501118e6150c42e0de85db82/dockerfiles/keycloak/kc_realm_user.sh#L39

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

  1. Deploy Che through Helm charts (manually, or through chectl using --installer=helm)
  2. Check startup logs on Keycloak pod, as it should give notes that it's using Postgres DB, Drivers, etc.

Expected behavior

Keycloak uses PostgreSQL database

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Screenshots

Installation method

  • chectl
  • che-operator
  • minishift-addon
  • I don't know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: please specify

Additional context

Issues and PRs hinting to this problem:
#13791
#13821

@mkuznyetsov
Copy link
Contributor Author

CC @monaka @l0rd

@skabashnyuk
Copy link
Contributor

@l0rd @slemeur since this issue was already met by Che users and since it's quite hard to migrate h2 to postgresql database afterwise. I think it makes sense to include this task in 7.0 release plan. wdyt?

@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. team/platform labels Jul 19, 2019
@skabashnyuk skabashnyuk added this to the 7.0.0 milestone Jul 19, 2019
@l0rd
Copy link
Contributor

l0rd commented Jul 19, 2019

@skabashnyuk +1

@monaka
Copy link
Member

monaka commented Jul 20, 2019

For new users, this issue will be fixed by the part of PR #11761 (un-merged).
(I didn't notice as I applied #11761 equivalent to my environment and am running Che with Postgres)

And as @skabashnyuk said, the migration way will be required by current users.

@monaka
Copy link
Member

monaka commented Jul 20, 2019

I added the patch from #11761 into PR #13791.

@l0rd l0rd added the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 22, 2019
monaka referenced this issue Jul 24, 2019
Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>
@mkuznyetsov
Copy link
Contributor Author

PR merged, so PostgreSQL DB should be used from now on in Helm.

In case somebody would need to perform a migration from existing H2 DB to Postgres, there is a guide:
https://gist.github.com/mkuznyetsov/457567a1bdaad0b843e088ba0b664ea5

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. severity/P1 Has a major impact to usage or development of the system. status/in-progress This issue has been taken by an engineer and is under active development.
Projects
None yet
Development

No branches or pull requests

4 participants