Skip to content

Commit c0b3986

Browse files
committed
refine nozzle docker file
1 parent 99d3ddb commit c0b3986

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.idea
22

3-
nozzle.sh
4-
53
tools/*
64
!tools/*.template
75
!tools/*.go

ci/nozzle.dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM golang:1.8.3
2+
3+
RUN apt-get update && \
4+
apt-get install -y telnet && \
5+
apt-get install -y gcc && \
6+
apt-get install -y screen && \
7+
apt-get install -y python-dev && \
8+
apt-get install -y python-pip && \
9+
apt-get install -y python
10+
11+
RUN pip install psutil && pip install requests --upgrade
12+
13+
ENV GOPATH /go
14+
15+
ENV HEC_WORKERS=8
16+
ENV SKIP_SSL_VALIDATION=true
17+
ENV ADD_APP_INFO=true
18+
19+
ENV API_ENDPOINT=http://trafficcontroller:9911
20+
ENV API_USER=admin
21+
ENV API_PASSWORD=admin
22+
23+
ENV EVENTS=ValueMetric,CounterEvent,Error,LogMessage,HttpStartStop,ContainerMetric
24+
ENV SPLUNK_TOKEN=1CB57F19-DC23-419A-8EDA-BA545DD3674D
25+
ENV SPLUNK_HOST=https://heclb1:8088
26+
ENV SPLUNK_INDEX=main
27+
ENV FLUSH_INTERVAL=30s
28+
ENV FIREHOSE_SUBSCRIPTION_ID=spl-nozzle-perf-testing
29+
30+
ENV NOZZLE_BRANCH=master
31+
32+
ADD nozzle.sh /
33+
34+
CMD ["/bin/sh", "-c", "/nozzle.sh"]

ci/nozzle.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
# Workaround to make sure dependency service is up and running
4+
sleep 60
5+
6+
branch=${NOZZLE_BRANCH:-master}
7+
8+
# Build nozzle
9+
go get -d github.com/cloudfoundry-community/splunk-firehose-nozzle
10+
cd /go/src/github.com/cloudfoundry-community/splunk-firehose-nozzle
11+
git checkout ${branch}
12+
make build
13+
14+
15+
# Run proc_monitor
16+
echo "Run proc monitor"
17+
git clone https://github.com/chenziliang/proc_monitor && git checkout develop
18+
cd proc_monitor
19+
screen -S proc_monitor -m -d python proc_monitor.py
20+
cd ..
21+
22+
duration=${NOZZLE_DURATION:-1200}
23+
24+
# Run perf test
25+
echo "Run nozzle perf tests"
26+
python ci/perf.py --run nozzle --duration ${duration}

0 commit comments

Comments
 (0)