Chef Infra Automation Commands

Chef Infra Automation Commands
Quick Command Guide reference:

 

knife bootstrap IPADDRESS(hostname) –sudo -x username -P password -N target1 (This installs chef-client and validates)

knife bootstrap WIN-I2R3V7Q9AFV –sudo -x username -P passwd -N nodename

 

Bootstrap Virtual box

**********************

knife bootstrap 192.168.1.101 –ssh-user vasanth –ssh-password ‘vasanth123’ –sudo –use-sudo-password –node-name virtuenode

knife bootstrap x.x.x.x –ssh-user ubuntu –sudo –identity-file ./.chef/mykey.pem –run-list webserver

knife bootstrap 172.31.51.157 –ssh-user ec2-user –sudo –identity-file ./.chef/user.pem

knife bootstrap 172.31.51.157 –ssh-user ec2-user –sudo –identity-file “C:Usersuser.sshid_rsa”

 

knife bootstrap windows winrm ADDRESS –winrm-user USER –winrm-password ‘PASSWORD’ –node-name target3 –run-list ‘recipe[learn_chef_iis]’ –winrm-transport ssl –winrm-ssl-verify-mode verify_none

knife bootstrap windows winrm WIN-I2R3V7Q9AFV –winrm-user username –winrm-password ‘passwd’ –node-name target3 –run-list ‘recipe[learn_chef_iis]’ –winrm-transport ssl –winrm-ssl-verify-mode verify_none

knife cookbook create apache

knife cookbook upload apache

Login via putty and run “sudo chef-client”

knife node show target1

knife node show target1 -l

knife node show target1 -Fj

knife node show target1 -a fqdn

knife search node “*:*” -a fqdn

 

From workstation

*******************

Using Chefdk

chef generate repo chef-repo

chef generate cookbook webserver

 

Installing and configuring kitchen

**********************************

Under your Chef local repo

gem install test-kitchen

gem install test-kitchen

kitchen init –create-gemfile /          kitchen init –driver=kitchen-vagrant

kitchen –version

kitchen list

kitchen create default-ubuntu-1404

kitchen list

kitchen converge default-ubuntu-1404

kitchen login default-ubuntu-1404

kitchen verify default-ubuntu-1404

kitchen verify 64 (centos)

kitchen test default-ubuntu-1404

kitchen help

kitchen help init

kitchen destroy

gem install test-kitchen

kitchen init –create-gemfile /          kitchen init –driver=kitchen-vagrant

kitchen –version

kitchen list

kitchen create default-ubuntu-1404

kitchen list

kitchen converge default-ubuntu-1404

kitchen login default-ubuntu-1404

kitchen verify default-ubuntu-1404

kitchen verify 64 (centos)

kitchen test default-ubuntu-1404

kitchen help

kitchen help init

kitchen destroy

Data bag

*********

knife data bag create databagname 1.x.x

Browsing the supermarket

*************************

knife cookbook site list

knife cookbook site search mysql

knife cookbook site show mysql

knife cookbook site show mysql 0.10.0

knife cookbook site download mysql

knife cookbook site install mysql

knife -v

Uploading cookbooks to Supermarket

*****************************************

knife cookbook site share “my_apache2_cookbook” “Web Servers”

Delete Node from Chef server

*****************************

knife node delete my_node (delete node in server)

knife node client my_node (delete client object in server)

Create Roles and environment

*****************************

subl roles/web_server.rb

knife role from file web_server.rb

knife node edit server

sudo chef-client

knife environment create book

knife environment list

knife node list

knife node list -E book

knife node edit my_server

knife node list -E book

knife environment edit book

 

