Skip to content

Commit 7d6d410

Browse files
authored
Merge pull request #17 from xmidt-org/release
add ipk release dir
2 parents 95ed4f7 + e39ad04 commit 7d6d410

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed

.release/ipk/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-FileCopyrightText: 2026 Comcast Cable Communications Management, LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# WRP Kafka Splitter Configuration
5+
# This is the base configuration file for the splitter service
6+
7+
servers:
8+
health:
9+
http:
10+
address: ":6000"
11+
path: "/health"
12+
metrics:
13+
http:
14+
address: ":6001"
15+
path: "/metrics"
16+
pprof:
17+
http:
18+
address: ":6002"
19+
path: "/debug/pprof"
20+
consumer:
21+
brokers:
22+
- "kafka:9092"
23+
topics:
24+
- "raw-events"
25+
group_id: "wrp-splitter"
26+
client_id: "splitter"
27+
logger:
28+
level: "INFO"
29+
encoding: "json"
30+
output_paths:
31+
- "stdout"
32+
error_output_paths:
33+
- "stderr"
34+
prometheus:
35+
namespace: "splitter"
36+
subsystem: "kafka"

.release/ipk/postinstall.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# SPDX-FileCopyrightText: 2026 Comcast Cable Communications Management, LLC
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Post-install script for splitter package
6+
7+
set -e
8+
9+
# Set permissions on configuration directory
10+
if [ -d /etc/splitter ]; then
11+
chown -R splitter:splitter /etc/splitter || true
12+
chmod 755 /etc/splitter || true
13+
fi
14+
15+
# Enable and start the systemd service
16+
if command -v systemctl &>/dev/null; then
17+
systemctl daemon-reload || true
18+
systemctl enable splitter || true
19+
echo "To start the service, run: systemctl start splitter"
20+
fi
21+
22+
exit 0

.release/ipk/preinstall.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# SPDX-FileCopyrightText: 2026 Comcast Cable Communications Management, LLC
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Pre-install script for splitter package
6+
7+
set -e
8+
9+
# Create splitter user and group if they don't exist
10+
if ! id "splitter" &>/dev/null; then
11+
echo "Creating splitter user and group..."
12+
groupadd -r splitter || true
13+
useradd -r -g splitter -s /bin/false -d /nonexistent -m splitter || true
14+
fi
15+
16+
exit 0

.release/ipk/splitter.service

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-FileCopyrightText: 2026 Comcast Cable Communications Management, LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
[Unit]
5+
Description=WRP Kafka Splitter Service
6+
After=network.target
7+
Wants=network-online.target
8+
9+
[Service]
10+
Type=simple
11+
User=splitter
12+
Group=splitter
13+
ExecStart=/usr/bin/splitter -f /etc/splitter/conf.d/
14+
Restart=on-failure
15+
RestartSec=10
16+
StandardOutput=journal
17+
StandardError=journal
18+
SyslogIdentifier=splitter
19+
20+
# Security hardening
21+
NoNewPrivileges=true
22+
PrivateTmp=true
23+
ProtectSystem=strict
24+
ProtectHome=true
25+
ReadWritePaths=/var/log/splitter /var/lib/splitter
26+
27+
[Install]
28+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)