Last active
January 4, 2018 05:58
-
-
Save DrLonnieJonesPFMP/239c6f56ab0f10df213c97839faca5fd to your computer and use it in GitHub Desktop.
New Udemy Full Stack Provision File for Vagrant 2.0.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Description: new Udemy Full Stack Provision file for Vagrant 2.0.1 | |
| # Date: 01/08/2018 | |
| # Author: @L-10 || LJones | |
| # Notes: Installation redundancy to support prior versions of Ubuntu | |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "bento/ubuntu-16.04-i386" | |
| config.vm.network "forwarded_port", guest: 8000, host: 8000, host_ip: "127.0.0.1" | |
| config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1" | |
| config.vm.network "forwarded_port", guest: 5000, host: 5000, host_ip: "127.0.0.1" | |
| # Work around disconnected virtual network cable. | |
| config.vm.provider "virtualbox" do |vb| | |
| vb.customize ["modifyvm", :id, "--cableconnected1", "on"] | |
| end | |
| config.vm.provision "shell", inline: <<-SHELL | |
| sudo apt-get -qqy update | |
| # apt-get -qqy upgrade | |
| apt-get install python-pip python-dev build-essential | |
| pip install --upgrade pip -i https://pypi.python.org/simple | |
| pip install --upgrade virtualenv | |
| apt-get -qqy install make zip unzip postgresql | |
| apt-get -qqy install python3 python3-pip | |
| pip3 install --upgrade pip | |
| pip3 install flask packaging oauth2client redis passlib flask-httpauth | |
| apt-get install python-flask | |
| pip3 install sqlalchemy flask-sqlalchemy psycopg2 bleach | |
| pip install SQLAlchemy -i https://pypi.python.org/simple | |
| apt-get -qqy install python python-pip | |
| pip2 install --upgrade pip | |
| pip2 install flask packaging oauth2client redis passlib flask-httpauth | |
| pip2 install sqlalchemy flask-sqlalchemy psycopg2 bleach | |
| su postgres -c 'createuser -dRS vagrant' | |
| su vagrant -c 'createdb' | |
| su vagrant -c 'createdb news' | |
| su vagrant -c 'createdb forum' | |
| su vagrant -c 'psql forum -f /vagrant/forum/forum.sql' | |
| vagrantTip="[35m[1mThe shared directory is located at /vagrant\\nTo access your shared files: cd /vagrant[m" | |
| 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 | |
| echo "Done installing your virtual machine!" | |
| SHELL | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment