Reader small image

You're reading from  Splunk Developer's Guide - Second Edition

Product typeBook
Published inJan 2016
Publisher
ISBN-139781785882371
Edition2nd Edition
Tools
Right arrow
Authors (2):
Marco Scala
Marco Scala
author image
Marco Scala

Marco Scala has been working for more than 15 years in delivering solutions to Large Enterprise Customers, first in the APM and J2EE field, and since 2009 in the field of Operational Intelligence and Splunk. He has provided consultancy for big Splunk installations on major Customers, focusing on the best and more effective solution for each different Customer's need. Since 2012 he's also a Certified Splunk Trainer. In the last years his major focus is to get Splunk Customer to gain the maximum value from their IT data, and provide the Business a better view and insight. BigData is another major field of interest, and his next challenge is using Splunk to give Customers useful insights and a practical implementation and exploitation of BigData.
Read more about Marco Scala

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

View More author details
Right arrow

Chapter 7. Packaging Applications

In this chapter, we will cover how to properly package your 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, created by both 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 Ts and dot your Is before you upload. As we progress through this chapter, we will package our App and get it ready for deployment to Splunkbase. We will first go over the naming guidelines, and then cover some standards and best practices. Once we detail what needs to happen, we will see how to actually package the App.

Naming guidelines


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

Note

These are guidelines, and while your App can literally be named anything you want for use, either internally in a company or for an individual install, you must follow the guidelines to publish 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 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 should include the...

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 into 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, we can start with 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...

The App packaging checklist


The App packing 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 of intellectual property. Make sure 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 the configurations and how to finalize the package, making it ready for publishing.

We went through a list of dos and don'ts of things to do within an App, and provided an App checklist as a reminder of what is required and what you need to make sure is presented within 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 to 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 - Second Edition
Published in: Jan 2016Publisher: ISBN-13: 9781785882371
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

Authors (2)

author image
Marco Scala

Marco Scala has been working for more than 15 years in delivering solutions to Large Enterprise Customers, first in the APM and J2EE field, and since 2009 in the field of Operational Intelligence and Splunk. He has provided consultancy for big Splunk installations on major Customers, focusing on the best and more effective solution for each different Customer's need. Since 2012 he's also a Certified Splunk Trainer. In the last years his major focus is to get Splunk Customer to gain the maximum value from their IT data, and provide the Business a better view and insight. BigData is another major field of interest, and his next challenge is using Splunk to give Customers useful insights and a practical implementation and exploitation of BigData.
Read more about Marco Scala

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