In Technical


PRE-REQUISITES

  • Install Ruby and its dependencies
    sudo apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert curl
  • Install chef-gem
    sudo gem install chef –no-ri –no-rdoc
  • Install knife-chefsolo gem(tested with Ubuntu-12.04)

BOOTSTRAPPING A VM WITH HAPROXY

  1. Create a VM using knife-computenext plugin
    To know how to launch a VM using knife-computenext plugin, click here.
    <br><br>Bootstrap it by providing the details

    $ knife chefsolo bootstrap IP_ADDRESS –x username –P password –N “New node name” –sudo

  2. After logging into the VM, create a json file with run list in the following format
    {“run_list” : “recipe[haproxy]”}
  3. Execute chef-solo
    If you have already uploaded the haproxy cookbook along with its dependency cookbooks to cookbook path, you can simply give,

    sudo chef-solo –j /path/to/json_file

    OR

    You can mention the recipe URL (need dependency cookbooks to be present in cookbook path).
    sudo chef-solo –j /path/to/json_file -r http://community.opscode.com/cookbooks/haproxy/versions/1_3_2/downloads

Leave a Comment

Start typing and press Enter to search