Skip to content

Commit

Permalink
Fix markdown (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
damacus authored Oct 3, 2023
1 parent fc3d115 commit 181d60d
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ be considered as not accepting the Splunk EULA.

For example, these will not accept the Splunk license:

```
```ruby
node['splunk']['accept_license'] = false
node['splunk'] = { 'accept_license' => nil }
node['splunk']['accept_license'] = ''
Expand All @@ -47,7 +47,7 @@ node['splunk']['accept_license'] = 'true'

Only this will accept the license:

```
```ruby
node['splunk']['accept_license'] = true
```

Expand Down Expand Up @@ -120,7 +120,7 @@ by default.
For example, each line below will force the chef-client to install Splunk's Universal Forwarder
and server from the local package manager:

```
```ruby
node.force_default['splunk']['forwarder']['url'] = ''
node.force_default['splunk']['server']['url'] = ''
node.force_default['splunk']['forwarder']['url'] = nil
Expand Down Expand Up @@ -183,7 +183,7 @@ clustering in the `setup_clustering` recipe:
- `node['splunk']['clustering']['replication_port']`: The replication port
of the cluster peer member. Only valid when `node['splunk']['clustering']['mode']='slave'`.
Defaults to 9887.
- [`node['splunk']['clustering']['mgmt_uri']`](Default: https://fqdn:8089)
- [`node['splunk']['clustering']['mgmt_uri']`](Default: <https://fqdn:8089>)
This attribute is for the indexer cluster members and cluster master. The cluster master
will set this node attribute to itself, while all cluster members will perform a chef search
to get the value from the cluster master's node data.
Expand Down Expand Up @@ -258,7 +258,7 @@ default['splunk']['outputs_conf'] = {

This will result in the following being rendered in `outputs.conf`:

```
```toml
[tcpout:splunk_indexers_9997]
server=10.0.2.47:9997
forwardedindex.0.whitelist = .*
Expand All @@ -269,7 +269,7 @@ forwardedindex.filter.disable = false

As an example of `outputs_conf` attribute usage, to add an `sslCertPath` directive, define the attribute in your role or wrapper cookbook as such:

```
```ruby
node.default['splunk']['outputs_conf']['sslCertPath'] = '$SPLUNK_HOME/etc/certs/cert.pem'
```

Expand All @@ -279,7 +279,7 @@ The `server` attribute in `tcpout:splunk_indexers_9997` stanza above is populate
For example:
```
```ruby
node.default['splunk']['server_list'] = '10.0.2.47:9997, 10.0.2.49:9997'
```
Expand All @@ -291,7 +291,7 @@ node.default['splunk']['server_list'] = '10.0.2.47:9997, 10.0.2.49:9997'
For example:
```
```ruby
node.default['splunk']['inputs_conf']['ports'] = [
{
port_num => 123123,
Expand All @@ -309,11 +309,10 @@ node.default['splunk']['inputs_conf']['inputs'] = [
}
}
]
```
The following attributes are related to upgrades in the `upgrade`
recipe. **Note** The default upgrade version is set to 7.3.2 and should be modified to
recipe. __Note__ The default upgrade version is set to 7.3.2 and should be modified to
suit in a role or wrapper, since we don't know what upgrade versions
may be relevant. Enabling the upgrade and blindly using the default
URLs may have undesirable consequences, hence this is not enabled, and
Expand All @@ -334,7 +333,7 @@ must be set explicitly elsewhere on the node(s).
For example, each line below will force the chef-client to install Splunk's Universal Forwarder and server
from the local package manager:
```
```ruby
node.force_default['splunk']['forwarder']['upgrade']['url'] = ''
node.force_default['splunk']['server']['upgrade']['url'] = ''
node.force_default['splunk']['forwarder']['upgrade']['url'] = nil
Expand All @@ -349,7 +348,7 @@ When wrapping this cookbook, it is often beneficial to run Splunk Enterprise or
Example:
```
```ruby
execute 'set servername' do
command splunk_cmd(['set', 'servername', node.name, '-auth', node.run_state['splunk_auth_info'])
sensitive true
Expand All @@ -359,7 +358,7 @@ end
another way that will result in the same command:
```
```ruby
execute 'set servername' do
command splunk_cmd("set servname #{node.name} -auth '#{node.run_state['splunk_auth_info']}'")
sensitive true
Expand Down Expand Up @@ -413,13 +412,13 @@ As of v6.0.0, sub-resources of the `splunk_app` provider will no longer notify r
end
```

#### Examples
#### Examples

Install and enable a deployment client configuration that overrides default Splunk Enterprise configurations

- Given a wrapper cookbook called MyDeploymentClientBase with a folder structure as below:

```
```ruby
MyDeploymentClientBase
/templates
/MyDeploymentClientBase
Expand All @@ -439,7 +438,7 @@ As of v6.0.0, sub-resources of the `splunk_app` provider will no longer notify r

The Splunk Enterprise server will have a filesystem created, as follows:

```
```ruby
/opt/splunk/etc/apps/MyDeploymentClientBase/local/deploymentclient.conf
```

Expand Down Expand Up @@ -588,7 +587,7 @@ updates the outputs.conf server configuration with those key value pairs.
These key value pairs can be used to setup SSL encryption on messages
forwarded through this client:

```
```ruby
# Note that the ssl CA and certs must exist on the server.
node['splunk']['outputs_conf'] = {
'sslCommonNameToCheck' => 'sslCommonName',
Expand All @@ -602,13 +601,13 @@ node['splunk']['outputs_conf'] = {
The inputs.conf file can also be managed through this recipe if you want to
setup a splunk forwarder just set the default host:

```
```ruby
node['splunk']['inputs_conf']['host'] = 'myhost'
```

Then set up the port configuration for each input port:

```
```ruby
node['splunk']['inputs_conf']['ports'] =
[
{
Expand Down Expand Up @@ -790,8 +789,8 @@ named `vault`, with an item `splunk_CHEF-ENVIRONMENT`, where
Enterprise server will be assigned. If environments are not used, use
`_default`. For example in a Chef Repository (not in a cookbook):
```
cat data_bags/vault/splunk__default.json
```ruby
# data_bags/vault/splunk__default.json
{
"id": "splunk__default",
"auth": "admin:notarealpassword",
Expand All @@ -801,8 +800,8 @@ cat data_bags/vault/splunk__default.json
Or with an environment, '`production`':
```
cat data_bags/vault/splunk_production.json
```ruby
# data_bags/vault/splunk_production.json
{
"id": "splunk_production",
"auth": "admin:notarealpassword",
Expand All @@ -814,7 +813,7 @@ Then, upload the data bag item to the Chef Server using the
`chef-vault` `knife encrypt` plugin (first example, `_default`
environment):
```
```shell
knife encrypt create vault splunk__default \
--json data_bags/vault/splunk__default.json \
--search 'splunk:*' --admins 'yourusername' \
Expand All @@ -830,7 +829,7 @@ The use of chef-vault is entirely optional. However, this cookbook maintains the
First, chef-vault has a built-in mechanism to fallback to a standard encrypted data bag. So, in order to make use of this, set the following attribute:
```
```ruby
node.force_default['chef-vault']['data_bag_fallback'] = true
```
Expand All @@ -844,8 +843,8 @@ Create a data bag named `vault`, with an item `splunk_CHEF-ENVIRONMENT`, where
Enterprise server will be assigned. If environments are not used, use
`_default`. For example in a Chef Repository (not in a cookbook):
```
cat data_bags/vault/splunk__default.json
```ruby
# data_bags/vault/splunk__default.json
{
"id": "splunk__default",
"auth": "admin:notarealpassword",
Expand All @@ -855,8 +854,8 @@ cat data_bags/vault/splunk__default.json
Or with an environment, '`production`':
```
cat data_bags/vault/splunk_production.json
```ruby
# data_bags/vault/splunk_production.json
{
"id": "splunk_production",
"auth": "admin:notarealpassword",
Expand All @@ -866,7 +865,7 @@ cat data_bags/vault/splunk_production.json
Below is an example for a node that is in the `_default` chef environment using the json file above.
```
```shell
knife data bag create vault
knife data bag from file vault data_bags/vault/splunk__default.json --secret-file ~/.chef/your_encrypted_data_bag_secret.key
```
Expand All @@ -880,8 +879,8 @@ be set up using self-signed SSL certificates, or "real" SSL
certificates. This loaded via a data bag item with chef-vault. Using
the defaults from the attributes:

```
cat data_bags/vault/splunk_certificates.json
```ruby
# data_bags/vault/splunk_certificates.json
{
"id": "splunk_certificates",
"data": {
Expand All @@ -894,7 +893,7 @@ cat data_bags/vault/splunk_certificates.json
Like the authentication credentials above, run the `knife encrypt`
command. Note the search here is for the splunk server only:

```
```shell
knife encrypt create vault splunk_certificates \
--json data_bags/vault/splunk_certificates.json \
--search 'splunk_is_server:true' --admins 'yourusername' \
Expand Down

0 comments on commit 181d60d

Please sign in to comment.