You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/upgrade-pgo.sh
+4-20Lines changed: 4 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -31,28 +31,12 @@ read -n1 -rsp $'Press any key to continue the upgrade or Ctrl+C to exit...\n'
31
31
# Remove the current Operator
32
32
$DIR/cleanup.sh
33
33
34
-
# Set up the defined namespaces for use with the new Operator version
35
-
$DIR/setupnamespaces.sh
36
-
37
-
# Install the correct RBAC
38
-
$DIR/install-rbac.sh
39
-
40
34
# Deploy the new Operator
41
-
$DIR/deploy.sh
42
-
43
-
# Store the current location of the PGO client
44
-
MYPGO=`which pgo`
45
-
# Store the expected location of the PGO client
46
-
BASHPGO="${GOBIN}/pgo"
47
-
48
-
if [ "$MYPGO"!="$BASHPGO" ];then
49
-
50
-
echo"Current location\(${MYPG}O\) does not match the expected location \(${BASHPGO}\). You will need to manually install the updated Posgres Operator client in your preferred location."
35
+
make -C "$(dirname $DIR)" setupnamespaces installrbac deployoperator build-pgo-client
51
36
52
-
else
53
-
# install the new PGO client
54
-
go install $PGOROOT/pgo/pgo.go
55
-
cp $GOBIN/pgo $PGOROOT/bin/pgo
37
+
if [ !"$(command -v pgo)"-ef"$(dirname $DIR)/bin/pgo" ];then
38
+
echo"Current location ($(command -v pgo)) does not match the expected location ($(dirname $DIR)/bin/pgo)." \
39
+
'You will need to manually install the updated Postgres Operator client in your preferred location.'
@@ -38,9 +37,7 @@ Variable | Example | Description
38
37
## Other requirements
39
38
40
39
* The development host has been created, has access to `yum` updates, and has a regular user account with `sudo` rights to run `yum`.
41
-
*`GOPATH` points to a directory containing `src`,`pkg`, and `bin` directories.
42
-
* The development host has `$GOPATH/bin` added to its `PATH` environment variable. Development tools will be installed to this path. Defining a `GOBIN` environment variable other than `$GOPATH/bin` may yield unexpected results.
43
-
* The development host has `git` installed and has cloned the postgres-operator repository to `$GOPATH/src/github.com/crunchydata/postgres-operator`. Makefile targets below are run from the repository directory.
40
+
* The development host has `git` installed and has cloned the [postgres-operator](https://github.com/CrunchyData/postgres-operator.git) repository. Makefile targets below are run from the repository directory.
44
41
* Deploying the Operator will require deployment access to a Kubernetes or OpenShift cluster
45
42
* Once you have cloned the git repository, you will need to download the CentOS 7 repository files and GPG keys and place them in the `$PGOROOT/conf` directory. You can do so with the following code:
46
43
@@ -61,7 +58,6 @@ Configuring build dependencies is automated via the `setup` target in the projec
61
58
62
59
The setup target ensures the presence of:
63
60
64
-
*`GOPATH` and `PATH` as described in the prerequisites
65
61
* EPEL yum repository
66
62
*[`go`](https://golang.org/) compiler version 1.13+
67
63
* NSQ messaging binaries
@@ -109,7 +105,7 @@ This assumes you have Docker installed and running on your development host.
109
105
By default, the Makefile will use buildah to build the container images, to override this default to use docker to build the images, set the IMGBUILDER variable to `docker`
110
106
111
107
112
-
After a full compile, you will have a `pgo` binary in `$HOME/odev/bin` and the Operator images in your local Docker registry.
108
+
After a full compile, you will have a `pgo` binary in `$PGOROOT/bin` and the Operator images in your local Docker registry.
This creates a directory structure under your HOME directory name *odev* and clones the current Operator version to that structure.
38
32
39
33
## Default Installation - Configure Environment
40
34
41
35
Environment variables control aspects of the Operator installation. You can copy a sample set of Operator environment variables and aliases to your *.bashrc* file to work with.
0 commit comments