Great Bear Packaging SDK
An SDK tool for managing Great Bear Application Packages (GBAP)
Installation
Prerequisites
A GBAP contains a root Helm Chart for managing embedded Kubernetes resources used to deploy your application to Great Bear edge sites.
If you intend to include Chart dependencies located in remote repositories, then you will need to install and configure the Helm client
tool.
- Binary downloads of the
Helm client
can be found on the Releases page of the Helm project. - Use the
helm registry login
command to configure authenticated access to each remote repository. See the tutorials for examples.
Download the binary
You can download the latest version of the Packaging SDK tool from the following links:
When prompted for credentials:
username: prod
password: <access-token as stated in your tenant on-boarding pack>
If you’re unsure about the access token, contact the Great Bear administrator of your organization, or the Great Bear Support Team.
Download your correlating OS/Architecture archive, unpack and add it to your PATH and you are good to go.
Log in to Great Bear
The Packaging SDK tool operates as a client to the Great Bear API and needs to be configured with your specific tenant API Key.
-
To access the API key, login to the Great Bear Dashboard, select the top right Profile icon, then click Copy API Key.
-
Use the login command to register your API key:
gbear login --apiKey=J1iAsrcu6xJFIJ7N0v5gYeichqIsdz8TZUcar-JjqSAYUuJD0L685I2ZFgqWcL4eYZ6tIAgZ2QRWPj0wxVY6lw Storing the new API Key... Connecting to the Great Bear platform... Login Status: Success
The tool stores the API Key together with the Great Bear API URL within a config file in your HOME path. The the specified API Key is then used to verify successful connectivity Great Bear API.
cat ~/.config/gbear/config.yaml # Great Bear API endpoint to use (overridden by $GBEAR_HOST, defaults to https://api.greatbear.io/api) host: https://api.greatbear.io/api login: # apiKey is the API token that you can copy from the dashboard (overridden by $GBEAR_API_KEY) apiKey: J1iAsrcu6xJFIJ7N0v5gYeichqIsdz8TZUcar-JjqSAYUuJD0L685I2ZFgqWcL4eYZ6tIAgZ2QRWPj0wxVY6lw
-
You can use the login command at any time to verify a previously registered API key. The following example uses the optional
verbose
flag to output the Great Bear API URL and API Key:gbear login --verbose Connecting to the Great Bear platform... -- INFO: URL: https://api.greatbear.io/api/v1/applications -- INFO: API Key: J1iAsrcu6xJFIJ7N0v5gYeichqIsdz8TZUcar-JjqSAYUuJD0L685I2ZFgqWcL4eYZ6tIAgZ2QRWPj0wxVY6lw Login Status: Success
Optionally, you can set the API Key using an environment variable, this could be pulled and set from an accessible Vault within your CICD pipeline:
export GBEAR_API_KEY=J1iAsrcu6xJFIJ7N0v5gYeichqIsdz8TZUcar-JjqSAYUuJD0L685I2ZFgqWcL4eYZ6tIAgZ2QRWPj0wxVY6lw
Quick Start User Guide
The user guides to operate the Packaging SDK tool assumes you have a good understanding of the Great Bear Application Package, with this knowledge you can use the tool to: