The first step of instructing a Banzai Cloud Pipeline instance — either the one of your organization, your own, or — is to log in. You have basically two options:

  • Log in interactively with a web browser
  • Log in using an API token

The easiest is the web browser flow, but for example if you don’t have or want to use interactive access to the host that will run the CLI, you may choose the API token method.

Interactive login with web browser 🔗︎

To start the procedure, type

banzai login

The command will ask for an endpoint, for example <your-pipeline-url>/pipeline. You can also preset it using the --endpoint option.

After that, accept the offer for the interactive login, and follow the instructions: log in in the browser window just opened, and grant access to the CLI. After that, you can return to the console, and optionally create a permanent token. If you want to use the tool later, you should choose this, because the session tokens will expire soon (depending on the settings).

You may also connect to an endpoint that has insecure certificates. The tool will offer to accept the untrusted certificate, and pin its fingerprint.

At the end, when you have multiple organizations, you will be offered to select a default.

Login with an API token 🔗︎

Check the section about authentication for information about obtaining an API token.

Once you have a token ready, run:

banzai login --endpoint=https://your.endpoint.local/pipeline --token=$TOKEN

If you want to accept an insecure certificate in a non-interactive session, add the --skip-verify flag as well.

Next steps 🔗︎

Once you have logged in, you can use the other Banzai CLI commands, for example to create a cluster.