Skip to content

Commit eebae0b

Browse files
committed
Update README to be more ... readable
1 parent 9961554 commit eebae0b

File tree

1 file changed

+51
-37
lines changed

1 file changed

+51
-37
lines changed

README.md

Lines changed: 51 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,71 @@
1-
# BOSH Release for postgres
1+
# PostgreSQL, BOSH-Style
22

3-
## Usage
3+
This BOSH release packages up PostgreSQL so that you can deploy it
4+
on BOSH. It supports standalone, clustered, and HA
5+
configurations.
46

5-
To use this bosh release, first upload it to your bosh:
7+
# Supported Topologies
68

7-
```
8-
bosh target BOSH_HOST
9-
git clone https://github.com/cloudfoundry-community/postgres-boshrelease.git
10-
cd postgres-boshrelease
11-
bosh upload release releases/postgres-1.yml
12-
```
9+
## Standalone Configuration
1310

14-
For [bosh-lite](https://github.com/cloudfoundry/bosh-lite), you can quickly create a deployment manifest & deploy a cluster:
11+
For a single, standalone PostgreSQL node, you only need the
12+
`postgres` job:
1513

1614
```
17-
templates/make_manifest warden
18-
bosh -n deploy
15+
instance_groups:
16+
- name: db
17+
jobs:
18+
- name: postgres
19+
release: postgres
1920
```
2021

21-
For AWS EC2, create a single VM:
22+
## Clustered Configuration
23+
24+
To enable replication, deploy multiple nodes and set the
25+
`postgres.replication.enabled` property to "yes":
2226

2327
```
24-
templates/make_manifest aws-ec2
25-
bosh -n deploy
28+
instance_groups:
29+
- name: db
30+
instances: 4
31+
jobs:
32+
- name: postgres
33+
release: postgres
34+
properties:
35+
replication:
36+
enabled: true
2637
```
2738

28-
### Override security groups
29-
30-
For AWS & Openstack, the default deployment assumes there is a `default` security group. If you wish to use a different security group(s) then you can pass in additional configuration when running `make_manifest` above.
39+
In replicated mode, the bootstrap VM will assume the role of
40+
master, and the remaining nodes will replicate from it, forming a
41+
star topology. No special query routing is done in this
42+
configuration; applications that wish to make use of read replicas
43+
must do so explicitly.
3144

32-
Create a file `my-networking.yml`:
45+
Promotion of a replica is left to the operator.
3346

34-
``` yaml
35-
---
36-
networks:
37-
- name: postgres1
38-
type: dynamic
39-
cloud_properties:
40-
security_groups:
41-
- postgres
42-
```
43-
44-
Where `- postgres` means you wish to use an existing security group called `postgres`.
47+
## HA Configuration
4548

46-
You now suffix this file path to the `make_manifest` command:
49+
For a highly-available, single-IP pair of PostgreSQL nodes, the
50+
`vip` job can be added. Note that you *must* deploy exactly two
51+
instances, or HA won't work. Replication must also be enabled.
4752

4853
```
49-
templates/make_manifest openstack-nova my-networking.yml
50-
bosh -n deploy
54+
instance_groups:
55+
- name: db
56+
jobs:
57+
- name: postgres
58+
release: postgres
59+
properties:
60+
replication:
61+
enabled: true # don't forget this!
62+
63+
- name: vip
64+
release: postgres
65+
properties:
66+
vip: 10.3.4.5
5167
```
5268

53-
## High Availability
54-
5569
HA is implemented with automatic failover, if you set
5670
`postgres.replication.enabled` to true.
5771

@@ -133,6 +147,6 @@ The following parameters affect high availability:
133147

134148
- `vip.readonly_port` - Which port to access the read-only node
135149
of the cluster. Defaults to `7542`.
136-
150+
137151
- `vip.vip` - Which IP to use as a VIP that is traded between the
138-
two nodes.
152+
two nodes.

0 commit comments

Comments
 (0)