File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ before_install:
12
12
- echo password=changed! >> $HOME/.splunkrc
13
13
# Set SPLUNK_HOME
14
14
- export SPLUNK_HOME="/opt/splunk"
15
- # Pull docker image
16
- - docker pull splunk/splunk-sdk-travis-ci:$SPLUNK_VERSION
17
15
# Add DOCKER to iptables, 1/10 times this is needed, force 0 exit status
18
16
- sudo iptables -N DOCKER || true
19
- # Start Docker container
20
- - docker run -p 127.0.0.1:8089:8089 -d splunk/splunk-sdk-travis-ci:$SPLUNK_VERSION
21
- # curl Splunk until it returns valid data indicating it has been setup, try 20 times maximum
22
- - for i in `seq 0 20 `; do if curl --fail -k https://localhost:8089/services/server/info &> /dev/null; then break; fi; echo $i; sleep 1; done
17
+ # Start docker-compose in detached mode
18
+ - docker-compose up -d
19
+ # Health Check (3 minutes)
20
+ - for i in `seq 0 180 `; do if docker exec -it splunk /sbin/checkstate.sh &> /dev/null; then break; fi; echo $i; sleep 1; done
23
21
# The upload test needs to refer to a file that Splunk has in the docker
24
22
# container
25
23
- export INPUT_EXAMPLE_UPLOAD=$SPLUNK_HOME/var/log/splunk/splunkd_ui_access.log
@@ -32,8 +30,8 @@ before_install:
32
30
language : python
33
31
34
32
env :
35
- - SPLUNK_VERSION=7.3-sdk
36
- - SPLUNK_VERSION=8.0-sdk
33
+ - SPLUNK_VERSION=7.3
34
+ - SPLUNK_VERSION=8.0
37
35
38
36
python :
39
37
- " 2.7"
Original file line number Diff line number Diff line change
1
+ version : ' 3.6'
2
+
3
+ services :
4
+ splunk :
5
+ image : " splunk/splunk:${SPLUNK_VERSION}"
6
+ container_name : splunk
7
+ environment :
8
+ - SPLUNK_START_ARGS=--accept-license
9
+ - SPLUNK_HEC_TOKEN=11111111-1111-1111-1111-1111111111113
10
+ - SPLUNK_PASSWORD=changed!
11
+ - SPLUNK_APPS_URL=https://github.com/splunk/sdk-app-collection/releases/download/v1.0.0/sdk-app-collection.tgz
12
+ ports :
13
+ - 8000:8000
14
+ - 8088:8088
15
+ - 8089:8089
16
+ healthcheck :
17
+ test : ['CMD', 'curl', '-f', 'http://localhost:8000']
18
+ interval : 5s
19
+ timeout : 5s
20
+ retries : 20
You can’t perform that action at this time.
0 commit comments