Project

General

Profile

Continuous Delivery and Testing » History » Version 7

Luke Murphey, 03/01/2017 05:32 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 7 Luke Murphey
You might need to add the user "go" to the "splunk" group:
20 7 Luke Murphey
21 7 Luke Murphey
<pre>
22 7 Luke Murphey
sudo usermod -G splunk go
23 7 Luke Murphey
</pre>
24 6 Luke Murphey
25 3 Luke Murphey
Should this be done using:
26 3 Luke Murphey
# The build script?
27 5 Luke Murphey
## Pros: Could hide password using secure variable; can be done in a single line; password can be globally in environment variables
28 5 Luke Murphey
## Cons: requires the build script as a material; requires ant on all agents
29 3 Luke Murphey
# Direct commands?
30 4 Luke Murphey
# Straight copying?
31 5 Luke Murphey
32 5 Luke Murphey
Using the build script:
33 5 Luke Murphey
Pros:
34 5 Luke Murphey
# Could hide password using secure variable
35 5 Luke Murphey
# Can be done in a single line
36 5 Luke Murphey
# Password can be globally in environment variables
37 5 Luke Murphey
# Could bump Splunk too
38 5 Luke Murphey
39 5 Luke Murphey
Cons:
40 5 Luke Murphey
# Requires downloading the build script as a material
41 5 Luke Murphey
# Requires ant on the agents