8000 Document admin bootstrapping and recovery by Pepo48 · Pull Request #31039 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Document admin bootstrapping and recovery - #31039

Merged
ahus1 merged 3 commits into
keycloak:mainfrom
Pepo48:issue-30011
Jul 30, 2024
Merged

ahus1 merged 3 commits into
keycloak:mainfrom
Pepo48:issue-30011

Conversation

@Pepo48
@Pepo48 Pepo48 commented Jul 3, 2024
Copy link
Copy Markdown
Contributor

Closes: #30011

Signed-off-by: Peter Zaoral pzaoral@redhat.com

@Pepo48
Pepo48 force-pushed the issue-30011 branch 3 times, most recently from ca95f75 to 4858789 Compare July 4, 2024 13:05
@vmuzikar vmuzikar left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Pepo48 Thank you for the draft. I think it's a good start.

@Pepo48
Pepo48 force-pushed the issue-30011 branch 3 times, most recently from 4c9dc9e to 0c9a072 Compare July 9, 2024 22:17
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It'd be also good to add a section for bootstrapping at server startup. Explaining the difference from the dedicated command (that on startup master realm must on exist, making the dedicated command the only suitable option for recovery).

I tried to address this one via a note.
@shawkins wdyt?

@Pepo48
Pepo48 requested a review from shawkins July 9, 2024 22:26
@Pepo48
Pepo48 commented Jul 9, 2024 •
Copy link
Copy Markdown
Contributor Author

I tried to incorporate every suggestion mentioned above. For now the changes are in a separate commit in order to make it easier to see the differences. I will do the squash later.

cc: @shawkins

Edit: I also tried to adjust the punctuation, articles and wording.

@Pepo48
Pepo48 force-pushed the issue-30011 branch 6 times, most recently from b52cfef to 906a107 Compare July 14, 2024 07:35
@Pepo48
Pepo48 marked this pull request as ready for review July 14, 2024 07:35
@Pepo48
Pepo48 requested review from a team as code owners July 14, 2024 07:35
shawkins
shawkins previously approved these changes Jul 15, 2024
@shawkins shawkins left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tried to incorporate every suggestion mentioned above. For now the changes are in a separate commit in order to make it easier to see the differences. I will do the squash later.

cc: @shawkins

Edit: I also tried to adjust the punctuation, articles and wording.

Thanks @Pepo48 it looks good. Just a conflict to clear up and it should be set.

@Pepo48
Pepo48 commented Jul 16, 2024
Copy link
Copy Markdown
Contributor Author

Just a conflict to clear up and it should be set.

@shawkins thanks for the review. The conflict happened in the release notes - I merged both of our inputs together into one section.

@shawkins
shawkins requested review from shawkins and vmuzikar July 16, 2024 13:41
shawkins
shawkins previously approved these changes Jul 16, 2024
@shawkins shawkins left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a conflict to clear up and it should be set.

@shawkins thanks for the review. The conflict happened in the release notes - I merged both of our inputs together into one section.

Looks good. Do you want to wait for @vmuzikar to also review?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMHO the db options would not only be "strongly recommended", but "required" as it would otherwise not write to the correct database and it will not work.

At the same time I am not sure if all of the options I use on the start command will also work on the boostrap commands (like: setting a HTTP port).

@shawkins shawkins Jul 17, 2024 •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a somewhat confusing area in general for us #29200 - we do some configuration exclusions for the CLI, but those same options will still work via the other config sources (the operator effectively uses this for export because almost everything is set via an env variable). Only a handful of options have hard-coded overrides when running a non-server command.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tried to clarify the cases with #29200 (comment) - as there are potentially 3 different ways users could be invoking non-server commands which have some nuance that we trying to address here quickly with this recommendation.

@ahus1
ahus1 commented Jul 17, 2024
Copy link
Copy Markdown
Member

@Pepo48 - I pushed one commit to make the external link check pass. I also found that anchors in the IDs don't work, so I updated the Freemarker makros to support it. It is already part of the scaling guide, but not yet in main.

