Skip to content

vngcloud/greennode-cli

Repository files navigation

GreenNode CLI

The GreenNode CLI (grn) is a unified tool to manage your GreenNode services from the command line.

Getting Started

Requirements

  • Python 3.10 or later (3.10.x, 3.11.x, 3.12.x, 3.13.x)

Installation

The safest way to install the GreenNode CLI is to use pip in a virtualenv:

python -m pip install grncli

or, if you are not installing in a virtualenv, to install globally:

sudo python -m pip install grncli

or for your user:

python -m pip install --user grncli

If you have the grncli package installed and want to upgrade to the latest version:

python -m pip install --upgrade grncli

On Linux and macOS, the GreenNode CLI can also be installed using a bundled installer. For offline environments, see the offline install guide.

If you want to run the develop branch of the GreenNode CLI, see the Contributing Guide.

Configuration

Before using the GreenNode CLI, you need to configure your credentials. The quickest way is to run:

grn configure
GRN Client ID [None]: <your-client-id>
GRN Client Secret [None]: <your-client-secret>
Default region name [HCM-3]:
Default output format [json]:

Credentials are obtained from the VNG Cloud IAM Portal under Service Accounts.

You can also configure the region via environment variable:

export GRN_DEFAULT_REGION=HCM-3

Or create the credential files directly:

# ~/.greenode/credentials
[default]
client_id = your-client-id
client_secret = your-client-secret
# ~/.greenode/config
[default]
region = HCM-3
output = json

To use multiple profiles:

grn configure --profile staging
grn --profile staging vks list-clusters

For more configuration options, see the Configuration Guide.

Basic Commands

The GreenNode CLI uses a multi-part command structure:

grn <service> <command> [options and parameters]

For example, to list your VKS clusters:

grn vks list-clusters

To get help on any command:

grn help
grn vks
grn vks create-cluster help

To check the version:

grn --version

Getting Help

The best way to interact with our team is through GitHub:

More Resources

License

Apache License 2.0 — see LICENSE.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors