ruby - how to get started with Chef cookbook? -


i have followed below mentioned article configure apache, mysql, php using chef cookbook.

http://gettingstartedwithchef.com/first-steps-with-chef.html

my purpose write standalone application, needed setup mysql, apache, php etc.

by following article, observed executing chef commands install stuffs & getting modifying configuration files manually.

for example following command wrote respective ruby equivalent:

 rvm install ruby-2.1.2 ruby equivalent : `rvm install ruby-2.1.2` 

similar way, found alternatives shell commands & prepared ruby code.

i not sure whether that's right approach.

2nd: how can custom functionality, let's bundling gemfile inside project repo or running rails migrations. how perform operations, please guide.

there're many community created cookbooks many applications. can find many cookbooks on chef supermarket.

in general, can install packet use packet manager way: supported install options can cookbook.

    package "#{res_name} :create nginx"       package_name 'nginx'       action :install     end 

if want install ruby rvm package, can use gem_package statement:

    gem_package 'name'       clear_sources              trueclass, falseclass       gem_binary                 string       notifies                   # see description       options                    string       package_name               string, array # defaults 'name' if         not specified       provider                   chef::provider::package::rubygems       source                     string       subscribes                 # see description       timeout                    string, integer       version                    string, array       action                     symbol # defaults :install if not specified     end 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -