Skip to content

Commit 77ef752

Browse files
committed
Update all documentation to use YAML for the config file.
1 parent 8143617 commit 77ef752

File tree

10 files changed

+64
-20
lines changed

10 files changed

+64
-20
lines changed

doc/loadtest/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ doorman-server-le54r 1/1 Running 0 15s
229229
This is running the Doorman server with a command line like this:
230230

231231
```console
232-
doorman -logtostderr -port=3667 -debug_port=3668 -config=./config.prototext
232+
doorman -logtostderr -port=3667 -debug_port=3668 -config=./config.yml
233233
```
234234

235235
Let's take a look at its logs to verify everything is fine:
@@ -362,7 +362,7 @@ What happens with the number of requests the server is doing? How about the QPS
362362

363363
### Different Algorithms
364364

365-
Experiment with different capacity distribution algorithms. Edit [`config.protext`](docker/server/config.prototext) to use the [FAIR_SHARE](../algorithms.md#fair_share) algorithm. Does it have any effect on the metrics?
365+
Experiment with different capacity distribution algorithms. Edit [`config.yml`](docker/server/config.yml) to use the [FAIR_SHARE](../algorithms.md#fair_share) algorithm. Does it have any effect on the metrics?
366366

367367
### High Availability
368368

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
FROM golang:1.5
2-
ADD config.prototext .
2+
ADD config.yml .
33
RUN go get github.com/youtube/doorman/go/cmd/doorman

doc/loadtest/docker/server/config.prototext

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
resources:
2+
- identifier_glob: "proportional"
3+
capacity: 5000
4+
safe_capacity: 10
5+
description: "proportional example"
6+
algorithm:
7+
kind: PROPORTIONAL_SHARE
8+
lease_length: 60
9+
refresh_interval: 15
10+
- identifier_glob: "fair"
11+
capacity: 5000
12+
safe_capacity: 10
13+
description: "fair share example"
14+
algorithm:
15+
kind: FAIR_SHARE
16+
lease_length: 60
17+
refresh_interval: 15
18+
- identifier_glob: "*"
19+
capacity: 1000
20+
safe_capacity: 10
21+
description: "test"
22+
algorithm:
23+
kind: FAIR_SHARE
24+
lease_length: 60
25+
refresh_interval: 15

doc/loadtest/k8s/doorman-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
containers:
3939
- name: doorman-server
4040
image: gcr.io/google.com/doorman/doorman-server:v0.1.7
41-
command: ["doorman", "-logtostderr", "-port=3667", "-debug_port=3668", "-config=./config.prototext"]
41+
command: ["doorman", "-logtostderr", "-port=3667", "-debug_port=3668", "-config=./config.yml"]
4242
resources:
4343
limits:
4444
cpu: 0.8

doc/simplecluster/Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
etcd: etcd --data-dir /tmp/etcd.data$PORT
2-
doorman: $GOPATH/bin/doorman -logtostderr -config=./config.prototext -port=$PORT -debug_port=$(expr $PORT + 50) -etcd_endpoints=http://localhost:2379 -master_election_lock=/doorman.master -hostname=localhost
2+
doorman: $GOPATH/bin/doorman -logtostderr -config=./config.yml -port=$PORT -debug_port=$(expr $PORT + 50) -etcd_endpoints=http://localhost:2379 -master_election_lock=/doorman.master -hostname=localhost
33

doc/simplecluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ go get github.com/youtube/doorman/go/cmd/doorman
3535

3636
## Preparing the configuration
3737

38-
Doorman's configuration file uses the protobuf text format. [config.prototext](config.prototext) sets up 2 resources:
38+
Doorman's configuration file uses the YAML format. [config.yml](config.yml) sets up 2 resources:
3939

4040
+ `proportional`, which uses the [PROPORTIONAL_SHARE](../algorithms.md#proportional_share) algorithm, with capacity 100.
4141
+ `fair`, which uses the [FAIR_SHARE](../algorithms.md#fair_share) algorithm, with capacity 400.

doc/simplecluster/config.prototext

Lines changed: 0 additions & 3 deletions
This file was deleted.

doc/simplecluster/config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
resources:
2+
- identifier_glob: proportional
3+
capacity: 100
4+
safe_capacity: 10
5+
description: proportional example
6+
algorithm:
7+
kind: PROPORTIONAL_SHARE
8+
lease_length: 15
9+
refresh_interval: 5
10+
- identifier_glob: fair
11+
capacity: 1000
12+
safe_capacity: 10
13+
description: fair share example
14+
algorithm:
15+
kind: FAIR_SHARE
16+
lease_length: 15
17+
refresh_interval: 5
18+
- identifier_glob: "*"
19+
capacity: 1000
20+
safe_capacity: 10
21+
description: default
22+
algorithm:
23+
kind: FAIR_SHARE
24+
lease_length: 60
25+
refresh_interval: 15

go/configuration/configuration_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ func TestParseSource(t *testing.T) {
77
text, path, kind string
88
}{
99
{
10-
text: "config.prototext",
10+
text: "config.yml",
1111
kind: "file",
12-
path: "config.prototext",
12+
path: "config.yml",
1313
},
1414
{
15-
text: "file:config.prototext",
15+
text: "file:config.yml",
1616
kind: "file",
17-
path: "config.prototext",
17+
path: "config.yml",
1818
},
1919
{
20-
text: "colons:in:name:good:idea:config.prototext",
20+
text: "colons:in:name:good:idea:config.yml",
2121
kind: "file",
22-
path: "colons:in:name:good:idea:config.prototext",
22+
path: "colons:in:name:good:idea:config.yml",
2323
},
2424
{
25-
text: "etcd:/config.prototext",
25+
text: "etcd:/config.yml",
2626
kind: "etcd",
27-
path: "/config.prototext",
27+
path: "/config.yml",
2828
},
2929
} {
3030
kind, path := ParseSource(c.text)

0 commit comments

Comments
 (0)