Splunk Dev

Packaging a Splunk

Marco
Communicator

Hello All,

What is the difference between packaging a Splunk app using Splunk's Packaging Toolkit and packaging the app via the Splunk Package App command?

I've packaged the app both ways:

When I use Splunk's Packaging Toolkit I get a tar.gz.

When I use the Splunk command splunk package app TestApp I get a .SPL

Which isn't an issue, I can convert an SPL into a tar.gz. My question is does the Packaging Toolkit do something that the Splunk package app command can't?

 

Labels (3)
0 Karma
1 Solution

Marco
Communicator

I found the answer.

I am currently using Splunk 8.1 and it looks like the Splunk's Packaging toolkit is built into it. If you go into the Splunk Bin folder you can issue Slim commands from there. 

For Example,

C:\Program Files\Splunk\bin>slim
usage: slim [-v] [-h] [--debug] [--quiet]
            {config,describe,generate-manifest,package,partition,validate,update-installation}
            ...

execute a packaging toolkit command

options:
  -v, --version         show program's version number and exit
  -h, --help            show this help message and exit
  --debug               save debugging information
  --quiet               suppress all messages except error messages

slim commands:
  {config,describe,generate-manifest,package,partition,validate,update-installation}
    config              get, set, or unset user or system options
    describe            describe an app and its dependencies
    generate-manifest   create a new or updated app manifest
    package             make an app source package for distribution
    partition           split an app source package into a set of targeted
                        deployment packages
    validate            verify an app and its dependencies
    update-installation
                        perform an update action on an installation graph

 

Which is exactly the same thing as the Splunk Packaging tool kit. To package an app here just issue the following: 

 slim package "C:\Users\MyAppDirectory" 

In conclusion,  Splunk's Packaging Toolkit is already built into Splunk.

View solution in original post

0 Karma

Marco
Communicator

I found the answer.

I am currently using Splunk 8.1 and it looks like the Splunk's Packaging toolkit is built into it. If you go into the Splunk Bin folder you can issue Slim commands from there. 

For Example,

C:\Program Files\Splunk\bin>slim
usage: slim [-v] [-h] [--debug] [--quiet]
            {config,describe,generate-manifest,package,partition,validate,update-installation}
            ...

execute a packaging toolkit command

options:
  -v, --version         show program's version number and exit
  -h, --help            show this help message and exit
  --debug               save debugging information
  --quiet               suppress all messages except error messages

slim commands:
  {config,describe,generate-manifest,package,partition,validate,update-installation}
    config              get, set, or unset user or system options
    describe            describe an app and its dependencies
    generate-manifest   create a new or updated app manifest
    package             make an app source package for distribution
    partition           split an app source package into a set of targeted
                        deployment packages
    validate            verify an app and its dependencies
    update-installation
                        perform an update action on an installation graph

 

Which is exactly the same thing as the Splunk Packaging tool kit. To package an app here just issue the following: 

 slim package "C:\Users\MyAppDirectory" 

In conclusion,  Splunk's Packaging Toolkit is already built into Splunk.

0 Karma

somesoni2
Revered Legend

The toolkit can do more based on application manifest file. See this for more information.

https://dev.splunk.com/enterprise/docs/releaseapps/packageapps/packagingtoolkit/#About-partitioning-...

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...