Skip to content

Commit

Permalink
Fix unique port unit/yml files (#136)
Browse files Browse the repository at this point in the history
Fix port ranges
Fix comment for docker-compose.yml
Add UDP ports to unique port unit/yml files
  • Loading branch information
mbonsack authored and Ryan Faircloth committed Oct 11, 2019
1 parent 92c77a5 commit 9f42d48
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 38 deletions.
14 changes: 6 additions & 8 deletions docs/gettingstarted/docker-swarm-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ For collection of such sources we provide a means of dedicating a unique listeni

Refer to the "Sources" documentation to identify the specific variable used to enable a specific port for the technology in use.

In the following example ``-p 5000-5020:5000-5020`` allows for up to 21 technology-specific ports. Modify the individual ports or a
In the following example the target port ranges allow for up to 21 technology-specific ports. Modify individual ports or a
range as appropriate for your network.

* Modify the unit file ``/opt/sc4s/docker-compose.yml``
Expand All @@ -134,22 +134,20 @@ services:
protocol: udp
#Comment the following line out if using docker-compose
mode: host
- target: 5000-5021
published: 5000-5021
- target: 5000-5020
published: 5000-5020
protocol: tcp
#Comment the following line out if using docker-compose
mode: host
- target: 5000-5021
published: 5000-5021
- target: 5000-5020
published: 5000-5020
protocol: udp
#Comment the following line out if using docker-compose
mode: host
env_file:
- /opt/sc4s/env_file
volumes:
- /opt/sc4s/default/splunk_index.csv:/opt/syslog-ng/etc/context-local/splunk_index.csv
- /opt/sc4s/default/vendor_product_by_source.csv:/opt/syslog-ng/etc/context-local/vendor_product_by_source.csv
- /opt/sc4s/default/vendor_product_by_source.conf:/opt/syslog-ng/etc/context-local/vendor_product_by_source.conf
- /opt/sc4s/local:/opt/syslog-ng/etc/conf.d/local
#Uncomment the following line if custom TLS certs are provided
- /opt/sc4s/tls:/opt/syslog-ng/tls
```
Expand Down
14 changes: 6 additions & 8 deletions docs/gettingstarted/docker-swarm-rhel7.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ For collection of such sources we provide a means of dedicating a unique listeni

Refer to the "Sources" documentation to identify the specific variable used to enable a specific port for the technology in use.

In the following example ``-p 5000-5020:5000-5020`` allows for up to 21 technology-specific ports. Modify the individual ports or a
In the following example the target port ranges allow for up to 21 technology-specific ports. Modify individual ports or a
range as appropriate for your network.

* Modify the unit file ``/opt/sc4s/docker-compose.yml``
Expand All @@ -164,22 +164,20 @@ services:
protocol: udp
#Comment the following line out if using docker-compose
mode: host
- target: 5000-5021
published: 5000-5021
- target: 5000-5020
published: 5000-5020
protocol: tcp
#Comment the following line out if using docker-compose
mode: host
- target: 5000-5021
published: 5000-5021
- target: 5000-5020
published: 5000-5020
protocol: udp
#Comment the following line out if using docker-compose
mode: host
env_file:
- /opt/sc4s/env_file
volumes:
- /opt/sc4s/default/splunk_index.csv:/opt/syslog-ng/etc/context-local/splunk_index.csv
- /opt/sc4s/default/vendor_product_by_source.csv:/opt/syslog-ng/etc/context-local/vendor_product_by_source.csv
- /opt/sc4s/default/vendor_product_by_source.conf:/opt/syslog-ng/etc/context-local/vendor_product_by_source.conf
- /opt/sc4s/local:/opt/syslog-ng/etc/conf.d/local
#Uncomment the following line if custom TLS certs are provided
- /opt/sc4s/tls:/opt/syslog-ng/tls
```
Expand Down
21 changes: 10 additions & 11 deletions docs/gettingstarted/docker-systemd-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ For collection of such sources we provide a means of dedicating a unique listeni

Refer to the "Sources" documentation to identify the specific variable used to enable a specific port for the technology in use.

In the following example ``-p 5000-5020:5000-5020`` allows for up to 21 technology-specific ports. Modify the individual ports or a
In the following example ``-p 5000-5020:5000-5020`` allows for up to 21 technology-specific ports. Modify individual ports or a
range as appropriate for your network.

* Modify the unit file ``/lib/systemd/system/sc4s.service``
Expand All @@ -130,25 +130,24 @@ Requires=network.service
[Service]
Environment="SC4S_IMAGE=splunk/scs:latest"

#Note Uncomment this line to use custom index names AND download the splunk_index.csv file template per getting started
Environment="SC4S_UNIT_SPLUNK_INDEX=-v /opt/sc4s/default/splunk_index.csv:/opt/syslog-ng/etc/context-local/splunk_index.csv"
#Note Uncomment the following two linese for host and ip based source type mapping AND download the two file templates per getting started
#Environment="SC4S_UNIT_VP_CSV=-v /opt/sc4s/default/vendor_product_by_source.csv:/opt/syslog-ng/etc/context-local/vendor_product_by_source.csv"
#Environment="SC4S_UNIT_VP_CONF=-v /opt/sc4s/default/vendor_product_by_source.conf:/opt/syslog-ng/etc/context-local/vendor_product_by_source.conf"
#Uncomment the following line if custom TLS certs are provided
#Environment="SC4S_TLS_DIR=-v /opt/sc4s/tls:/opt/syslog-ng/tls"
# Optional mount point for local overrides and configurations; see notes in docs

Environment="SC4S_LOCAL_CONFIG_MOUNT=-v /opt/sc4s/local:/opt/syslog-ng/etc/conf.d/local"

# Uncomment the following line if custom TLS certs are provided
# Environment="SC4S_TLS_DIR=-v /opt/sc4s/tls:/opt/syslog-ng/tls"

TimeoutStartSec=0
Restart=always
ExecStartPre=/usr/bin/docker pull $SC4S_IMAGE
ExecStartPre=/usr/bin/docker run \
--env-file=/opt/sc4s/default/env_file \
"$SC4S_UNIT_SPLUNK_INDEX" "$SC4S_UNIT_VP_CSV" "$SC4S_UNIT_VP_CONF" "$SC4S_TLS_DIR" \
"$SC4S_LOCAL_CONFIG_MOUNT" \
--name SC4S_preflight --rm \
$SC4S_IMAGE -s
ExecStart=/usr/bin/docker run -p 514:514 -p 5000-5020:5000-5020 \
ExecStart=/usr/bin/docker run -p 514:514 -p 514:514/udp -p 5000-5020:5000-5020 -p 5000-5020:5000-5020/udp \
--env-file=/opt/sc4s/default/env_file \
"$SC4S_UNIT_SPLUNK_INDEX" "$SC4S_UNIT_VP_CSV" "$SC4S_UNIT_VP_CONF" "$SC4S_TLS_DIR" \
"$SC4S_LOCAL_CONFIG_MOUNT" \
--name SC4S \
--rm \
$SC4S_IMAGE
Expand Down
21 changes: 10 additions & 11 deletions docs/gettingstarted/podman-systemd-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ For collection of such sources we provide a means of dedicating a unique listeni

Refer to the "Sources" documentation to identify the specific variable used to enable a specific port for the technology in use.

In the following example ``-p 5000-5020:5000-5020`` allows for up to 21 technology-specific ports. Modify the individual ports or a
In the following example ``-p 5000-5020:5000-5020`` allows for up to 21 technology-specific ports. Modify individual ports or a
range as appropriate for your network.

* Modify the unit file ``/lib/systemd/system/sc4s.service``
Expand All @@ -130,25 +130,24 @@ Requires=network.service
[Service]
Environment="SC4S_IMAGE=splunk/scs:latest"

#Note Uncomment this line to use custom index names AND download the splunk_index.csv file template per getting started
Environment="SC4S_UNIT_SPLUNK_INDEX=-v /opt/sc4s/default/splunk_index.csv:/opt/syslog-ng/etc/context-local/splunk_index.csv"
#Note Uncomment the following two linese for host and ip based source type mapping AND download the two file templates per getting started
#Environment="SC4S_UNIT_VP_CSV=-v /opt/sc4s/default/vendor_product_by_source.csv:/opt/syslog-ng/etc/context-local/vendor_product_by_source.csv"
#Environment="SC4S_UNIT_VP_CONF=-v /opt/sc4s/default/vendor_product_by_source.conf:/opt/syslog-ng/etc/context-local/vendor_product_by_source.conf"
#Uncomment the following line if custom TLS certs are provided
#Environment="SC4S_TLS_DIR=-v /opt/sc4s/tls:/opt/syslog-ng/tls"
# Optional mount point for local overrides and configurations; see notes in docs

Environment="SC4S_LOCAL_CONFIG_MOUNT=-v /opt/sc4s/local:/opt/syslog-ng/etc/conf.d/local"

# Uncomment the following line if custom TLS certs are provided
# Environment="SC4S_TLS_DIR=-v /opt/sc4s/tls:/opt/syslog-ng/tls"

TimeoutStartSec=0
Restart=always
ExecStartPre=/usr/bin/podman pull $SC4S_IMAGE
ExecStartPre=/usr/bin/podman run \
--env-file=/opt/sc4s/default/env_file \
"$SC4S_UNIT_SPLUNK_INDEX" "$SC4S_UNIT_VP_CSV" "$SC4S_UNIT_VP_CONF" "$SC4S_TLS_DIR" \
"$SC4S_LOCAL_CONFIG_MOUNT" \
--name SC4S_preflight --rm \
$SC4S_IMAGE -s
ExecStart=/usr/bin/podman run -p 514:514 -p 5000-5020:5000-5020 \
ExecStart=/usr/bin/podman run -p 514:514 -p 514:514/udp -p 5000-5020:5000-5020 -p 5000-5020:5000-5020/udp \
--env-file=/opt/sc4s/default/env_file \
"$SC4S_UNIT_SPLUNK_INDEX" "$SC4S_UNIT_VP_CSV" "$SC4S_UNIT_VP_CONF" "$SC4S_TLS_DIR" \
"$SC4S_LOCAL_CONFIG_MOUNT" \
--name SC4S \
--rm \
$SC4S_IMAGE
Expand Down

0 comments on commit 9f42d48

Please sign in to comment.