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

feat: [Operator] Retrieve autogenerated Keycloak admin user credentials #690

Merged
merged 4 commits into from
May 13, 2020

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented May 6, 2020

Signed-off-by: Mykola Morhun mmorhun@redhat.com

What does this PR do?

Retrieves and prints Keycloak admin-user login and password after Che installation finishes.
This implementation is done for operator and olm installers.
The same functionality has been implemented for helm installer before #686

chectl output:

    ...
    ✔ Eclipse Che pod bootstrap
      ✔ scheduling...done.
      ✔ downloading images...done.
      ✔ starting...done.
    ✔ Retrieving Eclipse Che server URL... https://che-che.192.168.99.212.nip.io
    ✔ Eclipse Che status check
  ✔ Retrieving Keycloak admin credentials... admin:2h9nRBK7SCPr
  ✔ Retrieving Che self-signed CA certificate... is exported to /home/username/cheCA.crt
  ✔ Show important messages
    ✔ Eclipse Che admin credentials are: "admin:admin". You will be asked to change default Che admin password on the first login.
    ✔ Autogenerated Keycloak credentials are: "admin:2h9nRBK7SCPr"
    ✔ ❗[MANUAL ACTION REQUIRED] Please add Che self-signed CA certificate into your browser: /home/mmorhun/cheCA.crt.
   Documentaton how to add a CA certificate into a browser: https://www.eclipse.org/che/docs/che-7/installing-che-in-tls-mode-with-self-signed-certificates/#using-che-with-tls_installing-che
-in-tls-mode-with-self-signed-certificates
Command server:start has completed successfully.

What issues does this PR fix or reference?

eclipse-che/che#14082

Depends on

eclipse-che/che-operator#240

…oyment finish

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@mmorhun mmorhun requested a review from l0rd as a code owner May 6, 2020 14:11
@mmorhun mmorhun self-assigned this May 6, 2020
@tolusha tolusha mentioned this pull request May 6, 2020
50 tasks
@mmorhun mmorhun changed the title [Operator] Retrieve autogenerated Keycloak admin user credentials feat: [Operator] Retrieve autogenerated Keycloak admin user credentials May 6, 2020
@tolusha tolusha mentioned this pull request May 7, 2020
56 tasks
src/api/che.ts Outdated
let adminUsername
let adminPassword

const cheCluster = await this.kube.getCheCluster('eclipse-che', cheNamespace)
Copy link
Collaborator

Choose a reason for hiding this comment

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

src/api/che.ts Outdated Show resolved Hide resolved
src/api/che.ts Outdated Show resolved Hide resolved
export function getRetrieveKeycloakCredentialsTask(flags: any): ListrTask {
return {
title: 'Retrieving Keycloak admin credentials',
enabled: () => flags.multiuser && (flags.installer !== 'operator' || flags.installer !== 'olm'),
Copy link
Collaborator

@tolusha tolusha May 7, 2020

Choose a reason for hiding this comment

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

let's skip if spec.auth.externalIdentityProvider is defined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch

@tolusha
Copy link
Collaborator

tolusha commented May 7, 2020

Update yarn.lock to rely on the latest che-operator changes.

@mmorhun
Copy link
Contributor Author

mmorhun commented May 7, 2020

Yes, I do remember. But thank you for reminding me.

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@mmorhun mmorhun merged commit 8534a03 into master May 13, 2020
@mmorhun mmorhun deleted the che-14082-3 branch May 13, 2020 06:18
@benoitf benoitf added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants