Skip to content

Commit aa82d92

Browse files
committed
feat: remove postgres job and packages, replace with postgres-release
- Delete jobs/postgres (fully removed) - Delete packages/postgres-15 (only used by removed jobs/postgres job) - Remove blob entries for postgres packages from config/blobs.yml - Remove CI blob-bumping tasks and postgres source resources - Delete spec/postgres_bpm_spec.rb (tested removed job) - Add docs/postgres-migration.md for operators migrating to postgres-release Note: packages/postgres-13 is retained because jobs/postgres-13 (currently deprecated) still depends on it. Both will be removed in the next release.
1 parent 39972c7 commit aa82d92

16 files changed

Lines changed: 96 additions & 522 deletions

File tree

ci/pipeline.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,10 +1435,6 @@ jobs:
14351435
trigger: true
14361436
- get: mariadb-connector-c-resource
14371437
trigger: true
1438-
- get: postgres-13-src
1439-
trigger: true
1440-
- get: postgres-15-src
1441-
trigger: true
14421438
- get: ruby-release
14431439
trigger: true
14441440
- get: bosh-blobstore-dav
@@ -1484,40 +1480,6 @@ jobs:
14841480
options:
14851481
credentials_source: static
14861482
json_key: '((gcp_json_key))'
1487-
- task: bump-postgres-13-package
1488-
file: bosh-ci/ci/tasks/bump-postgres-packages.yml
1489-
image: integration-image
1490-
input_mapping:
1491-
bosh: bosh-out
1492-
postgres-src: postgres-13-src
1493-
output_mapping:
1494-
bosh: bosh-out
1495-
params:
1496-
GIT_USER_NAME: *git_user_name
1497-
GIT_USER_EMAIL: *git_user_email
1498-
MAJOR_VERSION: 13
1499-
PRIVATE_YML: |
1500-
blobstore:
1501-
options:
1502-
credentials_source: static
1503-
json_key: '((gcp_json_key))'
1504-
- task: bump-postgres-15-package
1505-
file: bosh-ci/ci/tasks/bump-postgres-packages.yml
1506-
image: integration-image
1507-
input_mapping:
1508-
bosh: bosh-out
1509-
postgres-src: postgres-15-src
1510-
output_mapping:
1511-
bosh: bosh-out
1512-
params:
1513-
GIT_USER_NAME: *git_user_name
1514-
GIT_USER_EMAIL: *git_user_email
1515-
MAJOR_VERSION: 15
1516-
PRIVATE_YML: |
1517-
blobstore:
1518-
options:
1519-
credentials_source: static
1520-
json_key: '((gcp_json_key))'
15211483
- task: bump-ruby-package
15221484
file: ruby-release/ci/tasks/shared/bump-ruby-package.yml
15231485
input_mapping:
@@ -1683,21 +1645,6 @@ resources:
16831645
regex: '>(?P<version>3\.\d+.\d+)</a></td><td>\d{4}-\d{2}-\d{2}</td><td>Stable'
16841646
uri: "https://ftp.osuosl.org/pub/mariadb/connector-c-{version}/mariadb-connector-c-{version}-src.tar.gz"
16851647

1686-
- name: postgres-13-src
1687-
type: http-resource
1688-
source:
1689-
index: "https://ftp.postgresql.org/pub/source/"
1690-
regex: 'href="v(?P<version>13\.[0-9.]+)/"'
1691-
uri: "https://ftp.postgresql.org/pub/source/v{version}/postgresql-{version}.tar.gz"
1692-
1693-
- name: postgres-15-src
1694-
type: http-resource
1695-
source:
1696-
index: "https://ftp.postgresql.org/pub/source/"
1697-
regex: 'href="v(?P<version>15\.[0-9.]+)/"'
1698-
uri: "https://ftp.postgresql.org/pub/source/v{version}/postgresql-{version}.tar.gz"
1699-
1700-
17011648
- name: bosh-blobstore-dav
17021649
type: s3
17031650
source:

ci/tasks/bump-postgres-packages.sh

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

ci/tasks/bump-postgres-packages.yml

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

