Skip to content

Commit 38a300e

Browse files
authored
Merge pull request #287 from splunk/develop
Syncing develop and master
2 parents 8757352 + 2e0440f commit 38a300e

File tree

10 files changed

+350
-117
lines changed

10 files changed

+350
-117
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ base-centos-7:
6868
docker build ${DOCKER_BUILD_FLAGS} -t base-centos-7:${IMAGE_VERSION} ./base/centos-7
6969

7070
base-redhat-8:
71-
docker build ${DOCKER_BUILD_FLAGS} -t base-redhat-8:${IMAGE_VERSION} ./base/redhat-8
71+
docker build ${DOCKER_BUILD_FLAGS} --label version=${SPLUNK_VERSION} -t base-redhat-8:${IMAGE_VERSION} ./base/redhat-8
7272

7373
base-windows-2016:
7474
docker build ${DOCKER_BUILD_FLAGS} -t base-windows-2016:${IMAGE_VERSION} ./base/windows-2016

base/redhat-8/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
# the container catalog moved from registry.access.redhat.com to registry.redhat.io
1717
# So at some point before they deprecate the old registry we have to make sure that
1818
# we have access to the new registry and change where we pull the ubi image from.
19-
FROM registry.access.redhat.com/ubi8/ubi-minimal
19+
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.0-213
2020
LABEL name="splunk" \
2121
maintainer="support@splunk.com" \
2222
vendor="splunk" \
23-
version="8.0.0" \
2423
release="1" \
2524
summary="UBI 8 Docker image of Splunk Enterprise" \
2625
description="Splunk Enterprise is a platform for operational intelligence. Our software lets you collect, analyze, and act upon the untapped value of big data that your technology infrastructure, security systems, and business applications generate. It gives you insights to drive operational performance and business results."

base/redhat-8/install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
set -e
1717

1818
# reinstalling local en def for now, removed in minimal image https://bugzilla.redhat.com/show_bug.cgi?id=1665251
19-
microdnf -y update
2019
microdnf -y --nodocs install glibc-langpack-en
2120

2221
#Currently there is no access to the UTF-8 char map, the following command is commented out until

docs/ADVANCED.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,28 +242,28 @@ To build images directly from this repository, there is a supplied `Makefile` in
242242
```
243243
3. Run all the tests to verify your environment
244244
```
245-
$ make splunk-debian-9
246-
$ make uf-debian-9
245+
$ make splunk-redhat-8
246+
$ make uf-redhat-8
247247
```
248248
249-
Additionally, there are multiple images and layers that are produced by the previous commands: `base-debian-9`, `splunk-debian-9`, and `uf-debian-9`.
249+
Additionally, there are multiple images and layers that are produced by the previous commands: `base-redhat-8`, `splunk-redhat-8`, and `uf-redhat-8`.
250250
251-
#### base-debian-9
252-
The directory `base/debian-9` contains a Dockerfile to create a base image on top of which all the other images are built. In order to minimize image size and provide a stable foundation for other images to build on, we elected to use `debian:stretch-slim` (55MB) for our base image. In the future, we plan to add support for additional operating systems.
251+
#### base-redhat-8
252+
The directory `base-redhat-8` contains a Dockerfile to create a base image on top of which all the other images are built. In order to minimize image size and provide a stable foundation for other images to build on, we elected to use `registry.access.redhat.com/ubi8/ubi-minimal:8.0` (90MB) for our base image. In the future, we plan to add support for additional operating systems.
253253
```
254-
$ make base-debian-9
254+
$ make base-redhat-8
255255
```
256256
257257
**WARNING:** Modifications made to the "base" image can result in Splunk being unable to start or run correctly.
258258
259-
#### splunk-debian-9
260-
The directory `splunk/debian-9` contains a Dockerfile that extends the base image by installing Splunk and adding tools for provisioning. Advanced Splunk provisioning capabilities are provided through the utilization of an entrypoint script and playbooks published separately via the [splunk-ansible project](https://github.com/splunk/splunk-ansible).
259+
#### splunk-redhat-8
260+
The directory `splunk/common-files` contains a Dockerfile that extends the base image by installing Splunk and adding tools for provisioning. Advanced Splunk provisioning capabilities are provided through the utilization of an entrypoint script and playbooks published separately via the [splunk-ansible project](https://github.com/splunk/splunk-ansible).
261261
```
262-
$ make splunk-debian-9
262+
$ make splunk-redhat-8
263263
```
264264
265-
#### uf-debian-9
266-
The directory `uf/debian-9` contains a Dockerfile that extends the base image by installing Splunk Universal Forwarder and adding tools for provisioning. This image is similar to the Splunk Enterprise image (`splunk-debian-9`), except the more lightweight Splunk Universal Forwarder package is installed instead.
265+
#### uf-redhat-8
266+
The directory `uf/common-files` contains a Dockerfile that extends the base image by installing Splunk Universal Forwarder and adding tools for provisioning. This image is similar to the Splunk Enterprise image (`splunk-redhat-8`), except the more lightweight Splunk Universal Forwarder package is installed instead.
267267
```
268-
$ make uf-debian-9
268+
$ make uf-redhat-8
269269
```

docs/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Navigation
44

55
* [8.0.0](#800)
6+
* [7.3.3](#733)
67
* [7.3.2](#732)
78
* [7.3.1](#731)
89
* [7.3.0](#730)
@@ -37,6 +38,26 @@
3738

3839
---
3940

41+
## 7.3.3
42+
43+
#### What's New?
44+
* New Splunk Enterprise release of 7.3.3
45+
46+
#### docker-splunk changes:
47+
* Bumping Splunk version. For details, see: https://docs.splunk.com/Documentation/Splunk/7.3.3/ReleaseNotes/Fixedissues
48+
* Better management of deployment server apps
49+
* Support for variety of Splunk package types
50+
* Bugfixes around app installation
51+
52+
#### splunk-ansible changes:
53+
* Removing unnecessary apps in distributed ITSI installations
54+
* Partioning apps in serverclass.conf when using the deployment server
55+
* Adding support for activating Splunk Free license on boot
56+
* Support for cluster labels via environment variables
57+
* Bugfixes around app installation (through default.yml and pathing)
58+
59+
---
60+
4061
## 7.3.2
4162

4263
#### What's New?

docs/EXAMPLES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Note that for more complex scenarios, we will opt to use a [Docker compose file]
1414
* [...with any app](#create-standalone-with-app)
1515
* [...with a SplunkBase app](#create-standalone-with-splunkbase-app)
1616
* [...with SSL enabled](#create-standalone-with-ssl-enabled)
17+
* [...with a Free license](#create-standalone-with-free-license)
1718
* [Create standalone and universal forwarder](#create-standalone-and-universal-forwarder)
1819
* [Create heavy forwarder](#create-heavy-forwarder)
1920
* [Create heavy forwarder and deployment server](#create-heavy-forwarder-and-deployment-server)
@@ -188,7 +189,6 @@ $ SPLUNKBASE_PASSWORD=<splunkbase_password> SPLUNK_PASSWORD=<password> docker-co
188189
```
189190

