Netskope Log Stream Client Installer
Project description
Netskope Log Stream Client Installer
This script manages streaming client Docker container.
This script simplifies installation, scheduling updates, monitoring, and cleanup.
Overview
The installer automates the deployment of a containerized log streaming client that:
- Streams logs from Netskope services
- Provides automated monitoring and health checks
- Schedules regular updates via a watcher container
- Manages container lifecycle operations
Prerequisites
System Requirements
- Operating Systems: Debian, Ubuntu, Raspbian, RHEL, CentOS, Rocky Linux, AlmaLinux, SLES
- Architecture: x86_64, ARM64, AMD64, 64-bit
- Docker: Must be installed and running
- Python: Python 3.x with standard libraries
Docker Images
- Main application:
nsstreamingclient/ns-streaming-client-container - Watcher service:
nsstreamingclient/ns-watcher
Usage
Command Line Options
python3 installer.py [OPTION]
Available Options
| Option | Description |
|---|---|
--help |
Display help message and exit |
install |
Interactive installation with user prompts |
--silent |
Silent installation with default settings |
reinstall |
Remove and recreate existing container |
uninstall |
Complete removal of containers and files |
Interactive Mode
Run without arguments to get an interactive menu:
python3 installer.py
You'll be prompted to choose:
- install - Set up and configure the container
- reinstall - Remove and recreate the container
- uninstall - Remove the container and cleanup
Installation Examples
Interactive Installation
python3 installer.py install
- Prompts for installation directory
- Configures update schedule
- Sets up monitoring
Silent Installation
python3 installer.py --silent
- Uses default directory:
~/ns - Default update schedule: Thursday at 11.00 pm
- No user interaction required
Reinstallation
python3 installer.py reinstall
- Uses stored configuration
- Preserves existing settings
- Updates container to latest version
Uninstallation
python3 installer.py uninstall
- Removes all containers and images
- Cleans up installation directories
- Removes configuration files
Configuration
Installation Directory Structure
~/ns/ # Default installation directory
├── container_files/
│ └── container_env.env # Environment configuration
└── container_logs/ # Container log files
Environment Configuration
The installer creates a container_env.env file containing:
- Container key
- Installation directory path
- Connection key
Update Schedule
The watcher container monitors and updates the main container based on your configured schedule:
- Default: Every Thursday at 11:00 pm
- Customizable: Any day of the week, any time (24-hour format)
Features
System Validation
- Operating system compatibility check
- Hardware architecture verification
- Docker installation and daemon status
- Comprehensive pre-flight validation
Container Management
- Automatic image pulling and updating
- Container lifecycle management
- Restart policies and health monitoring
- Log rotation and management
Monitoring & Updates
- Automated ns-watcher container for monitoring
- Container health checks and restart capabilities
- Comprehensive logging and error handling
Security
- Container key authentication
- Secure environment variable handling
- Container isolation and resource limits
Logging
The installer creates detailed logs in installer.log with:
- Installation progress and status
- Error messages and troubleshooting information
- Container lifecycle events
- System validation results
Log Levels
- INFO: Normal operation messages
- WARNING: Non-critical issues
- ERROR: Critical failures requiring attention
Troubleshooting
Common Issues
Docker Not Running
ERROR: Docker daemon is not running.
Solution: Start Docker service
sudo systemctl start docker
sudo systemctl enable docker
Unsupported Operating System
ERROR: Operating system is not supported.
Solution: Verify you're running on a supported OS or contact support
Container Already Exists
ERROR: A container with the name 'ns-streaming-client-container' already exists.
Solution: Run uninstall first, then install
python3 installer.py uninstall
python3 installer.py install
Permission Issues
ERROR: Permission denied
Solution: Ensure user has Docker permissions
sudo usermod -aG docker $USER
# Log out and back in
Log Analysis
Check installer.log for detailed error information:
tail -f installer.log
Container Details
Main Container (ns-streaming-client-container)
- Image:
nsstreamingclient/ns-streaming-client-container - Purpose: Log streaming and processing
- Restart Policy: Always restart
- Volumes:
- Configuration:
/opt/ns - Logs:
/var/log
- Configuration:
Watcher Container (ns-watcher)
- Image:
nsstreamingclient/watcher - Purpose: Monitoring and automated updates
- Network: Host network access
- Volumes:
- Installation directory:
/mnt - Docker socket:
/var/run/docker.sock
- Installation directory:
Log Management
- Driver: JSON file logging
- Rotation: 10MB max size, 10 files max
- Compression: Enabled for space efficiency
Security Considerations
- The installer uses a container key for authentication
- Containers run with minimal required privileges
- Log files are rotated and compressed to prevent disk space issues
- Docker socket access is required for the ns-watcher container
Support
Getting Help
python3 installer.py --help
Log Files
- Installation logs:
installer.log - Container logs:
~/ns/container_logs/
Environment Information
Check your environment configuration:
cat ~/ns/container_files/container_env.env
Development
Code Structure
- System validation functions
- Docker management utilities
- Container lifecycle management
- Environment configuration handling
- Logging and error handling
Dependencies
- Python 3.x standard library modules
- Docker CLI tools
- System utilities (platform detection)
License
This installer is provided as-is for managing Netskope Log Stream Client deployments.
Note: This installer requires Docker to be installed and running on your system. Ensure you have appropriate permissions to manage Docker containers before running the installation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netskope_log_stream_client_installer-1.0.4.tar.gz.
File metadata
- Download URL: netskope_log_stream_client_installer-1.0.4.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a2430ad901402b429ed9a4f65b1ab6dc62e153de0b233ef74abf990c0736c19
|
|
| MD5 |
33e848b38ff488cf08a8e3d242f24213
|
|
| BLAKE2b-256 |
388175e1c889feb14b32c8b6ee4a20bcce2f9ee2c21d6b2063d3032feeb6a0df
|
File details
Details for the file netskope_log_stream_client_installer-1.0.4-py3-none-any.whl.
File metadata
- Download URL: netskope_log_stream_client_installer-1.0.4-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9fe7a8f48f58adf745972ed0749c12b0ea7220db96f3e67e03891252bc7835e
|
|
| MD5 |
f116cca03ca4165cf39212ca039da21e
|
|
| BLAKE2b-256 |
90e2181879177977764af3474b2f730eec20f47c1ac7e9a9aaf604af20e65157
|