openstack-ansible-ops/cluster_metrics/files/deploy_influxdbrelay.sh
Nish Patwa 17450f35f3 Adding influx relay to make the existing monitoring stack highly available
Added Influxdb relay to make the existing monitoring stack highly
available. Relay replicates the data to multiple database instances.
Also added configutation in HAProxy that load balances the read queries
to influxdb instances and write queries to influxdb relays

        ┌─────────────────┐
        │writes & queries │
        └─────────────────┘
                 │
                 ▼
         ┌───────────────┐
         │               │
┌────────│ Load Balancer │─────────┐
│        │               │         │
│        └──────┬─┬──────┘         │
│               │ │                │
│               │ │                │
│        ┌──────┘ └────────┐       │
│        │ ┌─────────────┐ │       │┌──────┐
│        │ │/write or UDP│ │       ││/query│
│        ▼ └─────────────┘ ▼       │└──────┘
│  ┌──────────┐      ┌──────────┐  │
│  │ InfluxDB │      │ InfluxDB │  │
│  │ Relay    │      │ Relay    │  │
│  └──┬────┬──┘      └────┬──┬──┘  │
│     │    |              |  │     │
│     |  ┌─┼──────────────┘  |     │
│     │  │ └──────────────┐  │     │
│     ▼  ▼                ▼  ▼     │
│  ┌──────────┐      ┌──────────┐  │
│  │          │      │          │  │
└─▶│ InfluxDB │      │ InfluxDB │◀─┘
   │          │      │          │
   └──────────┘      └──────────┘

This patch is dependent on this patch:
https://review.openstack.org/#/c/392328/

Change-Id: I05bdaa0e2fb251b48df1d26d09ad63942872293a
2016-11-10 15:54:56 +00:00

9 lines
175 B
Bash
Executable File

#!/bin/bash
rm -rf /opt/influxdb-relay;
mkdir /opt/influxdb-relay;
export GOPATH=/opt/influxdb-relay/;
export GOROOT=/opt/go;
go get -u github.com/influxdata/influxdb-relay