Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ SPLUNK_ANSIBLE_BRANCH ?= develop
SPLUNK_COMPOSE ?= cluster_absolute_unit.yaml
# Set Splunk version/build parameters here to define downstream URLs and file names
SPLUNK_PRODUCT := splunk
SPLUNK_VERSION := 7.2.6
SPLUNK_BUILD := c0bf0f679ce9
SPLUNK_VERSION := 7.3.1
SPLUNK_BUILD := bd63e13aa157
ifeq ($(shell arch), s390x)
SPLUNK_ARCH = s390x
else
Expand Down
19 changes: 19 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Navigation

* [7.3.1](#731)
* [7.3.0](#730)
* [7.2.7](#727)
* [7.2.6](#726)
Expand All @@ -15,6 +16,24 @@

---

## 7.3.1

#### What's New?
* New Splunk Enterprise release of 7.3.1

#### docker-splunk changes:
* Bumping Splunk version. For details, see: https://docs.splunk.com/Documentation/Splunk/7.3.1/ReleaseNotes/Fixedissues
* Documentation update
* Minor bug fixes

#### splunk-ansible changes:
* Fixed Enterprise Security application installation issues
* Refactored Systemd
* Fixed Ansible formatting issue
* Cleaned up Python files before install

---

## 7.3.0

#### What's New?
Expand Down
43 changes: 43 additions & 0 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Note that for more complex scenarios, we will opt to use a [Docker compose file]
* [Create search head cluster](#create-search-head-cluster)
* [Create indexer cluster and search head cluster](#create-indexer-cluster-and-search-head-cluster)
* [Enable root endpoint on SplunkWeb](#enable-root-endpoint-on-splunkweb)
* [Create sidecar forwarder](#create-sidecar-forwarder)
* [More](#more)

## Create standalone from CLI
Expand Down Expand Up @@ -808,5 +809,47 @@ $ SPLUNK_PASSWORD=<password> docker-compose up -d

Then, visit SplunkWeb on your browser with the root endpoint in the URL, such as `http://localhost:8000/splunkweb`.

## Create sidecar forwarder
<details><summary>k8s-sidecar.yml</summary><p>

```
apiVersion: v1
kind: Pod
metadata:
name: example
spec:
containers:
- name: splunk-uf
image: splunk/universalforwarder:latest
env:
- name: SPLUNK_START_ARGS
value: --accept-license
- name: SPLUNK_PASSWORD
value: helloworld
- name: SPLUNK_CMD
value: add monitor /var/log/
- name: SPLUNK_STANDALONE_URL
value: splunk.company.internal
volumeMounts:
- name: shared-data
mountPath: /var/log
- name: my-app
image: my-app
volumeMounts:
- name: shared-data
mountPath: /app/logs/
volumes:
- name: shared-data
emptyDir: {}
```
</p></details>

Execute the following to bring up your deployment:
```
$ kubectl apply -f k8s-sidecar.yml
```

After your pod is ready, the universal forwarder will be reading the logs generated by your app via the shared volume mount. In the ideal case, your app is generating the logs while the forwarder is reading them and streaming the output to a separate Splunk instance located at splunk.company.internal.

## More
There are a variety of Docker compose scenarios in the `docker-splunk` repo [here](https://github.com/splunk/docker-splunk/tree/develop/test_scenarios). Please feel free to use any of those for reference in terms of different topologies!
6 changes: 3 additions & 3 deletions splunk/common-files/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ FROM ${SPLUNK_BASE_IMAGE}:latest as package
ARG SPLUNK_BUILD_URL
COPY splunk/common-files/make-minimal-exclude.py /tmp
RUN python /tmp/make-minimal-exclude.py ${SPLUNK_BUILD_URL} > /tmp/splunk-minimal-exclude.list
RUN echo "Downloading Splunk and validating the checksum at: ${SPLUNK_BUILD_URL}"
RUN wget -qO /tmp/splunk.tgz ${SPLUNK_BUILD_URL}
RUN wget -qO /tmp/splunk.tgz.md5 ${SPLUNK_BUILD_URL}.md5
RUN test $(md5sum /tmp/splunk.tgz | sed 's,\([a-z0-9]*\).*,\1,') = $(cat /tmp/splunk.tgz.md5 | sed 's,MD5.*=.\([a-z0-9]*\).*,\1,')
RUN mkdir -p /opt/splunk/var /minimal/splunk/var /extras/splunk/var
RUN mkdir -p /minimal/splunk/var /extras/splunk/var
RUN tar -C /minimal/splunk --strip 1 --exclude-from=/tmp/splunk-minimal-exclude.list -zxf /tmp/splunk.tgz
RUN tar -C /extras/splunk --strip 1 --wildcards --files-from=/tmp/splunk-minimal-exclude.list -zxf /tmp/splunk.tgz
RUN mv /minimal/splunk/etc /minimal/splunk-etc
RUN mv /extras/splunk/etc /extras/splunk-etc
RUN mkdir -p /minimal/splunk/share/splunk/search_mrsparkle/modules.new
RUN mkdir -p /minimal/splunk/etc /minimal/splunk/share/splunk/search_mrsparkle/modules.new
COPY splunk/common-files/apps /extras/splunk-etc/apps/


Expand Down Expand Up @@ -106,6 +105,7 @@ RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /
&& mkdir ${CONTAINER_ARTIFACT_DIR} \
&& chown -R ${ANSIBLE_USER}:${ANSIBLE_GROUP} $CONTAINER_ARTIFACT_DIR \
&& chmod -R 555 ${SPLUNK_ANSIBLE_HOME} \
&& chmod -R 777 ${CONTAINER_ARTIFACT_DIR} \
&& chmod 755 /sbin/entrypoint.sh /sbin/createdefaults.py /sbin/checkstate.sh

USER ${ANSIBLE_USER}
Expand Down
3 changes: 3 additions & 0 deletions splunk/common-files/make-minimal-exclude.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@
print "*/etc/apps/gettingstarted*"
else:
print "*/etc/apps/splunk_metrics_workspace*"
elif int(m.group(1)) > 7:
print EXCLUDE_V7
print "*/etc/apps/splunk_metrics_workspace*"
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
image: splunk/splunk:latest
env:
- name: SPLUNK_HOME
value: /opt/splunk/
value: /opt/splunk
- name: SPLUNK_DEFAULTS_URL
value: http://splunk-defaults/default.yml
- name: SPLUNK_START_ARGS
Expand Down