Skip to content

Commit

Permalink
Refresh Vagrantfile to install all the things.
Browse files Browse the repository at this point in the history
Also, add a .gitignore to get git to ignore things.
  • Loading branch information
karlud committed Apr 20, 2017
1 parent 69134ff commit 483ecd3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 30 deletions.
3 changes: 3 additions & 0 deletions vagrant/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__pycache__
*.pyc
.vagrant
29 changes: 24 additions & 5 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", path: "pg_config.sh"
config.vm.box = "ubuntu/trusty32"
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial32"
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 5000, host: 5000
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get upgrade
apt-get -qqy install make python3-pip
apt-get -qqy install postgresql
pip3 install --upgrade pip
pip3 install flask packaging oauth2client redis passlib flask-httpauth
pip3 install sqlalchemy flask-sqlalchemy psycopg2 bleach
su postgres -c 'createuser -dRS ubuntu'
su ubuntu -c 'createdb'
su ubuntu -c 'createdb forum'
su ubuntu -c 'psql forum -f /vagrant/forum/forum.sql'
vagrantTip="The shared directory is located at /vagrant\\nTo access your shared files: cd /vagrant"
echo -e $vagrantTip > /etc/motd
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
make install
SHELL
end
25 changes: 0 additions & 25 deletions vagrant/pg_config.sh

This file was deleted.

0 comments on commit 483ecd3

Please sign in to comment.