Skip to content

Commit 8fa08d9

Browse files
authored
Merge pull request #427 from splunk/develop
Release/8.1.0
2 parents 1c2d8ed + 1185f01 commit 8fa08d9

File tree

14 files changed

+244
-41
lines changed

14 files changed

+244
-41
lines changed

Makefile

+52-9
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ SPLUNK_ANSIBLE_BRANCH ?= develop
77
SPLUNK_COMPOSE ?= cluster_absolute_unit.yaml
88
# Set Splunk version/build parameters here to define downstream URLs and file names
99
SPLUNK_PRODUCT := splunk
10-
SPLUNK_VERSION := 8.0.6
11-
SPLUNK_BUILD := 152fb4b2bb96
10+
SPLUNK_VERSION := 8.1.0
11+
SPLUNK_BUILD := f57c09e87251
1212
ifeq ($(shell arch), s390x)
1313
SPLUNK_ARCH = s390x
1414
else
@@ -58,7 +58,7 @@ ansible:
5858
@cat splunk-ansible/version.txt
5959

6060
##### Base images #####
61-
base: base-debian-9 base-debian-10 base-centos-7 base-redhat-8 base-windows-2016
61+
base: base-debian-9 base-debian-10 base-centos-7 base-centos-8 base-redhat-8 base-windows-2016
6262

6363
base-debian-10:
6464
docker build ${DOCKER_BUILD_FLAGS} --build-arg SCLOUD_URL=${SCLOUD_URL} -t base-debian-10:${IMAGE_VERSION} ./base/debian-10
@@ -69,14 +69,17 @@ base-debian-9:
6969
base-centos-7:
7070
docker build ${DOCKER_BUILD_FLAGS} --build-arg SCLOUD_URL=${SCLOUD_URL} -t base-centos-7:${IMAGE_VERSION} ./base/centos-7
7171

72+
base-centos-8:
73+
docker build ${DOCKER_BUILD_FLAGS} --build-arg SCLOUD_URL=${SCLOUD_URL} -t base-centos-8:${IMAGE_VERSION} ./base/centos-8
74+
7275
base-redhat-8:
7376
docker build ${DOCKER_BUILD_FLAGS} --build-arg SCLOUD_URL=${SCLOUD_URL} --label version=${SPLUNK_VERSION} -t base-redhat-8:${IMAGE_VERSION} ./base/redhat-8
7477

7578
base-windows-2016:
7679
docker build ${DOCKER_BUILD_FLAGS} -t base-windows-2016:${IMAGE_VERSION} ./base/windows-2016
7780

7881
##### Minimal images #####
79-
minimal: minimal-debian-9 minimal-debian-10 minimal-centos-7 minimal-redhat-8
82+
minimal: minimal-debian-9 minimal-debian-10 minimal-centos-7 minimal-centos-8 minimal-redhat-8
8083

8184
minimal-debian-9: base-debian-9
8285
docker build ${DOCKER_BUILD_FLAGS} \
@@ -99,6 +102,13 @@ minimal-centos-7: base-centos-7
99102
--build-arg SPLUNK_BUILD_URL=${SPLUNK_LINUX_BUILD_URL} \
100103
--target minimal -t minimal-centos-7:${IMAGE_VERSION} .
101104

105+
minimal-centos-8: base-centos-8
106+
docker build ${DOCKER_BUILD_FLAGS} \
107+
-f splunk/common-files/Dockerfile \
108+
--build-arg SPLUNK_BASE_IMAGE=base-centos-8 \
109+
--build-arg SPLUNK_BUILD_URL=${SPLUNK_LINUX_BUILD_URL} \
110+
--target minimal -t minimal-centos-8:${IMAGE_VERSION} .
111+
102112
minimal-redhat-8: base-redhat-8
103113
docker build ${DOCKER_BUILD_FLAGS} \
104114
-f splunk/common-files/Dockerfile \
@@ -107,7 +117,7 @@ minimal-redhat-8: base-redhat-8
107117
--target minimal -t minimal-redhat-8:${IMAGE_VERSION} .
108118

109119
##### Bare images #####
110-
bare: bare-debian-9 bare-debian-10 bare-centos-7 bare-redhat-8
120+
bare: bare-debian-9 bare-debian-10 bare-centos-7 bare-centos-8 bare-redhat-8
111121

