CLI Reference
Overview
The Kerbi CLI should be available to you anywhere on the system provided you installed the Gem using gem install, as opposed adding it in a particular project's Gemfile.
The information below can be found by running kerbi in your command line:
Commands:
kerbi config # Command group for config actions (see $ kerbi config help)
kerbi console # Opens an IRB console so you can play with your mixers
kerbi help [COMMAND] # Describe available commands or one specific command
kerbi project # Command group for project actions (see $ kerbi project help)
kerbi release # Command group for release actions (see $ kerbi release help)
kerbi state # Command group for state actions (see $ kerbi state help)
kerbi template [RELEASE_NAME] [PROJECT_URI] # Templates to YAML/JSON, using [RELEASE_NAME] for state I/O
kerbi values # Command group for values actions (see $ kerbi values help)
kerbi version # Print the kerbi gem's version.Root Commands
$ kerbi template [RELEASE_NAME] [PROJECT_URI]
kerbi template [RELEASE_NAME] [PROJECT_URI]Template the project given by [PROJECT_URI], where [RELEASE_NAME] is used for any state I/O (enabled with --read-state and --write-state), and is made available to mixers as the instance variable release_name.
$ kerbi console
$ kerbi consoleStarts an interactive console powered by IRB. The entire SDK is loaded into memory, plus your kerbifile and everything it requires. The following variables are available in the current binding:
values- the same bundle of values available to$ kerbi templatedefault_valuesthe subset of values taken only fromvalues.yaml
Value Commands
$ kerbi values show
$ kerbi values showPrints out all values compiled by Kerbi for the project in the current directory. Useful to preview the data that your mixers will be consuming.
If you need to merge in state values, specify which release to use with --release-name along with the usual state parameters (found in $ kerbi state, $ kerbi template, etc...).
Starts an interactive console that lets you interact with code from your project, which is assumed to be in the current directory.
Release Commands
$ kerbi release init [RELEASE_NAME]
$ kerbi release init [RELEASE_NAME]Provisions a new state tracking resource - either ConfigMap or Secret as per --state-backend - and prints out what it creates. This command does not fail if the resources already existed.
$ kerbi release status [RELEASE_NAME]
$ kerbi release status [RELEASE_NAME]Attempts to connect to the persistent store that is tracking states for [RELEASE_NAME.
$ kerbi release list
$ kerbi release listPrints out summary data about each release found in the cluster. Authentication to your cluster, as per --k8s-auth-type must be correct.
$ kerbi release delete [RELEASE_NAME]
$ kerbi release delete [RELEASE_NAME]Deletes the resource responsible for tracking states for release RELEASE_NAME. You can skip the prompt with --confirm.
State Commands
$ kerbi state show [RELEASE_NAME] [TAG]
$ kerbi state show [RELEASE_NAME] [TAG]Prints out summaries of all the states recorded under [RELEASE_NAME].
$ kerbi state list [RELEASE_NAME]
$ kerbi state list [RELEASE_NAME]Prints out all information about the state named [TAG] under [RELEASE_NAME].
$ kerbi state promote [RELEASE_NAME] [TAG]
$ kerbi state promote [RELEASE_NAME] [TAG]Remove the candidate flag from the state given by [TAG]'s name ([cand]-). This commands fails if the given state was not a candidate.
$ kerbi state demote [RELEASE_NAME] [TAG]
$ kerbi state demote [RELEASE_NAME] [TAG]Add the candidate flag to a state's name ([cand]-). This commands fails if the given state was already a candidate.
$ kerbi state retag [R_NAME] [OLD_TAG] [NEW_TAG]
$ kerbi state retag [R_NAME] [OLD_TAG] [NEW_TAG]Update a state record's tag.
$ kerbi state prune-candidates [RELEASE_NAME]
$ kerbi state prune-candidates [RELEASE_NAME]Deletes all state records under [RELEASE_NAME] that are flagged as candidates.
Config Commands
$ kerbi config show
$ kerbi config showPrints the final compiled configuration kerbi will use.
Not the exact contents of the config file
This command shows what Kerbi sees after it has loaded your config file and processed it, e.g sanitized it with fallback values. If you need to read your config file, just read it normally: cat ~/.kerbi/config.
$ kerbi config set [KEY] [VALUE]
$ kerbi config set [KEY] [VALUE]Updates one attribute in your global config file. This command will fail if you attempt to set an attribute not supported in the config file.
$ kerbi config reset
$ kerbi config resetDeletes your global configuration file and creates an empty one.
Project Commands
$ kerbi project new [NAME]
$ kerbi project new [NAME]Creates a boilerplate project called [NAME] in the current directory. While a Gemfile fill be generated, you do not technically need to run bundle install to get started, although you will need to at some point if your project becomes more serious.
Last updated