Skip to content

Commit cfe5c56

Browse files
tjmoore4andrewlecuyer
authored andcommitted
Postgres Operator Upgrade updates (#1051)
* Postgres Operator Upgrade updates An updated procedure for upgrading the Postgres Operator from version 4.0.1 to 4.1 is required to account for recent configuration updates and environmental changes. These changes left certain Operator features nonfunctional. The new upgrade procedure is designed to ensure all applicable changes are accounted for in the most convenient way possible. * Updated the PGO 4.0.1 to 4.1.0 procedure to include a missing step outlining the process to recreate the 4.0.1 clusters in the new 4.1.0 environment. Also added a reference to the pgo scaledown command's help for use when needing to scale down the existing PGO 4.0.1 pgclusters. * Added a separate upgrade procedure for users using the Ansible installation method for their Operator installation. Procedure is designed to be inclusive. Other updates reflect renaming of the existing procedure to specify it is for Bash installations, and an update to relevant links.
1 parent 6a8537d commit cfe5c56

File tree

5 files changed

+255
-236
lines changed

5 files changed

+255
-236
lines changed

hugo/content/Upgrade/_index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ This section of the documentation shows specific steps required to upgrade diffe
1616

1717
[Upgrade Postgres Operator from 3.5 to 4.1] ( {{< relref "upgrade/upgrade35to4.md" >}})
1818

19-
[Upgrade Postgres Operator from 4.0.1 to 4.1.0] ( {{< relref "upgrade/upgrade40to41.md" >}})
19+
[Upgrade Postgres Operator from 4.0.1 to 4.1.0 (Bash)] ( {{< relref "upgrade/upgrade40to41_bash.md" >}})
20+
21+
[Upgrade Postgres Operator from 4.0.1 to 4.1.0 (Ansible)] ( {{< relref "upgrade/upgrade40to41_ansible.md" >}})
2022

2123
## Upgrading A Postgres Cluster
2224

@@ -36,4 +38,4 @@ In this example, we are upgrading a cluster from PostgreSQL 11.4 to 11.5 using t
3638

3739
`pgo upgrade mycluster --ccp-image-tag=centos7-11.5-2.4.2`
3840

39-
For more information, please see the `pgo upgrade` documentation [here.] ( {{< relref "operatorcli/cli/pgo_upgrade.md" >}})
41+
For more information, please see the `pgo upgrade` documentation [here.] ( {{< relref "operatorcli/cli/pgo_upgrade.md" >}})

hugo/content/Upgrade/upgrade35to4.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: "Upgrade PGO 3.5 to 4"
3-
Latest Release: 4.1.0 {docdate}
2+
title: "Upgrade PGO 3.5 to 4.1"
3+
Latest Release: 4.1 {docdate}
44
draft: false
55
weight: 8
66
---
77

8-
## Upgrading a Cluster from Version 3.5.x to PGO 4
8+
## Upgrading a Cluster from Version 3.5.x to PGO 4.1
99

10-
This section will outline the procedure to upgrade a given cluster created using Postgres Operator 3.5.x to PGO version 4.1.
10+
This section will outline the procedure to upgrade a given cluster created using Postgres Operator 3.5.x to PGO version 4.1
1111

1212
{{% notice info %}}
1313

hugo/content/Upgrade/upgrade40to41.md

Lines changed: 0 additions & 230 deletions
This file was deleted.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: "Upgrade PGO 4.0.1 to 4.1.0 (Ansible)"
3+
Latest Release: 4.1.0 {docdate}
4+
draft: false
5+
weight: 8
6+
---
7+
8+
## Postgres Operator Ansible Upgrade Procedure from 4.0.1 to 4.1.0
9+
10+
This procedure will give instructions on how to upgrade to Postgres Operator 4.1.0 when using the Ansible installation method.
11+
12+
{{% notice info %}}
13+
14+
As with any upgrade, please ensure you have taken recent backups of all relevant data!
15+
16+
{{% / notice %}}
17+
18+
##### Prerequisites.
19+
You will need the following items to complete the upgrade:
20+
21+
* The latest 4.1.0 code for the Postgres Operator available
22+
23+
These instructions assume you are executing in a terminal window and that your user has admin privileges in your Kubernetes or Openshift environment.
24+
25+
26+
##### Step 0
27+
For the cluster(s) you wish to upgrade, scale down any replicas, if necessary (see `pgo scaledown --help` for more information on command usage) page for more information), then delete the cluster
28+
29+
pgo delete cluster <clustername>
30+
31+
{{% notice warning %}}
32+
33+
Please note the name of each cluster, the namespace used, and be sure not to delete the associated PVCs or CRDs!
34+
35+
{{% /notice %}}
36+
37+
38+
##### Step 1
39+
40+
Save a copy of your current inventory file with a new name (such as `inventory.backup)` and checkout the latest 4.1 tag of the Postgres Operator.
41+
42+
43+
##### Step 2
44+
Update the new inventory file with the appropriate values for your new Operator installation, as described in the [Ansible Install Prerequisites] ( {{< relref "installation/install-with-ansible/prerequisites.md" >}}) and the [Compatibility Requirements Guide] ( {{< relref "configuration/compatibility.md" >}}).
45+
46+
47+
##### Step 3
48+
49+
Now you can upgrade your Operator installation and configure your connection settings as described in the [Ansible Update Page] ( {{< relref "installation/install-with-ansible/updating-operator.md" >}}).
50+
51+
52+
##### Step 4
53+
Verify the Operator is running:
54+
55+
kubectl get pod -n <operator namespace>
56+
57+
And that it is upgraded to the appropriate version
58+
59+
pgo version
60+
61+
##### Step 5
62+
Once the Operator is installed and functional, create new 4.1 clusters with the same name as was used previously. This will allow the new clusters to utilize the existing PVCs.
63+
64+
pgo create cluster <clustername> -n <namespace>
65+
66+
##### Step 6
67+
To verify cluster status, run
68+
pgo test <clustername> -n <namespace>
69+
Output should be similar to:
70+
```
71+
psql -p 5432 -h 10.104.74.189 -U postgres postgres is Working
72+
psql -p 5432 -h 10.104.74.189 -U postgres userdb is Working
73+
psql -p 5432 -h 10.104.74.189 -U primaryuser postgres is Working
74+
psql -p 5432 -h 10.104.74.189 -U primaryuser userdb is Working
75+
psql -p 5432 -h 10.104.74.189 -U testuser postgres is Working
76+
psql -p 5432 -h 10.104.74.189 -U testuser userdb is Working
77+
```
78+
##### Step 7
79+
Scale up to the required number of replicas, as needed.
80+

0 commit comments

Comments
 (0)