Skip to content

Commit b5f0116

Browse files
Merge pull request CrunchyData#157 from xenophenes/quickstart
quickstart fixes
2 parents b42b4d9 + ee90766 commit b5f0116

File tree

2 files changed

+56
-58
lines changed

2 files changed

+56
-58
lines changed

examples/quickstart-for-gke.sh

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,32 @@ LOG="pgo-installer.log"
1717

1818
export PGORELEASE=2.6
1919

20-
echo "testing for dependencies " | tee -a $LOG
20+
echo "Testing for dependencies..." | tee -a $LOG
2121

2222
which wget > /dev/null 2> /dev/null
2323
if [[ $? -ne 0 ]]; then
24-
echo "wget is missing on your system, a required dependency" | tee -a $LOG
24+
echo "The required dependency wget is missing on your system." | tee -a $LOG
2525
exit 1
2626
fi
2727
which kubectl > /dev/null 2> /dev/null
2828
if [[ $? -ne 0 ]]; then
29-
echo "kubectl is missing on your system, a required dependency" | tee -a $LOG
29+
echo "The required dependency kubectl is missing on your system." | tee -a $LOG
3030
exit 1
3131
fi
3232

3333
echo ""
34-
echo "testing kubectl connection" | tee -a $LOG
34+
echo "Testing kubectl connection..." | tee -a $LOG
3535
echo ""
36-
kubectl get namespaces
36+
kubectl get namespaces
3737
if [[ $? -ne 0 ]]; then
38-
echo "kubectl is not connecting to your Kube Cluster, required to proceed" | tee -a $LOG
38+
echo "kubectl is not able to connect to your Kube Cluster." | tee -a $LOG
3939
exit 1
4040
fi
4141

4242
NAMESPACE=`kubectl config current-context`
43-
echo "will install postgres-operator into the current namespace which is ["$NAMESPACE"]"
43+
echo "The postgres-operator tool will be installed into the current namespace which is ["$NAMESPACE"]."
4444

45-
echo -n "do you want to continue the installation? [yes no] "
45+
echo -n "Do you want to continue the installation? [yes no] "
4646
read REPLY
4747
if [[ "$REPLY" != "yes" ]]; then
4848
echo "aborting installation"
@@ -61,7 +61,7 @@ export PGO_CA_CERT=$COROOT/conf/apiserver/server.crt
6161
export PGO_CLIENT_CERT=$COROOT/conf/apiserver/server.crt
6262
export PGO_CLIENT_KEY=$COROOT/conf/apiserver/server.key
6363

64-
echo "setting environment variables in $HOME/.bashrc" | tee -a $LOG
64+
echo "Setting environment variables in $HOME/.bashrc..." | tee -a $LOG
6565

6666
cat <<'EOF' >> $HOME/.bashrc
6767
@@ -73,28 +73,28 @@ export PGO_CLIENT_KEY=$HOME/odev/src/github.com/crunchydata/postgres-operator/co
7373
#
7474
EOF
7575

76-
echo "setting up installation directory " | tee -a $LOG
76+
echo "Setting up installation directory..." | tee -a $LOG
7777

7878
mkdir -p $HOME/odev/src $HOME/odev/bin $HOME/odev/pkg
7979
mkdir -p $GOPATH/src/github.com/crunchydata/postgres-operator
8080

8181
echo ""
82-
echo "installing pgo server config" | tee -a $LOG
82+
echo "Installing the pgo server config..." | tee -a $LOG
8383
wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/$PGORELEASE/postgres-operator.$PGORELEASE.tar.gz -O /tmp/postgres-operator.$PGORELEASE.tar.gz
8484
if [[ $? -ne 0 ]]; then
85-
echo "problem getting pgo server config"
85+
echo "Error: pgo server config not found."
8686
exit 1
8787
fi
8888

8989
cd $COROOT
9090
tar xzf /tmp/postgres-operator.$PGORELEASE.tar.gz
9191
if [[ $? -ne 0 ]]; then
92-
echo "problem getting 2.5 release"
92+
echo "Error: problem with unpackaging the $PGORELEASE release."
9393
exit 1
9494
fi
9595

