Last active
January 22, 2018 04:17
-
-
Save eduardomp/2250927e879a64e327c9ed377675085b to your computer and use it in GitHub Desktop.
Minimal tooling and configuration of JHipster environment
This file contains 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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
config.vm.synced_folder "workspace/", "/home/vagrant/workspace" | |
config.vm.network :forwarded_port, host: 8080, guest: 8080 | |
config.vm.network :forwarded_port, host: 8081, guest: 8081 | |
config.vm.network :forwarded_port, host: 9000, guest: 9000 | |
config.ssh.insert_key = true | |
config.vm.provision "shell", inline: <<-SHELL | |
#ENVIRONMENT | |
sudo echo "LANG=en_US.UTF-8" >> /etc/environment | |
sudo echo "LANGUAGE=en_US.UTF-8" >> /etc/environment | |
sudo echo "LC_ALL=en_US.UTF-8" >> /etc/environment | |
sudo echo "LC_CTYPE=en_US.UTF-8" >> /etc/environment | |
#REPOSITORIES | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
#JAVA8 | |
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
sudo apt-get -y install oracle-java8-installer | |
#g++, git, curl, nodejs, npm, yeoman... | |
echo "instalando g++..." | |
sudo apt-get install -y g++ | |
echo "instalando GIT..." | |
sudo apt-get install -y git | |
echo "instalando CURL..." | |
sudo apt-get install -y curl | |
echo "instalando NodeJS..." | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
echo "atualizando npm..." | |
sudo npm install npm@latest -g | |
echo "instalando yeoman" | |
sudo npm install -g yo | |
echo "instalando jHipster" | |
sudo npm install -g generator-jhipster | |
echo "instalando angular cli" | |
sudo npm install -g @angular/cli | |
#POSTGRES | |
sudo apt-get install -y postgresql postgresql-contrib | |
#criar usuario no postgres: sudo -i -u postgres | psql | create database pbw; | \c pbw | create user pbw password 'pbw'; | |
SHELL | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "4096"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment