Skip to content

Commit 5b537d4

Browse files
author
Jeff McCormick
committed
update quickstart in prep for 2.5 release
1 parent ae0ca4a commit 5b537d4

File tree

1 file changed

+13
-34
lines changed

1 file changed

+13
-34
lines changed

examples/quickstart.sh

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

1818
echo "installing deps if necessary" | tee -a $LOG
1919

20-
21-
which git > /dev/null 2> /dev/null
22-
if [[ $? -ne 0 ]]; then
23-
echo "git is missing on your system, a required dependency" | tee -a $LOG
24-
exit 1
25-
fi
26-
which go > /dev/null 2> /dev/null
27-
if [[ $? -ne 0 ]]; then
28-
echo "golang is missing on your system, a required dependency" | tee -a $LOG
29-
exit 1
30-
fi
3120
which wget > /dev/null 2> /dev/null
3221
if [[ $? -ne 0 ]]; then
3322
echo "wget is missing on your system, a required dependency" | tee -a $LOG
@@ -57,7 +46,8 @@ export GOBIN=$GOPATH/bin
5746
export PATH=$PATH:$GOBIN
5847
export COROOT=$GOPATH/src/github.com/crunchydata/postgres-operator
5948
export CO_BASEOS=centos7
60-
export CO_VERSION=2.4
49+
export CO_VERSION=2.5
50+
export CO_IMAGE_PREFIX=crunchydata
6151
export CO_IMAGE_TAG=$CO_BASEOS-$CO_VERSION
6252
export CO_NAMESPACE=demo
6353
export CO_CMD=kubectl
@@ -74,7 +64,7 @@ source $HOME/.bashrc
7464
echo "setting up directory structure" | tee -a $LOG
7565

7666
mkdir -p $HOME/odev/src $HOME/odev/bin $HOME/odev/pkg
77-
mkdir -p $GOPATH/src/github.com/crunchydata/
67+
mkdir -p $GOPATH/src/github.com/crunchydata/postgres-operator
7868

7969
echo "installing deps if necessary" | tee -a $LOG
8070

@@ -86,44 +76,34 @@ fi
8676

8777

8878
echo "installing pgo server config" | tee -a $LOG
89-
cd $GOPATH/src/github.com/crunchydata
90-
git clone --quiet https://github.com/CrunchyData/postgres-operator.git
79+
wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/2.4/postgres-operator.2.4.tar.gz -O /tmp/postgres-operator.2.4.tar.gz
9180
if [[ $? -ne 0 ]]; then
9281
echo "problem getting pgo server config"
9382
exit 1
9483
fi
9584
cd $COROOT
96-
#git checkout 2.4
97-
git checkout master
85+
tar xzf /tmp/postgres-operator.2.5.tar.gz
9886
if [[ $? -ne 0 ]]; then
99-
echo "problem getting 2.4 release"
87+
echo "problem getting 2.5 release"
10088
exit 1
10189
fi
10290

10391
echo "installing pgo client" | tee -a $LOG
10492

105-
cd $HOME
106-
wget --quiet https://github.com/CrunchyData/postgres-operator/releases/download/2.4/postgres-operator.2.4.tar.gz
107-
if [[ $? -ne 0 ]]; then
108-
echo "problem getting postgres-operator release" | tee -a $LOG
109-
exit 1
110-
fi
111-
112-
tar xzf $HOME/postgres-operator.2.4.tar.gz
113-
11493
mv pgo $GOBIN
11594
mv pgo-mac $GOBIN
95+
mv pgo.exe $GOBIN
11696

11797
echo -n "do you want to create the demo namespace? [yes no] "
11898
read REPLY
11999
if [[ "$REPLY" == "yes" ]]; then
120100
echo "creating demo namespace" | tee -a $LOG
121101

122102
kubectl create -f $COROOT/examples/demo-namespace.json
123-
#if [[ $? -ne 0 ]]; then
124-
# echo "problem creating Kube demo namespace"
125-
## exit 1
126-
#fi
103+
if [[ $? -ne 0 ]]; then
104+
echo "problem creating Kube demo namespace"
105+
exit 1
106+
fi
127107
Kubectl get namespaces
128108
kubectl config view
129109

@@ -143,16 +123,15 @@ if [[ "$REPLY" == "yes" ]]; then
143123
cp $COROOT/examples/pgo.yaml.storageclass $COROOT/conf/apiserver/pgo.yaml
144124

145125
echo "deploy the operator to the Kube cluster" | tee -a $LOG
146-
cd $COROOT
147-
./deploy/deploy.sh
126+
$COROOT/deploy/deploy.sh > /dev/null 2> /dev/null | tee -a $LOG
148127
fi
149128

150129
echo "setting up pgo client auth" | tee -a $LOG
151130
tail --lines=1 $COROOT/conf/apiserver/pgouser > $HOME/.pgouser
152131

153132
echo "for pgo bash completion you will need to install the bash-completion package" | tee -a $LOG
154133

155-
mv $HOME/pgo-bash-completion $HOME/.bash_completion
134+
cp $COROOT/examples/pgo-bash-completion $HOME/.bash_completion
156135

157136
echo "install complete" | tee -a $LOG
158137

0 commit comments

Comments
 (0)