A chef cookbook for deploying a JumpSquares server
Ruby
Latest commit fc771e6 Jul 20, 2014 kacole2 redo-it
Permalink
Failed to load latest commit information.
attributes initial commit May 16, 2014
recipes remove comment May 19, 2014
.project redo-it Jul 20, 2014
CHANGELOG.md updated change log May 16, 2014
Gemfile initial commit May 16, 2014
README.md Passenger works correctly May 19, 2014
metadata.rb initial commit May 16, 2014

README.md

jumpsquares Cookbook

This cookbook will install the JumpSquares application on an ubuntu or debian machine. Only use this if you feel like you want to play around. Otherwise, it's probably a safer idea to download the appliance version that's pre-built. This was an attempt to make my first chef cookbook with my own project. In addition, directly downloading from my source doesn't include the 250+ types of application types.

Requirements

Tested with Ubuntu 12.04.03

Other cookbooks required:

  • apt - used to update packages to the latest
  • openssl - requirements for postgresql
  • rvm - installs RVM and rubies. Suggested ruby to install is ruby-2.1.2
  • postgresql - database for JumpSquares
  • nginx - used for passenger_and_thin recipe. This recipe doesn't work (403 Forbidden) but leaving it there for future purposes
  • thin_nginx - used for thin_and_nginx recipe. Creates a thin and nginx rack based solution

Installs packages outside of the cookbooks:

  • ImageMagick - used for application type images

All gems required to run JumpSquares through RVM shell calling "bundle install" are installed

Attributes

Attributes here are supposed to be overwritten.

jumpsquares::default

Key Type Description Default
['jumpsquares']['www_dir'] String www directory '/var/www'
['jumpsquares']['jumpsquares_dir'] String the JumpSquares directory '/var/www/jumpsquares'
['jumpsquares']['rvm_source'] String the local RVM source '/usr/local/rvm/scripts/rvm'
["postgresql"]["pg_hba_defaults"] Boolean we want to set our own default False
["postgresql"]["pg_hba"] String the that changes it all [ { "type"=> "local", "db"=> "all", "user"=> "postgres", "addr"=> "", "method"=> "peer" }, { "type"=> "local", "db"=> "all", "user"=> "all", "addr"=> "", "method"=> "md5" }, { "type"=> "host", "db"=> "all", "user"=> "all", "addr"=> "127.0.0.1/32", "method"=> "md5" }, { "type"=> "host", "db"=> "all", "user"=> "all", "addr"=> "::1/128", "method"=> "md5" } ]

jumpsquares::thin_and_nginx

I have no idea why, but these value are not overriding the cookbook. Go into the thin_nginx::default recipe and make sure the following values are correct

Key Type Description Default
['thin_nginx']['app_name'] String Of course it's JumpSquares! "jumpsquares"
['thin_nginx']['www_dir'] String the JumpSquares directory '/var/www/'
['thin_nginx']['rails_env'] String specify our rails envionment "appliance-production"
['thin_nginx']['ruby_version'] String ruby version needed for calling RVM "ruby-2.1.2"
['thin_nginx']['ruby_path'] String RVM ruby local path "/usr/local/rvm"
['thin_nginx']['rvm_source'] String RVM ruby source "/usr/local/rvm/scripts/rvm"

jumpsquares::passenger_and_nginx

No attributes to set. Just add it and watch it work.

Usage

jumpsquares::default

When using jumpsquares in your node's run_list, it will only do a basic install. You need to specify other cookbooks and recipes to create a working solution. Here is my current recipe run list that works:
0. apt
1. openssl
2. rvm::system
3. postgresql::server
4. postgresql::libpq
5. postgresql::client
6. jumpsquares
7. thin_nginx

jumpsquares::thin_nginx

Just include jumpsquares::thin_and_nginx in your node's run_list. However, go to thin_nginx and make sure the attributes match what is shown above.

jumpsquares::passenger_nginx

Just include jumpsquares::passenger_and_nginx in your node's run_list. This will install all the necessary components. No attributes are necessary.

Contributing

I am not a software developer by nature. Just a hack. Please contribute to make this better.


1. Fork the repository on Github
2. Create a named feature branch (like add_component_x)
3. Write your change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github

License and Authors

Authors: Kendrick Coleman | @KendrickColeman

Licensed under Apache 2.0