lmscliο
Lmscli is a python CLI tool to interact that allows you to interact with Bakfleet
Installationο
In order to use lmscli, install uv. This tool will manage dependencies automatically.
Setupο
Next, export the following variables
export BAKFLEET_PAT=<pat-here>
lmscli needs a biscuit to authenticate against Bakfleet, but keeping biscuits stored is not very safe. What the team came up with was a personal access token, or PAT, that can be exchanged for a biscuit in runtime.
To get the PAT please follow these steps:
Visit staging-spire if you are accessing dev and spire if you are accessing prod
Click the most recent release in βAssetsβ and download
SPIRE-CLIfor your platformOnce you have downloaded it, decompress it
Login to SPIRE using
staging-spire auth loginorspire auth loginGenerate a PAT using
staging-spire user create-patorspire user create-pat(if you donβt already have one)Retrieve PAT with
staging-spire user get-patorspire user get-pat(if you already have one)
NOTE: if you donβt have the user command contact IT Support.
Once you got the PAT, you are now able to provide a value for BAKFLEET_PAT:
export BAKFLEET_PAT="<email-address-used-to-login-to-spire>:<pat-printed-above>"
Running commandsο
uvx lmscli
lets you access bakfleet options see usage for more details of the commands
Instancesο
Commands to manage instances
usage: uvx lmscli instances [-h] {list,get} ...
positional arguments:
{list,get} Sub commands
list list instances
get get specific instance
options:
-h, --help show this help message and exit
Subscriptionsο
Commands to manage subscriptions
usage: uvx lmscli subscriptions [-h] {list,get} ...
positional arguments:
{list,get} Sub commands
list list subscriptions
get get specific subscription
options:
-h, --help show this help message and exit
Deploymentsο
Commands to manage deployments
usage: uvx lmscli deployments [-h] {list,get,create} ...
positional arguments:
{list,get,create} Sub commands
list list deployments
get get specific deployment
create create a new deployment
options:
-h, --help show this help message and exit
Note: The creation of a deployment requires just a release with optional parameters for each of the other inputs as shown below
usage: uvx lmscli deployments create [-h] [--description DESCRIPTION] [--organization ORGANIZATION]
[--subscription SUBSCRIPTION] [--selector SELECTOR]
release
positional arguments:
release release
options:
-h, --help show this help message and exit
--description DESCRIPTION
release description
--organization ORGANIZATION
organization
--subscription SUBSCRIPTION
subscription
--selector SELECTOR selector
Organizationsο
Commands to manage organizations
usage: uvx lmscli organizations [-h] {list,get} ...
positional arguments:
{list,get} Sub commands
list list organizations
get get specific organization
options:
-h, --help show this help message and exit
Releasesο
Commands to manage releases
usage: uvx lmscli releases [-h] {list,get,create,delete} ...
positional arguments:
{list,get,create,delete}
Sub commands
list list releases
get get specific release
create create a new release
delete delete a release
options:
-h, --help show this help message and exit
Note: The releases list supports more filtering as shownn below
usage: uvx lmscli releases list [-h] [--state {development,disabled,released,testing,unknown}]
options:
-h, --help show this help message and exit
--verbose, -v display all the information about all filtered releases
--state {development,disabled,released,testing,unknown}
filter by state
--json output in json format
--before BEFORE give a version (in the form x or x.x or x.x.x) to filter only versions before a given version
--after AFTER give a version (in the form x or x.x or x.x.x) to filter only versions after a given version
When filtering for releases before/after or between