9696
echo ""
97-
echo "installing pgo client" | tee -a $LOG
97+
echo "Installing pgo client..." | tee -a $LOG
9898

9999
mv pgo $GOBIN
100100
mv pgo-mac $GOBIN
@@ -103,46 +103,44 @@ mv expenv.exe $GOBIN
103103
mv expenv-mac $GOBIN
104104
mv expenv $GOBIN
105105

106-
echo "storage classes on your system..."
106+
echo "Storage classes on your system:"
107107
kubectl get sc
108108
echo ""
109-
echo -n "enter the name of the storage class to use: "
109+
echo -n "Enter the name of the storage class to use: "
110110
read STORAGE_CLASS
111111

112112
echo ""
113-
echo "setting up pgo storage configuration for storageclass" | tee -a $LOG
113+
echo "Setting up pgo storage configuration for the selected storageclass..." | tee -a $LOG
114114
cp $COROOT/examples/pgo.yaml.storageclass $COROOT/conf/apiserver/pgo.yaml
115115
sed --in-place=.bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
116116
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/service-account.yaml
117117
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/rbac.yaml
118118

119119
echo ""
120-
echo "setting up pgo client auth" | tee -a $LOG
120+
echo "Setting up pgo client authentication..." | tee -a $LOG
121121
echo "username:password" > $HOME/.pgouser
122122

123-
echo "for pgo bash completion you will need to install the bash-completion package" | tee -a $LOG
123+
echo "For pgo bash completion you will need to install the bash-completion package." | tee -a $LOG
124124

125125
cp $COROOT/examples/pgo-bash-completion $HOME/.bash_completion
126126

127-
echo -n "do you want to deploy the operator? [yes no] "
127+
echo -n "Do you want to deploy the operator? [yes no] "
128128
read REPLY
129129
if [[ "$REPLY" == "yes" ]]; then
130-
echo "deploy the operator to the Kube cluster" | tee -a $LOG
130+
echo "Deploying the operator to the Kubernetes cluster..." | tee -a $LOG
131131
$COROOT/deploy/deploy.sh | tee -a $LOG
132132
fi
133133

134-
echo "install complete" | tee -a $LOG
134+
echo "Installation complete." | tee -a $LOG
135135
echo ""
136136

137137
echo "At this point you can access the operator by using a port-forward command similar to:"
138138
podname=`kubectl get pod --selector=name=postgres-operator -o jsonpath={..metadata.name}`
139139
echo "kubectl port-forward " $podname " 18443:8443"
140-
echo "do this in another terminal or run in the background"
140+
echo "Do this in another terminal or run in the background."
141141

142142
echo ""
143-
echo "WARNING: for the postgres-operator settings to take effect, log out of your session and back in, or reload your .bashrc file"
143+
echo "WARNING: for the postgres-operator settings to take effect, it will be necessary to log out of your session and back in or reload your .bashrc file."
144144

145145
echo ""
146-
echo "NOTE: to access the pgo CLI, place it within your PATH, it is located in $HOME/odev/bin/pgo"
147-
148-
146+
echo "NOTE: In order to access the pgo CLI, it will be necessary to place it within your PATH. The default location after installing is within $HOME/odev/bin/pgo"

examples/quickstart-for-ocp.sh

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,38 @@ LOG="pgo-installer.log"
1717

1818
export PGORELEASE=2.6
1919

20-
echo "testing for dependencies " | tee -a $LOG
20+
echo "Testing for dependencies..." | tee -a $LOG
2121

2222
which wget > /dev/null 2> /dev/null
2323
if [[ $? -ne 0 ]]; then
24-
echo "wget is missing on your system, a required dependency" | tee -a $LOG
24+
echo "The required dependency wget is missing on your system." | tee -a $LOG
2525
exit 1
2626
fi
2727
which oc > /dev/null 2> /dev/null
2828
if [[ $? -ne 0 ]]; then
29-
echo "oc is missing on your system, a required dependency" | tee -a $LOG
29+
echo "The required dependency oc is missing on your system." | tee -a $LOG
3030
exit 1
3131
fi
3232

