Add InfluxDB stack to Docker Swarm
Change-Id: If219369574e3af5eeedf3f52967e94b9c9d06f34
Depends-On: I5e815109987f928024f05cdaa99de6f558866174
diff --git a/docker/swarm/stack/influxdb.yml b/docker/swarm/stack/influxdb.yml
new file mode 100644
index 0000000..e753d18
--- /dev/null
+++ b/docker/swarm/stack/influxdb.yml
@@ -0,0 +1,29 @@
+classes:
+- system.influxdb.server.container
+- system.influxdb.server.tmpfs_wal
+- system.telegraf.agent.remote.input.influxdb
+parameters:
+ _param:
+ docker_influxdb_replicas: 1
+ docker_influxdb_data_dir: /srv/volumes/influxdb
+ docker:
+ client:
+ stack:
+ influxdb:
+ service:
+ server:
+ deploy:
+ replicas: ${_param:docker_influxdb_replicas}
+ restart_policy:
+ condition: any
+ environment:
+ INFLUXDB_CONFIG_PATH: /etc/influxdb/influxdb.conf
+ INFLUXDB_DATA_DIR: /var/lib/influxdb/data
+ INFLUXDB_DATA_WAL_DIR: /var/lib/influxdb/wal
+ image: ${_param:docker_influxdb_image}
+ ports:
+ - 15016:8086
+ volumes:
+ - ${influxdb:server:prefix_dir}/etc/influxdb:/etc/influxdb
+ - ${_param:docker_influxdb_data_dir}:/var/lib/influxdb/data
+ - ${influxdb:server:data:wal_dir}:/var/lib/influxdb/wal