112122
bare-debian-9: base-debian-9
113123
docker build ${DOCKER_BUILD_FLAGS} \
@@ -128,7 +138,14 @@ bare-centos-7: base-centos-7
128138
-f splunk/common-files/Dockerfile \
129139
--build-arg SPLUNK_BASE_IMAGE=base-centos-7 \
130140
--build-arg SPLUNK_BUILD_URL=${SPLUNK_LINUX_BUILD_URL} \
131-
--target bare -t bare-centos-7:${IMAGE_VERSION} .
141+
--target bare -t bare-centos-7:${IMAGE_VERSION} .
142+
143+
bare-centos-8: base-centos-7
144+
docker build ${DOCKER_BUILD_FLAGS} \
145+
-f splunk/common-files/Dockerfile \
146+
--build-arg SPLUNK_BASE_IMAGE=base-centos-8 \
147+
--build-arg SPLUNK_BUILD_URL=${SPLUNK_LINUX_BUILD_URL} \
148+
--target bare -t bare-centos-8:${IMAGE_VERSION} .
132149

133150
bare-redhat-8: base-redhat-8
134151
docker build ${DOCKER_BUILD_FLAGS} \
@@ -138,7 +155,7 @@ bare-redhat-8: base-redhat-8
138155
--target bare -t bare-redhat-8:${IMAGE_VERSION} .
139156

140157
##### Splunk images #####
141-
splunk: ansible splunk-debian-9 splunk-debian-10 splunk-centos-7 splunk-redhat-8
158+
splunk: ansible splunk-debian-9 splunk-debian-10 splunk-centos-7 splunk-centos-8 splunk-redhat-8
142159

143160
splunk-debian-9: base-debian-9 ansible
144161
docker build ${DOCKER_BUILD_FLAGS} \
@@ -161,6 +178,13 @@ splunk-centos-7: base-centos-7 ansible
161178
--build-arg SPLUNK_BUILD_URL=${SPLUNK_LINUX_BUILD_URL} \
162179
-t splunk-centos-7:${IMAGE_VERSION} .
163180

181+
splunk-centos-8: base-centos-8 ansible
182+
docker build ${DOCKER_BUILD_FLAGS} \
183+
-f splunk/common-files/Dockerfile \
184+
--build-arg SPLUNK_BASE_IMAGE=base-centos-8 \
185+
--build-arg SPLUNK_BUILD_URL=${SPLUNK_LINUX_BUILD_URL} \
186+
-t splunk-centos-8:${IMAGE_VERSION} .
187+
164188
splunk-redhat-8: base-redhat-8 ansible
165189
docker build ${DOCKER_BUILD_FLAGS} \
166190
-f splunk/common-files/Dockerfile \
@@ -176,7 +200,7 @@ splunk-windows-2016: base-windows-2016 ansible
176200
-t splunk-windows-2016:${IMAGE_VERSION} .
177201

178202
##### UF images #####
179-
uf: ansible uf-debian-9 uf-debian-10 uf-centos-7 uf-redhat-8
203+
uf: ansible uf-debian-9 uf-debian-10 uf-centos-7 uf-centos-8 uf-redhat-8
180204

181205
ufbare-debian-9: base-debian-9 ansible
182206
docker build ${DOCKER_BUILD_FLAGS} \
@@ -213,6 +237,13 @@ uf-centos-7: base-centos-7 ansible
213237
--build-arg SPLUNK_BUILD_URL=${UF_LINUX_BUILD_URL} \
214238
-t uf-centos-7:${IMAGE_VERSION} .
215239

240+
uf-centos-8: base-centos-8 ansible
241+
docker build ${DOCKER_BUILD_FLAGS} \
242+
-f uf/common-files/Dockerfile \
243+
--build-arg SPLUNK_BASE_IMAGE=base-centos-8 \
244+
--build-arg SPLUNK_BUILD_URL=${UF_LINUX_BUILD_URL} \
245+
-t uf-centos-8:${IMAGE_VERSION} .
246+
216247
uf-redhat-8: base-redhat-8 ansible
217248
docker build ${DOCKER_BUILD_FLAGS} \
218249
-f uf/common-files/Dockerfile \
@@ -229,7 +260,7 @@ uf-windows-2016: base-windows-2016 ansible
229260

230261

231262
##### Python 3 support #####
232-
splunk-py23: splunk-py23-debian-9 splunk-py23-debian-10 splunk-py23-centos-7 splunk-py23-redhat-8
263+
splunk-py23: splunk-py23-debian-9 splunk-py23-debian-10 splunk-py23-centos-7 splunk-py23-centos-8 splunk-py23-redhat-8
233264

234265
splunk-py23-debian-9: splunk-debian-9
235266
docker build ${DOCKER_BUILD_FLAGS} \
@@ -249,6 +280,12 @@ splunk-py23-centos-7: splunk-centos-7
249280
--build-arg SPLUNK_PRODUCT=splunk \
250281
-t splunk-py23-centos-7:${IMAGE_VERSION} .
251282

