Skip to content

Commit

Permalink
review feedback, removed node app
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilde committed Apr 18, 2017
1 parent 917ff85 commit 2967d22
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 49 deletions.
14 changes: 7 additions & 7 deletions consul/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ configuration
The following components make up the system:
* `curl` which acts as our client application
* `linkerd` for proxying requests to our service
* `audit` example service which has a `/health` endpoint
* `helloworld` example service
* `consul` as our service discovery back-end
* [`consul-registrator`](https://github.com/gliderlabs/registrator)
to automatically registers services with consul

**System overview**
```
+--------+ +---------+ +-----------------+
| client +----> | linkerd +--> | service (audit) |
+--------+ +----^----+ +-------+---------+
+--------+ +---------+ +----------------------+
| client +----> | linkerd +--> | service (helloworld) |
+--------+ +----^----+ +-------+--------------+
| |
+----+---+ +-------v------------+
| consul <-----+ consul registrator |
Expand All @@ -38,10 +38,10 @@ $ docker-compose build && docker-compose up -d
## Testing the system
To make sure everything is working properly run the following command:
```bash
$ curl localhost:4140/audit/health
$ curl localhost:4140/helloworld
```

You will get the following response:
```bash
I am healthy!
```
Hello!
```
4 changes: 0 additions & 4 deletions consul/audit/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions consul/audit/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions consul/audit/package.json

This file was deleted.

17 changes: 7 additions & 10 deletions consul/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,19 @@ services:
image: "consul:0.8.0"
ports:
- "8500:8500"
audit:
build: ./audit/
command: ["node", "/usr/src/app/index.js"]
service:
image: buoyantio/helloworld
command: ["-addr=:7777", "-text=Hello"]
ports:
- "8100:8100"
volumes:
- ./audit/:/usr/src/app/
environment:
- SERVICE_NAME=audit
- "7777:7777"

linkerd:
image: buoyantio/linkerd:0.9.1
command: ['/config.yaml']
links:
- consul
volumes:
- ./linkerd/linkerd.conf.yaml:/config.yaml
- ./linkerd.yml:/config.yaml
ports:
- 9990:9990
- 4140:4140
Expand All @@ -33,4 +30,4 @@ services:
volumes:
- /var/run/docker.sock:/tmp/docker.sock
depends_on:
- consul
- consul
2 changes: 1 addition & 1 deletion consul/linkerd/linkerd.conf.yaml → consul/linkerd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ routers:
client:
retries:
budget:
percentCanRetry: 5.0
percentCanRetry: 5.0

0 comments on commit 2967d22

Please sign in to comment.