Command Reference¶
All inmanta commands and services are started by the inmanta
command. This page provides an
overview of all subcommands available:
inmanta¶
usage: inmanta [-h] [-p] [-c CONFIG_FILE] [--config-dir CONFIG_DIR]
[--log-file LOG_FILE] [--log-file-level LOG_FILE_LEVEL]
[--timed-logs] [-v] [--warnings {warn,ignore,error}] [-X]
[--version]
{server,agent,compile,list-commands,help,modules,module,project,deploy,export}
...
Named Arguments¶
- -p
Profile this run of the program
Default: False
- -c, --config
Use this config file
- --config-dir
The directory containing the Inmanta configuration files
Default: “/etc/inmanta/inmanta.d”
- --log-file
Path to the logfile
- --log-file-level
Log level for messages going to the logfile: 0=ERROR, 1=WARNING, 2=INFO, 3=DEBUG
Default: 2
- --timed-logs
Add timestamps to logs
Default: False
- -v, --verbose
Log level for messages going to the console. Default is only errors,-v warning, -vv info and -vvv debug and -vvvv trace
Default: 0
- --warnings
Possible choices: warn, ignore, error
The warning behaviour of the compiler. Must be one of ‘warn’, ‘ignore’, ‘error’
Default: “warn”
- -X, --extended-errors
Show stack traces for errors
Default: False
- --version
Show current version of Inmanta
Default: False
Sub-commands:¶
compile¶
Compile the project to a configuration model
inmanta compile [-h] [-e ENVIRONMENT] [-X] [--server_address SERVER]
[--server_port PORT] [--username USER] [--password PASSWORD]
[--ssl] [--ssl-ca-cert CA_CERT] [--experimental-data-trace]
[--experimental-dataflow-graphic] [-f MAIN_FILE]
Named Arguments¶
- -e
The environment to compile this model for
- -X, --extended-errors
Show stack traces for compile errors
Default: False
- --server_address
The address of the server hosting the environment
- --server_port
The port of the server hosting the environment
- --username
The username of the server
- --password
The password of the server
- --ssl
Enable SSL
Default: False
- --ssl-ca-cert
Certificate authority for SSL
- --experimental-data-trace
Experimental data trace tool useful for debugging
Default: False
- --experimental-dataflow-graphic
Experimental graphic data flow visualization
Default: False
- -f
Main file
Default: “main.cf”
help¶
show a help message and exit
inmanta help [-h] [subcommand]
Positional Arguments¶
- subcommand
Output help for a particular subcommand
modules (module)¶
Subcommand to manage modules
inmanta modules [-h] [-m [MODULE]]
{list,do,update,install,status,push,verify,commit,create,freeze}
...
Named Arguments¶
- -m, --module
Module to apply this command to
subcommand¶
- cmd
Possible choices: list, do, update, install, status, push, verify, commit, create, freeze
Sub-commands:¶
list¶
List all modules used in this project in a table
inmanta modules list [-h] [-r]
- -r
Output a list of requires that can be included in project.yml
Default: False
do¶
Execute a command on all loaded modules
inmanta modules do [-h] command
- command
the command to execute
commit¶
Commit all changes in the current module.
inmanta modules commit [-h] -m MESSAGE [-r] [--major] [--minor] [--patch]
[-v VERSION] [-a] [-t] [-n]
- -m, --message
Commit message
- -r, --release
make a release
Default: True
- --major
make a major release
Default: False
- --minor
make a major release
Default: False
- --patch
make a major release
Default: False
- -v, --version
Version to use on tag
- -a, --all
Use commit -a
Default: False
- -t, --tag
Create a tag for the commit.Tags are not created for dev releases by default, if you want to tag it, specify this flag explicitly
Default: False
- -n, --no-tag
Don’t create a tag for the commit
Default: False
create¶
Create a new module
inmanta modules create [-h] name
- name
The name of the module
freeze¶
Set all version numbers in project.yml
inmanta modules freeze [-h] [-o OUTFILE] [-r] [--operator OPERATOR]
- -o, --outfile
File in which to put the new project.yml, default is the existing project.yml
- -r, --recursive
Freeze dependencies recursively. If not set, freeze_recursive option in project.yml is used,which defaults to False
- --operator
Comparison operator used to freeze versions, If not set, the freeze_operator option in project.yml is used which defaults to ~=
project¶
Subcommand to manage the project
inmanta project [-h] {freeze,init} ...
subcommand¶
- cmd
Possible choices: freeze, init
Sub-commands:¶
freeze¶
Set all version numbers in project.yml
inmanta project freeze [-h] [-o OUTFILE] [-r] [--operator OPERATOR]
- -o, --outfile
File in which to put the new project.yml, default is the existing project.yml
- -r, --recursive
Freeze dependencies recursively. If not set, freeze_recursive option in project.yml is used,which defaults to False
- --operator
Comparison operator used to freeze versions, If not set, the freeze_operator option in project.yml is used which defaults to ~=
init¶
Initialize directory structure for a project
inmanta project init [-h] --name NAME [--output-dir OUTPUT_DIR] [--default]
- --name, -n
The name of the new project
- --output-dir, -o
Output directory path
Default: “./”
- --default
Use default parameters for the project generation
Default: False
deploy¶
Deploy with a inmanta all-in-one setup
inmanta deploy [-h] [--dry-run] [-f MAIN_FILE] [--dashboard]
Named Arguments¶
- --dry-run
Only report changes
Default: False
- -f
Main file
Default: “main.cf”
- --dashboard
Start the dashboard and keep the server running. The server uses the current project as the source for server recompiles
Default: False
export¶
Export the configuration
inmanta export [-h] [-g] [-j JSON] [-e ENVIRONMENT] [-d] [--full] [-m]
[--server_address SERVER] [--server_port PORT] [--token TOKEN]
[--ssl] [--ssl-ca-cert CA_CERT] [-X] [-f MAIN_FILE]
[--metadata METADATA] [--model-export]
[--export-plugin EXPORT_PLUGIN]
Named Arguments¶
- -g
Dump the dependency graph
Default: False
- -j
Do not submit to the server but only store the json that would have been submitted in the supplied file
- -e
The environment to compile this model for
- -d
Trigger a deploy for the exported version
Default: False
- --full
Make the agents execute a full deploy instead of an incremental deploy. Should be used together with the -d option
Default: False
- -m
Also export the complete model
Default: False
- --server_address
The address of the server to submit the model to
- --server_port
The port of the server to submit the model to
- --token
The token to auth to the server
- --ssl
Enable SSL
Default: False
- --ssl-ca-cert
Certificate authority for SSL
- -X, --extended-errors
Show stack traces for compile errors
Default: False
- -f
Main file
Default: “main.cf”
- --metadata
JSON metadata why this compile happened. If a non-json string is passed it is used as the ‘message’ attribute in the metadata.
- --model-export
Export the configuration model to the server as metadata.
Default: False
- --export-plugin
Only use this export plugin. This option also disables the execution of the plugins listed in the configuration file in the export setting.
inmanta-cli¶
The inmanta-cli
command can be used to interact with the inmanta server and agents,
including manage projects, environments, parameters and more.
The following reference explains the available subcommands.
inmanta-cli¶
inmanta-cli [OPTIONS] COMMAND [ARGS]...
Options
-
--host
<host>
¶ The server hostname to connect to
-
--port
<port>
¶ The server port to connect to
agent¶
inmanta-cli agent [OPTIONS] COMMAND [ARGS]...
list¶
inmanta-cli agent list [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
pause¶
Pause a specific agent or all agents in a given environment. A paused agent cannot execute deploy operations.
inmanta-cli agent pause [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
-
--agent
<agent>
¶ The name of the agent to pause.
-
--all
¶
Pause all agents in the given environment
unpause¶
Unpause a specific agent or all agents in a given environment. A unpaused agent will be able to execute deploy operations.
inmanta-cli agent unpause [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
-
--agent
<agent>
¶ The name of the agent to pause.
-
--all
¶
Pause all agents in the given environment
environment¶
inmanta-cli environment [OPTIONS] COMMAND [ARGS]...
create¶
inmanta-cli environment create [OPTIONS]
Options
-
-n
,
--name
<name>
¶ The name of the new environment [required]
-
-p
,
--project
<project>
¶ The id of the project this environment belongs to [required]
-
-r
,
--repo-url
<repo_url>
¶ The url of the repository that contains the configuration model
-
-b
,
--branch
<branch>
¶ The branch in the repository that contains the configuration model
-
-s
,
--save
¶
Save the ID of the environment and the server to the .inmanta config file
delete¶
inmanta-cli environment delete [OPTIONS] ENVIRONMENT
Arguments
-
ENVIRONMENT
¶
Required argument
list¶
inmanta-cli environment list [OPTIONS]
modify¶
inmanta-cli environment modify [OPTIONS] ENVIRONMENT
Options
-
-n
,
--name
<name>
¶ The name of the new environment [required]
-
-r
,
--repo-url
<repo_url>
¶ The url of the repository that contains the configuration model
-
-b
,
--branch
<branch>
¶ The branch in the repository that contains the configuration model
Arguments
-
ENVIRONMENT
¶
Required argument
save¶
Save the ID of the environment and the server to the .inmanta config file
inmanta-cli environment save [OPTIONS] ENVIRONMENT
Arguments
-
ENVIRONMENT
¶
Required argument
setting¶
inmanta-cli environment setting [OPTIONS] COMMAND [ARGS]...
delete¶
inmanta-cli environment setting delete [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
-
-k
,
--key
<key>
¶ The key to delete [required]
get¶
inmanta-cli environment setting get [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
-
-k
,
--key
<key>
¶ The key to get [required]
monitor¶
inmanta-cli monitor [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
param¶
inmanta-cli param [OPTIONS] COMMAND [ARGS]...
get¶
inmanta-cli param get [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
-
--name
<name>
¶ The name of the parameter [required]
-
--resource
<resource>
¶ The resource id of the parameter
project¶
inmanta-cli project [OPTIONS] COMMAND [ARGS]...
create¶
Create a new project on the server
inmanta-cli project create [OPTIONS]
Options
-
-n
,
--name
<name>
¶ The name of the new project [required]
list¶
inmanta-cli project list [OPTIONS]
token¶
inmanta-cli token [OPTIONS] COMMAND [ARGS]...
bootstrap¶
Generate a bootstrap token that provides access to everything. This token is only valid for 3600 seconds.
inmanta-cli token bootstrap [OPTIONS]
version¶
inmanta-cli version [OPTIONS] COMMAND [ARGS]...
list¶
inmanta-cli version list [OPTIONS]
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
release¶
inmanta-cli version release [OPTIONS] VERSION
Options
-
-e
,
--environment
<environment>
¶ The environment to use [required]
-
-p
,
--push
¶
Push the version to the deployment agents
-
--full
¶
Make the agents execute a full deploy instead of an incremental deploy. Should be used together with the –push option
Arguments
-
VERSION
¶
Required argument