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

Feature Request: Add CLI commands for account and setup key creation #2857

Open
dmeremyanin opened this issue Nov 7, 2024 · 0 comments
Open

Comments

@dmeremyanin
Copy link

Is your feature request related to a problem? Please describe.

Currently, the netbird-mgmt CLI tool offers limited functionality when it comes to automating the setup of a NetBird cluster. To enable a more streamlined and IaaC-friendly approach, I would like to request additional options for the netbird-mgmt CLI.

Specifically, it would be great to have the ability to:

  1. Create an account through the CLI.
  2. Generate a setup key.

These features would significantly improve the ability to automate the setup of a NetBird cluster, particularly in scenarios where a management node and multiple router nodes need to be provisioned in a reproducible, automated manner. This would allow users to deploy a complete NetBird setup programmatically.

Describe the solution you'd like

Add commands to the CLI for creating a new account and a setup key. Proposed commands:

  1. Create an account

This command would allow users to create a new account directly from the CLI, specifying a domain for the account.

# create a new account
netbird-mgmt account create --domain <domain>
  1. Create a setup key

This command would allow users to generate setup keys with configurable options like expiration time, usage limits, and predefined keys for different purposes (e.g., server setup, admin access). The --key parameter would accept an existing key for generation.

# Create a reusable setup key for server setup with a 30-minute expiration and usage limit
netbird-mgmt setup-key create --name server-setup-key --expires 30m --type reusable --usage-limit <usage-limit> --key <key>

# Create a setup key for admin user with a 2-hour expiration
netbird-mgmt setup-key create --name admin-user-setup-key --expires 2h --key <key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants