Skip to content

Commit ab3cf94

Browse files
authored
Docs - Reconcile Jekyll, Kramdown, GFM formatting (#350)
* Spellcheck and removing trailing spaces * Removing stale SUMMARY.md file * Cleanly escaping double curly braces in Jekyll * Fixing kramdown and jekyll rendering errors * Formatting fenced code blocks
1 parent b621fbe commit ab3cf94

16 files changed

+214
-210
lines changed

docs/ADVANCED.md

Lines changed: 63 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Let's dive into the nitty-gritty of how to tweak the setup of your containerized
55
## Navigation
66

77
* [Runtime configuration](#runtime-configuration)
8-
* [Using default.yml](#using-defaultyml)
9-
* [Configuration specs for default.yml](#configuration-specs-for-defaultyml)
8+
* [Using `default.yml`](#using-defaultyml)
9+
* [Configuration specs for `default.yml`](#configuration-specs-for-defaultyml)
1010
* [Global variables](#global-variables)
1111
* [Configure Splunk](#configure-splunk)
1212
* [Configured app installation paths](#configure-app-installation-paths)
@@ -38,24 +38,30 @@ The purpose of the `default.yml` is to define a standard set of variables that c
3838

3939
#### Generation
4040
The image contains a script to enable dynamic generation of this file automatically. Run the following command to generate a `default.yml`:
41-
```
41+
```bash
4242
$ docker run --rm -it splunk/splunk:latest create-defaults > default.yml
4343
```
4444

4545
You can also pre-seed some settings based on environment variables during this `default.yml` generation process. For example, you can define `SPLUNK_PASSWORD` with the following command:
46-
```
46+
```bash
4747
$ docker run --rm -it -e SPLUNK_PASSWORD=<password> splunk/splunk:latest create-defaults > default.yml
4848
```
4949
#### Usage
5050
When starting the docker container, the `default.yml` can be mounted in `/tmp/defaults/default.yml` or fetched dynamically with `SPLUNK_DEFAULTS_URL`. Ansible provisioning will read in and honor these settings.
5151

5252
Environment variables specified at runtime will take precedence over anything defined in `default.yml`.
53-
```
53+
```bash
5454
# Volume-mounting option
55-
$ docker run -d -p 8000:8000 -v default.yml:/tmp/defaults/default.yml -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=<password> splunk/splunk:latest
55+
$ docker run -d -p 8000:8000 -e "SPLUNK_PASSWORD=<password>" \
56+
-e "SPLUNK_START_ARGS=--accept-license" \
57+
-v default.yml:/tmp/defaults/default.yml \
58+
splunk/splunk:latest
5659

5760
# URL option
58-
$ docker run -d -p 8000:8000 -v -e SPLUNK_DEFAULTS_URL=http://company.net/path/to/default.yml -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=<password> splunk/splunk:latest
61+
$ docker run -d -p 8000:8000 -v -e "SPLUNK_PASSWORD=<password>" \
62+
-e "SPLUNK_START_ARGS=--accept-license" \
63+
-e "SPLUNK_DEFAULTS_URL=http://company.net/path/to/default.yml" \
64+
splunk/splunk:latest
5965
```
6066

6167
### Configuration specs for default.yml
@@ -65,7 +71,7 @@ $ docker run -d -p 8000:8000 -v -e SPLUNK_DEFAULTS_URL=http://company.net/path/t
6571
Variables at the root level influence the behavior of everything in the container, as they have global scope.
6672

6773
Example:
68-
```
74+
```yaml
6975
---
7076
retry_num: 100
7177
```
@@ -79,7 +85,9 @@ retry_num: 100
7985
The major object `splunk` in the YAML file contains variables that control how Splunk operates.
8086

8187
Sample:
82-
```
88+
<!-- {% raw %} -->
89+
```yaml
90+
---
8391
splunk:
8492
opt: /opt
8593
home: /opt/splunk
@@ -98,7 +106,9 @@ splunk:
98106
# hec.token is used only for ingestion (receiving Splunk events)
99107
token: <default_hec_token>
100108
smartstore: null
109+
...
101110
```
111+
<!-- {% endraw %} -->
102112

103113
| Variable Name | Description | Parent Object | Default Value | Required for Standalone | Required for Search Head Clustering | Required for Index Clustering |
104114
| --- | --- | --- | --- | --- | --- | --- |
@@ -124,12 +134,15 @@ splunk:
124134
The `app_paths` section under `splunk` controls how apps are installed inside the container.
125135

126136
Sample:
127-
```
137+
```yaml
138+
---
139+
splunk:
128140
app_paths:
129141
default: /opt/splunk/etc/apps
130142
shc: /opt/splunk/etc/shcluster/apps
131143
idxc: /opt/splunk/etc/master-apps
132144
httpinput: /opt/splunk/etc/apps/splunk_httpinput
145+
...
133146
```
134147

135148
| Variable Name | Description | Parent Object | Default Value | Required for Standalone | Required for Search Head Clustering | Required for Index Clustering |
@@ -144,12 +157,15 @@ Sample:
144157
Search Head Clustering is configured using the `shc` section under `splunk`.
145158

146159
Sample:
147-
```
160+
```yaml
161+
---
162+
splunk:
148163
shc:
149164
enable: false
150165
secret: <secret_key>
151166
replication_factor: 3
152167
replication_port: 9887
168+
...
153169
```
154170

155171
| Variable Name | Description | Parent Object | Default Value | Required for Standalone | Required for Search Head Clustering | Required for Index Clustering |
@@ -164,12 +180,15 @@ Sample:
164180
Indexer Clustering is configured using the `idxc` section under `splunk`.
165181

166182
Sample:
167-
```
183+
```yaml
184+
---
185+
splunk:
168186
idxc:
169187
secret: <secret_key>
170188
search_factor: 2
171189
replication_factor: 3
172190
replication_port: 9887
191+
...
173192
```
174193

175194
| Variable Name | Description | Parent Object | Default Value | Required for Standalone| Required for Search Head Clustering | Required for Index Clustering |
@@ -181,16 +200,22 @@ Sample:
181200

182201
## Install apps
183202
Apps can be installed by using the `SPLUNK_APPS_URL` environment variable when creating the Splunk container:
184-
```
185-
$ docker run -it --name splunk -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=<password> -e SPLUNK_APPS_URL=http://company.com/path/to/app.tgz splunk/splunk:latest
203+
```bash
204+
$ docker run --name splunk -e "SPLUNK_PASSWORD=<password>" \
205+
-e "SPLUNK_START_ARGS=--accept-license" \
206+
-e "SPLUNK_APPS_URL=http://company.com/path/to/app.tgz" \
207+
-it splunk/splunk:latest
186208
```
187209

188210
See the [full app installation guide](advanced/APP_INSTALL.md) to learn how to specify multiple apps and how to install apps in a distributed environment.
189211

190212
## Apply Splunk license
191213
Licenses can be added with the `SPLUNK_LICENSE_URI` environment variable when creating the Splunk container:
192-
```
193-
$ docker run -it --name splunk -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=<password> -e SPLUNK_LICENSE_URI=http://company.com/path/to/splunk.lic splunk/splunk:latest
214+
```bash
215+
$ docker run --name splunk -e "SPLUNK_PASSWORD=<password>" \
216+
-e "SPLUNK_START_ARGS=--accept-license" \
217+
-e "SPLUNK_LICENSE_URI=http://company.com/path/to/splunk.lic" \
218+
-it splunk/splunk:latest
194219
```
195220

196221
See the [full license installation guide](advanced/LICENSE_INSTALL.md) to learn how to specify multiple licenses and how to use a central, containerized license manager.
@@ -200,8 +225,8 @@ When Splunk boots, it registers all the config files in various locations on the
200225

201226
Using the Splunk Docker image, users can also create their own config files, following the same INI file format that drives Splunk. This is a power-user/admin-level feature, as invalid config files can break or prevent start-up of your Splunk installation.
202227

203-
User-specified config files are set in `default.yml` by creating a `conf` key under `splunk`, in the format below:
204-
```
228+
User-specified config files are set in `default.yml` by creating a `conf` key under `splunk`, in the format below:
229+
```yaml
205230
---
206231
splunk:
207232
conf:
@@ -217,7 +242,7 @@ splunk:
217242
This generates a file `user-prefs.conf`, owned by the correct Splunk user and group and located in the given directory (in this case, `/opt/splunkforwarder/etc/users/admin/user-prefs/local`).
218243

219244
Following INI format, the contents of `user-prefs.conf` will resemble the following:
220-
```
245+
```ini
221246
[general]
222247
search_syntax_highlighting = dark
223248
default_namespace = appboilerplate
@@ -235,7 +260,7 @@ This is a capability only available for indexer clusters (cluster_master + index
235260
The Splunk Docker image supports SmartStore in a bring-your-own backend storage provider format. Due to the complexity of this option, SmartStore is only enabled if you specify all the parameters in your `default.yml` file.
236261

237262
Sample configuration that persists *all* indexes (default) with a SmartStore backend:
238-
```
263+
```yaml
239264
---
240265
splunk:
241266
smartstore:
@@ -259,20 +284,22 @@ The SmartStore cache manager controls data movement between the indexer and the
259284
* The `index` stanza corresponds to [indexes.conf options](https://docs.splunk.com/Documentation/Splunk/latest/admin/Indexesconf).
260285

261286
This example defines cache settings and retention policy:
262-
```
263-
smartstore:
264-
cachemanager:
265-
max_cache_size: 500
266-
max_concurrent_uploads: 7
267-
index:
268-
- indexName: custom_index
269-
remoteName: my_storage
270-
scheme: http
271-
remoteLocation: my_storage.net
272-
maxGlobalDataSizeMB: 500
273-
maxGlobalRawDataSizeMB: 200
274-
hotlist_recency_secs: 30
275-
hotlist_bloom_filter_recency_hours: 1
287+
```yaml
288+
splunk:
289+
smartstore:
290+
cachemanager:
291+
max_cache_size: 500
292+
max_concurrent_uploads: 7
293+
index:
294+
- indexName: custom_index
295+
remoteName: my_storage
296+
scheme: http
297+
remoteLocation: my_storage.net
298+
maxGlobalDataSizeMB: 500
299+
maxGlobalRawDataSizeMB: 200
300+
hotlist_recency_secs: 30
301+
hotlist_bloom_filter_recency_hours: 1
302+
...
276303
```
277304

278305
## Use a deployment server
@@ -291,7 +318,7 @@ To secure network traffic from one Splunk instance to another (e.g. forwarders t
291318
If you are enabling SSL on one tier of your Splunk topology, it's likely all instances will need it. To achieve this, generate your server and CA certificates and add them to the `default.yml`, which gets shared across all Splunk docker containers.
292319

293320
Sample `default.yml` snippet to configure Splunk TCP with SSL:
294-
```
321+
```yaml
295322
splunk:
296323
...
297324
s2s:
@@ -312,7 +339,7 @@ Building your own images from source is possible, but neither supported nor reco
312339
The supplied `Makefile` in the root of this project contains commands to control the build:
313340
1. Fork the [docker-splunk GitHub repository](https://github.com/splunk/docker-splunk/)
314341
1. Clone your fork using git and create a branch off develop
315-
```
342+
```bash
316343
$ git clone [email protected]:YOUR_GITHUB_USERNAME/docker-splunk.git
317344
$ cd docker-splunk
318345
```
@@ -351,14 +378,12 @@ The `splunk/common-files` directory contains a Dockerfile that extends the base
351378
```
352379
$ make minimal-redhat-8
353380
```
354-
355381
* **Bare image**
356382
357383
Build a full Splunk base image *without* Ansible.
358384
```
359385
$ make bare-redhat-8
360386
```
361-
362387
* **Full image**
363388
364389
Build a full Splunk base image *with* Ansible.

docs/ARCHITECTURE.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Architecture
2-
From a design perspective, the containers brought up with the `docker-splunk` images are meant to provision themselves locally and asynchronously. The execution flow of the provisioning process is meant to gracefully handle interoperability in this manner, while also maintaining idempotency and reliability.
2+
From a design perspective, the containers brought up with the `docker-splunk` images are meant to provision themselves locally and asynchronously. The execution flow of the provisioning process is meant to gracefully handle interoperability in this manner, while also maintaining idempotency and reliability.
33

44
## Navigation
55

@@ -9,7 +9,7 @@ From a design perspective, the containers brought up with the `docker-splunk` im
99
* [Supported platforms](#supported-platforms)
1010

1111
## Networking
12-
By default, the Docker image exposes a variety of ports for both external interaction as well as internal use.
12+
By default, the Docker image exposes a variety of ports for both external interaction as well as internal use.
1313
```
1414
EXPOSE 8000 8065 8088 8089 8191 9887 9997
1515
```
@@ -28,11 +28,13 @@ Below is a table detailing the purpose of each port, which can be used as a refe
2828

2929
## Design
3030

31-
##### Remote networking
32-
Particularly when bringing up distributed Splunk topologies, there is a need for one Splunk instances to make a request against another Splunk instance in order to construct the cluster. These networking requests are often prone to failure, as when Ansible is executed asyncronously there are no guarantees that the requestee is online/ready to receive the message.
31+
#### Remote networking
32+
Particularly when bringing up distributed Splunk topologies, there is a need for one Splunk instances to make a request against another Splunk instance in order to construct the cluster. These networking requests are often prone to failure, as when Ansible is executed asynchronously there are no guarantees that the requestee is online/ready to receive the message.
3333

3434
While developing new playbooks that require remote Splunk-to-Splunk connectivity, we employ the use of `retry` and `delay` options for tasks. For instance, in this example below, we add indexers as search peers of individual search head. To overcome error-prone networking, we have retry counts with delays embedded in the task. There are also break-early conditions that maintain idempotency so we can progress if successful:
35-
```
35+
36+
<!-- {% raw %} -->
37+
```yaml
3638
- name: Set all indexers as search peers
3739
command: "{{ splunk.exec }} add search-server https://{{ item }}:{{ splunk.svc_port }} -auth {{ splunk.admin_user }}:{{ splunk.password }} -remoteUsername {{ splunk.admin_user }} -remotePassword {{ splunk.password }}"
3840
become: yes
@@ -49,9 +51,12 @@ While developing new playbooks that require remote Splunk-to-Splunk connectivity
4951
no_log: "{{ hide_password }}"
5052
when: "'splunk_indexer' in groups"
5153
```
54+
<!-- {% endraw %} -->
5255
5356
Another utility you can add when creating new plays is an implicit wait. For more information on this, see the `roles/splunk_common/tasks/wait_for_splunk_instance.yml` play which will wait for another Splunk instance to be online before making any connections against it.
54-
```
57+
58+
<!-- {% raw %} -->
59+
```yaml
5560
- name: Check Splunk instance is running
5661
uri:
5762
url: https://{{ splunk_instance_address }}:{{ splunk.svc_port }}/services/server/info?output_mode=json
@@ -68,6 +73,7 @@ Another utility you can add when creating new plays is an implicit wait. For mor
6873
ignore_errors: true
6974
no_log: "{{ hide_password }}"
7075
```
76+
<!-- {% endraw %} -->
7177

7278
## Supported platforms
7379
At the current time, this project only officially supports running Splunk Enterprise on `debian:stretch-slim`. We do have plans to incorporate other operating systems and Windows in the future.

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ There are multiple types of tests. The location of the test code varies with typ
116116
$ make medium-tests
117117
```
118118
119-
3. **Large:** Exercises the entire system, end-to-end; used to identify crucial performance and basic functionality that will be run for every code check-in and commit; may launch or interact with services in a datacenter, preferably with a staging environment to avoid affecting production
119+
3. **Large:** Exercises the entire system, end-to-end; used to identify crucial performance and basic functionality that will be run for every code check-in and commit; may launch or interact with services in a data center, preferably with a staging environment to avoid affecting production
120120
```
121121
$ make large-tests
122122
```

0 commit comments

Comments
 (0)