@@ -17,17 +17,6 @@ LOG="pgo-installer.log"
17
17
18
18
echo " installing deps if necessary" | tee -a $LOG
19
19
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
31
20
which wget > /dev/null 2> /dev/null
32
21
if [[ $? -ne 0 ]]; then
33
22
echo " wget is missing on your system, a required dependency" | tee -a $LOG
@@ -57,7 +46,8 @@ export GOBIN=$GOPATH/bin
57
46
export PATH=$PATH:$GOBIN
58
47
export COROOT=$GOPATH/src/github.com/crunchydata/postgres-operator
59
48
export CO_BASEOS=centos7
60
- export CO_VERSION=2.4
49
+ export CO_VERSION=2.5
50
+ export CO_IMAGE_PREFIX=crunchydata
61
51
export CO_IMAGE_TAG=$CO_BASEOS-$CO_VERSION
62
52
export CO_NAMESPACE=demo
63
53
export CO_CMD=kubectl
@@ -74,7 +64,7 @@ source $HOME/.bashrc
74
64
echo " setting up directory structure" | tee -a $LOG
75
65
76
66
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
78
68
79
69
echo " installing deps if necessary" | tee -a $LOG
80
70
86
76
87
77
88
78
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
91
80
if [[ $? -ne 0 ]]; then
92
81
echo " problem getting pgo server config"
93
82
exit 1
94
83
fi
95
84
cd $COROOT
96
- # git checkout 2.4
97
- git checkout master
85
+ tar xzf /tmp/postgres-operator.2.5.tar.gz
98
86
if [[ $? -ne 0 ]]; then
99
- echo " problem getting 2.4 release"
87
+ echo " problem getting 2.5 release"
100
88
exit 1
101
89
fi
102
90
103
91
echo " installing pgo client" | tee -a $LOG
104
92
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
-
114
93
mv pgo $GOBIN
115
94
mv pgo-mac $GOBIN
95
+ mv pgo.exe $GOBIN
116
96
117
97
echo -n " do you want to create the demo namespace? [yes no] "
118
98
read REPLY
119
99
if [[ " $REPLY " == " yes" ]]; then
120
100
echo " creating demo namespace" | tee -a $LOG
121
101
122
102
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
127
107
Kubectl get namespaces
128
108
kubectl config view
129
109
@@ -143,16 +123,15 @@ if [[ "$REPLY" == "yes" ]]; then
143
123
cp $COROOT /examples/pgo.yaml.storageclass $COROOT /conf/apiserver/pgo.yaml
144
124
145
125
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
148
127
fi
149
128
150
129
echo " setting up pgo client auth" | tee -a $LOG
151
130
tail --lines=1 $COROOT /conf/apiserver/pgouser > $HOME /.pgouser
152
131
153
132
echo " for pgo bash completion you will need to install the bash-completion package" | tee -a $LOG
154
133
155
- mv $HOME /pgo-bash-completion $HOME /.bash_completion
134
+ cp $COROOT /examples /pgo-bash-completion $HOME /.bash_completion
156
135
157
136
echo " install complete" | tee -a $LOG
158
137
0 commit comments