Skip to content

Latest commit

 

History

History
284 lines (218 loc) · 6.77 KB

File metadata and controls

284 lines (218 loc) · 6.77 KB

Deployment

PowerScale Data Insights can be deployed as standalone binaries, Docker containers, or as a full evaluation stack via Docker Compose.

Binary Deployment

Install

Download pre-built binaries from the GitHub Releases page, or build from source:

make build
sudo cp bin/gostats bin/goppstats bin/dashgen /usr/local/bin/

Configuration

sudo mkdir -p /etc/powerscale-data-insights
sudo cp configs/gostats.example.toml /etc/powerscale-data-insights/gostats.toml
sudo cp configs/goppstats.example.toml /etc/powerscale-data-insights/goppstats.toml

Edit both files with your cluster and InfluxDB details. See Configuration Reference.

systemd Service Files

Create /etc/systemd/system/pdi-gostats.service:

[Unit]
Description=PowerScale Data Insights - Statistics Collector
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/gostats -config-file /etc/powerscale-data-insights/gostats.toml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
User=pdi
Group=pdi

# Hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log/powerscale-data-insights

[Install]
WantedBy=multi-user.target

Create /etc/systemd/system/pdi-goppstats.service:

[Unit]
Description=PowerScale Data Insights - Partitioned Performance Collector
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/goppstats -config-file /etc/powerscale-data-insights/goppstats.toml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
User=pdi
Group=pdi

# Hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log/powerscale-data-insights

[Install]
WantedBy=multi-user.target

Enable and start:

# Create a dedicated service user
sudo useradd -r -s /usr/sbin/nologin pdi
sudo mkdir -p /var/log/powerscale-data-insights
sudo chown pdi:pdi /var/log/powerscale-data-insights

# If using $env: for passwords, add them to an environment file
sudo tee /etc/powerscale-data-insights/env > /dev/null <<'EOF'
CLUSTER_PASS=your-password-here
EOF
sudo chmod 600 /etc/powerscale-data-insights/env

# Add to each service file under [Service]:
#   EnvironmentFile=/etc/powerscale-data-insights/env

sudo systemctl daemon-reload
sudo systemctl enable --now pdi-gostats pdi-goppstats

Manage:

sudo systemctl status pdi-gostats
sudo systemctl restart pdi-gostats
sudo systemctl reload pdi-gostats     # sends SIGHUP, reloads config
sudo journalctl -u pdi-gostats -f     # follow logs

Docker (Standalone Containers)

Build

From the project root:

docker build -f docker/Dockerfile.gostats -t pdi-gostats .
docker build -f docker/Dockerfile.goppstats -t pdi-goppstats .

Images are ~23MB (Alpine-based, statically linked binary).

Run

Mount your config file into the container:

docker run -d --name gostats \
  --restart unless-stopped \
  -v /path/to/gostats.toml:/etc/gostats/idic.toml:ro \
  pdi-gostats

docker run -d --name goppstats \
  --restart unless-stopped \
  -v /path/to/goppstats.toml:/etc/goppstats/goppstats.toml:ro \
  pdi-goppstats

In your config file, set log_to_stdout = true so logs are visible via docker logs. Set the InfluxDB host to whatever is reachable from the container (e.g., host IP or Docker network alias).

Pre-built Images

Pre-built images are published to GitHub Container Registry on each release:

docker pull ghcr.io/isilon/pdi-gostats:latest
docker pull ghcr.io/isilon/pdi-goppstats:latest

Docker Compose (Evaluation Stack)

The Docker Compose stack brings up InfluxDB, Grafana, and both collectors in one command. Dashboards and the InfluxDB datasource are provisioned automatically.

Setup

cd docker/
cp gostats.example.toml gostats.toml
cp goppstats.example.toml goppstats.toml

Edit both files — set your cluster hostname, username, and password in the [[cluster]] section. The InfluxDB host is already set to influxdb (the Compose service name) and logging is set to stdout.

Start

docker compose up -d

Access

Dashboards appear under the PowerScale folder in Grafana.

Stop

docker compose down       # stop containers, keep data
docker compose down -v    # stop containers and delete all data

Monitoring Multiple Clusters

Add additional [[cluster]] sections to gostats.toml and goppstats.toml:

[[cluster]]
hostname = "cluster-a.example.com"
username = "statsuser"
password = "password-a"
verify-ssl = false

[[cluster]]
hostname = "cluster-b.example.com"
username = "statsuser"
password = "password-b"
verify-ssl = false

Restart the collectors: docker compose restart gostats goppstats

Kubernetes

Container images can be deployed to Kubernetes using standard patterns. A Helm chart is on the backlog; in the meantime, here is guidance for manual deployment.

Key Considerations

  • Mount config files via ConfigMaps or Secrets (use Secrets for configs containing passwords, or use $env: substitution with Secret-sourced environment variables).
  • Set log_to_stdout = true and logfile_format = "json" for structured log aggregation.
  • Set the InfluxDB host to the in-cluster service name.
  • Both collectors are stateless — they can be restarted freely.
  • Use Deployment with replicas: 1 (running multiple replicas of the same collector against the same cluster would produce duplicate data).

Example Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pdi-gostats
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pdi-gostats
  template:
    metadata:
      labels:
        app: pdi-gostats
    spec:
      containers:
        - name: gostats
          image: ghcr.io/isilon/pdi-gostats:latest
          args: ["-config-file", "/etc/gostats/gostats.toml"]
          env:
            - name: CLUSTER_PASS
              valueFrom:
                secretKeyRef:
                  name: pdi-credentials
                  key: cluster-password
          volumeMounts:
            - name: config
              mountPath: /etc/gostats
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: pdi-gostats-config

Cross-Platform Releases

GoReleaser builds binaries for:

OS Architectures
Linux amd64, arm64
macOS amd64, arm64
Windows amd64, arm64

Download from the GitHub Releases page. Each release includes checksums for verification.