Project

General

Profile

Continuous Delivery and Testing » History » Version 6

Luke Murphey, 03/01/2017 05:30 AM

1 1 Luke Murphey
h1. Continuous Delivery and Testing
2 1 Luke Murphey
3 1 Luke Murphey
You can use a continuous integration tool to automate testing and deploying your Splunk apps. This will allow you to:
4 1 Luke Murphey
5 1 Luke Murphey
# Test your app on several platforms and versions of Splunk automatically (or with a click of a button)
6 1 Luke Murphey
# Easily build clean and consistent copies of your app (avoids the possible corrupt builds made on Developer hosts)
7 1 Luke Murphey
# Deploy the app to your test and production hosts with a single click
8 2 Luke Murphey
9 2 Luke Murphey
Some notes:
10 2 Luke Murphey
To use a created package (spl or tar.gz), make sure to:
11 2 Luke Murphey
12 2 Luke Murphey
* Make a fetch artifact step
13 2 Luke Murphey
* Set the fetch as a file, not a directory (https://groups.google.com/forum/#!searchin/go-cd/gocd$20fetch$20zip$20artifact$20%7Csort:relevance/go-cd/Ja5lBT6bpRA/A0ojaSRqBwAJ)
14 3 Luke Murphey
15 5 Luke Murphey
Need to create a minimal account for installing apps with the following capabilities per (https://answers.splunk.com/answers/67843/capability-to-install-app.html):
16 5 Luke Murphey
* rest_apps_management
17 5 Luke Murphey
* admin_all_objects
18 5 Luke Murphey
19 6 Luke Murphey
You might need to add the user "go" to the "splunk" group.
20 6 Luke Murphey
21 3 Luke Murphey
Should this be done using:
22 3 Luke Murphey
# The build script?
23 5 Luke Murphey
## Pros: Could hide password using secure variable; can be done in a single line; password can be globally in environment variables
24 5 Luke Murphey
## Cons: requires the build script as a material; requires ant on all agents
25 3 Luke Murphey
# Direct commands?
26 4 Luke Murphey
# Straight copying?
27 5 Luke Murphey
28 5 Luke Murphey
Using the build script:
29 5 Luke Murphey
Pros:
30 5 Luke Murphey
# Could hide password using secure variable
31 5 Luke Murphey
# Can be done in a single line
32 5 Luke Murphey
# Password can be globally in environment variables
33 5 Luke Murphey
# Could bump Splunk too
34 5 Luke Murphey
35 5 Luke Murphey
Cons:
36 5 Luke Murphey
# Requires downloading the build script as a material
37 5 Luke Murphey
# Requires ant on the agents