A Ubuntu 10.04 Vagrant setup with Play! 2.1.1 and Scala 2.10.1.
- VirtualBox - Free virtualization software Downloads
- Vagrant - Tool for working with virtualbox images Vagrant Home, click on 'download now link'
- Git - Source Control Management Downloads
- Clone this repository
git clone {git://github.com/SegFaultx64/vagrant-play.git}
- Modify
Vagrantfile
to set it's git address to be that of you app if you would like - run
vagrant up
inside the newly created directory - (the first time you run vagrant it will need to fetch the virtual box image which is ~300mb so depending on your download speed this could take some time)
- Vagrant will then use Chef Solo to provision the base virtual box with the Typesafe stack (this could take a few minutes, the JDK is big and Ubuntu's mirrors are slow)
- You can verify that everything was successful by opening http://localhost:9000 in a browser
- NOTE: The first time you hit the Play! application it will have to compile which takes a long time. Also it takes a while for the Play! framework to load the project file so if you try to hit the address in the first 1 minute or so after the box comes up you will get an error.
- zsh - Because I am far too used to it to switch back to bash
- oh_my_zsh - Otherwise zsh is a pain to configure especially from Chef
- git - Used for pulling down oh_my_zsh and your projects
- screen - Used to run Play! in interactive mode in the background
Some basic information on interacting with the vagrant box
- 9000 - Play
play_console
: This will connect you to the GNU screen on which the play console is running. To disconnect without exiting Play! doctrl + a + d
. To stop play doctrl + d
as normal.
Vagrant is very well documented but here are a few common commands:
vagrant up
starts the virtual machine and provisions itvagrant suspend
will essentially put the machine to 'sleep' withvagrant resume
waking it back upvagrant halt
attempts a graceful shutdown of the machine and will need to be brought back withvagrant up
vagrant ssh
gives you shell access to the virtual machine
Hit me up on Twitter @ReluctantHipstr
- OS - Ubuntu 10.04
- Play - 2.1.1
- Scala - 2.10.1
- JDK - OpenJDK 1.6.0_27