openstack-ansible-ops/cluster_metrics/files/deploy_go.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

12 lines
346 B
Bash
Executable File

#!/bin/bash
pushd /opt
wget -P /opt/ https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz
tar -xzf /opt/go1.7.3.linux-amd64.tar.gz -C /opt/
popd
pushd /usr/local/bin
find /opt/go/bin/ -type f -exec ln -sf {} \;
popd
if ! grep -qw 'GOROOT="/opt/go"' /etc/environment; then
echo 'GOROOT="/opt/go"' | tee -a /etc/environment
fi