Install the Splunk Packaging Toolkit

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

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

This topic contains the following sections:


Download the latest Packaging Toolkit

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

By downloading the software here, I hereby accept the terms of Splunk's Software License Agreement.

Previous versions

For past versions of the Splunk Packaging Toolkit, and the corresponding Splunk release, refer to the table below:

Release Date Version Splunk Release Download
2016-09 0.8.0 Compatible with Splunk 6.5.0 splunk-packaging-toolkit-0.8.0.tar.gz
2017-01 0.9.0 Compatible with Splunk 6.6.0 splunk-packaging-toolkit-0.9.0.tar.gz
2017-09 0.9.1 Compatible with Splunk 7.0.0 splunk-packaging-toolkit-0.9.1.tar.gz
2017-09 1.0.0 Compatible with Splunk Enterprise 7.0.0 or later, and Splunk Cloud 7.0.0 or later splunk-packaging-toolkit-1.0.0.tar.gz

Install VirtualEnv

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

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 installation:

virtualenv slim
cd slim
source bin/activate

Install the Packaging Toolkit

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 splunk-packaging-toolkit-1.0.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 CLI commands as follows:

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