Skip to Main Menu

Creating an OSS Splunk App Part 2: App Packaging

Sometime ago I blogged about setting up a Splunk app in GitHub with builds and the rest. I just wanted to clean up the inital setup using another tool that is available from Splunk. The Splunk Packaging Toolkit has been around for sometime however now it has been released with recent versions of the Splunk product.

The toolkit provides a number of features, one of which is packaging Splunk apps. Given the previous example on GitHub it is straight forward to setup and I was able to considerably clean up the build script.

Firstly, I moved the source of the app into a sub folder representative of the app folder used for packaging. In this case src/octopus_deploy_addon/.

Then I created a manifest for the Splunk app via the following command.

slim generate-manifest src/ -o src/octopus_deploy_addon/app.manifest

In terms of the build, not a lot changed other than ensuring the Packaging Toolkit was added before the build started.

Below is a snip from the Travis Build.

language: python
sudo: false
- '2.7'
- wget --output-document splunk-appinspect.tar.gz
- pip install splunk-appinspect.tar.gz
- pip install
- pip install bumpversion
- "./"

In the file, I was able to focus on the key areas of packaging, testing and pushing a release. The updated build script can be found over at GitHub.

So, try it out and I can assure you packaging Splunk apps has never been easier.

Get Amongst It!!

comments powered by Disqus