Simple setup to launch a VM using Vagrant running Ubuntu 12.04 and Railo
Prerequisites:
Vagrant allows you to launch local VMs via the command line that can easily be destroyed and recreated. It's power is in the ability to script out all of the tasks you'd need when launching a VM using Chef or Puppet.
This project uses Vagrant + Chef to create a VM with the following:
This uses a very basic Chef recipe (Chef recipes are written in Ruby). Some caveats
192.168.33.10 testrailo.dev
$ git clone git@github.com:bdcravens/railo-vagrant.git
$ cd railo-vagrant
$ git submodule init
$ git submodule update
$ vagrant up
After it starts, verify it runs by opening http://testrailo.dev
. You should see a cfdump of server scope. (Note: you'll need to set up the hosts entry as above first, or whatever you've changed the values to in Vagrantfile and/or your attributes file)
Originally written to load Railo 3.3.x. If you want to run Railo 4.0, rename cookbooks/main/recipes/default.rb
to default.rb.old
and rename railo4.rb
to default.rb
. (Modularizing this and making it easy to select version is a TODO)
See cookbooks/attributes/default.rb
(Yes, it's Ruby. You'll be fine.) If you want to perform more Tomcat or Railo config changes, see the respective files (server.xml.rb, web.xml.rb, or _admin.cfm.rb) in cookbooks/templates/default
You will want to empty out the code directory (including WEB-INF
) if you make any changes to the index.cfm
or admin.cfm
templates. To restart without redownloading things like Railo and Tomcat:
$ vagrant reload
To start over from scratch:
$ vagrant destroy
$ vagrant up
Usual location
railoserver
and railoweb
)railodb
for root
)I'm an expert at a few things, and a hack at most. Feel free to make changes and issue a pull request.
Could easily do this with all the above (though exact steps of setting password, making admin changes, etc, would vary) - the concepts are the same. Use this project as your starting point.
The host class is reporting that NFS is not supported by this host,
or `nfsd` may not be installed. Please verify that `nfsd` is installed
on your machine, and retry.
$ sudo apt-get install nfs-kernel-server
Change the vagrantfile so you use virtualbox's shared folders instead of nfs, by setting nfs=>false: config.vm.share_folder "blah", "~/blah", ".", :extra => 'dmode=755,fmode=644', :nfs => false
http://devblog.alexsapps.com/2012/11/solution-to-vagrant-up-host-class-is.html