-
Notifications
You must be signed in to change notification settings - Fork 319
Running with Vagrant
Andy Hoernecke edited this page Apr 1, 2015
·
1 revision
Scumblr can be evaluated using the Vagrantfile and setup script below. Once these are placed into a directory, a VM can be created using the "vagrant up" command. Scumblr should be started on port 3000. You will still need to setup an admin user per the instructions here: https://github.com/Netflix/Scumblr/wiki#create-an-admin-user
Note: This setup is best suited for evaluation purposes only!
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network "forwarded_port", guest: 3000, host: 3000
end
boostrap.sh
apt-get update
apt-get -y install git curl redis-server libxslt-dev libxml2-dev libyaml-dev build-essential bison openssl zlib1g libxslt1.1 libssl-dev libxslt1-dev libxml2 libffi-dev libxslt-dev autoconf libc6-dev libreadline6-dev zlib1g-dev libtool libsqlite3-dev libcurl3 libmagickcore-dev libmagickwand-dev imagemagick libpq-dev
sudo aptitude purge ruby
wget -O - https://get.rvm.io | bash
rvm requirements
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
source /etc/profile.d/rvm.sh
rvm install ruby-2.1.2
rvm use 2.1.2
rvm rubygems current
gem install bundler --no-ri --no-rdoc
gem install rails -v 4.0.9 --no-ri --no-rdoc
gem install sidekiq --no-ri --no-rdoc
cd /vagrant
git clone https://github.com/Netflix/Scumblr.git
cd Scumblr
bundle install
rake db:create
rake db:schema:load
redis-server &
rails s &
sidekiq -l log/sidekiq.log &
echo '----------------------------------------------' >> /etc/motd
echo 'Welcome! We have already set up a base box for' >> /etc/motd
echo 'you, but there is still config yet to be done.' >> /etc/motd
echo 'You need to go into /vagrant/Scrumblr and make' >> /etc/motd
echo 'an admin user. See: ' >> /etc/motd
echo ' https://github.com/Netflix/Scumblr/wiki#create-an-admin-user' >> /etc/motd
echo '----------------------------------------------' >> /etc/motd
cat /etc/motd
# user = User.new
# user.email = "admin@localhost.com"
# user.password = "root"
# user.password_confirmation = "root"
# user.admin = true
# user.save