How can I launch a launch list with a role for a dynamically generated chef node (not using a knife)?

How can I load the launch list of a node on a chef server with one of the predefined roles when a node is dynamically created (not using a knife)?

Cloudify installs node (ubuntu image with chef client) and runs the chef client which registers with the chef server. A new node and client is created in the chef server, but the node launch list is empty. I want to populate the launch list with the mongo role so that MongoDB is installed on node and configured. If I manually create a node on the chef server with the mongo role in the launch list before starting the cloudify process, then mongo is installed and everything is fine. However, this is not an option though due to autoscaling and other requirements. So how can we automate the creation of a node on the chef server with a role in the launch list?

  • The Chef server is configured for cookbooks and roles. One of these roles is mongo , whose list has recipes for installing and configuring MongoDB.
  • Cloudify installs the chef client on the ubuntu image. This is node.
  • The / etc / chef / client.rb file has the following:

    log_level             :debug
    log_locaiton          "/var/log/chef/client.log"
    ssl_verification_mode :verify_none
    chef_server_url       "htts://chefserver/organizations/orgname"
    verify_api_cert       false
    node_name             SOME_GUID
    
          

+3


source to share


1 answer


Role is a specific case runlist

. For example docs (search role[

)



0


source







All Articles