Reader small image

You're reading from  Splunk Developer's Guide

Product typeBook
Published inMay 2015
Reading LevelBeginner
Publisher
ISBN-139781785285295
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Kyle Smith
Kyle Smith
author image
Kyle Smith

Kyle Smith is a self-proclaimed geek and has been working with Splunk extensively since 2010. He enjoys integrating Splunk with new sources of data and types of visualization. He has spoken numerous times at the Splunk User Conference (most recently in 2014 on Lesser Known Search Commands) and is an active contributor to the Splunk Answers community and also to the #splunk IRC channel. He was awarded membership into the SplunkTrust as a founding member. He has published several Splunk Apps and add-ons to Splunkbase, the Splunk community's premier Apps and add-ons platform. He has worked in both higher education and private industry; he is currently working as an integration developer for Splunk's longest running professional services partner. He lives in central Pennsylvania with his family.
Read more about Kyle Smith

Right arrow

Chapter 7. Packaging Applications

In this chapter, we will cover how to properly package our App for publishing. Packaging your App correctly is critical to allowing you to publish the App on Splunkbase. Splunk provides a set of guidelines and standards that must be met for your App to be included on Splunkbase. Splunkbase is the official repository for Splunk Apps and add-ons, both created by Splunk and other contributors. Packaging also gives you the opportunity to brand and document your App in a manner that clearly defines you and your brand. Splunkbase automatically checks the structure of your App when you upload it, so it is important to make sure you cross your "T"s and dot your "I"s before you upload. As we progress through this chapter, we will package our App and get it ready for deployment on Splunkbase. We will first go over the naming guidelines, and then cover some standards and best practices. Once we've detailed what needs to happen, we will see how to actually package the...

Naming guidelines


Splunk has provided a very nice set of guidelines for use in packaging your App. These guidelines are important, as you would not want to infringe on any copyrights or licensed trademarks as you build your App.

Tip

These are Guidelines, and while your App can literally be named anything you want for use, either internally to a company or for an individual installation, you must follow the guidelines for publishing on Splunkbase.

The first guideline revolves around using third-party trademarks. A third-party trademark is anything that you or Splunk do not own, control, or have license to use except under fair use. When using a third-party trademark, Splunk maintains that you must separate the third party's trademark from the Splunk trademark with the word "for", which:

  • Clarifies that the third-party trademark and the associated technology do not belong to Splunk or the author of the App or add-on.

  • Indicates that the app or add-on works with a specific third-party product. You...

Packaging the App


Now, we actually get to package the App in preparation for publishing. We will cover how to use both a *nix command line as well as 7-Zip for Windows. We will carry out the compression only after readying the folder structure for packaging. Let's start by copying the entire App folder to a new location. This makes sure that we get a clean directory to move files and content within. If you are using Git, you can also simply commit the dev changes and clone the repository in a different folder. This is beneficial, since earlier we had some build files in the appserver/static folder, but they didn't make it into the repository. Keep it clean, and keep it small!

Once you have relocated your App, you can start the actual packaging. The first thing to remove is the metadata/local.meta file. The next thing is to check the default permissions in metadata/default.meta. If they look good, let's move on to the bin folder. This is where you would want to remove any *.pyc files, as they...

The App packaging checklist


The App packaging checklist table is a non-all-inclusive checklist for App packaging requirements. Not every item on this list needs to be in every App, but it should provide a basic reminder of what is required:

Basic Checklist

Basic README file

XML is well formed

Empty local directory

Contact information

App description

Delete metadata/local.meta

Clean of viruses/malware

App ID

Verify default permissions

No malicious commands

App version

Remove dynamic lookups

Executables located in bin

App icon

No hardcoded paths

SPL file format

Common Information Model compliance

Setup screen

App name complies with guidelines

Valid EULA

No hardcoded index paths

Summary


In this chapter, we covered the Splunk guidelines for naming conventions. Naming your App incorrectly could cause an infringement on intellectual property. Make sure that you use third-party trademarks properly, following both Splunk's and the third-party's guidelines. We covered the basic options needed for the app.conf file, and went through the standards for content located within the App. We saw how to combine configurations and how to finalize the package, making it ready for publishing.

We also went through a list of do's and don'ts for things within an App, and provided an App checklist as a reminder of what is required and what you need to make sure is present in the App. While these lists are not exhaustive, they provide a basic measure to test your Apps against.

In our final chapter, we will cover how to publish the App on Splunkbase, as well as some other areas where you can receive support from the Splunk community.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Splunk Developer's Guide
Published in: May 2015Publisher: ISBN-13: 9781785285295
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Kyle Smith

Kyle Smith is a self-proclaimed geek and has been working with Splunk extensively since 2010. He enjoys integrating Splunk with new sources of data and types of visualization. He has spoken numerous times at the Splunk User Conference (most recently in 2014 on Lesser Known Search Commands) and is an active contributor to the Splunk Answers community and also to the #splunk IRC channel. He was awarded membership into the SplunkTrust as a founding member. He has published several Splunk Apps and add-ons to Splunkbase, the Splunk community's premier Apps and add-ons platform. He has worked in both higher education and private industry; he is currently working as an integration developer for Splunk's longest running professional services partner. He lives in central Pennsylvania with his family.
Read more about Kyle Smith