If you consider this documentation ready-to-be-merged, please ask Andrew Munro for a review from the technical writer's perspective to make sure the wording aligns with all the other docs.

@vmuzikar vmuzikar left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Pepo48 Thank you for the updates. Nice work! Added some comments.

@vmuzikar
Copy link
Copy Markdown
Contributor

@Pepo48 Could you also please address this comment in this PR since #30711 was merged sooner than this?

@Pepo48
Pepo48 force-pushed the issue-30011 branch 2 times, most recently from 5be0072 to b865903 Compare July 24, 2024 17:24
@Pepo48
Pepo48 commented Jul 24, 2024
Copy link
Copy Markdown
Contributor Author

@Pepo48 Could you also please address this comment in this PR since #30711 was merged sooner than this?

Addressed by adding a new section with the link to the operator's advanced configuration.

@vmuzikar vmuzikar left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Pepo48 Thanks for another update. Added some last thoughts, mostly nitpics.

Comment thread docs/guides/server/bootstrap-admin-recovery.adoc Resolved 10BC8
@Pepo48
Pepo48 force-pushed the issue-30011 branch 3 times, most recently from b22291c to 3e74501 Compare July 29, 2024 08:27
@vmuzikar vmuzikar left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Pepo48 Thanks for the latest changes. Overall LGTM, added some last minor comments.

@ahus1 @shawkins @mhajas Do you want to re-review as well?

I'd like to merge this rather sooner than later. Not sure we need to wait for a review from @andymunro (as he's quite busy). We could incorporate his review changes as a follow up. WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This does not seem to render correctly?
image

@Pepo48 Pepo48 Jul 29, 2024 •
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some of these are not rendered for me when building the docs locally, yet they're used and seems to work fine when deployed. What's the general approach here? Should we use a hard-coded links or should we alway try to use variables and link anchors, especially when cross-referencing.

Am I actually allowed to define and use new document attributes for this specific case?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure. Possibly @ahus1 has some input?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess for the guide itself I can replace it with <@links.server id="bootstrap-admin-recovery"/>. But what about the release notes then?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Release notes seem to work fine for my local build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For me as well. The question is whether it's fine to use it that way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For me as well. The question is whether it's fine to use it that way.

For release note and upgrading guide, sure from my PoV. For Operator guide, I'm not sure – locally it doesn't work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@vmuzikar are the rest of the links in the operator's advanced configuration guide rendered correctly for your local build?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, other links render fine for me.

@mhajas
mhajas commented Jul 29, 2024
Copy link
Copy Markdown
Contributor

@vmuzikar, I went through the changes quickly and it looks good. Still, I am not 100% confident to approve so I will leave it for the others to add final approvals. If you would like me to have a proper look let me know.

Pepo48 and others added 3 commits July 29, 2024 18:23
Closes: keycloak#30011

Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
@vmuzikar vmuzikar left a comment •
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Pepo48 After the latest changes, LGTM! Thank you!

@shawkins @ahus1 Do you want to review as well?

@shawkins shawkins left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you @Pepo48

@ahus1
ahus1 commented Jul 30, 2024
Copy link
Copy Markdown
Member

@vmuzikar - no further comments from me. IMHO this is really a big change, and people will need to adjust. For example on the Keycloak Benchmark Project, we had the KEYCLOAK_ADMIN/KEYCLOAK_ADMIN_PASSWORD env variables set, and now the Operator created a different admin account. Only once I put my env variables into KC_BOOTSTRAP_ADMIN_USERNAME/KC_BOOTSTRAP_ADMIN_PASSWORD it worked as before. Yes, I know this is non-standard, still people might fall into similar traps they have built for themselves in the past.

Please reach out to the community to try this out (blog post, user mailing list, GitHub discussion) so the community can adjust.

@ahus1
ahus1 merged commit 07cfdac into keycloak:main Jul 30, 2024
@Pepo48
Pepo48 deleted the issue-30011 branch August 20, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document admin bootstrapping and recovery

5 participants

0