Prozzie, the Wizzie Data Platform Collector
This project is maintained by wizzie-io
Hosted on GitHub Pages — Theme by orderedlist
Prozzie is the main entry point of Wizzie Data Plane (WDP) platform.
Prozzie CLI allows the user (or admin) to operate prozzie with no need to know internals or advance docker or docker-compose commands.
prozzie [-h|--help] <command> [<command args>]
-h|--help
-v|--version
You can handle prozzie components configuration with prozzie config
command. This command allows you to configure modules with a wizard
assistant, get
, set
and setup
prozzie components configuration and enable
or disable
modules.
Prozzie config command has the next actions:
prozzie config get
prozzie config set
prozzie config wizard
prozzie config describe <module>
prozzie config setup <module>
prozzie config describe-all
prozzie config enable <module1, module2, ···, moduleN>
prozzie up
commandprozzie config disable <module1, module2, ···, moduleN>
prozzie up
commandprozzie config list-enabled [--quiet|-q]
--quiet
will not print the title,
making it more suitable for scripting.Prozzie config command has next options:
--help|-h
--no-reload-prozzie
prozzie up
or
similar.Prozzie config setup
and set
has next aditional options:
--dry-run
You can use get
and set
actions to check and list all variables in a specific module.
You can get a complete key-value list of variables for a specified module:
prozzie config get <module>
i.e:
prozzie config get base
You can get a specified variable value with next command:
prozzie config get <module> <key1> <key2> ··· <keyN>···
i.e:
prozzie config get base INTERFACE_IP CLIENT_API_KEY
You can set a specific a list of variables with next action:
prozzie config set <module> <key-1>=<value-1> <key-2>=<value-2> ··· <key-N>=<value-N>
i.e:
prozzie config set base INTERFACE_IP=192.168.1.100 CLIENT_API_KEY=myAwesomeAPIKey
As you can see, the format of key-value pairs are <key>
=<value>
Please note that the prozzie makes some verifications, and the variables can be
modified or rejected. The new key=value
will be printed to check the actual new
variable assignment.
The command prozzie config set
also accepts --dry-run
and --no-reload-prozzie
modifiers.
prozzie config
command allows you check and handle the configuration in next modules:
You have the next commands for basic prozzie operation:
prozzie compose
prozzie down
prozzie start
prozzie stop
prozzie up -d
-d
flag is for using detached mode.You can start, stop, create or destroy prozzie compose with installed commands
prozzie start
, prozzie stop
, prozzie up
and prozzie down
, respectively.
The difference between up
/down
and start
/stop
is that the former will
create or destroy containers and associated data, but the latter will only start
or stop them if they are already created with former commands.
To operate at low level on created compose, you can use prozzie compose
command, and it will forward arguments with proper compose
file and configurations.
So, prozzie start
, prozzie stop
, prozzie up
and
prozzie down
are just shortcuts for the long version
prozzie compose [up|down|...]
, and arguments will be also forwarded.
You can use the command logs
to see the different prozzie components logs:
prozzie logs
You can keep seeing logs with the option -f/--follow
:
prozzie logs -f
And check only a specific component if you append that component’s name. For example, to check kafka logs:
prozzie logs kafka
If log file is too long, you can use --tail <n>
option to show the newest entries in log, where <n>
is the number of entries to show. For exmaple, to show the 1000 newest entries of kafka’s log we can type:
prozzie logs -f --tail 1000 kafka
You can manage topics with prozzie kafka topics
subcommand. If you execute
it, you can check the options it offers to you. Check included examples in
this document.
prozzie kafka topics --create --topic abc --partitions 1 --replication-factor 1
Note that you don’t need to create a topic before produce data. Kafka cluster creates it for you at the same moment you produce the first message.
prozzie kafka topics --list
prozzie kafka produce <topic>
You can introduce as many messages as you want, separated by a newline. If you want to produce messages with key you can use the next command:
prozzie kafka produce <topic> --property "parse.key=true" --property "key.separator=,"
prozzie kafka consume <topic> [<partition>]
You can consume from many topics using --whitelist
or --blacklist
:
prozzie kafka consume --whitelist '<topic1>|<topic2>|...'
prozzie kafka consume --blacklist '<topic1>|<topic2>|...'
Or consume from the earlier message in the kafka log:
prozzie kafka consume <topic> [<partition>] --from-beginning
If you want to consume messages and show its keys you can use the next command:
prozzie kafka consume <topic> --property "print.key=true" --property "key.separator= -> "
If you know how to use kafka distributed configuration scripts, you can
execute them directly using
prozzie compose exec kafka /opt/kafka/bin/<your_script>
.
You can check for upgrade your prozzie with prozzie upgrade
command. If you run prozzie upgrade
without options, prozzie will check and upgrade (With user confirmation) to latest stable release by default.
Prozzie upgrade with transactional operations. First of all Prozzie create a backup of your current prozzie version, If something go wrong then prozzie will revert all local changes.
Prozzie upgrade command has next options:
--from-git[=<branch|commit>]
--from-git operation is dangerous, you could break your prozzie! Use it at your own risk.
--prerelease
-y, --yes, --assumeyes
-f, --force
--force operation is dangerous, you could break your prozzie! Use it at your own risk.
--check
-h, --help
prozzie upgrade
command help.You can add new connectors of kafka-connect with prozzie config install
command. This command has the next parameters:
--dry-run
:
Optional. Only validate the configuration, do not modify anything.
--kafka-connector
:
Mandatory. This parameter allows us to specify the path of kafka-connect connector jar file. You can use a relative or absolute path.
--compose-file
:
Mandatory. This parameter allows us to specify the absolute path of docker-compose file. You must use a absolute path due to docker-compose context.
--config-file
:
Mandatory. This parameter allows us to specify the path of configuration bash file to handle the connector’s configuration. You can use a relative or absolute path.
You can create a new configuration bash file for a new connector based in kafka-connect (using --kafka-connector
) or docker-compose (using --compose-file
). You can use a simple json
or yaml
scheme to generate automatically the bash file:
JSON schema:
To use a json schema you need to specify it with --config-file.json
option.
kafka-connect based connector
{
"configs": [
{
"var_name": "variable.name.1",
"default_value": "my-default-value",
"description": "description about variable.name.1",
"hidden": false
}
]
}
docker-compose file based connector
{
"configs": [
{
"var_name": "ENV_VAR_1",
"default_value": "my-default-value",
"description": "description about ENV_VAR_1",
"hidden": false
}
]
}
YAML schema:
To use a yaml schema you need to specify it with --config-file.yaml
option.
kafka-connect based connector
configs:
- var_name: "variable.name.1"
default_value: "my-default-value"
description: "description about variable.name.1"
hidden: false
docker-compose file based connector
configs:
- var_name: "ENV_VAR_1"
default_value: "my-default-value"
description: "description about ENV_VAR_1"
hidden: false
The configs
field contains all the variables that our kafka-connect or docker-compose connector use. Each variable definition has the next fields:
Mandatory fields:
var_name
Optional fields:
default_value
description
hidden
true
or false
, by default it’s false
. If you set hidden
to true
the variable will be classified like module_hidden_envs
else module_envs
.Or you just follow the next basic template:
kafka-connect based connector
#!/usr/bin/env bash
. "${BASH_SOURCE%/*/*}/include/config_kcli.bash"
declare -A module_envs=(
[var.name.1]='defaultValue1|my description 1',
[var.name.2]='defaultValue2|my description 2'
)
declare -A module_hidden_envs=(
[hidden.var.name.1]='defaultValue1|my description 1',
[hidden.var.name.2]='defaultValue2|my description 2'
)
docker-compose file based connector
#!/usr/bin/env bash
. "${BASH_SOURCE%/*/*}/include/config_compose.bash"
declare -A module_envs=(
[ENV_VAR_1]='defaultValue1|my description 1',
[ENV_VAR_2]='defaultValue2|my description 2'
)
declare -A module_hidden_envs=(
[HIDDEN_ENV_VAR_1]='defaultValue1|my description 1',
[HIDDEN_ENV_VAR_2]='defaultValue2|my description 2'
)
IMPORTANT NOTE:
We don’t take any responsibility If you create a schema or config file and then doesn’t work. The user must know the variables and default values of the kafka-connect based connector or docker-compose file based connector that desire install. These variables could be specified in its repository or documentation.
If you use a kafka-connect based connector, you must define at least the name
property that must match with the connector’s name. Also, you must add the connector.class
. You can found more information about this topic in Configuring Connectors of Confluent docs.
If you use a docker-compose file based connector, you only need to add the appropriate environment vars.
You can create your own prozzie CLI subcommands just placing it under
<installation dir>/share/prozzie/cli/prozzie-<cmd>.bash
. For example, foo
subcommand would be <installation dir>/share/prozzie/cli/prozzie-foo.bash
.
This new CLI command has to provide a short guide of what does it do via
--shorthelp
, to be shown in prozzie
help. Also, it will be provided
with prozzie installation prefix with PREFIX
environment variable.
Beyond that, each prozzie CLI subcommand must provide treatment for it’s subcommands, help, and any action it wants to perform.