Merge pull request #6434 from hashicorp/docs-add-grpc-info
docs: Added grpc info; small style fixes to connect guide
This commit is contained in:
commit
ae8bfce399
|
@ -56,6 +56,40 @@ run in dev mode with the following command:
|
|||
$ consul agent -dev
|
||||
```
|
||||
|
||||
To use Connect on a non-dev Consul agent, you will minimally need to enable the
|
||||
GRPC port and set `connect` to enabled by adding some additional information to
|
||||
your Consul client configurations, depending on format.
|
||||
|
||||
For HCL configurations:
|
||||
|
||||
```hcl
|
||||
# ...
|
||||
|
||||
ports {
|
||||
"grpc" = 8502
|
||||
}
|
||||
|
||||
connect {
|
||||
enabled = true
|
||||
}
|
||||
```
|
||||
|
||||
For JSON configurations:
|
||||
|
||||
```javascript
|
||||
{
|
||||
// ...
|
||||
"ports": {
|
||||
"grpc": 8502
|
||||
},
|
||||
"connect": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Nomad
|
||||
|
||||
Nomad must schedule onto a routable interface in order for the proxies to
|
||||
|
@ -89,6 +123,7 @@ to Nomad by copying the HCL into a file named `connect.nomad` and running:
|
|||
```hcl
|
||||
job "countdash" {
|
||||
datacenters = ["dc1"]
|
||||
|
||||
group "api" {
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
@ -105,6 +140,7 @@ to Nomad by copying the HCL into a file named `connect.nomad` and running:
|
|||
|
||||
task "web" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "hashicorpnomad/counter-api:v1"
|
||||
}
|
||||
|
@ -114,6 +150,7 @@ to Nomad by copying the HCL into a file named `connect.nomad` and running:
|
|||
group "dashboard" {
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
||||
port "http" {
|
||||
static = 9002
|
||||
to = 9002
|
||||
|
@ -138,9 +175,11 @@ to Nomad by copying the HCL into a file named `connect.nomad` and running:
|
|||
|
||||
task "dashboard" {
|
||||
driver = "docker"
|
||||
|
||||
env {
|
||||
COUNTING_SERVICE_URL = "http://${NOMAD_UPSTREAM_ADDR_count_api}"
|
||||
}
|
||||
|
||||
config {
|
||||
image = "hashicorpnomad/counter-dashboard:v1"
|
||||
}
|
||||
|
@ -161,7 +200,7 @@ The API service is defined as a task group with a bridge network:
|
|||
mode = "bridge"
|
||||
}
|
||||
|
||||
...
|
||||
# ...
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -170,7 +209,8 @@ any ports in its network. The service stanza enables Connect:
|
|||
|
||||
```hcl
|
||||
group "api" {
|
||||
...
|
||||
|
||||
# ...
|
||||
|
||||
service {
|
||||
name = "count-api"
|
||||
|
@ -181,7 +221,8 @@ any ports in its network. The service stanza enables Connect:
|
|||
}
|
||||
}
|
||||
|
||||
...
|
||||
# ...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -198,13 +239,15 @@ forwarded port:
|
|||
group "dashboard" {
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
||||
port "http" {
|
||||
static = 9002
|
||||
to = 9002
|
||||
}
|
||||
}
|
||||
|
||||
...
|
||||
# ...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -261,7 +304,7 @@ dashes (`-`) are converted to underscores (`_`) in environment variables so
|
|||
- Consul Connect Native is not yet supported.
|
||||
- Consul Connect HTTP and gRPC checks are not yet supported.
|
||||
- Consul ACLs are not yet supported.
|
||||
- Only the Docker, exec, raw exec, and java drivers support network namespaces
|
||||
- Only the Docker, exec, raw_exec, and java drivers support network namespaces
|
||||
and Connect.
|
||||
- Variable interpolation for group services and checks are not yet supported.
|
||||
- Consul Connect and network namespaces are only supported on Linux.
|
||||
|
|
Loading…
Reference in a new issue