283+
splunk-py23-centos-8: splunk-centos-8
284+
docker build ${DOCKER_BUILD_FLAGS} \
285+
-f py23-image/centos-8/Dockerfile \
286+
--build-arg SPLUNK_PRODUCT=splunk \
287+
-t splunk-py23-centos-8:${IMAGE_VERSION} .
288+
252289
splunk-py23-redhat-8: splunk-redhat-8
253290
docker build ${DOCKER_BUILD_FLAGS} \
254291
-f py23-image/redhat-8/Dockerfile \
@@ -275,6 +312,12 @@ uf-py23-centos-7: uf-centos-7
275312
--build-arg SPLUNK_PRODUCT=uf \
276313
-t uf-py23-centos-7:${IMAGE_VERSION} .
277314

315+
uf-py23-centos-8: uf-centos-8
316+
docker build ${DOCKER_BUILD_FLAGS} \
317+
-f py23-image/centos-8/Dockerfile \
318+
--build-arg SPLUNK_PRODUCT=uf \
319+
-t uf-py23-centos-8:${IMAGE_VERSION} .
320+
278321
uf-py23-redhat-8: uf-redhat-8
279322
docker build ${DOCKER_BUILD_FLAGS} \
280323
-f py23-image/redhat-8/Dockerfile \

base/centos-7/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Splunk
1+
# Copyright 2018-2020 Splunk
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

base/centos-7/install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2018 Splunk
2+
# Copyright 2018-2020 Splunk
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

base/centos-8/Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2018-2020 Splunk
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM centos:8
16+
LABEL maintainer="[email protected]"
17+
18+
ARG SCLOUD_URL
19+
ENV SCLOUD_URL ${SCLOUD_URL}
20+
21+
COPY install.sh /install.sh
22+
RUN /install.sh && rm -rf /install.sh