190191
## Create standalone with SSL enabled
191-
192192
To enable SSL over SplunkWeb, you'll first need to generate your self-signed certificates. Please see the [Splunk docs](https://docs.splunk.com/Documentation/Splunk/latest/Security/Self-signcertificatesforSplunkWeb) on how to go about doing this. For the purposes of local development, you can use:
193193
```
194194
openssl req -x509 -newkey rsa:4096 -passout pass:abcd1234 -keyout /home/key.pem -out /home/cert.pem -days 365 -subj /CN=localhost
@@ -207,6 +207,14 @@ $ docker run --name so1 --hostname so1 -p 8000:8000 \
207207
-it splunk/splunk:latest
208208
```
209209

210+
## Create Standalone with Free license
211+
[Splunk Free](https://docs.splunk.com/Documentation/Splunk/latest/Admin/MoreaboutSplunkFree) is the totally free version of Splunk software. The Free license lets you index up to 500 MB per day and will never expire.
212+
213+
Execute the following to bring up a Splunk Free standalone environment:
214+
```
215+
$ docker run --name so1 --hostname so1 -p 8000:8000 -e SPLUNK_PASSWORD=<password> -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_LICENSE_URI=Free -it splunk/splunk:latest
216+
```
217+
210218
## Create standalone and universal forwarder
211219
You can also enable distributed deployments. In this case, we can create a Splunk universal forwarder running in a container to stream logs to a Splunk standalone, also running in a container.
212220

docs/advanced/APP_INSTALL.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
## Installing Splunk Apps and Add-ons
22
Splunk's Docker image supports the ability to dynamically install any Splunk-compliant app or add-on. These can be certified apps that are hosted through [SplunkBase](https://splunkbase.splunk.com/) or they might be local apps you have developed yourself.
33

4-
App installation can be done a variety of ways: either through a file/directory volume-mounted inside the container, or through an external URL for dynamic downloads. Nothing is required for the former, and the enviroment variable `SPLUNK_APPS_URL` supports the later.
4+
App installation can be done a variety of ways: either through a file/directory volume-mounted inside the container, or through an external URL for dynamic downloads. Nothing is required for the former, and the enviroment variable `SPLUNK_APPS_URL` supports the latter.
55

66
**NOTE:** Installation of Splunk Enterprise Security (ES) and Splunk IT Service Intelligence (ITSI) is currently not supported with this image. Please contact Splunk Services for more information on using these applications with Splunk Enterprise in a container.
77

88
## Navigation
99

1010
* [Volume-mount app directory](#volume-mount-app-directory)
1111
* [Download via URL](#download-via-url)
12-
* [Multiple apps](@multiple-apps)
12+
* [Multiple apps](#multiple-apps)
1313
* [Apps in distributed environments](#apps-in-distributed-environments)
1414

1515
## Volume-mount app directory
@@ -34,7 +34,6 @@ In most cases, you're likely hosting the app as a tar file somewhere accessible
3434

3535
#### SplunkBase apps
3636
Please refer to this docker-compose.yml file for how to download SplunkBase apps with authentication:
37-
<details><summary>docker-compose.yml</summary><p>
3837

3938
```
4039
version: "3.6"
@@ -52,11 +51,9 @@ services:
5251
ports:
5352
- 8000
5453
```
55-
</p></details>
5654

5755
#### Self-hosted apps
5856
Please refer to this docker-compose.yml file for how to download any app hosted at an arbitrary location:
59-
<details><summary>docker-compose.yml</summary><p>
6057

6158
```
6259
version: "3.6"
@@ -72,13 +69,11 @@ services:
7269
ports:
7370
- 8000
7471
```
75-
</p></details>
7672

7773
#### Apps on filesystem
7874
If you build your own image on top of the `splunk/splunk` or `splunk/universalforwarder` image, it's possible you may embedd a tar file of an app inside. Or, you can go with the bind-mount volume approach and inject a tar file on container run time. In either case, it's still possible to install an app from this file on the container's filesystem with the following.
7975

8076
Please refer to this docker-compose.yml file for how to install an app in the container's filesystem:
81-
<details><summary>docker-compose.yml</summary><p>
8277

8378
```
8479
version: "3.6"
@@ -94,13 +89,11 @@ services:
9489
ports:
9590
- 8000
9691
```
97-
</p></details>
9892

9993
## Multiple apps
10094
As one would expect, Splunk can and should support downloading any combination or series of apps. This can be incredibly useful when cross-referencing data from various sources.
10195

10296
The `SPLUNK_APPS_URL` supports multiple apps, as long as they are comma-separated. Plase refer to this docker-compose.yml file for how to install multiple apps:
103-
<details><summary>docker-compose.yml</summary><p>
10497

10598
```
10699
version: "3.6"
@@ -118,15 +111,12 @@ services:
118111
ports:
119112
- 8000
120113
```
121-
</p></details>
122114

123115
## Apps in distributed environments
124116
This docker image also deploys apps when running Splunk in distributed environments. There are, however, special cases and instructions for how apps get deployed in these scenarios.
125117

126118
In the case of multiple search heads (no clustering) and multiple indexers (no clustering), you will explicitly need to tell each container what apps to install by defining a `SPLUNK_APPS_URL` for each role. See the example below and note the different apps used for search heads and indexers:
127119

128-
<details><summary>2idx2sh.yml</summary><p>
129-
130120
```
131121
version: "3.6"
132122
@@ -212,11 +202,9 @@ services:
212202
ports:
213203
- 8000
214204
```
215-
</p></details>
216205

217206
In the case of search head clusters, you will explicitly need to tell the `splunk_deployer` what apps to install by defining a `SPLUNK_APPS_URL` for that particular role. The deployer will manage the distribution of apps to each of the search head cluster members (search heads). See the example below and note the different apps used for search heads and indexers:
218207

219-
<details><summary>1dep3sh2idx.yml</summary><p>
220208

221209
```
222210
version: "3.6"
@@ -342,12 +330,9 @@ services:
342330
ports:
343331
- 8000
344332
```
345-
</p></details>
346333

347334
In the case of indexer clusters, you will explicitly need to tell the `splunk_cluster_master` what apps to install by defining a `SPLUNK_APPS_URL` for that particular role. The cluster master will manage the distribution of apps to each of the indexer cluster members (indexers). See the example below and note the different apps used for search heads and indexers:
348335

349-
<details><summary>3idx1sh1cm.yml</summary><p>
350-
351336
```
352337
version: "3.6"
353338
@@ -453,4 +438,3 @@ services:
453438
ports:
454439
- 8000
455440
```
456-
</p></details>

docs/advanced/LICENSE_INSTALL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ There are primarily two different ways to apply a license when starting your con
88

99
* [Path to file](#path-to-file)
1010
* [Download via URL](#download-via-url)
11+
* [Free license](#splunk-free-license)
1112
* [Using a license master](#using-a-license-master)
1213

1314
## Path to file
@@ -94,6 +95,14 @@ You should be able to bring up your deployment with the Splunk license automatic
9495
$ SPLUNK_PASSWORD=<password> docker stack deploy --compose-file=docker-compose.yml splunk_deployment
9596
```
9697

98+
## Splunk Free license
99+
Not to be confused with an actual free Splunk enterprise license, but [Splunk Free](https://docs.splunk.com/Documentation/Splunk/latest/Admin/MoreaboutSplunkFree) is a product offering that enables the power of Splunk with a never-expiring but ingest-limited license. By default, when you create a Splunk environment using this Docker container, it will enable a Splunk Trial license which is good for 30 days from the start of your instance. With Splunk Free, you can create a full developer environment of Splunk for any personal, sustained usage.
100+
101+
To bring up a single instance using Splunk Free, you can run the following command:
102+
```
103+
$ docker run --name so1 --hostname so1 -p 8000:8000 -e SPLUNK_PASSWORD=<password> -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_LICENSE_URI=Free -it splunk/splunk:latest
104+
```
105+
97106
## Using a license master
98107
When starting up a distributed Splunk deployment, it may be inefficient for each Splunk instance to apply/fetch the same license. Luckily, there is a dedicated Splunk role for this - `splunk_license_master`. For more information on what this role is, please refer to Splunk documentation on [license masters](https://docs.splunk.com/Documentation/Splunk/latest/Admin/Configurealicensemaster).
99108

test_scenarios/3idx1cm.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
version: "3.6"
2+
3+
networks:
4+
splunknet:
5+
driver: bridge
6+
attachable: true
7+
8+
services:
9+
cm1:
10+
networks:
11+
splunknet:
12+
aliases:
13+
- cm1
14+
image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
15+
command: start
16+
hostname: cm1
17+
container_name: cm1
18+
environment:
19+
- SPLUNK_START_ARGS=--accept-license
20+
- SPLUNK_INDEXER_URL=idx1,idx2,idx3
21+
- SPLUNK_CLUSTER_MASTER_URL=cm1
22+
- SPLUNK_ROLE=splunk_cluster_master
23+
- SPLUNK_LICENSE_URI
24+
- DEBUG=true
25+
- SPLUNK_PASSWORD
26+
ports:
27+
- 8000
28+
- 8089
29+
volumes:
30+
- ./defaults:/tmp/defaults
31+
32+
idx1:
33+
networks:
34+
splunknet:
35+
aliases:
36+
- idx1
37+
image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
38+
command: start
39+
hostname: idx1
40+
container_name: idx1
41+
environment:
42+
- SPLUNK_START_ARGS=--accept-license
43+
- SPLUNK_INDEXER_URL=idx1,idx2,idx3
44+
- SPLUNK_CLUSTER_MASTER_URL=cm1
45+
- SPLUNK_ROLE=splunk_indexer
46+
- SPLUNK_LICENSE_URI
47+
- DEBUG=true
48+
- SPLUNK_PASSWORD
49+
ports:
50+
- 8000
51+
- 8089
52+
volumes:
53+
- ./defaults:/tmp/defaults
54+
55+
idx2:
56+
networks:
57+
splunknet:
58+
aliases:
59+
- idx2
60+
image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
61+
command: start
62+
hostname: idx2
63+
container_name: idx2
64+
environment:
65+
- SPLUNK_START_ARGS=--accept-license
66+
- SPLUNK_INDEXER_URL=idx1,idx2,idx3
67+
- SPLUNK_CLUSTER_MASTER_URL=cm1
68+
- SPLUNK_ROLE=splunk_indexer
69+
- SPLUNK_LICENSE_URI
70+
- DEBUG=true
71+
- SPLUNK_PASSWORD
72+
ports:
73+
- 8000
74+
- 8089
75+
volumes:
76+
- ./defaults:/tmp/defaults
77+
78+
idx3:
79+
networks:
80+
splunknet:
81+
aliases:
82+
- idx3
83+
image: ${SPLUNK_IMAGE:-splunk/splunk:latest}
84+
command: start
85+
hostname: idx3
86+
container_name: idx3
87+
environment:
88+
- SPLUNK_START_ARGS=--accept-license
89+
- SPLUNK_INDEXER_URL=idx1,idx2,idx3
90+
- SPLUNK_CLUSTER_MASTER_URL=cm1
91+
- SPLUNK_ROLE=splunk_indexer
92+
- SPLUNK_LICENSE_URI
93+
- DEBUG=true
94+
- SPLUNK_PASSWORD
95+
ports:
96+
- 8000
97+
- 8089
98+
volumes:
99+
- ./defaults:/tmp/defaults
100+

0 commit comments

Comments
 (0)