Splunk Add-on SDK formerly UCC is a build and code generation framework
Project description
SPDX-FileCopyrightText: 2020 Splunk Inc.
splunk-add-on-ucc-framework
A framework to generate UI based Splunk Add-ons. It includes UI, Rest handler, Modular input, Oauth, Alert action templates.
Note: after UCC 5.2 Python 2 specific libraries are not supported anymore. This means if the add-on has
package/lib/py2/requirements.txt
they will not be installed while runningucc-gen
command. Therefore modular inputs that are supposed to run on Python 2 will not be supported by UCC.
What is UCC?
UCC stands for Universal Configuration Console. It is a service for generating Splunk Add-ons which is easily customizable and flexible. UCC provides basic UI template for creating Addon's UI. It is helpful to control the activity by using hooks and other functionalities.
Features
- Generate UCC based addons for your Splunk Technology Add-ons
UCC 5
UCC 5 has potentially breaking changes to add-ons using hook extension in the UX. Previously such hooks were limited to un-optimized js files placed in the package. Add-ons may now package such extensions with webpack.
Requirements
- Addon package and globalConfig.json file
Note: You may refer the globalConfig.json file here
Installation
"splunk-add-on-ucc-framework" can be installed via pip
from PyPI
:
$ pip3 install splunk-add-on-ucc-framework
pre-commit
Please visit pre-commit
quick start section.
How to use
To build the UCC based addon follow the below steps:
- Install the
splunk-add-on-ucc-framework
viapip3
. - Run the
ucc-gen
command. - Make sure that
package
folder andglobalConfig.json
file are present in the addon folder. - The final addon package will be generated, in the
output
folder.
Workflow
By the running the ucc-gen
command, the following steps are executed:
-
Cleaning out the
output
folder. -
Retrieve the package ID of addon.
-
Copy UCC template directory under
output/<package_ID>
directory. -
Copy
globalConfig.json
file tooutput/<package_ID>/appserver/static/js/build
directory. -
Collect and install Addon's requirements into
output/<package_ID>/lib
directory of addon's package. -
For the addon's requirements, packages are installed according to following table:
File Name Description Output directory in UCC build lib/requirements.txt Python3 compatible packages output/<package_ID>/lib -
Replace tokens in views.
-
Copy addon's
package/*
tooutput/<package_ID>/*
directory. -
If an addon requires some additional configurations in packaging than implement the steps in additional_packaging.py
Params
splunk-add-on-ucc-framework supports the following params:
Name | Description |
---|---|
source | Folder containing the app.manifest and app source |
config | Path to the configuration file, Defaults to GlobalConfig.json in the parent directory of source provided |
ta-version | Optional override Current version of TA, Default version is version specified in globalConfig.json a Splunkbase compatible version of SEMVER will be used by default |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for splunk_add_on_ucc_framework-5.5.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9df458e8c4010909f159186b4b0905620930c523d06b8e5c2af7bbbb795e8db |
|
MD5 | 7e403e256b5c55620bae44dbc06194da |
|
BLAKE2b-256 | 1ab63d8ed04affc82d21f7f912470a472efb8f33c01e1ee5173a14528620ba0a |
Hashes for splunk_add_on_ucc_framework-5.5.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a7e5133abab7c668f4f15b8667a283b1258b6822af92a70db64d224e59e7e4b |
|
MD5 | 291a9beac033c5beb2eb771b9fcf0244 |
|
BLAKE2b-256 | d0515fcd4574a2f98065d8096caa01e5d2c1b95ee501da1faef1a7787d574ee9 |