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.6.tar.gz (20.2 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.6.tar.gz.

File metadata

File hashes

Hashes for netskope_log_stream_client_installer-1.0.6.tar.gz
Algorithm Hash digest
SHA256 8592df8c0f62b4a6fa91bb3f3693f9c214b2436debd321d7303b836f90e2d001
MD5 1d157365b8da9256d82e5ab22209595e
BLAKE2b-256 bcfa68ee3d07037606023b05bdc751f9ea1313f9ddfa020d1bef1000454a0065

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for netskope_log_stream_client_installer-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a738f8db54b5c3e4977d39c97cbf042a4c0a1f663131e36c394065a6a7ec43
MD5 a25d0c094657c44920c5d8e21faf0102
BLAKE2b-256 6273f82e3c1243781489e6496b16fa267dcc27803a73dfefb8bd8b4a8253774f

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