Skip to content

OpenLMIS/env-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

|======================================================|
|   ____                   _      __  __ _____  _____  |
|  / __ \                 | |    |  \/  |_   _|/ ____| |
| | |  | |_ __   ___ _ __ | |    | \  / | | | | (___   |
| | |  | | '_ \ / _ \ '_ \| |    | |\/| | | |  \___ \  |
| | |__| | |_) |  __/ | | | |____| |  | |_| |_ ____) | |
|  \____/| .__/ \___|_| |_|______|_|  |_|_____|_____/  |
|        | |                                           |
|        |_|                                           |
|                                                      |
|   env-setup                                          |
;======================================================;

Currently this is mainly focussed to RHEL6/CentOS6 distros

Maintaining DevOps related Project requirements

* Requirements : ruby, chef, knife
  ============

SETUP
=====
Using Chef-Solo
--------------

* Set up your base machine as a knife client. Find more on chef http://wiki.opscode.com/display/chef/Chef+Basics
* Set up git on your base machine
*   Run following commands : -
           git clone https://github.com/OpenLMIS/env-setup.git
           cd env-setup/chef-solo
           knife bootstrap vm/ec2-IP/domain-name  --template-file centos6.rb -x username

* The vm/ec2 instance is up and running with latest build.

Using Chef Server
----------------
* Set up a chef server as described in http://blog.frameos.org/2011/05/19/installing-chef-server-0-10-in-rhel-6-scientificlinux-6/
* Set up your base machine as a knife client. Find more on chef http://wiki.opscode.com/display/chef/Chef+Basics 
* Bootstrap a new node using ./scripts/bootstrap-templates/centos6.rb. This will register the node to the chef server.
* Upload cookbooks from ./chef/cookbooks to the chef server
* Upload roles from ./chef/roles to the chef server
* Run baserole on the newly set up node
* Node is ready for the application to be deployed.

Cookbook Testing
================
* Using chefspec (rspec based) tool for cookbook testing https://github.com/acrmp/chefspec
* Gemfile in env-setup has the gems loaded.
* Run bundle install to install the gems.
* unit_test rake task is defined in Rakefile.
* Use `bundle exec rake` to test all cookbooks.
* For individual cookbook spec testing use `rspec chef/cookbooks/<cookbook_name>/spec/*_spec.rb`

About

repo to maintain vm setup scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages