Skip to content

Commit 4b5c9d6

Browse files
Added docs for EKS deployment (#2785)
* Added docs for EKS deployment * Changed some examples in Ansible documentation
1 parent cd7621d commit 4b5c9d6

File tree

6 files changed

+199
-6
lines changed

6 files changed

+199
-6
lines changed

ansible/resources/env_file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SC4S_DEST_SPLUNK_HEC_DEFAULT_URL=http://xxx.xxx.xxx.xxx:8088
1+
SC4S_DEST_SPLUNK_HEC_DEFAULT_URL=https://xxx.xxx.xxx.xxx:8088
22
SC4S_DEST_SPLUNK_HEC_DEFAULT_TOKEN=xxxxxxxxxxxxxxxxxx
33
#Uncomment the following line if using untrusted SSL certificates
44
#SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY=no

docs/gettingstarted/ansible-docker-podman.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ docker exec -it ansible_sc4s /bin/bash
2323

2424
* To authenticate with username and password:
2525
``` bash
26-
ansible-playbook -i path/to/inventory.yaml -u <username> --ask-pass path/to/playbooks/docker.yml
26+
ansible-playbook -i ansible/inventory/inventory.yaml -u <username> --ask-pass ansible/playbooks/playbooks/docker.yml
2727
or
28-
ansible-playbook -i path/to/inventory.yaml -u <username> --ask-pass path/to/playbooks/podman.yml
28+
ansible-playbook -i ansible/inventory/inventory.yaml -u <username> --ask-pass ansible/playbooks/playbooks/podman.yml
2929

3030
```
3131
* To authenticate using a key pair:
3232
``` bash
33-
ansible-playbook -i path/to/inventory.yaml -u <username> --key-file <key_file> path/to/playbooks/docker.yml
33+
ansible-playbook -i ansible/inventory/inventory.yaml -u <username> --key-file <key_file> ansible/playbooks/playbooks/docker.yml
3434
or
35-
ansible-playbook -i path/to/inventory.yaml -u <username> --key-file <key_file> path/to/playbooks/podman.yml
35+
ansible-playbook -i ansible/inventory/inventory.yaml -u <username> --key-file <key_file> ansible/playbooks/playbooks/podman.yml
3636
```
3737

3838
# Step 3: Validate your configuration

docs/gettingstarted/ansible-docker-swarm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ansible-playbook -i path/to/inventory_swarm.yaml -u <username> --key-file <key_f
5151
|sc4s | 1 | Swarm |
5252

5353
* To scale your number of services:
54-
```sudo docker service update --replicas 2 sc4s_sc4s```
54+
```sudo docker service update --replicas 2 SC4S_sc4s```
5555

5656
* To see services running in a given stack:
5757
```sudo docker stack services sc4s```

docs/gettingstarted/eks.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
You can install SC4S on AWS with EKS. To do this, you can use a deployment file and a basic configuration information.
2+
3+
Refer to AWS [documentation](https://docs.aws.amazon.com/eks/latest/userguide/sample-deployment.html) on how to set up your AWS environment.
4+
5+
Before you begin you also need to have `kubectl` installed.
6+
7+
# Prepare your initial configuration
8+
1. First create a file named `/opt/sc4s/env_file` and add the following environment variables and values:
9+
10+
``` dotenv
11+
--8<---- "ansible/resources/env_file"
12+
```
13+
Then create a configmap with variables provided in the file
14+
```
15+
kubectl create configmap sc4s-config --from-env-file=/opt/sc4s/env_file -n sc4s
16+
```
17+
18+
2. Create a deployment configuration file based on this:
19+
``` yaml
20+
--8<---- "docs/resources/docker/sc4s_deployment.yaml"
21+
```
22+
23+
Please note that this file may need to be modified based on your requirements, such as the ports being used.
24+
You can view the default range of ports opened by the nodePort [here](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport).
25+
26+
3. (Optioinal) To use local filters you have to load them into a configmap, and uncomment parts of the deployment file related to them:
27+
28+
```
29+
kubectl create configmap sc4s-local-filter-config \
30+
--from-file=/opt/sc4s/local/config/app_parsers -n sc4s
31+
```
32+
33+
This loads files from app_parsers directory only, [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#create-configmaps-from-files) is the documentation explaining other use cases.
34+
35+
# Deploy SC4S with your configuration
36+
1. To run SC4S simply run this command in the directory where your deployment file is located:
37+
```bash
38+
kubectl apply -f sc4s_deployment.yaml
39+
```
40+
41+
You can use a load balancer with SC4S, to set it up properly refer to our [documentation](../architecture/lb/index.md).
42+
43+
2. You can use following commands to check if SC4S deployment and NodePort service is running.
44+
45+
To get pods:
46+
```bash
47+
kubectl get pods -n sc4s
48+
```
49+
50+
To get NodePort service:
51+
```bash
52+
kubectl get services -n sc4s
53+
```
54+
55+
Check the logs using this command:
56+
```bash
57+
kubectl logs {your_pod_name} -n sc4s
58+
```
59+
60+
You should see something like this:
61+
```ini
62+
SC4S_ENV_CHECK_HEC: Splunk HEC connection test successful to index=main for sourcetype=sc4s:fallback...
63+
SC4S_ENV_CHECK_HEC: Splunk HEC connection test successful to index=main for sourcetype=sc4s:events...
64+
syslog-ng checking config
65+
sc4s version=3.37.0
66+
Configuring the health check port to: 8080
67+
[2025-08-01 17:40:50 +0000] [130] [INFO] Starting gunicorn 23.0.0
68+
[2025-08-01 17:40:50 +0000] [130] [INFO] Listening at: http://0.0.0.0:8080 (130)
69+
[2025-08-01 17:40:50 +0000] [130] [INFO] Using worker: sync
70+
[2025-08-01 17:40:50 +0000] [133] [INFO] Booting worker with pid: 133
71+
starting syslog-ng
72+
```
73+
74+
If the pod does not start you can debug it with this command:
75+
```bash
76+
kubectl describe pod {your_pod_name} -n sc4s
77+
```
78+
79+
3. You can use following commands to check if SC4S deployment and NodePort service is running.
80+
81+
82+
# Validate your configuration
83+
84+
SC4S performs checks to ensure that the container starts properly and that the syntax of the underlying syslog-ng
85+
configuration is correct. Once the checks are complete, validate that SC4S properly communicate with Splunk.
86+
To do this, execute the following search in Splunk:
87+
88+
```ini
89+
index=* sourcetype=sc4s:events "starting up"
90+
```
91+
92+
# Update SC4S
93+
Whenever the image is upgraded or when you want your configuration changes to be applied, run the command:
94+
95+
```bash
96+
kubectl apply -f sc4s_deployment.yaml
97+
```
98+
99+
Kubectl will detect if there are any changes to be made and rollout new pods if necessary.
100+
101+
# Stop SC4S
102+
103+
To delete the deployment run this command in the directory where your deployment file is located:
104+
```bash
105+
kubectl delete -f sc4s_deployment.yaml
106+
```
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: sc4s-deployment
5+
namespace: sc4s
6+
labels:
7+
app: sc4s-app
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: sc4s-app
13+
template:
14+
metadata:
15+
labels:
16+
app: sc4s-app
17+
spec:
18+
volumes:
19+
- name: config-volume
20+
configMap:
21+
name: sc4s-config
22+
# Uncomment only if local parser used
23+
# - name: local-filter-config
24+
# configMap:
25+
# name: sc4s-local-filter-config
26+
27+
containers:
28+
- name: sc4s
29+
image: ghcr.io/splunk/splunk-connect-for-syslog/container3:latest
30+
imagePullPolicy: IfNotPresent
31+
32+
resources:
33+
requests:
34+
cpu: "500m"
35+
memory: "512Mi"
36+
limits:
37+
cpu: "2000m"
38+
memory: "2Gi"
39+
40+
envFrom:
41+
- configMapRef:
42+
name: sc4s-config
43+
44+
# Uncomment only if local parser used
45+
# volumeMounts:
46+
# - name: local-filter-config
47+
# mountPath: /etc/syslog-ng/conf.d/local/config/app_parsers
48+
# readOnly: true
49+
50+
---
51+
apiVersion: v1
52+
kind: Service
53+
metadata:
54+
name: sc4s-nodeport-service
55+
namespace: sc4s
56+
spec:
57+
selector:
58+
app: sc4s-app
59+
type: NodePort
60+
ports:
61+
- port: 514
62+
targetPort: 514
63+
name: "tcp514"
64+
protocol: TCP
65+
nodePort: 30514
66+
- port: 514
67+
targetPort: 514
68+
name: "udp514"
69+
protocol: UDP
70+
nodePort: 30514
71+
- port: 601
72+
targetPort: 601
73+
name: "tcp601"
74+
protocol: TCP
75+
nodePort: 30601
76+
- port: 6514
77+
targetPort: 6514
78+
name: "tcp6514"
79+
protocol: TCP
80+
nodePort: 30515
81+
- port: 8080
82+
targetPort: 8080
83+
name: "healthcheck"
84+
protocol: TCP
85+
nodePort: 30080

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ nav:
6464
- Docker Swarm: "gettingstarted/ansible-docker-swarm.md"
6565
- Podman/Docker: "gettingstarted/ansible-docker-podman.md"
6666
- mk8s: "gettingstarted/ansible-mk8s.md"
67+
- Cloud (Experimental):
68+
- EKS (Experimental): "gettingstarted/eks.md"
6769
- Create a parser: "create-parser.md"
6870
- Configuration: "configuration.md"
6971
- Destinations: "destinations.md"

0 commit comments

Comments
 (0)