CLI Reference¶
The MACH composer's command line interface allows you to peform the following actions:
$ mach
Usage: mach [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
apply Apply the configuration.
bootstrap Bootstraps a configuration or component.
components List all components.
generate Generate the Terraform files.
plan Output the deploy plan.
sites List all sites.
update Update all (or a given) component.
apply¶
Apply the configuration.
mach apply --auto-approve -f main.yml
Options
--with-sp-loginIf az login with service principal environment variables should be done.--auto-approveAuto-approve the Terraform plan--fileor-f TEXTYAML file to apply. If not set apply all *.yml files.--siteor-s TEXTSite to apply. If not set apply all sites.--componentor-c TEXTSpecific component to target.--output-path TEXTOutput path, defaults tocwd/deployments`.--reuseSupress a terraform init for improved speed (not recommended for production usage)
bootstrap¶
Usage: mach bootstrap [OPTIONS] [config|component]
Bootstraps a configuration or component.
# To start a wizard to create a new configuration file
mach bootstrap config
# To start a wizard to create a new component
mach bootstrap component
Options
--outputor-o TEXTOutput file or directory.--cookiecutteror-c TEXTcookiecutter repository to generate from.
components¶
List all components.
mach components -f main.yml
Options
--fileor-f TEXTYAML file to read. If not set parse all *.yml files.
generate¶
Generate the Terraform files.
mach generate -f main.yml
Options
--fileor-f TEXTYAML file to parse. If not set parse all *.yml files.--siteor-s TEXTSite to parse. If not set parse all sites.--output-path TEXTOutput path, defaults tocwd/deployments.
plan¶
Output the deploy plan.
mach plan -f main.yml
Options
--fileor-f TEXTYAML file to parse. If not set parse all *.yml files.--siteor-s TEXTSite to generate plan of. If not set generate plans for all sites.--componentor-c TEXTSpecific component to target.--output-path TEXTOutput path, defaults tocwd/deployments.--reuseSupress a terraform init for improved speed (not recommended for production usage)
sites¶
List all sites.
mach sites -f main.yml
Options
--fileor-f TEXTYAML file to read. If not set parse all *.yml files.
update¶
Usage: mach update [OPTIONS] [COMPONENT] [VERSION]
Update all (or a given) component.
When no component and version is given, it will check the git repositories for any updates. This command can also be used to manually update a single component by specifying a component and version.
# To check for updates on all components
mach update --check
# To update a specific component and create a commit message
mach update pim-importer v1.2.0 -c
Options
--fileor-f TEXTYAML file to update. If not set update all *.yml files.--verboseor-vVerbose output.--checkOnly checks for updates, doesnt change files.--commitor-cAutomatically commits the change.