website: Fix getting started connect dependent service example

* Needs a `port`
* The upstream service is `socat` in the previous example, make
  the dependent service section use `socat` consistently throughout
This commit is contained in:
Thomas Kula 2018-06-13 16:02:13 -04:00 committed by Jack Pearkes
parent 1069654f3b
commit 72a58dca67
1 changed files with 5 additions and 4 deletions

View File

@ -134,11 +134,12 @@ $ cat <<EOF | sudo tee /etc/consul.d/web.json
{
"service": {
"name": "web",
"port": 8080,
"connect": {
"proxy": {
"config": {
"upstreams": [{
"destination_name": "db",
"destination_name": "socat",
"local_bind_port": 9191
}]
}
@ -150,8 +151,8 @@ EOF
```
This configures a Consul-managed proxy for the service "web" that
is listening on port 9191 to establish connects to "db" as "web". The
"web" service should then use that local port to talk to the DB rather than
is listening on port 9191 to establish connects to "socat" as "web". The
"web" service should then use that local port to talk to socat rather than
directly attempting to connect.
-> **Security note:** The Connect security model requires trusting
@ -167,7 +168,7 @@ all" by default.
Let's insert a rule to deny access from web to socat:
```sh
$ consul intention create -deny web db
$ consul intention create -deny web socat
Created: web => socat (deny)
```