Install the Splunk Packaging Toolkit

This topic covers how to download and install the Splunk Packaging Toolkit Beta. At this time, the Packaging Toolkit Beta is a CLI tool only, and must be installed separately from Splunk Enterprise. You do not have to install the Packaging Toolkit Beta on a machine that is also running Splunk Enterprise.

Note: The Splunk Packaging Toolkit Beta requires Python 2.7.x. It does not work with Python 3.x.

This topic contains the following sections:


Download the Packaging Toolkit Beta

First, download the Splunk Packaging Toolkit Beta. To download the Packaging Toolkit Beta, you must agree to the following:

By downloading the preview software here, I hereby accept the terms of Splunk's Pre-Release Software License Agreement. Given that this is a public preview, however, I understand that the confidentiality clause in the agreement will not apply. I also understand that this preview will expire on 27 September, 2017.

Install VirtualEnv

Splunk recommends installing VirtualEnv before installing the Packaging Toolkit Beta. With VirtualEnv, you can create isolated Python environments. Installing VirtualEnv is not required to install the Packaging Toolkit Beta.

To install VirtualEnv using Pip, on the command line, enter the following:

pip install virtualenv

Now, create a directory to house your virtual envs:

mkdir ~/Virtualenvs
cd ~/Virtualenvs

Next, create a new virtual env for this Packaging Toolkit Beta installation:

virtualenv slim
cd slim
source bin/activate

Install the Packaging Toolkit Beta

Install the Splunk Packaging Toolkit and its dependency to your environment by entering the following text on the command line:

pip install semantic_version
pip install --no-binary :all: splunk-packaging-toolkit-0.9.0.tar.gz

The --no-binary :all: option is required so that pip does not incorrectly identify the installation file as a binary package.

Update your Python PATH

You must ensure that your Python 2.7.x installation's bin is on your PATH to use the slim command to perform packaging operations. For example, if you set up a Python 2.7.x virtual environment to the following location:

$ PYTHON_HOME=~/Virtualenvs/slim
You might update your PATH like this:
$ PATH="${PYTHON_HOME}/bin:$PATH"

You can then run the Splunk Packaging Toolkit Beta CLI commands as follows:

$ slim
Expected a SLIM command: config, describe, generate-manifest, package, partition, update-installation, validate
$ slim <command> --help