diff --git a/website/source/configuration.html.erb b/website/source/configuration.html.erb index 7f81157530..c243843cf6 100644 --- a/website/source/configuration.html.erb +++ b/website/source/configuration.html.erb @@ -11,13 +11,13 @@ description: |-
Feature rich key/value store to easily configure services
@@ -92,17 +92,27 @@ description: |-$ curl \
- --request POST \
+
+ $ curl http://localhost:8500/v1/txn \
+ --request PUT \
--data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
-
"Tags"
: ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ '[
+ {
+ "KV": {
+ "Verb": "set",
+ "Key": "lock",
+ "Value": "MQ=="
+ }
+ },
+ {
+ "KV": {
+ "Verb": "cas",
+ "Index": 10,
+ "Key": "configuration",
+ "Value": "c29tZS1jb25maWc="
+ }
+ }
+ ]'
$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ $ curl http://localhost:8500/v1/kv/web/config/rate_limit?wait=1m&index=229
+[
+ {
+ "LockIndex": 0,
+ "Key": "web/config/rate_limit",
+ "Flags": 0,
+ "Value": "NjAw",
+ "CreateIndex": 229,
+ "ModifyIndex": 234
+ }
+]
$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ $ consul watch \
+ -type=key \
+ -key=web/config/rate_limit \
+ /usr/local/bin/record-rate-limit.sh
+
Service registry, integrated health checks, and DNS and HTTP interfaces enable any service to discover and be discovered by other services
@@ -90,17 +90,21 @@ description: |-$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+
+$ dig web-frontend.service.consul.
ANY
+
+; <<>> DiG 9.8.3-P1 <<>> web-frontend.service.consul. ANY
+;; global options: +cmd
+;; Got answer:
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29981
+;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
+
+;; QUESTION SECTION:
+;web-frontend.service.consul. IN ANY
+
+;; ANSWER SECTION:
+web-frontend.service.consul. 0 IN A 10.0.3.83
+web-frontend.service.consul. 0 IN A 10.0.1.109
$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ $ curl http://localhost:8500/v1/health/service/web?index=11&wait=30s
+{
+ ...
+ "Node": "10-0-1-109",
+ "CheckID": "service:web",
+ "Name": "Service 'web' check",
+ "Status": "critical"
,
+ "ServiceID": "web",
+ "ServiceName": "web",
+ "CreateIndex": 10,
+ "ModifyIndex": 20
+ ...
+}
+
$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ $ curl http://localhost:8500/v1/catalog/datacenters
+["dc1", "dc2"]
+$ curl http://localhost:8500/v1/catalog/nodes?dc=dc2
+...
Consul is a distributed service mesh to connect, secure, and configure services across any runtime platform and public or private cloud
- + Download - Get Started + Get Started$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
-
"Tags"
: ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ $ curl http://localhost:8500/v1/kv/deployment
+[
+ {
+ "LockIndex": 1,
+ "Session": "1c3f5836-4df4-0e26-6697-90dcce78acd9",
+ "Value": "Zm9v",
+ "Flags": 0,
+ "Key": "deployment",
+ "CreateIndex": 13,
+ "ModifyIndex": 19
+ }
+]
Consul Open Source addresses the technical complexity of connecting services across distributed infrastructure.
Secure service-to-service communication with automatic TLS encryption and identity-based authorization
@@ -99,17 +99,19 @@ description: |-$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ $ consul connect proxy
\
+ -service web \
+ -service-addr 127.0.0.1:80 \
+ -listen 10.0.1.109:7200
+==> Consul Connect proxy starting...
+ Configuration mode: Flags
+ Service: web
+ Public listener: 10.0.1.109:7200 => 127.0.0.1:80
+
+==> Log data will now stream in as it occurs:
+
+ 2018/06/23 09:33:51 [INFO] public listener starting on 10.0.1.109:7200
+ 2018/06/23 09:33:51 [INFO] proxy loaded config and ready to serve
$ curl \
- --request POST \
- --data \
-'{
- "Name": "api",
- "Service": {
- "Service": "api",
- "Tags": ["v1.2.3"],
- "Failover": {
- "Datacenters": ["dc1", "dc2"]
+ TODO