This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
provisioning.sh
60 lines (50 loc) · 1.58 KB
/
provisioning.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
#
# Vagrant provisioning script
#
# Copyright 2014 Michael Weibel <[email protected]>
# License: MIT
#
#
# Install Prosody XMPP server
#
echo "deb http://packages.prosody.im/debian precise main" > /etc/apt/sources.list.d/prosody.list
wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
apt-get update
apt-get install -y liblua5.1-bitop prosody lua-event
# Install Websockets module
wget -O /usr/lib/prosody/modules/mod_websocket.lua http://prosody-modules.googlecode.com/hg/mod_websocket/mod_websocket.lua
# Place config
cp /vagrant/prosody.cfg.lua /etc/prosody/prosody.cfg.lua
/etc/init.d/prosody restart
#
# Install nginx for static file serving
#
apt-get install -y nginx
cp /vagrant/nginx-default.conf /etc/nginx/sites-available/default
/etc/init.d/nginx restart
ln -fs /vagrant/candy /usr/share/nginx/html/candy
ln -fs /vagrant/candy-plugins /usr/share/nginx/html/candy-plugins
ln -fs /vagrant/candy-index.html /usr/share/nginx/html/index.html
#
# Candy development dependencies
#
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
cd /vagrant/candy
npm install -g
#
# Selenium & PhantomJS for testing
#
apt-get install -y openjdk-7-jre
mkdir /usr/lib/selenium/
cd /usr/lib/selenium/
wget http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar
mkdir -p /var/log/selenium/
chmod a+w /var/log/selenium/
cp /vagrant/selenium.init.sh /etc/init.d/selenium
chmod 755 /etc/init.d/selenium
/etc/init.d/selenium start
update-rc.d selenium defaults
apt-get install -y phantomjs