forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirector-configure-db.html.md.erb
64 lines (50 loc) · 1.57 KB
/
director-configure-db.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Connecting the Director to an External Postgres Database
---
The Director stores VM, persistent disk and other information in a database. An internal database might be sufficient for your deployment; however, a highly-available external database can improve performance, scalability and protect against data loss.
## <a id="included"></a> Included Postgres (default)
1. Add postgres release job and make sure that persistent disk is enabled:
```yaml
jobs:
- name: bosh
templates:
- {name: postgres, release: bosh}
# ...
persistent_disk: 25_000
# ...
```
1. Configure postgres job, and let the Director and the Registry (if configured) use the database:
```yaml
properties:
postgres: &database
host: 127.0.0.1
user: postgres
password: postgres-password
database: bosh
adapter: postgres
director:
db: *database
# ...
registry:
db: *database
# ...
```
---
## <a id="external"></a> External
The Director is tested to be compatible with MySQL and Postgresql databases.
1. Modify deployment manifest for the Director
```yaml
properties:
director:
db: &database
host: DB-HOST
port: DB-PORT
user: DB-USER
password: DB-PASSWORD
database: bosh
adapter: postgres
registry:
db: *database
# ...
```
See [director.db job configuration](https://bosh.io/jobs/director?source=github.com/cloudfoundry/bosh#p=director.db) for more details.