This vagrant setup serves as a starting point for development trainings. It sets up a ubuntu development vm with preinstalled software packages.
The current version installs the following services on the VM:
- PostgreSQL - Documentation
- User: vagrant
- Password: vagrant
- RabbitMQ - Documentation
- MySQL - Documentation
- User: root
- Password: vagrant
All services can be accessed from the host system using their default ports and the host 127.0.0.1. For a list of forwarded ports please refer to the Vagrantfile.
For a general description about database technologies and choice please have a look here.
!!! And please never use Redis to store persistent data. Redis should be used only as a cache !!!
- git
- rvm & ruby
- Java
- Gradle
- Utilities (curl, jq, ...)
# clone the repo
git clone TODO
# enter the directory
cd dev_env_training
# start the vagrant machine & provision software
vagrant up && vagrant provision
# ssh into the machine when the provisioning process has finished
vagrant ssh
# stop the machine at the end of a working day
vagrant halt
When making changes to the Cheffile and Vagrantfile please reprovision the VM using the following commands:
vagrant up
vagrant provision
The workspace folder is mounted to the VM under /vagrant/workspace. Put your files (sources, ...) in this folder to be able to access the files from your guest and host systems.
Example repositories can be cloned automatically to the workspace/examples directory.
# display status for submodules
git submodule status
# initialize git submodules
git submodule init
git submodule update
Error message: "Shared folders that chef requires are missing ...."
rm .vagrant/machines/default/virtualbox/synced_folders
vagrant reload --provision
# if using a proxy:
# important: url encode user and password
export https_proxy="http://<user>:<password>@proxy_host:proxy_port"
export http_proxy="http://<user>:<password>@proxy_host:proxy_port"
$> vagrant plugin install vagrant-proxyconf
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://192.168.0.2:3128/" # exchange correct http proxy here
config.proxy.https = "http://192.168.0.2:3128/" # exchange correct https proxy here
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
You need to configure the gradle.properties file in ~/.gradle. You can find an example configuration in the gradle.properties file.
git config --global core.fileMode false
git config --add --global core.filemode false
Please execute the commands above in a command line instance with administrator rights.
You can use a normal ssh client (command line, putty, ...) to ssh into the virtual machine. The user and password is vagrant.
ssh -p 2222 [email protected] # pw: vagrant