Skip to content

[Fleet] Show Fleet Server instructions when user wants to add another Fleet Server after the first#97681

Merged
jen-huang merged 3 commits intoelastic:masterfrom
jen-huang:fix/additional-fleet-servers
Apr 20, 2021
Merged

[Fleet] Show Fleet Server instructions when user wants to add another Fleet Server after the first#97681
jen-huang merged 3 commits intoelastic:masterfrom
jen-huang:fix/additional-fleet-servers

Conversation

@jen-huang
Copy link
Copy Markdown
Contributor

@jen-huang jen-huang commented Apr 20, 2021

Summary

Resolves #96295. Follow up to #97585.

This PR adjusts the Add agent flyout so that if a user chooses selects an agent policy that contains fleet_server package, we show the same service token and command steps in the Fleet Server onboarding UI. This will allow the user to enroll more than one Fleet Server.

The copy for Step 3 (command step) was also adjusted to have more information about quick start vs production-ready deployment options, inspired by @mostlyjason's designs in #96295 (comment). This is reflected in both the flyout and onboarding UI since the same component is used.

image

image

@jen-huang jen-huang self-assigned this Apr 20, 2021
@jen-huang jen-huang added backport:skip This PR does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes and removed backport:skip This PR does not require backporting labels Apr 20, 2021
… same token and command steps from fleet server onboarding UI
@jen-huang jen-huang force-pushed the fix/additional-fleet-servers branch from bacc7d3 to f20fbbe Compare April 20, 2021 18:06
@jen-huang jen-huang marked this pull request as ready for review April 20, 2021 18:07
@jen-huang jen-huang requested a review from a team as a code owner April 20, 2021 18:07
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

withKeySelection={setSelectedAPIKeyId ? true : false}
onKeyChange={setSelectedAPIKeyId}
onAgentPolicyChange={setSelectedPolicyId}
onAgentPolicyChange={async (policyID) => {
Copy link
Copy Markdown
Member

@nchaulet nchaulet Apr 20, 2021

Choose a reason for hiding this comment

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

maybe a useCallack for that callback here will be good? or better what do you think of moving this logic in an useEffect with policyId as a dependency in the parent component?

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 the sake of time, I'll move this to a useCallback

@nchaulet
Copy link
Copy Markdown
Member

Does it make sense to show the fleet server policy in the standalone tab?

@jen-huang
Copy link
Copy Markdown
Contributor Author

jen-huang commented Apr 20, 2021

Does it make sense to show the fleet server policy in the standalone tab?

Hmm, good question, probably not right? I'll file an issue for this. Edit: filed #97707

Copy link
Copy Markdown
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

🚀 it works as expected, (not for that PR but this component looks like to be a good candidate to have unit testing so we could refactor it without breaking it)

@jen-huang jen-huang added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 20, 2021
@jen-huang jen-huang enabled auto-merge (squash) April 20, 2021 20:06
@mostlyjason
Copy link
Copy Markdown
Contributor

mostlyjason commented Apr 20, 2021

@jen-huang thanks for the quick turnaround! I can't see it in your screenshot, but you fill the token into the command the user copies?

Lastly, what do you think about including a link to the troubleshooting docs at the bottom?

If you are having trouble connecting, see our troubleshooting guide.

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 719.6KB 722.9KB +3.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 346.3KB 346.4KB +96.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jen-huang

@jen-huang jen-huang merged commit 32ce42e into elastic:master Apr 20, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 20, 2021
… Fleet Server after the first (elastic#97681)

* In add agent flyout, when selected policy contains fleet server, show same token and command steps from fleet server onboarding UI

* Fix types

* Move policy change handler to useCallback
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@jen-huang jen-huang deleted the fix/additional-fleet-servers branch April 20, 2021 20:25
@jen-huang
Copy link
Copy Markdown
Contributor Author

@jen-huang thanks for the quick turnaround! I can't see it in your screenshot, but you fill the token into the command the user copies?

Lastly, what do you think about including a link to the troubleshooting docs at the bottom?

If you are having trouble connecting, see our troubleshooting guide.

That's right, after the user clicks Generate token we fill in the token and ES URL into the commands. I'll add a troubleshoot doc link in a follow up PR.

kibanamachine added a commit that referenced this pull request Apr 20, 2021
… Fleet Server after the first (#97681) (#97738)

* In add agent flyout, when selected policy contains fleet server, show same token and command steps from fleet server onboarding UI

* Fix types

* Move policy change handler to useCallback

Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Easier installation for Fleet Server on self-managed clusters

6 participants