![]() ![]() Now we are all set to bootstrap an EC2 instance with the my_app role with the following knife ec2 server create -I ami-9eaa1cf6 -r "role" -Z us-east-1c -g Chef11_Server_On_EC2_Security_Group -ssh-key Chef_11_Server -i Chef_11_Server.pem -f t2.micro -A 'AK***' -K "bm***" -region us-east-1 -ssh-user knife ec2 server create -r "role" In the editor, fill the file contents in JSON format as below: Then, at the knife role create command, editing window will be opened. We will create a role named "my_app", enter:Īctually, before we issue the command knife role create, we need to set $EDITOR as below: When a chef-client runs, it merges its own attributes and run-lists with those contained within each assigned role. When a role is run against a node, the configuration details of that node are compared against the attributes of the role, and then the contents of that role's run-list are applied to the node's configuration details. Each node can have zero (or more) roles assigned to it. Each role consists of zero (or more) attributes and a run-list. Uploaded 2 knife cookbook upload chef-sugar openssl tomcatĪ role is a way to define certain patterns and processes that exist across nodes in an organization as belonging to a single job function. Upload the cookbooks to the knife cookbook upload java apt On the workstation, create the required cookbooks and upload to the Chef cd ~/chef-repo/cookbooks/Ĭlone the repositories from git clone git clone git clone git clone git clone ![]() Successfully installed knife-windows-0.8.2 Successfully installed eventmachine-1.0.3 Successfully installed little-plugger-1.1.3 Successfully installed httpclient-2.5.3.3 Successfully installed fog-softlayer-0.3.25 Successfully installed fog-brightbox-0.7.0 Successfully installed mini_portile-0.6.1 To install the knife ec2 plugin using RubyGems, we want to run the following sudo apt-get install make sudo apt-get install libxml2 libxml2-dev sudo apt-get install sudo /opt/chef/embedded/bin/gem install knife-ec2 Chef Knife plugin for EC2 gives knife the ability to create, bootstrap, and manage EC2 instances. The knife ec2 is used to manage API-driven cloud servers that are hosted by Amazon EC2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |