Vagrant + Chef + Railo project

231 views
Skip to first unread message

Billy Cravens

unread,
Nov 21, 2012, 3:12:34 PM11/21/12
to ra...@googlegroups.com
Posted what I've worked with to get a basic Vagrant VM with Railo running.


Pretty basic: 
- Ubuntu 12.04
- Tomcat (via apt-get) + Railo (jar install into Tomcat)
- no Apache/nginx yet
- single Chef recipe: probably needs to be split up
- basic Railo admin config (only sets server/web admin passwords)
- Linux permissions, etc probably need tweaking

If you see any issues, please log issues and/or do a pull request. Thanks!



Billy Cravens
bdcr...@gmail.com



Mark Drew

unread,
Nov 21, 2012, 3:37:20 PM11/21/12
to ra...@googlegroups.com
Awesome work fella! I shall give it a bash tomorrow!

Regards
Mark Drew

Billy Cravens

unread,
Nov 21, 2012, 3:42:45 PM11/21/12
to ra...@googlegroups.com
Great - I'd love to hear your thoughts.  Be sure and pull the latest when you do - fixing a small issue now. 

Billy Cravens
bdcr...@gmail.com


DL

unread,
Nov 21, 2012, 6:43:33 PM11/21/12
to ra...@googlegroups.com
Bill,

I have to admit, all of these things are new to me except railo itself.  I then read about virtualbox and vagrant.  What is the purpose of your project?  Is it just to demonstrate how to set up a local linux environment?  Could you point out some benefits?  Can this help production?

Thanks,

Derek

Mark Drew

unread,
Nov 23, 2012, 9:20:06 AM11/23/12
to ra...@googlegroups.com
Hi Derek

A quick way to explain how vagrant works is that you can include a simple text file within your project and submit that to the version control, then, when the next developer comes on board, he checks it all out and does:

> vagrant up

from the command line within your project and it creates a server with railo, apache or whatever already installed.

Check out http://vagrantup.com

so what Billy did is awesome work as it brings Railo to the masses.


Another way to look at it is… let's say I hire Bob. Bob is a JavaScript/HTML5 guru, and he is going to style the hell out of my project and make it Funkeee!

He checks out the code via git (cos he is cool like that) then runs the vagrant script… and voila, no installing railo or setting it up, it all works happy as larry.

Make sense?

Regards

Mark Drew

Mark Drew

unread,
Nov 23, 2012, 10:06:55 AM11/23/12
to ra...@googlegroups.com
So I was a bit late to the party, I had a fatal crash on my laptop and the hard-drive went gaga

Anyway, I have managed to play round with this but strangely, code isn't updating. WEll, now that I have tried it… it's not updating immediately.

I wonder if this is from Safari (hey, new install) or what?

Have you seen this issue?

Awesome work tho! It's super great! 

MD 

Billy Cravens

unread,
Nov 23, 2012, 10:06:53 AM11/23/12
to ra...@googlegroups.com
Thanks for checking it out Derek! I appreciate that these are new technologies to many, and requires us to stretch a bit from the developer role to the dev-ops role (a good thing, IMO)

In addition to what Mark said:

It lets your dev environment more closely mirror production (my project is Ubuntu, but can be any OS that VirtualBox supports, though Linux works best). So why not just regular VM images? Well, that requires a 300MB-1GB+ to be passed around over the wire. With Vagrant, you download the base OS once (in my case, it's stock Ubuntu) and only update using simple scripts that can be checked out of SCM. 

You could accomplish a lot with simple bash scripts, but Vagrant lets you work at the VM level (networking settings, etc) and Chef gives you full power of Ruby (not CF I know, but I think most CF devs are more comfortable with Ruby than bash scripting. Most of what you write doesn't really feel like Ruby - it's more of a DSL, but the full power is there if you need it). (Again, at this point my cookbook is basic, but don't let that fool you! So much more is capable.)

What I've written is *very* simple, but there's tons of Chef recipes out there for any task you can imagine (install MySQL/PostgreSQL/MongoDB, install and configure Apache/nginx, memcached, etc) http://community.opscode.com/cookbooks

Aside from a team setting where you have a standardized environment, it's good for the consultant as well. It lets you easily isolate your projects, keeping your hard drive clean, preventing conflicts between versions, etc. 


Billy Cravens
bdcr...@gmail.com


Mark Drew

unread,
Nov 23, 2012, 10:12:28 AM11/23/12
to ra...@googlegroups.com
Actually, dis-regard my last email regarding code changes. It was a browser issue methinks.

Everything working as it should! This is great! 

Billy Cravens

unread,
Nov 23, 2012, 10:12:40 AM11/23/12
to ra...@googlegroups.com
Can you clarify what code? The project on GitHub? Or the code in the project? Is it not updating admin settings?


Billy Cravens
bdcr...@gmail.com


Billy Cravens

unread,
Nov 23, 2012, 10:13:30 AM11/23/12
to ra...@googlegroups.com
Haha, ok, hit Send (or rather the funny little paper airplane button) before I saw your post.

Billy Cravens
bdcr...@gmail.com


Mark Drew

unread,
Nov 23, 2012, 10:14:37 AM11/23/12
to ra...@googlegroups.com
I was changing code/index.cfm and it wasn't updating. 

PEBKAC

MD 

DL

unread,
Nov 23, 2012, 6:39:13 PM11/23/12
to ra...@googlegroups.com
Hi Mark and Bill,

Thanks for explaining the numerous benefits.  Do these good things extend to the cloud world?  I haven't tried amazon ec2 yet.  As far as I know, it's like a linux box.  So I can use what Bill has done and set up my environment quickly on amazon ec2, right?

Thanks,

Derek

Billy Cravens

unread,
Nov 23, 2012, 11:19:55 PM11/23/12
to ra...@googlegroups.com
You wouldn't use Vagrant to deploy to EC2, but the Chef recipe is a great starting point for managing deploying to EC2 (Chef's original purpose was deployment)

Billy Cravens
bdcr...@gmail.com

Billy Cravens

unread,
Nov 28, 2012, 2:59:23 PM11/28/12
to ra...@googlegroups.com
The creator of Vagrant announced he is incorporating to focus full time on the product:


It'll remain open source, while moving towards a model similar to Railo's. (services, training, etc) This will allow for better documentation, enhancements, etc. In addition, on the roadmap is to rely on VMs other than VirtualBox.



Billy Cravens
bdcr...@gmail.com


Matt Quackenbush

unread,
Nov 28, 2012, 3:00:10 PM11/28/12
to ra...@googlegroups.com
Awesome!

ronnie otts

unread,
Nov 28, 2012, 3:01:55 PM11/28/12
to ra...@googlegroups.com
fantastic.

Billy Cravens

unread,
Nov 29, 2012, 9:27:47 AM11/29/12
to ra...@googlegroups.com
Updated to run Railo 4. Bit of a hack - you have to backup the default.rb recipe, and rename railo4.rb to default.rb. Need to rework it so that things are modular and easy to switch between versions.

Billy Cravens
bdcr...@gmail.com


Sean Daniels

unread,
Nov 30, 2012, 7:53:45 AM11/30/12
to ra...@googlegroups.com
This is too fricking cool Billy! Thanks for sharing, looking forward to trying it out.
Reply all
Reply to author
Forward
0 new messages