14 thoughts on “Chef Infra Automation Commands”

  1. I almost never comment, but afteer reading a few off tthe comments hee
    Chef Infra Automatijon Commands – CubenSquare. I actually
    do have some questions for you if it’s okay. Is it onnly
    me or does it sseem like a few of these remarks appear like they are coming
    from brain dead people? 😛 And, if you aare writing aat other online sites, I’d like to keep up
    with anything fresh you have to post. Would you list of
    all of your social pages like your Facebook page, twitter feed, or linkedin profile? http://Gizport.jp/gp/question/1776732/?id=26418773

  2. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  3. Eyeliner set box size: 12.93 cm x 1.64 cm x 4.19 cmEyeliner pen size: 12.8 cm x 1 cmEyeliner tip size: 0.9mm soft felt tip brushNo. Of Shades: 9 Shades – 3 in each box: 57.39 SAR Your shopping bag is empty There are a few things to keep in mind when choosing an eyeliner. First, you’ll want to decide what type of finish you want. Do you want a natural look or something more dramatic? Second, you’ll need to decide on the right application method and formula. Clay pencil liners are great for a natural look, while liquid liners are perfect for creating a more dramatic effect. Beauty Lovers Squad If you think drugstore eyeliners lack the payoff needed for a colored eyeliner to really pop, think again, friend. Scibelli loves this budget-friendly option that lasts for hours and comes in bold, earthy shades. If your brown smokey eye is looking a little blah, change it up with this rich green instead.
    https://www.soundclick.com/member/default.cfm?memberID=7258727
    When it comes to Korean skincare, Elizavecca is undoubtedly one of the leading brands. The company was founded in 1990 by Kim Hee Jun, a student in Korean Oriental Medicine who saw a gap in the market for high-quality skincare products. Since then, Elizavecca has strived to provide customers with top-of-the-line products that are not only effective but also pleasant to use. With over 50 stores in North America, ARITAUM is the leader in providing clientsfrom all over the globe with the best innovation, trends, and experience. Why Korean Beauty? These products have been going viral on TikTok! There’s no Western equivalent to the Korean “toner”. Like Western toners, they are watery and applied after cleansing, but they’re neither astringent nor meant to clean up after a half-hearted cleansing job (that’s what double cleansing is for). They are patted onto the skin and left there. Essential for Chok-Chok toners soften the skin, hydrate it, and sometimes perform a few extras. Koreans are big into hydration — which is essentially adding water to the skin and not to be confused with moisturising or adding oils to the skin — and toners are typically full of water-loving humectants like hyaluronic acid, snail mucin, ceramides, and aloe.

  4. European VPS hosting options offer dedicated resources and customizable hosting environments. They’re ideal for businesses seeking reliable and efficient hosting solutions in Europe. LightNode is a worldwide VPS Hosting provider. We use our technology to build a global edge computing network, aiming to offer affordable and valuable cloud services to help our clients reach customers everywhere. High quality cloud hosting safeguarded in Dutch datacenters.  We are here to show you the speediest way to your web page by hosting your site and giving it all that it needs to develop. The main thing about the DedicatedCore VPS hosting in Germany is that it offers value for money. Yes, all our hosting plans come with DDoS Protection included into the price. Our inhouse DDoS Mitigation can filter Attacks up to 500+ Gbps.
    https://www.speedrun.com/user/rerapaco1984
    Premium VPS Provider, M2Host offers Full Administrative access via RDP, allowing for complete control. You can quickly restart or power cycle your server as needed. Additionally, you may manage all of your domains, websites, and email addresses. Yes, it is cheaper to get Plesk licenses directly from plesk. The lowest-tier Plesk plan (Web Admin Edition) costs $6.19 per month on a yearly rate from plesk. This price is 20% to 58% lower compared to some Plesk hosting providers, where the same plan costs between $7.79 and $15 per month. Ensuring uninterrupted website availability is our top priority. With our Plesk VPS hosting plans, we guarantee a 99.95% SLA, providing your visitors with a flawless user experience. Rely on our robust servers and redundant data center infrastructure to deliver industry-leading uptime.

Leave a Comment

Your email address will not be published. Required fields are marked *