Add system classes for influxdb-relay

Change-Id: Ie2bf7dc704a2307a470419782674272a130cf898
Depends-On: I1f299ee1730d32aefc127935131219851f3d9fe5
Depends-On: I06b691b599660c1663306c6316a00de57885c848
diff --git a/.releasenotes/notes/add-influxdb-relay-dc8bd245bebec442.yaml b/.releasenotes/notes/add-influxdb-relay-dc8bd245bebec442.yaml
new file mode 100644
index 0000000..2ccc60c
--- /dev/null
+++ b/.releasenotes/notes/add-influxdb-relay-dc8bd245bebec442.yaml
@@ -0,0 +1,15 @@
+---
+features:
+  - |
+    Added system metadata classes to deploy the InfluxDB relay service.
+
+    The InfluxDB relay service replicates the InfluxDB data to a cluster of
+    InfluxDB servers for HA.
+
+    For more details about the service, see the `GitHub project
+    <https://github.com/influxdata/influxdb-relay>`_ page.
+
+    To enable it, add the ``system.influxdb.relay.cluster`` class to the
+    Telemetry nodes and change
+    ``system.haproxy.proxy.listen.stacklight.influxdb`` to
+    ``system.haproxy.proxy.listen.stacklight.influxdb_relay``.
diff --git a/haproxy/proxy/listen/stacklight/influxdb_relay.yml b/haproxy/proxy/listen/stacklight/influxdb_relay.yml
new file mode 100644
index 0000000..bb3dd81
--- /dev/null
+++ b/haproxy/proxy/listen/stacklight/influxdb_relay.yml
@@ -0,0 +1,53 @@
+parameters:
+  _param:
+    cluster_influxdb_port: 8086
+  haproxy:
+    proxy:
+      listen:
+        influxdb_relay:
+          mode: http
+          format: end
+          binds:
+            - address: ${_param:cluster_vip_address}
+              port: ${_param:cluster_influxdb_port}
+          acls:
+            - name: influxdb
+              conditions:
+                - type:  path_beg
+                  condition: /query
+                  # InfluxDB backends for read requests
+              options:
+                - "httpchk GET /ping"
+                - httplog
+                - dontlog-normal
+              servers:
+                - name: ${_param:cluster_node01_hostname}
+                  host: ${_param:cluster_node01_address}
+                  port: 8086
+                  params: 'check'
+                - name: ${_param:cluster_node02_hostname}
+                  host: ${_param:cluster_node02_address}
+                  port: 8086
+                  params: 'check'
+                - name: ${_param:cluster_node03_hostname}
+                  host: ${_param:cluster_node03_address}
+                  port: 8086
+                  params: 'check'
+          options:
+            - "httpchk GET /ping"
+            - httplog
+            - dontlog-normal
+          # InfluxDB relay backends for write requests
+          servers:
+            - name: ${_param:cluster_node01_hostname}
+              host: ${_param:cluster_node01_address}
+              port: 9096
+              params: 'check'
+            - name: ${_param:cluster_node02_hostname}
+              host: ${_param:cluster_node02_address}
+              port: 9096
+              params: 'check'
+            - name: ${_param:cluster_node03_hostname}
+              host: ${_param:cluster_node03_address}
+              port: 9096
+              params: 'check'
diff --git a/influxdb/relay/cluster.yml b/influxdb/relay/cluster.yml
new file mode 100644
index 0000000..03639e1
--- /dev/null
+++ b/influxdb/relay/cluster.yml
@@ -0,0 +1,2 @@
+classes:
+- service.influxdb.relay.cluster