mzcli Usage and Options(4.3)

The mzcli command line tool has a number of options to be added for it to know which installation to run the command on.

Comment for below

Options

The options specified with double-dashes (--) can also be specified via:

  • Environment variables: MZCLI_PORT, MZCLI_HOST, MZCLI_USER, MZCLI_PASSWORD, and MZCLI_SCHEMA. The environment variables need to be set for the machine that is running the mzcli client.

  • A property file called mzcli.properties with these property names and default values:

    • mzcli.user=mzadmin

    • mzcli.schema=http

    • mzcli.port=9000

    • mzcli.host=localhost

      mzcli searches for this file in MZ_HOME/etc (if MZ_HOME exists) or in the local folder (if MZ_HOME does not exist). If the mzcli.properties file is not present, it is created with default values.

      If an option is not specified, its default value is used.

  • A profile containing one or several installations with different options

You can also use a simplified user/password syntax, just enter the username and password in a single parameter together with the command. When the command is executed, the command prompt is returned to the Unix shell.

Priority

Since the options can be set in various ways, the following priority applies:

The priority is as follows, ranking lowest to highest:

  • Values from the mzcli.properties file

  • Environment variables

  • Options specified when out of interactive mode

  • Username and password specified using the [<username/password>] syntax

  • Values derived from the default profile.

  • Values derived from the --profile option.

  • Command Line Attributes.

  • Options specified when in interactive mode

Lower priority means that it can be overridden by anything with higher priority.