Skip to content

Commit c5cae0f

Browse files
author
Tony Lee
authored
Merge branch 'develop' into migration_debian10
2 parents a46f68a + c037ed6 commit c5cae0f

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

base/redhat-8/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ LABEL name="splunk" \
2525
summary="UBI 8 Docker image of Splunk Enterprise" \
2626
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."
2727

28-
RUN mkdir /licenses; \
29-
curl -o /licenses/apache-2.0.txt https://www.apache.org/licenses/LICENSE-2.0.txt; \
30-
curl -o /licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf
31-
3228
COPY install.sh /install.sh
33-
RUN /install.sh && rm -rf /install.sh
29+
30+
RUN mkdir /licenses \
31+
&& curl -o /licenses/apache-2.0.txt https://www.apache.org/licenses/LICENSE-2.0.txt \
32+
&& curl -o /licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf \
33+
&& /install.sh && rm -rf /install.sh

docs/EXAMPLES.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Note that for more complex scenarios, we will opt to use a [Docker compose file]
1313
* [...with HEC](#create-standalone-with-hec)
1414
* [...with any app](#create-standalone-with-app)
1515
* [...with a SplunkBase app](#create-standalone-with-splunkbase-app)
16+
* [...with SSL enabled](#create-standalone-with-ssl-enabled)
1617
* [Create standalone and universal forwarder](#create-standalone-and-universal-forwarder)
1718
* [Create heavy forwarder](#create-heavy-forwarder)
1819
* [Create heavy forwarder and deployment server](#create-heavy-forwarder-and-deployment-server)
@@ -186,6 +187,26 @@ Execute the following to bring up your deployment:
186187
$ SPLUNKBASE_PASSWORD=<splunkbase_password> SPLUNK_PASSWORD=<password> docker-compose up -d
187188
```
188189

190+
## Create standalone with SSL enabled
191+
192+
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:
193+
```
194+
openssl req -x509 -newkey rsa:4096 -passout pass:abcd1234 -keyout /home/key.pem -out /home/cert.pem -days 365 -subj /CN=localhost
195+
```
196+
197+
Once you have your certificates available, you can execute the following to bring up your deployment with SSL enabled on the Splunk Web UI:
198+
```
199+
$ docker run --name so1 --hostname so1 -p 8000:8000 \
200+
-e "SPLUNK_HTTP_ENABLESSL=true" \
201+
-e "SPLUNK_HTTP_ENABLESSL_CERT=/home/cert.pem" \
202+
-e "SPLUNK_HTTP_ENABLESSL_PRIVKEY=/home/key.pem" \
203+
-e "SPLUNK_HTTP_ENABLESSL_PRIVKEY_PASSWORD=abcd1234" \
204+
-e "SPLUNK_PASSWORD=<password>" \
205+
-e "SPLUNK_START_ARGS=--accept-license" \
206+
-v /home:/home \
207+
-it splunk/splunk:latest
208+
```
209+
189210
## Create standalone and universal forwarder
190211
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.
191212

splunk/common-files/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ COPY splunk-ansible ${SPLUNK_ANSIBLE_HOME}
9797
# Set sudo rights
9898
RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers \
9999
&& sudo echo -e '\nansible ALL=(splunk)NOPASSWD:ALL' >> /etc/sudoers \
100-
# Create the ansible user/group
100+
&& echo 'Create the ansible user/group' \
101101
&& groupadd -r ${ANSIBLE_GROUP} \
102102
&& useradd -r -m -g ${ANSIBLE_GROUP} ${ANSIBLE_USER} \
103103
&& usermod -aG sudo ${ANSIBLE_USER} \
104104
&& usermod -aG ${ANSIBLE_GROUP} ${SPLUNK_USER} \
105-
# Container Artifact Directory is a place for all artifacts and logs that are generated by the provisioning process. The directory is owned by the user "ansible".
105+
&& echo 'Container Artifact Directory is a place for all artifacts and logs that are generated by the provisioning process. The directory is owned by the user "ansible".' \
106106
&& mkdir ${CONTAINER_ARTIFACT_DIR} \
107107
&& chown -R ${ANSIBLE_USER}:${ANSIBLE_GROUP} ${CONTAINER_ARTIFACT_DIR} \
108108
&& chmod -R 775 ${CONTAINER_ARTIFACT_DIR} \

splunk/common-files/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ case "$1" in
163163
configure_multisite $0
164164
;;
165165
create-defaults)
166-
create_defaults
166+
create_defaults
167167
;;
168168
restart)
169169
shift

0 commit comments

Comments
 (0)