Skip to content

Commit e284d4b

Browse files
authored
meta: Add more example config files and update readme (#124)
Adds example config files for the objectstore server in typical configurations for local development. This also create places to store custom local configurations that include a Sentry DSN or Datadog key.
1 parent 715a3e6 commit e284d4b

File tree

5 files changed

+74
-13
lines changed

5 files changed

+74
-13
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ recipe.json
44
profile.json.gz
55
.envrc.private
66

7+
**/config/*.yaml
8+
!**/config/*example.yaml
9+
710
# vim swap files
811
.*.sw*

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,26 @@ the required images and configuration, such as port mapping.
100100

101101
For **Google BigTable**, you additionally need to provision table into the test
102102
instance. Run `scripts/setup-bigtable.sh` to do that. Use this configuration to
103-
connect:
103+
connect (recommended as high-volume backend):
104104

105105
```yaml
106-
type: bigtable
107-
endpoint: localhost:8086
108-
project_id: testing
109-
instance_name: objectstore
110-
table_name: objectstore
106+
high_volume_storage:
107+
type: bigtable
108+
endpoint: localhost:8086
109+
project_id: testing
110+
instance_name: objectstore
111+
table_name: objectstore
111112
```
112113
113114
For **Google Cloud Storage** (GCS), a test bucket is already configured in the
114-
dev container. Use this configuration to connect:
115+
dev container. Use this configuration to connect (recommended as long-term
116+
backend):
115117
116118
```yaml
117-
type: gcs
118-
endpoint: http://localhost:8087
119-
bucket: test-bucket
119+
long_term_storage:
120+
type: gcs
121+
endpoint: http://localhost:8087
122+
bucket: test-bucket
120123
```
121124
122125
### Editor Setup
@@ -156,7 +159,7 @@ reason, we do **not** provide default configuration variables in `.envrc`.
156159

157160
```sh
158161
# Option 1: Configuration file
159-
cargo run -- -c path/to/config.yml
162+
cargo run -- -c objectstore-server/config/local.example.yaml
160163

161164
# Option 2: Environment variables
162165
export FSS_HIGH_VOLUME_STORAGE__TYPE=filesystem
@@ -166,6 +169,9 @@ export FSS_LONG_TERM_STORAGE__PATH=data
166169
cargo run
167170
```
168171

172+
You can copy and save additional config files into next to the examples in
173+
`objectstore-server/config`. All other files are ignored by git.
174+
169175
### Tests
170176

171177
To run tests:
@@ -179,5 +185,9 @@ cargo test --workspace --all-features
179185
Run the stresstest binary against the running server with:
180186

181187
```sh
182-
cargo run --release -p stresstest
188+
cargo run --release -p stresstest -- -c stresstest/config/example.yaml
183189
```
190+
191+
Similar to the objectstore server, you can find example configuration files in
192+
the `config` subfolder. Copy and save your own files there, as they will not be
193+
tracked by git.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Use a port different from devservices
2+
http_addr: 0.0.0.0:18888
3+
4+
long_term_storage:
5+
type: gcs
6+
endpoint: http://localhost:8087
7+
bucket: test-bucket
8+
9+
high_volume_storage:
10+
type: bigtable
11+
endpoint: localhost:8086
12+
project_id: testing
13+
instance_name: objectstore
14+
table_name: objectstore
15+
16+
logging:
17+
level: trace
18+
format: auto
19+
20+
# sentry:
21+
# dsn: http://<key>@localhost:8000/1
22+
# sample_rate: 1.0
23+
# traces_sample_rate: 1.0
24+
25+
metric_tags:
26+
sentry_region: development
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use a port different from devservices
2+
http_addr: 0.0.0.0:18888
3+
4+
long_term_storage:
5+
type: filesystem
6+
path: data
7+
8+
high_volume_storage:
9+
type: filesystem
10+
path: data
11+
12+
logging:
13+
level: trace
14+
format: auto
15+
16+
# sentry:
17+
# dsn: http://<key>@localhost:8000/1
18+
# sample_rate: 1.0
19+
# traces_sample_rate: 1.0
20+
21+
metric_tags:
22+
sentry_region: development
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
remote: http://localhost:8888
1+
remote: http://localhost:18888
22

33
duration: 5s
44

0 commit comments

Comments
 (0)