base/centos-8/install.sh

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
# Copyright 2018-2020 Splunk
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -e
17+
18+
yum -y install glibc-locale-source glibc-langpack-en
19+
20+
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
21+
export LANG=en_US.utf8
22+
23+
yum -y update && yum -y install wget sudo epel-release make
24+
yum -y install ansible python3-requests python3-jmespath
25+
26+
# Install busybox
27+
wget -O /bin/busybox https://busybox.net/downloads/binaries/1.28.1-defconfig-multiarch/busybox-`arch`
28+
chmod +x /bin/busybox
29+
30+
# Install scloud
31+
wget -O /usr/bin/scloud.tar.gz ${SCLOUD_URL}
32+
tar -xf /usr/bin/scloud.tar.gz -C /usr/bin/
33+
rm /usr/bin/scloud.tar.gz
34+
35+
cd /bin
36+
ln -s busybox killall
37+
ln -s busybox netstat
38+
ln -s busybox nslookup
39+
ln -s busybox readline
40+
ln -s busybox route
41+
ln -s busybox syslogd
42+
ln -s busybox traceroute
43+
chmod u+s /bin/ping
44+
groupadd sudo
45+
46+
echo "
47+
## Allows people in group sudo to run all commands
48+
%sudo ALL=(ALL) ALL" >> /etc/sudoers
49+
50+
# symlink for python3
51+
ln -s /bin/python3 /bin/python
52+
53+
# Clean
54+
yum clean all
55+
rm -rf /install.sh /anaconda-post.log /var/log/anaconda/*

docs/CHANGELOG.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Navigation
44

5+
* [8.1.0](#810)
56
* [8.0.6](#806)
67
* [8.0.5.1](#8051)
78
* [8.0.5](#805)
@@ -37,6 +38,26 @@
3738

3839
---
3940

41+
## 8.1.0
42+
43+
#### What's New?
44+
* Releasing new images to support Splunk Enterprise release.
45+
46+
#### docker-splunk changes:
47+
* Bumping Splunk version. For details, see [Fixed issues for 8.1.0](https://docs.splunk.com/Documentation/Splunk/8.1.0/ReleaseNotes/Fixedissues)
48+
* Set bash as the default shell
49+
* CI bugfixes
50+
51+
#### splunk-ansible changes:
52+
* Added environment variables to configure HTTPS on Splunkd. See [Supported environment variables](https://github.com/splunk/splunk-ansible/blob/develop/docs/ADVANCED.md#supported-environment-variables) for details.
53+
* `SPLUNKD_SSL_` prefixed environment variables
54+
* `splunk.ssl` section in `default.yml`
55+
* Enabled multisite for the `splunk_monitor` role
56+
* Enabled local indexing on the license master
57+
* Bugfixes and cleanup
58+
59+
---
60+
4061
## 8.0.6
4162

4263
#### What's New?
@@ -45,7 +66,7 @@
4566
#### docker-splunk changes:
4667
* Bumping Splunk version. For details, see [Fixed issues for 8.0.6](https://docs.splunk.com/Documentation/Splunk/8.0.6/ReleaseNotes/Fixedissues)
4768
* Test rewrite for parallelization
48-
* Decouples `etc` backup directory from `SPLUNK_HOME`
69+
* Decoupled `etc` backup directory from `SPLUNK_HOME`
4970
* Added tests and documentation for new features
5071

5172
#### splunk-ansible changes:
@@ -97,7 +118,7 @@
97118
#### splunk-ansible changes:
98119
* Support for setting the [deployer push mode](https://docs.splunk.com/Documentation/Splunk/latest/DistSearch/PropagateSHCconfigurationchanges#Choose_a_deployer_push_mode) to control how apps are bundled and distributed to cluster members:
99120
* `shc.deployer_push_mode` in `default.yml`
100-
* Added the config variable `auxiliary_cluster_masters` to support enabling a search head to search across multiple indexer clusters. See [Multi-Cluster Search](advanced/MULTICLUSTERSEARCH.md) for details on configuration.
121+
* Added the config variable `auxiliary_cluster_masters` to support enabling a search head to search across multiple indexer clusters. See [Multi-Cluster Search](https://github.com/splunk/splunk-ansible/blob/develop/docs/advanced/MULTICLUSTERSEARCH.md) for details on configuration.
101122
* Documentation on executing `splunk-ansible` remotely, through a controller node such as Ansible Tower/AWX
102123
* Set custom Splunkd connection timeout using either:
103124
* `splunk.connection_timeout` in `default.yml`

py23-image/centos-8/Dockerfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ARG SPLUNK_PRODUCT=splunk
2+
FROM ${SPLUNK_PRODUCT}-centos-8:latest
3+
USER root
4+
5+
RUN yum -y update
6+
RUN yum -y install gcc openssl-devel bzip2-devel libffi-devel python3-pip python2 python2-pip
7+
8+
# manual installation of python 3.7 as default distro version is 3.6
9+
RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
10+
&& tar xzf Python-3.7.4.tgz \
11+
&& cd Python-3.7.4 \
12+
&& ./configure --enable-optimizations --prefix=/usr \
13+
&& make install \
14+
&& cd .. \
15+
&& rm Python-3.7.4.tgz \
16+
&& rm -r Python-3.7.4 \
17+
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
18+
&& python3.7 get-pip.py \
19+
&& rm -f get-pip.py \
20+
# pip version is not automatically "fixed", unlike debian-based
21+
&& ln -sf /usr/bin/pip2 /usr/bin/pip \
22+
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip3
23+
# add python alias
24+
# && ln -s /bin/python3 /bin/python
25+
26+
RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
27+
&& yum autoremove -y \
28+
&& yum clean all
29+
RUN pip3 --no-cache-dir install ansible requests \
30+
&& pip --no-cache-dir install pyyaml requests

splunk/common-files/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ COPY [ "splunk/common-files/updateetc.sh", "/sbin/" ]
5555

5656
# Setup users and groups
5757
RUN groupadd -r -g ${GID} ${SPLUNK_GROUP} \
58-
&& useradd -r -m -u ${UID} -g ${GID} ${SPLUNK_USER} \
58+
&& useradd -r -m -u ${UID} -g ${GID} -s /bin/bash ${SPLUNK_USER} \
5959
&& chmod 755 /sbin/updateetc.sh
6060

6161
COPY --from=package --chown=splunk:splunk /minimal /opt
@@ -98,7 +98,7 @@ COPY splunk-ansible ${SPLUNK_ANSIBLE_HOME}
9898
RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL\nansible ALL=(splunk)NOPASSWD:ALL/g' /etc/sudoers \
9999
&& echo 'Create the ansible user/group' \
100100
&& groupadd -r ${ANSIBLE_GROUP} \
101-
&& useradd -r -m -g ${ANSIBLE_GROUP} ${ANSIBLE_USER} \
101+
&& useradd -r -m -g ${ANSIBLE_GROUP} -s /bin/bash ${ANSIBLE_USER} \
102102
&& usermod -aG sudo ${ANSIBLE_USER} \
103103
&& usermod -aG ${ANSIBLE_GROUP} ${SPLUNK_USER} \
104104
&& 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".' \

splunk/common-files/createdefaults.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /usr/bin/python
2-
# Copyright 2018 Splunk
2+
# Copyright 2018-2020 Splunk
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
import os
16+
import six
1617
import sys
1718
import uuid
1819
import random
@@ -32,10 +33,14 @@
3233
def random_generator(size=24):
3334
# Use System Random for
3435
rng = random.SystemRandom()
35-
bytes = [chr(rng.randrange(256)) for i in range(size)]
36-
s = ''.join(bytes)
36+
b = [chr(rng.randrange(256)) for i in range(size)]
37+
s = ''.join(b)
38+
if six.PY2:
39+
s = base64.b64encode(s)
40+
else:
41+
s = base64.b64encode(s.encode()).decode()
42+
return s
3743

38-
return base64.b64encode(s)
3944

4045
# if there are no environment vars set, lets make some safe defaults
4146
if not splunk_hec_token:

0 commit comments

Comments
 (0)