mirror of
https://github.com/ptarmiganlabs/butler-sos.git
synced 2025-12-19 17:58:18 -05:00
Add Docker Compose files for InfluxDB v1, v2, and v3
Co-authored-by: mountaindude <1029262+mountaindude@users.noreply.github.com>
This commit is contained in:
committed by
Göran Sander
parent
897f8c6490
commit
cedb89a1fd
105
docs/docker-compose/README.md
Normal file
105
docs/docker-compose/README.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Docker Compose Files for Butler SOS with InfluxDB
|
||||
|
||||
This directory contains Docker Compose configurations for running Butler SOS with different versions of InfluxDB.
|
||||
|
||||
## Available Configurations
|
||||
|
||||
### InfluxDB v1.x
|
||||
- **File**: `docker-compose_fullstack_influxdb_v1.yml`
|
||||
- **InfluxDB Image**: `influxdb:1.8-alpine`
|
||||
- **Features**: Traditional InfluxDB with SQL-like query language
|
||||
- **Configuration**: Set `Butler-SOS.influxdbConfig.version: 1` in your config file
|
||||
- **Environment**: Set `NODE_ENV=production_influxdb_v1`
|
||||
|
||||
### InfluxDB v2.x
|
||||
- **File**: `docker-compose_fullstack_influxdb_v2.yml`
|
||||
- **InfluxDB Image**: `influxdb:2.7-alpine`
|
||||
- **Features**: Modern InfluxDB with Flux query language, unified time series platform
|
||||
- **Configuration**: Set `Butler-SOS.influxdbConfig.version: 2` in your config file
|
||||
- **Environment**: Set `NODE_ENV=production_influxdb_v2`
|
||||
- **Default Credentials**:
|
||||
- Username: `admin`
|
||||
- Password: `butlersos123`
|
||||
- Organization: `butler-sos`
|
||||
- Bucket: `butler-sos`
|
||||
- Token: `butlersos-token`
|
||||
|
||||
### InfluxDB v3.x
|
||||
- **File**: `docker-compose_fullstack_influxdb_v3.yml`
|
||||
- **InfluxDB Image**: `influxdb:latest`
|
||||
- **Features**: Latest InfluxDB architecture with enhanced performance and cloud-native design
|
||||
- **Configuration**: Set `Butler-SOS.influxdbConfig.version: 3` in your config file
|
||||
- **Environment**: Set `NODE_ENV=production_influxdb_v3`
|
||||
- **Default Credentials**: Same as v2.x but with database concept support
|
||||
|
||||
### Legacy/Default
|
||||
- **File**: `docker-compose_fullstack_influxdb.yml`
|
||||
- **Purpose**: Backward compatibility (defaults to v1.x)
|
||||
- **Recommendation**: Use version-specific files for new deployments
|
||||
|
||||
## Usage
|
||||
|
||||
1. Choose the appropriate docker-compose file for your InfluxDB version
|
||||
2. Create the corresponding configuration file (e.g., `production_influxdb_v2.yaml`)
|
||||
3. Configure Butler SOS with the correct InfluxDB version and connection details
|
||||
4. Run with: `docker-compose -f docker-compose_fullstack_influxdb_v2.yml up -d`
|
||||
|
||||
## Configuration Requirements
|
||||
|
||||
### For InfluxDB v1.x
|
||||
```yaml
|
||||
Butler-SOS:
|
||||
influxdbConfig:
|
||||
enable: true
|
||||
version: 1
|
||||
host: influxdb-v1
|
||||
port: 8086
|
||||
v1Config:
|
||||
auth:
|
||||
enable: false
|
||||
dbName: SenseOps
|
||||
retentionPolicy:
|
||||
name: 10d
|
||||
duration: 10d
|
||||
```
|
||||
|
||||
### For InfluxDB v2.x
|
||||
```yaml
|
||||
Butler-SOS:
|
||||
influxdbConfig:
|
||||
enable: true
|
||||
version: 2
|
||||
host: influxdb-v2
|
||||
port: 8086
|
||||
v2Config:
|
||||
org: butler-sos
|
||||
bucket: butler-sos
|
||||
token: butlersos-token
|
||||
description: Butler SOS metrics
|
||||
retentionDuration: 10d
|
||||
```
|
||||
|
||||
### For InfluxDB v3.x
|
||||
```yaml
|
||||
Butler-SOS:
|
||||
influxdbConfig:
|
||||
enable: true
|
||||
version: 3
|
||||
host: influxdb-v3
|
||||
port: 8086
|
||||
v3Config:
|
||||
org: butler-sos
|
||||
bucket: butler-sos
|
||||
database: butler-sos
|
||||
token: butlersos-token
|
||||
description: Butler SOS metrics
|
||||
retentionDuration: 10d
|
||||
```
|
||||
|
||||
## Migration Notes
|
||||
|
||||
- **v1 to v2**: Requires data migration using InfluxDB tools
|
||||
- **v2 to v3**: Uses similar client libraries but different internal architecture
|
||||
- **v1 to v3**: Significant migration required, consider using InfluxDB migration tools
|
||||
|
||||
For detailed configuration options, refer to the main Butler SOS documentation.
|
||||
@@ -1,4 +1,9 @@
|
||||
# docker-compose_fullstack_influxdb.yml
|
||||
# Default InfluxDB configuration (v1.x) for backward compatibility
|
||||
# For version-specific configurations, use:
|
||||
# - docker-compose_fullstack_influxdb_v1.yml for InfluxDB v1.x
|
||||
# - docker-compose_fullstack_influxdb_v2.yml for InfluxDB v2.x
|
||||
# - docker-compose_fullstack_influxdb_v3.yml for InfluxDB v3.x
|
||||
version: "3.3"
|
||||
services:
|
||||
butler-sos:
|
||||
|
||||
52
docs/docker-compose/docker-compose_fullstack_influxdb_v1.yml
Normal file
52
docs/docker-compose/docker-compose_fullstack_influxdb_v1.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
# docker-compose_fullstack_influxdb_v1.yml
|
||||
version: "3.3"
|
||||
services:
|
||||
butler-sos:
|
||||
image: ptarmiganlabs/butler-sos:latest
|
||||
container_name: butler-sos
|
||||
restart: always
|
||||
volumes:
|
||||
# Make config file and log files accessible outside of container
|
||||
- "./config:/nodeapp/config"
|
||||
- "./log:/nodeapp/log"
|
||||
environment:
|
||||
- "NODE_ENV=production_influxdb_v1" # Means that Butler SOS will read config data from production_influxdb_v1.yaml
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-file: "5"
|
||||
max-size: "5m"
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
influxdb:
|
||||
image: influxdb:1.8-alpine
|
||||
container_name: influxdb-v1
|
||||
restart: always
|
||||
volumes:
|
||||
- ./influxdb/data:/var/lib/influxdb # Mount for influxdb data directory
|
||||
- ./influxdb/config/:/etc/influxdb/ # Mount for influxdb configuration
|
||||
ports:
|
||||
# The API for InfluxDB is served on port 8086
|
||||
- "8086:8086"
|
||||
- "8082:8082"
|
||||
environment:
|
||||
# Disable usage reporting
|
||||
- "INFLUXDB_REPORTING_DISABLED=true"
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./grafana/data:/var/lib/grafana
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
networks:
|
||||
senseops:
|
||||
driver: bridge
|
||||
57
docs/docker-compose/docker-compose_fullstack_influxdb_v2.yml
Normal file
57
docs/docker-compose/docker-compose_fullstack_influxdb_v2.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
# docker-compose_fullstack_influxdb_v2.yml
|
||||
version: "3.3"
|
||||
services:
|
||||
butler-sos:
|
||||
image: ptarmiganlabs/butler-sos:latest
|
||||
container_name: butler-sos
|
||||
restart: always
|
||||
volumes:
|
||||
# Make config file and log files accessible outside of container
|
||||
- "./config:/nodeapp/config"
|
||||
- "./log:/nodeapp/log"
|
||||
environment:
|
||||
- "NODE_ENV=production_influxdb_v2" # Means that Butler SOS will read config data from production_influxdb_v2.yaml
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-file: "5"
|
||||
max-size: "5m"
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
influxdb:
|
||||
image: influxdb:2.7-alpine
|
||||
container_name: influxdb-v2
|
||||
restart: always
|
||||
volumes:
|
||||
- ./influxdb/data:/var/lib/influxdb2 # Mount for influxdb data directory
|
||||
- ./influxdb/config/:/etc/influxdb2/ # Mount for influxdb configuration
|
||||
ports:
|
||||
# The API for InfluxDB is served on port 8086
|
||||
- "8086:8086"
|
||||
environment:
|
||||
# Initial setup parameters
|
||||
- "DOCKER_INFLUXDB_INIT_MODE=setup"
|
||||
- "DOCKER_INFLUXDB_INIT_USERNAME=admin"
|
||||
- "DOCKER_INFLUXDB_INIT_PASSWORD=butlersos123"
|
||||
- "DOCKER_INFLUXDB_INIT_ORG=butler-sos"
|
||||
- "DOCKER_INFLUXDB_INIT_BUCKET=butler-sos"
|
||||
- "DOCKER_INFLUXDB_INIT_RETENTION=10d"
|
||||
- "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=butlersos-token"
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./grafana/data:/var/lib/grafana
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
networks:
|
||||
senseops:
|
||||
driver: bridge
|
||||
61
docs/docker-compose/docker-compose_fullstack_influxdb_v3.yml
Normal file
61
docs/docker-compose/docker-compose_fullstack_influxdb_v3.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
# docker-compose_fullstack_influxdb_v3.yml
|
||||
# InfluxDB v3.x (Core) - using the InfluxDB 3.x Community Edition
|
||||
version: "3.3"
|
||||
services:
|
||||
butler-sos:
|
||||
image: ptarmiganlabs/butler-sos:latest
|
||||
container_name: butler-sos
|
||||
restart: always
|
||||
volumes:
|
||||
# Make config file and log files accessible outside of container
|
||||
- "./config:/nodeapp/config"
|
||||
- "./log:/nodeapp/log"
|
||||
environment:
|
||||
- "NODE_ENV=production_influxdb_v3" # Means that Butler SOS will read config data from production_influxdb_v3.yaml
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-file: "5"
|
||||
max-size: "5m"
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
influxdb:
|
||||
# Note: InfluxDB v3 Core is available as influxdb3 image
|
||||
# For production use, consider InfluxDB Cloud or Enterprise
|
||||
image: influxdb:latest
|
||||
container_name: influxdb-v3
|
||||
restart: always
|
||||
volumes:
|
||||
- ./influxdb/data:/var/lib/influxdb3 # Mount for influxdb data directory
|
||||
- ./influxdb/config/:/etc/influxdb3/ # Mount for influxdb configuration
|
||||
ports:
|
||||
# The API for InfluxDB is served on port 8086
|
||||
- "8086:8086"
|
||||
environment:
|
||||
# InfluxDB v3 setup - uses similar setup to v2 but different internal architecture
|
||||
- "DOCKER_INFLUXDB_INIT_MODE=setup"
|
||||
- "DOCKER_INFLUXDB_INIT_USERNAME=admin"
|
||||
- "DOCKER_INFLUXDB_INIT_PASSWORD=butlersos123"
|
||||
- "DOCKER_INFLUXDB_INIT_ORG=butler-sos"
|
||||
- "DOCKER_INFLUXDB_INIT_BUCKET=butler-sos"
|
||||
- "DOCKER_INFLUXDB_INIT_DATABASE=butler-sos" # v3 uses database concept
|
||||
- "DOCKER_INFLUXDB_INIT_RETENTION=10d"
|
||||
- "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=butlersos-token"
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./grafana/data:/var/lib/grafana
|
||||
networks:
|
||||
- senseops
|
||||
|
||||
networks:
|
||||
senseops:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user