Deployment: On Local
This guide walks you through deploying DataStream on a local server or workstation. Local deployment is ideal for development, testing, or small-scale production environments where you need full control over the system resources.
Prerequisites
Before starting a local deployment, ensure your system meets these requirements:
Category | Requirements |
---|---|
Hardware |
|
Software |
|
Deployment Options
DataStream offers a straightforward installation method for local deployment.
Native Installation
Install DataStream directly on the host operating system.
Installation Steps
-
Download the installer package -
- Windows
- Linux
- macOS
Invoke-WebRequest -Uri "https://download.datastream.example.com/latest/datastream-installer.exe" -OutFile "datastream-installer.exe"
wget https://download.datastream.example.com/latest/datastream-installer.sh
curl -O https://download.datastream.example.com/latest/datastream-installer.sh
-
Make the installer executable (Linux/macOS only) -
- Windows
- Linux
- macOS
# Not needed for Windows
chmod +x datastream-installer.sh
chmod +x datastream-installer.sh
-
Run the installer -
- Windows
- Linux
- macOS
.\datastream-installer.exe
sudo ./datastream-installer.sh
sudo ./datastream-installer.sh
-
Configure the service -
- Windows
- Linux
- macOS
The installer will create a configuration directory at C:\ProgramData\DataStream
notepad C:\ProgramData\DataStream\config.yaml
The installer will create a configuration directory at /etc/datastream
sudo nano /etc/datastream/config.yaml
The installer will create a configuration directory at /etc/datastream
sudo nano /etc/datastream/config.yaml
-
Start the service -
- Windows
- Linux
- macOS
Start-Service DataStream
Set-Service DataStream -StartupType Automaticsudo systemctl enable datastream
sudo systemctl start datastreamsudo launchctl load /Library/LaunchDaemons/com.datastream.service.plist
Configuration
After deployment, configure DataStream to meet your specific requirements:
-
Define devices in the configuration directory -
Example Syslog devices configuration:
devices:
- id: 1
name: local_syslog
type: syslog
properties:
port: 514 -
Add processors and pipelines as needed -
pipelines:
- name: basic_processing
processors:
- grok:
field: message
patterns:
- "%{COMMONAPACHELOG}" -
Configure targets to forward processed data -
targets:
- name: local_file
type: file
properties:
path: /var/log/datastream/processed.log
Verification
After deployment, verify that DataStream is running correctly:
-
Check the service status -
- Windows
- Linux
- macOS
Get-Service DataStream
sudo systemctl status datastream
sudo launchctl list | grep datastream
-
Review log output -
- Windows
- Linux
- macOS
Get-Content -Path "C:\ProgramData\DataStream\logs\service.log" -Tail 50 -Wait
sudo journalctl -u datastream -f
tail -f /Library/Logs/DataStream/service.log
-
Test a device -
- Windows
- Linux
- macOS
Using PowerShell to send a UDP message to port
514
:$Message = [Text.Encoding]::ASCII.GetBytes("Test message for DataStream")
$UdpClient = New-Object System.Net.Sockets.UdpClient
$UdpClient.Connect("127.0.0.1", 514)
$UdpClient.Send($Message, $Message.Length)logger -n localhost -P 514 "Test message for DataStream"
logger -n localhost -P 514 "Test message for DataStream"
Resource Allocation
For local deployments, adjust resource allocations based on your workload:
Scale | Volume (events/sec) | Recommendation |
---|---|---|
Small | < 100 | Default configuration |
Medium | = 100-1000 | Allocate 2-4 dedicated cores, 8GB RAM |
Large | > 1000 | Consider distributing across multiple instances |
Maintenance
Regular maintenance tasks for local deployments:
-
Update DataStream when new versions are released -
- Windows
- Linux
- macOS
-
Download the latest installer:
Invoke-WebRequest -Uri "https://download.datastream.example.com/latest/datastream-installer.exe" -OutFile "datastream-installer.exe"
-
Stop the service:
Stop-Service DataStream
-
Run the installer to update:
.\datastream-installer.exe
-
Start the service:
Start-Service DataStream
-
Download the latest installer:
wget https://download.datastream.example.com/latest/datastream-installer.sh
-
Make the installer executable:
chmod +x datastream-installer.sh
-
Run the installer with update flag:
sudo ./datastream-installer.sh --update
-
Restart the service:
sudo systemctl restart datastream
-
Download the latest installer:
curl -O https://download.datastream.example.com/latest/datastream-installer.sh
-
Make the installer executable:
chmod +x datastream-installer.sh
-
Run the installer with update flag:
sudo ./datastream-installer.sh --update
-
Restart the service:
sudo launchctl unload /Library/LaunchDaemons/com.datastream.service.plist
sudo launchctl load /Library/LaunchDaemons/com.datastream.service.plist
-
Backup configuration files regularly:
- Windows
- Linux
- macOS
Compress-Archive -Path "C:\ProgramData\DataStream" -DestinationPath "C:\Backups\datastream-config-backup.zip"
sudo tar -czf /backup/datastream-config-backup.tar.gz /etc/datastream
sudo tar -czf ~/Downloads/datastream-config-backup.tar.gz /etc/datastream
-
Monitor disk usage to prevent storage issues:
- Windows
- Linux
- macOS
Get-ChildItem -Path "C:\ProgramData\DataStream\logs" -Recurse | Measure-Object -Property Length -Sum
du -sh /var/log/datastream/
du -sh /Library/Logs/DataStream/
Troubleshooting
Common issues with local deployments:
Issue | Potential Resolution |
---|---|
Service fails to start |
|
No data collected |
|
High CPU/memory usage |
|
For detailed logs, check:
- Windows
- Linux
- macOS
Get-Content -Path "C:\ProgramData\DataStream\logs\service.log"
cat /var/log/datastream/service.log
cat /Library/Logs/DataStream/service.log