3333
echo ""
34-
echo "testing oc connection" | tee -a $LOG
34+
echo "Testing oc connection..." | tee -a $LOG
3535
echo ""
3636
oc project
3737
if [[ $? -ne 0 ]]; then
38-
echo "oc is not connecting to your Openshift Cluster, required to proceed" | tee -a $LOG
38+
echo "oc is not able to connect to your OpenShift Cluster." | tee -a $LOG
3939
exit 1
4040
fi
4141

42-
echo "connected to project" | tee -a $LOG
42+
echo "Connected to project." | tee -a $LOG
4343
echo ""
44-
echo "this script will install the postgres operator into the project listed below...."
44+
echo "This script will install the postgres operator into the project listed below."
4545
oc project
4646
echo ""
4747

4848
PROJECT=`oc project -q`
49-
echo "installing into project ["$PROJECT"]"
49+
echo "Installing into project ["$PROJECT"]."
5050
echo ""
51-
echo -n "do you want to continue the installation? [yes no] "
51+
echo -n "Do you want to continue the installation? [yes no] "
5252
read REPLY
5353
if [[ "$REPLY" == "no" ]]; then
5454
exit 0
@@ -67,7 +67,7 @@ export PGO_CLIENT_CERT=$COROOT/conf/apiserver/server.crt
6767
export PGO_CLIENT_KEY=$COROOT/conf/apiserver/server.key
6868

6969
echo ""
70-
echo "setting environment variables in $HOME/.bashrc" | tee -a $LOG
70+
echo "Setting environment variables in $HOME/.bashrc..." | tee -a $LOG
7171
echo ""
7272

7373
cat <<'EOF' >> $HOME/.bashrc
@@ -77,18 +77,18 @@ export CO_APISERVER_URL=https://127.0.0.1:18443
7777
export PGO_CA_CERT=$HOME/odev/src/github.com/crunchydata/postgres-operator/conf/apiserver/server.crt
7878
export PGO_CLIENT_CERT=$HOME/odev/src/github.com/crunchydata/postgres-operator/conf/apiserver/server.crt
7979
export PGO_CLIENT_KEY=$HOME/odev/src/github.com/crunchydata/postgres-operator/conf/apiserver/server.key
80-
#
80+
#
8181
8282
EOF
8383

8484
echo ""
85-
echo "setting up installation directory" | tee -a $LOG
85+
echo "Setting up installation directory..." | tee -a $LOG
8686

8787
mkdir -p $HOME/odev/src $HOME/odev/bin $HOME/odev/pkg
8888
mkdir -p $GOPATH/src/github.com/crunchydata/postgres-operator
8989

9090
echo ""
91-
echo "installing pgo server config" | tee -a $LOG
91+
echo "Installing the pgo server config..." | tee -a $LOG
9292
wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/$PGORELEASE/postgres-operator.$PGORELEASE.tar.gz -O /tmp/postgres-operator.$PGORELEASE.tar.gz
9393
#if [[ $? -ne 0 ]]; then
9494
# echo "problem getting pgo server config"
@@ -97,12 +97,12 @@ wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/
9797
cd $COROOT
9898
tar xzf /tmp/postgres-operator.$PGORELEASE.tar.gz
9999
if [[ $? -ne 0 ]]; then
100-
echo "problem getting 2.6 release"
100+
echo "Error: problem with unpackaging the $PGORELEASE release."
101101
exit 1
102102
fi
103103

104104
echo ""
105-
echo "installing pgo client" | tee -a $LOG
105+
echo "Installing pgo client..." | tee -a $LOG
106106

107107
mv pgo $GOBIN
108108
mv pgo-mac $GOBIN
@@ -111,51 +111,51 @@ mv expenv.exe $GOBIN
111111
mv expenv-mac $GOBIN
112112
mv expenv $GOBIN
113113

