Skip to content

PMM-14993 One step install#894

Open
theTibi wants to merge 24 commits into
mainfrom
one_step_install
Open

PMM-14993 One step install#894
theTibi wants to merge 24 commits into
mainfrom
one_step_install

Conversation

@theTibi
Copy link
Copy Markdown

@theTibi theTibi commented Apr 15, 2026

PMM-14993

FB: Percona-Lab/pmm-submodules#4330

This pull request introduces a new "Add Node" quick-install feature to the Inventory Nodes tab, enabling users to easily add MySQL, PostgreSQL, MongoDB, or Valkey nodes with a single click. It provides a dropdown for technology selection, generates a secure short-lived install token, and copies a tailored shell command to the clipboard for execution on the target host. The implementation includes supporting utilities, UI enhancements, and robust error handling.

Feature: Add Node Quick-Install Command

  • Added a dropdown "Add Node" button with options for MySQL, PostgreSQL, MongoDB, and Valkey, each with appropriate icons and labels. Selecting an option generates a short-lived Grafana service account token, builds a shell command to install and register the node, and copies it to the clipboard. User feedback is provided for success and error cases. (Nodes.tsx, Nodes.constants.ts, Inventory.messages.ts, installToken.ts, [1] [2] [3] [4]
  • Implemented buildQuickInstallCommand utility to construct a secure, technology-specific install command, ensuring proper shell escaping and URL-encoding of tokens. (NodesInstallCommand.utils.ts, public/app/percona/inventory/Tabs/NodesInstallCommand.utils.tsR1-R37)
  • Added logic to create or reuse a Grafana service account per technology and mint a short-lived token for each install, aligning with previous backend behavior but using Grafana APIs directly. (installToken.ts, public/app/percona/inventory/installToken.tsR1-R132)

Testing and Reliability

UI/UX Enhancements

  • Updated styles for the action panel to accommodate the new button group and ensure responsive layout. (Tabs.styles.ts, public/app/percona/inventory/Tabs/Tabs.styles.tsL20-R23)
  • Added "More options…" link for advanced node addition and updated messages for new UI elements. (Nodes.tsx, Inventory.messages.ts, [1] [2]

These changes collectively streamline the node addition workflow and improve the user experience for managing inventory nodes.

theTibi added 3 commits April 15, 2026 16:25
Add primary control with MySQL/PostgreSQL/MongoDB menu items that copy a
default one-line curl install command. Link to full /pmm-ui/install-client
wizard for advanced options.

Made-with: Cursor
Resolve stash onto one_step_install: use management API path for token,
optional token in buildQuickInstallCommand, loading state and error message.

Made-with: Cursor
Rename copy to match UX: primary dropdown is Add Node; menu order MySQL,
MongoDB, PostgreSQL; clearer success and message keys.

Made-with: Cursor
…eneration

Introduce 'Valkey' as a new option in the Add Node menu. Update the QuickInstallTech type to include 'valkey' and modify the buildQuickInstallCommand function to align with the new installation process, ensuring proper command formatting and security options.
theTibi and others added 4 commits April 28, 2026 20:18
…e security

Refactor the buildQuickInstallCommand function to download the install script to a temporary path before execution. This change enhances security by allowing the script to prompt for database credentials directly on the node. The command structure has been updated to reflect these changes, ensuring proper handling of environment variables and command flags.

Signed-off-by: theTibi <tkorocz@gmail.com>
@mattiasimonato mattiasimonato marked this pull request as ready for review May 6, 2026 13:44
@matejkubinec matejkubinec changed the title One step install PMM-14993 One step install May 6, 2026
@mattiasimonato mattiasimonato self-requested a review May 6, 2026 13:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “one step install” flow to the Percona Inventory > Nodes tab by generating a quick-install command (with a freshly created install token) and copying it to the clipboard, while keeping an “advanced options” link available.

Changes:

  • Adds UI for “Add Node” as a dropdown by technology, generating/copying a quick-install command with an install token.
  • Introduces a utility to build the install command (download-then-run install-pmm-client.sh) and a management API path constant.
  • Adjusts action panel layout styles to accommodate the new controls.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
public/app/percona/inventory/Tabs/Tabs.styles.ts Updates action panel flex layout to fit the new Add Node controls alongside existing actions.
public/app/percona/inventory/Tabs/NodesInstallCommand.utils.ts New utility to generate the quick-install shell command (script download + execution + flags).
public/app/percona/inventory/Tabs/Nodes.tsx Adds Add Node dropdown UI, token generation call, clipboard copy flow, and “More options…” link.
public/app/percona/inventory/managementApi.constants.ts Adds a constant for the management endpoint path used to create install tokens.
public/app/percona/inventory/Inventory.messages.ts Adds user-facing strings for the new Add Node dropdown and copy/token errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread public/app/percona/inventory/Tabs/NodesInstallCommand.utils.ts
Comment thread public/app/percona/inventory/Tabs/Nodes.tsx
Comment thread public/app/percona/inventory/Tabs/NodesInstallCommand.utils.ts
mattiasimonato and others added 3 commits May 11, 2026 18:06
…count token generation

Add a new TypeScript file to handle the creation of short-lived Grafana service account tokens for the "Add Node" quick-install command. This implementation replaces the removed backend endpoint, directly utilizing Grafana's service accounts API. The previous management API constant for the token path has been removed, and the Nodes component has been updated to use the new token generation function.

Signed-off-by: theTibi <tkorocz@gmail.com>
Update the installToken.ts file to replace hardcoded API paths with a new utility function, grafanaHttpApiUrl, which constructs the correct Grafana API URL based on the application's sub-path configuration. This change ensures that service-account API calls are correctly routed, improving maintainability and reducing the risk of 404 errors.

Signed-off-by: theTibi <tkorocz@gmail.com>
Comment thread public/app/percona/inventory/Tabs/Nodes.tsx Outdated
Comment thread public/app/percona/inventory/Tabs/Nodes.tsx Outdated
@fabio-silva
Copy link
Copy Markdown

@copilot please commit @matejkubinec suggestions

Copy link
Copy Markdown

Copilot AI commented May 14, 2026

@copilot please commit @matejkubinec suggestions

Implemented @matejkubinec’s suggestions in 6d526085 (options extracted to Nodes.constants.ts + per-tech icon mapping applied in the dropdown).

Screenshot:
Updated Add Node dropdown

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

ademidoff and others added 7 commits May 15, 2026 12:39
* PMM-14441 Add field to enable dump encryption & correctly handle downloads

Co-authored-by: Copilot <copilot@github.com>

* PMM-14441 Fix encryption password field

* PMM-14441 Resolve copilot comments

* PMM-14441 Use service directly instead of action, conditionally send dump encryption password

* PMM-14441 Add validation for pmm dump encryption password

* PMM-14441 Fix import & add tooltip

* PMM-14441 Remove grafana-icons

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Alex Demidoff <alexander.demidoff@percona.com>
* fix: Stack direction and height

* fix: backport missing plugin fix from Grafana

* chore: prettier
@matejkubinec
Copy link
Copy Markdown
Collaborator

In the last commits I've made some small improvement to the UI layout:

  • Move "Delete" and "Add Node" button to the right to match Services layout
  • Move "More options" into the dropdown

Before:

Screenshot 2026-05-20 at 13 01 21

After:
Screenshot 2026-05-20 at 14 13 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants