splunk / splunk-connect-for-syslog

Splunk Connect for Syslog
Apache License 2.0
152 stars 108 forks source link

docs: update docker-compose-MacOS.md #2429

Closed jenworthington closed 4 months ago

jenworthington commented 5 months ago

editing first pass

mstopa-splunk commented 5 months ago

@jenworthington should we merge this file with docker-compose.md? There are just a few differences:

diff docs/gettingstarted/docker-compose-MacOS.md docs/gettingstarted/docker-compose.md      
2c2
< # Install Docker Desktop for MacOS
---
> # Install Docker Desktop
4c4
< Refer to [Installation](https://hub.docker.com/editions/community/docker-ce-desktop-mac)
---
> Refer to [Installation](https://docs.docker.com/engine/install/)
20c20
< ```yaml
---
> ``` yaml
22a23
> 
57,82d57
< 
< ## Dedicated (Unique) Listening Ports
< * NOTE:  Container networking differs on MacOS compared to that for linux.  On Docker Desktop, there is no "host" networking driver,
< so NAT networking must be used.  For this reason, each listening port on the container must be mapped to a listening port on the host.
< These port mappings are configured in the `docker-compose.yml` file or directly as a runtime option when run out of the CLI.
< Be sure to update the `docker-compose.yml` file or CLI arguments when adding listening ports for new data sources.
< 
< Follow these steps to configure unique ports:
< 
< * Modify the `/opt/sc4s/env_file` file to include the port-specific environment variable(s). Refer to the "Sources"
< documentation to identify the specific environment variables that are mapped to each data source vendor/technology.
< * (Optional for `docker-compose`) The docker compose file used to start the SC4S container needs to be modified as well to reflect the additional listening ports configured by the environment variable(s) added above.  The docker compose file
< can be amended with additional `target` stanzas in the `ports` section of the file (after the default ports). For example, the following
< additional `target` and `published` lines provide for 21 additional technology-specific UDP and TCP ports:
< 
< ```
<        - target: 5000-5020
<          published: 5000-5020
<          protocol: tcp
<        - target: 5000-5020
<          published: 5000-5020
<          protocol: udp
< ```
< 
< * Restart SC4S using the command in the "Start/Restart SC4S" section below.
< * 
91c66
< ```
---
> ```bash
98c73
< If you are using `docker-compose`, from the catalog where you created compose file execute:
---
> If you are using `docker compose`, from the catalog where you created compose file execute:
101c76
< docker-compose up
---
> docker compose up
103c78
< Otherwise use `docker-compose` with `-f` flag pointing to the compose file
---
> Otherwise use `docker compose` with `-f` flag pointing to the compose file
105c80
< docker-compose up -f /path/to/compose/file/docker-compose.yml
---
> docker compose up -f /path/to/compose/file/docker-compose.yml
111c86
< If using `docker-compose`, execute:
---
> If using `docker compose`, execute:
114c89
< docker-compose down 
---
> docker compose down 
119c94
< docker-compose down -f /path/to/compose/file/docker-compose.yml
---
> docker compose down -f /path/to/compose/file/docker-compose.yml
jenworthington commented 5 months ago

I noticed that and have been thinking about it. I'm not sure, because we already have options for command line or Docker compose in some of the steps, and it could get confusing. I'm thinking for now we keep it (and make sure the edits are consistent) and then revisit this as part of the review process. But I'm open to discussing it further in our meeting tomorrow.

mstopa-splunk commented 4 months ago

@jenworthington ready for the final pass

mstopa-splunk commented 4 months ago

cherry picked for merging to main in https://github.com/splunk/splunk-connect-for-syslog/pull/2469