forked from openfarmcc/OpenFarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
56 lines (35 loc) · 1.34 KB
/
bootstrap.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
#-*- coding: utf-8 -*-
#!/usr/bin/env bash
sudo apt-get update
aptitude update
aptitude -y -qq upgrade
aptitude install -y -qq build-essential
aptitude install -y -qq cvs git-core
sudo apt-get -y -qq install git
sudo apt-get -y -qq install libcurl3 libcurl3-gnutls libcurl4-openssl-dev
echo "OKAY - GOING TO INSTALL OUR OWN THINGS NOW"
echo "--- INSTALLING RVM ---"
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --quiet-curl --ruby=2.2.0
source /etc/profile.d/rvm.sh
echo "--- INSTALLING RUBY 2.2.0 ---"
source /home/vagrant/.rvm/scripts/rvm
rvm reload
rvm --default use 2.2.0
echo "--- INSTALLING ELASTICSEARCH ---"
sudo apt-get -y -qq install openjdk-7-jre-headless -y
wget –-quiet https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.0.0/elasticsearch-2.0.0.deb
sudo dpkg -i elasticsearch-2.0.0.deb
sudo service elasticsearch start
echo "--- INSTALLING MONGODB ---"
sudo apt-get -y -qq install mongodb
sudo mkdir /data/ && sudo mkdir /data/db/
sudo chown -R vagrant /data/db
sudo service mongodb start
echo "--- OPEN FARM - getting there! ---"
cd /vagrant
gem install bundler
gem install activesupport -v '4.0.2'
bundle install
rake db:setup
echo "ENV['SECRET_KEY_BASE'] = '$(rake secret)'" >> config/app_environment_variables.rb