bdcravens / railo-vagrant

Simple setup to launch a VM using Vagrant running Ubuntu 12.04 and Railo
15 stars 8 forks source link

railo-vagrant

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

Configure Host

192.168.33.10   testrailo.dev

Running it

$ 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)

Railo Version

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)

Making Changes

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

Railo Administration location

Usual location

Passwords

Hey Billy, you're an idiot because you ….

I'm an expert at a few things, and a hack at most. Feel free to make changes and issue a pull request.

Where's the Adobe and OpenBD love? Why jars and not wars? etc

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.

Error Resolution

error

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.

resolution

linux

$ sudo apt-get install nfs-kernel-server

windows

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

Special thanks to ….