4
4
set -o errexit
5
5
6
6
7
- VAGRANT_URL_DEBIAN=" https://releases.hashicorp.com/vagrant/1.8.5 /vagrant_1.8.5_x86_64 .deb"
7
+ VAGRANT_URL_DEBIAN=" https://releases.hashicorp.com/vagrant/1.8.6 /vagrant_1.8.6_x86_64 .deb"
8
8
ERLANG_APT_GPG_KEY_URL=" http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc"
9
9
ERLANG_APT_REPOSITORY_URL=" http://packages.erlang-solutions.com/ubuntu"
10
10
RABBITMQ_PACKAGECLOUD_SCRIPT=" https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh"
@@ -59,7 +59,7 @@ function verlt() {
59
59
}
60
60
61
61
62
- echo " installing media cloud system dependencies"
62
+ echo " Installing Media Cloud system dependencies... "
63
63
echo
64
64
65
65
if [ ` uname` == ' Darwin' ]; then
87
87
exit 1
88
88
fi
89
89
90
+ echo " Installing Media Cloud dependencies with Homebrew..."
90
91
brew install \
91
92
coreutils \
92
93
cpanminus \
96
97
homebrew/dupes/tidy \
97
98
hunspell \
98
99
libyaml \
99
- libyaml \
100
100
netcat \
101
101
openssl \
102
+ python3 \
102
103
rabbitmq \
103
104
#
104
105
106
+ echo " Installing Media Cloud dependencies with cpanm..."
105
107
sudo cpanm \
106
108
DBD::Pg \
107
109
Graph \
138
140
139
141
# assume Ubuntu
140
142
source /etc/lsb-release
143
+
144
+ echo " Installing curl..."
141
145
sudo apt-get -y install curl
142
146
143
147
# Apt's versions of Supervisor, Vagrant, RabbitMQ are too old
@@ -154,7 +158,11 @@ else
154
158
155
159
if verlt " $DISTRIB_RELEASE " " 14.04" ; then
156
160
# Ubuntu < 14.04 APT's version of Erlang is too old (needed by RabbitMQ)
161
+ echo " Removing system package Erlang on Ubuntu 12.04 because it's too old..."
157
162
sudo apt-get -y remove erlang*
163
+
164
+ # Install and hold specific version of Erlang
165
+ echo " Installing Erlang from Erlang Solutions..."
158
166
curl " $ERLANG_APT_GPG_KEY_URL " | sudo apt-key add -
159
167
echo " deb $ERLANG_APT_REPOSITORY_URL precise contrib" | \
160
168
sudo tee -a /etc/apt/sources.list.d/erlang-solutions.list
169
177
170
178
# Ubuntu (all versions) APT's version of RabbitMQ is too old
171
179
# (we need 3.6.0+ to support priorities and lazy queues)
180
+ echo " Adding RabbitMQ GPG key for Apt..."
172
181
curl -s " $RABBITMQ_PACKAGECLOUD_SCRIPT " | sudo bash
173
182
174
183
if verlt " $DISTRIB_RELEASE " " 14.04" ; then
@@ -184,12 +193,23 @@ else
184
193
185
194
if verlt " $DISTRIB_RELEASE " " 16.04" ; then
186
195
# Solr 6+ requires Java 8 which is unavailable before 16.04
196
+ echo " Adding Java 8 PPA repository to Ubuntu 12.04..."
187
197
sudo apt-get -y install python-software-properties
188
198
sudo add-apt-repository -y ppa:openjdk-r/ppa
189
199
sudo apt-get update
190
200
fi
191
201
202
+ # Python version to install
203
+ if verlt " $DISTRIB_RELEASE " " 16.04" ; then
204
+ # We require at least Python 3.5 (12.04 only has 3.2 which doesn't work with newest Pip)
205
+ echo " Adding Python 3.5 PPA repository to Ubuntu 12.04..."
206
+ sudo apt-get -y install python-software-properties
207
+ sudo add-apt-repository -y ppa:fkrull/deadsnakes
208
+ sudo apt-get update
209
+ fi
210
+
192
211
# Install the rest of the packages
212
+ echo " Installing Media Cloud dependencies with APT..."
193
213
sudo apt-get --assume-yes install \
194
214
build-essential \
195
215
cpanminus \
@@ -231,17 +251,21 @@ else
231
251
python-pip \
232
252
python2.7 \
233
253
python2.7-dev \
254
+ python3.5 \
255
+ python3.5-dev \
234
256
unzip \
235
257
#
236
258
237
259
# Choose to use OpenJDK 8 by default
238
260
PATH=" $PATH :/usr/sbin"
261
+ echo " Selecting Java 8..."
239
262
sudo update-java-alternatives -s ` update-java-alternatives --list | grep java-1.8 | awk ' { print $3 }' `
240
263
241
264
# Install / upgrade Setuptools before installing Python dependencies
242
265
wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python2.7 -
243
266
244
267
# Disable system-wide RabbitMQ server (we will start and use our very own instance)
268
+ echo " Stopping and disabling system's RabbitMQ instance..."
245
269
sudo update-rc.d rabbitmq-server disable
246
270
sudo service rabbitmq-server stop
247
271
@@ -284,12 +308,3 @@ else
284
308
fi
285
309
286
310
fi
287
-
288
- # Install (upgrade) Supervisor
289
- # (change dir, otherwise the installer might think we're trying to install
290
- # from the supervisor/ directory)
291
- if [ ` uname` == ' Darwin' ]; then
292
- ( cd /tmp; pip install --upgrade supervisor )
293
- else
294
- ( cd /tmp; sudo pip install --upgrade supervisor )
295
- fi
0 commit comments