@@ -56,10 +56,10 @@ watch_for_failure(){
5656 echo Ansible playbook complete, will begin streaming var/log/splunk/splunkd_stderr.log
5757 echo
5858 user_permission_change
59- # Any crashes/errors while Splunk is running should get logged to splunkd_stderr.log and sent to the container's stdout
6059 if [ ` whoami` != " ${SPLUNK_USER} " ]; then
6160 RUN_AS_SPLUNK=" sudo -u ${SPLUNK_USER} "
6261 fi
62+ # Any crashes/errors while Splunk is running should get logged to splunkd_stderr.log and sent to the container's stdout
6363 if [ -z " $SPLUNK_TAIL_FILE " ]; then
6464 ${RUN_AS_SPLUNK} tail -n 0 -f ${SPLUNK_HOME} /var/log/splunk/splunkd_stderr.log &
6565 else
@@ -69,13 +69,13 @@ watch_for_failure(){
6969}
7070
7171create_defaults () {
72- createdefaults.py
72+ createdefaults.py
7373}
7474
7575start_and_exit () {
7676 if [ -z " $SPLUNK_PASSWORD " ]
7777 then
78- echo " WARNING: No password ENV var. Stack may fail to provision if splunk.password is not set in ENV or a default.yml"
78+ echo " WARNING: No password ENV var. Stack may fail to provision if splunk.password is not set in ENV or a default.yml"
7979 fi
8080 sh -c " echo 'starting' > ${CONTAINER_ARTIFACT_DIR} /splunk-container.state"
8181 setup
@@ -111,42 +111,42 @@ user_permission_change(){
111111
112112help () {
113113 cat << EOF
114- ____ _ _ __
114+ ____ _ _ __
115115 / ___| _ __ | |_ _ _ __ | | __ \ \\
116116 \___ \| '_ \| | | | | '_ \| |/ / \ \\
117- ___) | |_) | | |_| | | | | < / /
117+ ___) | |_) | | |_| | | | | < / /
118118 |____/| .__/|_|\__,_|_| |_|_|\_\ /_/
119- |_|
119+ |_|
120120========================================
121121
122122Environment Variables:
123- * SPLUNK_USER - user under which to run Splunk (default: splunk)
124- * SPLUNK_GROUP - group under which to run Splunk (default: splunk)
125- * SPLUNK_HOME - home directory where Splunk gets installed (default: /opt/splunk)
126- * SPLUNK_START_ARGS - arguments to pass into the Splunk start command; you must include '--accept-license' to start Splunk (default: none)
127- * SPLUNK_ROLE - the role of this Splunk instance (default: splunk_standalone)
128- Acceptable values:
129- - splunk_standalone
130- - splunk_search_head
131- - splunk_indexer
132- - splunk_deployer
133- - splunk_license_master
134- - splunk_cluster_master
135- - splunk_heavy_forwarder
136- * SPLUNK_LICENSE_URI - URI or local file path (absolute path in the container) to a Splunk license
137- * SPLUNK_STANDALONE_URL, SPLUNK_INDEXER_URL, ... - comma-separated list of resolvable aliases to properly bring-up a distributed environment.
138- This is optional for standalones, but required for multi-node Splunk deployments.
139- * SPLUNK_BUILD_URL - URL to a Splunk build which will be installed (instead of the image's default build)
140- * SPLUNK_APPS_URL - comma-separated list of URLs to Splunk apps which will be downloaded and installed
123+ * SPLUNK_USER - user under which to run Splunk (default: splunk)
124+ * SPLUNK_GROUP - group under which to run Splunk (default: splunk)
125+ * SPLUNK_HOME - home directory where Splunk gets installed (default: /opt/splunk)
126+ * SPLUNK_START_ARGS - arguments to pass into the Splunk start command; you must include '--accept-license' to start Splunk (default: none)
127+ * SPLUNK_ROLE - the role of this Splunk instance (default: splunk_standalone)
128+ Acceptable values:
129+ - splunk_standalone
130+ - splunk_search_head
131+ - splunk_indexer
132+ - splunk_deployer
133+ - splunk_license_master
134+ - splunk_cluster_master
135+ - splunk_heavy_forwarder
136+ * SPLUNK_LICENSE_URI - URI or local file path (absolute path in the container) to a Splunk license
137+ * SPLUNK_STANDALONE_URL, SPLUNK_INDEXER_URL, ... - comma-separated list of resolvable aliases to properly bring-up a distributed environment.
138+ This is optional for standalones, but required for multi-node Splunk deployments.
139+ * SPLUNK_BUILD_URL - URL to a Splunk build which will be installed (instead of the image's default build)
140+ * SPLUNK_APPS_URL - comma-separated list of URLs to Splunk apps which will be downloaded and installed
141141
142142Examples:
143- * docker run -it -p 8000:8000 splunk/splunk start
144- * docker run -it -e SPLUNK_START_ARGS=--accept-license -p 8000:8000 -p 8089:8089 splunk/splunk start
145- * docker run -it -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_LICENSE_URI=http://example.com/splunk.lic -p 8000:8000 splunk/splunk start
146- * docker run -it -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_INDEXER_URL=idx1,idx2 -e SPLUNK_SEARCH_HEAD_URL=sh1,sh2 -e SPLUNK_ROLE=splunk_search_head --hostname sh1 --network splunknet --network-alias sh1 -e SPLUNK_PASSWORD=helloworld -e SPLUNK_LICENSE_URI=http://example.com/splunk.lic splunk/splunk start
143+ * docker run -it -p 8000:8000 splunk/splunk start
144+ * docker run -it -e SPLUNK_START_ARGS=--accept-license -p 8000:8000 -p 8089:8089 splunk/splunk start
145+ * docker run -it -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_LICENSE_URI=http://example.com/splunk.lic -p 8000:8000 splunk/splunk start
146+ * docker run -it -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_INDEXER_URL=idx1,idx2 -e SPLUNK_SEARCH_HEAD_URL=sh1,sh2 -e SPLUNK_ROLE=splunk_search_head --hostname sh1 --network splunknet --network-alias sh1 -e SPLUNK_PASSWORD=helloworld -e SPLUNK_LICENSE_URI=http://example.com/splunk.lic splunk/splunk start
147147
148148EOF
149- exit 1
149+ exit 1
150150}
151151
152152case " $1 " in
0 commit comments