OpsSquad
CLI Reference

Configuration

Configuration files, paths, and parameters for the OpsSquad node

The OpsSquad node stores its configuration in YAML files. This guide covers the configuration structure, file locations, and available parameters.

File Locations

Configuration file locations depend on how you installed the node:

System Installation (Root)

FileLocation
Node Binary/usr/local/lib/opssquad/opssquad-connectivity-layer
Configuration/etc/opssquad/node.yaml
Logs/var/log/opssquad/node.log
Service/etc/systemd/system/opssquad-connectivity-layer.service

User Installation (Non-Root)

FileLocation
Node Binary~/.local/lib/opssquad/opssquad-connectivity-layer
Configuration~/.config/opssquad/node.yaml
Logs~/.local/log/opssquad/node.log

Configuration File Structure

The node.yaml file is automatically generated during installation but can be modified manually if needed.

Basic Structure

app:
  node_id: "your-node-id"
  token: "your-token"

logging:
  level: "info"
  file: "/var/log/opssquad/node.log"

Parameters Reference

App Section

ParameterDescriptionRequired
app.node_idThe unique identifier for this node (provided by dashboard)Yes
app.tokenThe authentication token for communicating with the platformYes

Logging Section

ParameterDescriptionDefault
logging.levelLog verbosity levelinfo
logging.fileAbsolute path to the log filePlatform-dependent

Available Log Levels:

LevelDescription
debugVerbose output including internal operations
infoStandard operational messages
warnWarnings and potential issues
errorError messages only

Example Configurations

Minimal Configuration

The minimum required configuration:

app:
  node_id: "node_abc123def456"
  token: "tok_live_xxxxxxxxxxxxx"

Full Configuration

A complete configuration with all options:

app:
  node_id: "node_abc123def456"
  token: "tok_live_xxxxxxxxxxxxx"

logging:
  level: "debug"
  file: "/var/log/opssquad/node.log"

Environment Variables

You can override configuration values using environment variables. This is useful for containerized deployments or CI/CD pipelines.

VariableOverrides
OPSSQUAD_NODE_IDapp.node_id
OPSSQUAD_TOKENapp.token
OPSSQUAD_LOG_LEVELlogging.level
OPSSQUAD_LOG_FILElogging.file

Example:

export OPSSQUAD_NODE_ID="node_abc123def456"
export OPSSQUAD_TOKEN="tok_live_xxxxxxxxxxxxx"
export OPSSQUAD_LOG_LEVEL="debug"

opssquad node start

Modifying Configuration

1. Stop the Node

opssquad node stop

2. Edit the Configuration

Open the configuration file in your editor:

# System installation
sudo nano /etc/opssquad/node.yaml

# User installation
nano ~/.config/opssquad/node.yaml

3. Validate the Configuration

opssquad node validate

4. Restart the Node

opssquad node start

Validating Configuration

Use the validate command to check your configuration:

opssquad node validate

This checks:

  • YAML syntax is valid
  • Required fields (node_id, token) are present
  • File paths are accessible
  • Log directory is writable

Troubleshooting Configuration

Common Issues

Invalid YAML syntax: YAML is sensitive to indentation. Use spaces (not tabs) and ensure consistent indentation.

Check YAML syntax:

# Install yamllint if needed
pip install yamllint

# Validate your config
yamllint /etc/opssquad/node.yaml

Missing Configuration File

If the configuration file is missing, re-run the installation:

opssquad node install --node-id="your-id" --token="your-token"

Permission Denied

Ensure the node has read access to the configuration file:

# System installation
sudo chmod 600 /etc/opssquad/node.yaml
sudo chown root:root /etc/opssquad/node.yaml

# User installation
chmod 600 ~/.config/opssquad/node.yaml

Next Steps

On this page