Skip to main content

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:

  1. install - Set up and configure the container
  2. reinstall - Remove and recreate the container
  3. 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

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netskope_log_stream_client_installer-1.0.9.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file netskope_log_stream_client_installer-1.0.9.tar.gz.

File metadata

File hashes

Hashes for netskope_log_stream_client_installer-1.0.9.tar.gz
Algorithm Hash digest
SHA256 6a4d72675a7c8870bffe4a8836671d7aeafc93edd0fa54a4afa31f23f7e20d54
MD5 27dbc9d86c271ae32caf5655770e14d1
BLAKE2b-256 03b073ac66074f68381942d94d910eee28623c2c4e9c00ee28b481e217773daf

See more details on using hashes here.

File details

Details for the file netskope_log_stream_client_installer-1.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for netskope_log_stream_client_installer-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 eb151d5a6a279cfd814b8ee009afd6c4afce0ed40ddc6c9d908dc86624b8ce97
MD5 e4a106da40dfd9569c4195ddeb2ccf03
BLAKE2b-256 d86749e1b2a5cac72cae77e7d0b540131faf98ffadff488a98f9f241f14d9ffe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page