open-vault/vendor/github.com
Sean Chittenden 6b2c83564e Teach Vault how to register with Consul
Vault will now register itself with Consul.  The active node can be found using `active.vault.service.consul`.  All standby vaults are available via `standby.vault.service.consul`.  All unsealed vaults are considered healthy and available via `vault.service.consul`.  Change in status and registration is event driven and should happen at the speed of a write to Consul (~network RTT + ~1x fsync(2)).

Healthy/active:

```
curl -X GET 'http://127.0.0.1:8500/v1/health/service/vault?pretty' && echo;
[
    {
        "Node": {
            "Node": "vm1",
            "Address": "127.0.0.1",
            "TaggedAddresses": {
                "wan": "127.0.0.1"
            },
            "CreateIndex": 3,
            "ModifyIndex": 20
        },
        "Service": {
            "ID": "vault:127.0.0.1:8200",
            "Service": "vault",
            "Tags": [
                "active"
            ],
            "Address": "127.0.0.1",
            "Port": 8200,
            "EnableTagOverride": false,
            "CreateIndex": 17,
            "ModifyIndex": 20
        },
        "Checks": [
            {
                "Node": "vm1",
                "CheckID": "serfHealth",
                "Name": "Serf Health Status",
                "Status": "passing",
                "Notes": "",
                "Output": "Agent alive and reachable",
                "ServiceID": "",
                "ServiceName": "",
                "CreateIndex": 3,
                "ModifyIndex": 3
            },
            {
                "Node": "vm1",
                "CheckID": "vault-sealed-check",
                "Name": "Vault Sealed Status",
                "Status": "passing",
                "Notes": "Vault service is healthy when Vault is in an unsealed status and can become an active Vault server",
                "Output": "",
                "ServiceID": "vault:127.0.0.1:8200",
                "ServiceName": "vault",
                "CreateIndex": 19,
                "ModifyIndex": 19
            }
        ]
    }
]
```

Healthy/standby:

```
[snip]
        "Service": {
            "ID": "vault:127.0.0.2:8200",
            "Service": "vault",
            "Tags": [
                "standby"
            ],
            "Address": "127.0.0.2",
            "Port": 8200,
            "EnableTagOverride": false,
            "CreateIndex": 17,
            "ModifyIndex": 20
        },
        "Checks": [
            {
                "Node": "vm2",
                "CheckID": "serfHealth",
                "Name": "Serf Health Status",
                "Status": "passing",
                "Notes": "",
                "Output": "Agent alive and reachable",
                "ServiceID": "",
                "ServiceName": "",
                "CreateIndex": 3,
                "ModifyIndex": 3
            },
            {
                "Node": "vm2",
                "CheckID": "vault-sealed-check",
                "Name": "Vault Sealed Status",
                "Status": "passing",
                "Notes": "Vault service is healthy when Vault is in an unsealed status and can become an active Vault server",
                "Output": "",
                "ServiceID": "vault:127.0.0.2:8200",
                "ServiceName": "vault",
                "CreateIndex": 19,
                "ModifyIndex": 19
            }
        ]
    }
]
```

Sealed:

```
        "Checks": [
            {
                "Node": "vm2",
                "CheckID": "serfHealth",
                "Name": "Serf Health Status",
                "Status": "passing",
                "Notes": "",
                "Output": "Agent alive and reachable",
                "ServiceID": "",
                "ServiceName": "",
                "CreateIndex": 3,
                "ModifyIndex": 3
            },
            {
                "Node": "vm2",
                "CheckID": "vault-sealed-check",
                "Name": "Vault Sealed Status",
                "Status": "critical",
                "Notes": "Vault service is healthy when Vault is in an unsealed status and can become an active Vault server",
                "Output": "Vault Sealed",
                "ServiceID": "vault:127.0.0.2:8200",
                "ServiceName": "vault",
                "CreateIndex": 19,
                "ModifyIndex": 38
            }
        ]
```
2016-04-25 18:01:13 -07:00
..
armon Update godeps 2016-03-10 22:50:50 -05:00
asaskevich/govalidator Update vendoring 2016-04-26 00:18:04 +00:00
aws/aws-sdk-go Update vendoring 2016-04-26 00:18:04 +00:00
Azure/azure-sdk-for-go Update vendoring 2016-04-26 00:18:04 +00:00
bgentry/speakeasy Update godeps 2016-03-10 22:50:50 -05:00
cloudfoundry-incubator/candiedyaml Update vendoring 2016-04-26 00:18:04 +00:00
coreos/etcd Update vendoring 2016-04-26 00:18:04 +00:00
denisenkom/go-mssqldb Update vendoring 2016-04-26 00:18:04 +00:00
duosecurity/duo_api_golang Update vendoring 2016-04-26 00:18:04 +00:00
fatih/structs Update vendoring 2016-04-26 00:18:04 +00:00
ghodss/yaml Update godeps 2016-03-10 22:50:50 -05:00
go-ini/ini Update vendoring 2016-04-26 00:18:04 +00:00
go-ldap/ldap Update vendoring 2016-04-26 00:18:04 +00:00
go-sql-driver/mysql Update vendoring 2016-04-26 00:18:04 +00:00
gocql/gocql Update vendoring 2016-04-26 00:18:04 +00:00
golang/snappy Update vendoring 2016-04-26 00:18:04 +00:00
google Update vendoring 2016-04-26 00:18:04 +00:00
hailocab/go-hostpool Migrate to built-in Go vendoring. 2016-02-18 15:06:02 -05:00
hashicorp Teach Vault how to register with Consul 2016-04-25 18:01:13 -07:00
jmespath/go-jmespath Update godeps 2016-03-10 22:50:50 -05:00
lib/pq Update vendoring 2016-04-26 00:18:04 +00:00
mattn/go-isatty Migrate to built-in Go vendoring. 2016-02-18 15:06:02 -05:00
mitchellh Update vendoring 2016-04-26 00:18:04 +00:00
ryanuber/columnize Migrate to built-in Go vendoring. 2016-02-18 15:06:02 -05:00
samuel/go-zookeeper Migrate to built-in Go vendoring. 2016-02-18 15:06:02 -05:00
ugorji/go Update vendoring 2016-04-26 00:18:04 +00:00