config/blobs.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ azure-storage-cli/azure-storage-cli-0.0.242-linux-amd64:
22
size: 10703448
33
object_id: 997c7799-404b-4182-76d1-bcf626ea5fa4
44
sha: sha256:fd094f2cd94a35fdfe0871163e987500295ac1c6fbab495ad254b094dd6dfc8a
5-
bosh-gcscli/bosh-gcscli-0.0.391-linux-amd64:
6-
size: 46940632
7-
object_id: 423ed690-e2fc-4b73-7df7-867ed4aac50a
8-
sha: sha256:493e7fa48248f78f5e8f7520b8574d20f18cb54a87846b2a85fbefeb47821242
9-
davcli/davcli-0.0.485-linux-amd64:
5+
bosh-gcscli/bosh-gcscli-0.0.392-linux-amd64:
6+
size: 46940408
7+
object_id: abc228ac-b0e3-415d-57d1-83ec51cce167
8+
sha: sha256:a5f2973b69bd628b4076bddf46b24a7d85d52008db7e1af338dbc330f7f388ff
9+
davcli/davcli-0.0.486-linux-amd64:
1010
size: 10458919
11-
object_id: 9babdbdb-618a-4e61-6a50-8c4c6c5db917
12-
sha: sha256:3367c115ec4968a5660bdba20c658afe6eeb8e29a5739ae89a00451a13690e1a
11+
object_id: a9b66b4f-ed7a-400e-5e48-3d30ae3d51dd
12+
sha: sha256:124464ac1def1916c552f933f158f57451ed43e08341136b85e545686c6829ee
1313
mysql/mariadb-connector-c-3.4.9-src.tar.gz:
1414
size: 1383464
1515
object_id: 6771a01b-5c33-4d68-4f63-29ae02498be5
@@ -18,22 +18,10 @@ nats/nats-server-v2.14.3-linux-amd64.tar.gz:
1818
size: 6843959
1919
object_id: 9c3d83e2-f9d6-43e2-59d4-9c56e0e9cd3c
2020
sha: sha256:f3d0c820c749f81d717310fb00d4903919e70e3e66b268bd352a088b9788eb93
21-
postgres/postgresql-10.23.tar.gz:
22-
size: 25493839
23-
object_id: 1549746f-1e8d-4ce5-5585-36eca41ab528
24-
sha: sha256:39886b7fbf375fdd79e94b676d8346a62c3c190ccf00b3f763002c8fc8fb71f0
25-
postgres/postgresql-13.23.tar.gz:
26-
size: 28506793
27-
object_id: c2814297-9505-46e7-7b78-9adbd0d4b8f5
28-
sha: sha256:f5eb642f659d59a9a65df08a1364fed8e83db5df116eff17a2f063a02854069b
29-
postgres/postgresql-15.18.tar.gz:
30-
size: 30728818
31-
object_id: d0e42b9a-3281-4e39-77eb-32a0d6bdb131
32-
sha: sha256:d32a533516edc688ebbb96ae221b605be2712edd94d7428b42a4af5644250943
33-
s3cli/s3cli-0.0.412-linux-amd64:
34-
size: 15998138
35-
object_id: 2a6c89d3-e918-44d2-5ea3-e98c6d0ac74e
36-
sha: sha256:8c8c9c501644d29b875ac73b1b737a443f9ab50f732c387e07090a78a12c32bf
21+
s3cli/s3cli-0.0.413-linux-amd64:
22+
size: 15962472
23+
object_id: 8adb4196-1706-432a-40af-b371d7495881
24+
sha: sha256:d39f4b016d70626b5245b10222e8c91b0bd2c9140040e9049f8cf24f180f4b9f
3725
verify-multidigest/verify-multidigest-0.0.624-linux-amd64:
3826
size: 4305039
3927
object_id: b9843724-b98b-4075-7c7d-f1cb9b51d64c

docs/postgres-migration.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Migrating from bosh postgres jobs to cloudfoundry/postgres-release
2+
3+
## Background
4+
5+
The `postgres` and `postgres-13` jobs previously shipped inside the bosh release
6+
have been removed. PostgreSQL is now provided by the
7+
[cloudfoundry/postgres-release](https://github.com/cloudfoundry/postgres-release).
8+
9+
This release ships PostgreSQL versions 15, 16, 17, and 18.
10+
11+
## Switching from jobs/postgres (bosh release)
12+
13+
In your director manifest, replace:
14+
15+
```yaml
16+
releases:
17+
- name: bosh
18+
version: latest
19+
20+
instance_groups:
21+
- name: bosh
22+
jobs:
23+
- name: postgres
24+
release: bosh
25+
properties:
26+
postgres:
27+
user: bosh
28+
password: secret
29+
database: bosh
30+
listen_address: 127.0.0.1
31+
port: 5432
32+
max_connections: 200
33+
```
34+
35+
With:
36+
37+
```yaml
38+
releases:
39+
- name: bosh
40+
version: latest
41+
- name: postgres
42+
url: https://bosh.io/d/github.com/cloudfoundry/postgres-release
43+
version: latest
44+
45+
instance_groups:
46+
- name: bosh
47+
jobs:
48+
- name: postgres
49+
release: postgres
50+
properties:
51+
databases:
52+
version: 15 # match your existing on-disk data version
53+
port: 5432
54+
max_connections: 500
55+
databases:
56+
- name: bosh
57+
roles:
58+
- name: bosh
59+
password: secret
60+
```
61+
62+
## Switching from jobs/postgres-13
63+
64+
Same as above, but set `databases.version: 13`.
65+
66+
## In-place cutover procedure
67+
68+
1. Set `databases.version: 15` (or 13 if still on postgres-13).
69+
postgres-release detects the existing `/var/vcap/store/postgres-<version>`
70+
data directory and starts without reinitializing.
71+
2. Deploy. BOSH will restart the postgres process using postgres-release.
72+
3. To upgrade to a newer PostgreSQL major version, change `databases.version`
73+
to 16, 17, or 18 and redeploy. postgres-release handles `pg_upgrade`.
74+
75+
## Property mapping
76+
77+
| Old (`bosh` release) | New (`postgres-release`) |
78+
|---------------------------------|----------------------------------------------|
79+
| `postgres.user` | `databases.roles[0].name` |
80+
| `postgres.password` | `databases.roles[0].password` |
81+
| `postgres.database` | `databases.databases[0].name` |
82+
| `postgres.additional_databases` | additional `databases.databases` entries |
83+
| `postgres.listen_address` | `databases.address` (default `127.0.0.1`) |
84+
| `postgres.port` | `databases.port` (default `5432`) |
85+
| `postgres.max_connections` | `databases.max_connections` (default `500`) |

jobs/postgres/monit

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

jobs/postgres/spec

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

jobs/postgres/templates/bpm.yml

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

jobs/postgres/templates/create-database.erb

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

jobs/postgres/templates/postgres.erb

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

0 commit comments

Comments
 (0)