Skip to content

User Commands

Abstract

This chapter list the operator commands you need to start and stop your channels.

The main command you will use is the punchctl command line utility. It provides:

  • online help
  • autocompletion of configured and running channels and jobs
  • support for all administration commands : start, stop, status etc..

The simplest way to understand it is simply to launch it:

image

The interactive mode makes it extra easy to manage your channels. In the rest of this guide we will only list the equivalent non-interactive variants. That is, whenever we document (say):

1
punchctl --tenant mytenant start --channel apache_httpd

it is equivalent to

1
punchctl:mytenant > start --channel apache_httpd

using the interactive mode.

Channel Commands

Start

To start a channel:

1
punchctl --tenant mytenant start --channel apache_httpd

You also can start all channels at once:

1
punchctl --tenant mytenant start --channel apache_httpd

Stop

To stop a channel:

1
punchctl --tenant mytenant stop --channel apache_httpd

or all of them:

1
punchctl --tenant mytenant stop

Status

To query a channel status:

1
punchctl --tenant mytenant status --channel apache_httpd

or

1
punchctl --tenant mytenant status

Job Commands

The punchctl command provides you with the capability to start stop or status only a dedicated job. Here is an example:

1
punchctl --tenant mytenant start --job apache_httpd/main/single_topology.json

Refer to the punchctl online help for details.

Developer Commands

When designing topologies or spark jobs, you need a way to quickly run them without the burden to pass through a channel.

The punch provides you with the punchplatform-topology.sh and punchplartform-analytics.sh commands to launch storm topologies or spark pml jobs using a simple foreground mode. Once satisfied, simply include your new topology in a channel, you will then be able to start it using the regular punchctl command.

Designing Channels with Templates

Writing channel and topology configuration files is rendered simpler using templating. The punchplatform provides you with a tool to generate you complete channel configuration files so as to greatly simplify the settings of the various parameters and options.

By quickly switching from one template set to another you can easily test your channels with or without Kafka for instance. It is handy and often used to generate simpler channels to focus on parsing issues.