114-
echo "storage classes on your system..."
114+
echo "Storage classes on your system:"
115115
oc get sc
116116
echo ""
117-
echo -n "enter the name of the storage class to use: "
117+
echo -n "Enter the name of the storage class to use: "
118118
read STORAGE_CLASS
119119

120120
echo ""
121-
echo "setting up pgo storage configuration for storageclass" | tee -a $LOG
121+
echo "Setting up pgo storage configuration for the selected storageclass..." | tee -a $LOG
122122
cp $COROOT/examples/pgo.yaml.storageclass $COROOT/conf/apiserver/pgo.yaml
123-
sed --in-place=.bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
124-
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/service-account.yaml
125-
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/rbac.yaml
123+
sed --in-place=.bak 's/standard/'"$STORAGE_CLASS"'/' $COROOT/conf/apiserver/pgo.yaml
124+
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/service-account.yaml
125+
sed --in-place=.bak 's/demo/'"$PROJECT"'/' $COROOT/deploy/rbac.yaml
126126

127127
echo ""
128-
echo -n "storage classes can require a fsgroup setting to be specified in the security context of your pods, typically this value is 26 but on some storage providers, this value is blank, enter your fsgroup setting if required or blank if not required: "
128+
echo -n "Storage classes can require a fsgroup setting to be specified in the security context of your pods. Typically, this value is 26, but on some storage providers this value is blank. Enter your fsgroup setting if required or leave blank if not required: "
129129
read FSGROUP
130-
sed --in-place=.bak 's/26/'"$FSGROUP"'/' $COROOT/conf/apiserver/pgo.yaml
130+
sed --in-place=.bak 's/26/'"$FSGROUP"'/' $COROOT/conf/apiserver/pgo.yaml
131131

132132
echo ""
133-
echo "setting up pgo client auth" | tee -a $LOG
133+
echo "Setting up pgo client authentication..." | tee -a $LOG
134134
echo "username:password" > $HOME/.pgouser
135135

136136
echo ""
137-
echo "for pgo bash completion you will need to install the bash-completion package" | tee -a $LOG
137+
echo "For pgo bash completion you will need to install the bash-completion package." | tee -a $LOG
138138

139139
cp $COROOT/examples/pgo-bash-completion $HOME/.bash_completion
140140
echo ""
141-
echo -n "do you want to deploy the operator? [yes no] "
141+
echo -n "Do you want to deploy the operator? [yes no] "
142142
read REPLY
143143
if [[ "$REPLY" == "yes" ]]; then
144-
echo "deploy the operator to the OCP cluster" | tee -a $LOG
144+
echo "Deploying the operator to the OCP cluster..." | tee -a $LOG
145145
# $COROOT/deploy/deploy.sh > /dev/null 2> /dev/null | tee -a $LOG
146146
$COROOT/deploy/deploy.sh | tee -a $LOG
147147
fi
148148

149-
echo "install complete" | tee -a $LOG
149+
echo "Installation complete." | tee -a $LOG
150150
echo ""
151151

152152
echo "At this point you can access the operator by using a port-forward command similar to:"
153153
podname=`oc get pod --selector=name=postgres-operator -o jsonpath={..metadata.name}`
154154
echo "oc port-forward " $podname " 18443:8443"
155-
echo "do this in another terminal or run in the background"
155+
echo "Do this in another terminal or run in the background."
156156

157157
echo ""
158-
echo "WARNING: for the postgres-operator settings to take effect, log out of your session and back in, or reload your .bashrc file"
158+
echo "WARNING: for the postgres-operator settings to take effect, it will be necessary to log out of your session and back in or reload your .bashrc file."
159159

160160
echo ""
161-
echo "NOTE: to access the pgo CLI, place it within your PATH, it is located in $HOME/odev/bin/pgo"
161+
echo "NOTE: In order to access the pgo CLI, it will be necessary to place it within your PATH. The default location after installing is within $HOME/odev/bin/pgo"

0 commit comments

Comments
 (0)