Reputation: 3365
How can I bootstrap the run list of a node in chef server with one of the predefined roles, when the node is created dynamically (not using knife)?
Cloudify installs the node (an ubuntu image with chef client) and starts chef client, which registers with chef server. A new node and client is created in chef server, but the node's run list is empty. I want to populate the run list with mongo role so that MongoDB is installed on the node and configured. If I manually create the node in the chef server with mongo role in run list before running the cloudify process, then mongo is installed and everything is fine. However, this is not an option though because of autoscaling and other requirements. So how can we automate creating a node in chef server with role in run list?
/etc/chef/client.rb file has 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
Upvotes: 3
Views: 1958