[chef] RE: Re: Chef Role and integration


Chronological Thread 
  • From: Mingfei Hua < >
  • To: " " < >
  • Subject: [chef] RE: Re: Chef Role and integration
  • Date: Mon, 30 Jun 2014 06:59:17 +0000
  • Accept-language: zh-CN, en-US
  • Authentication-results: mx1.aerohive.com (amavisd-new); dkim=pass

Hi Danjib,

If I use “-o” in chef-client, Not only the run list, but also the attribute “roles” in chef server be overwritten.  The integration which depend on attribute “roles” may broken.

 

Regards,

Mingfei

 

From: Ranjib Dey [mailto:
Sent: 2014
629 15:38
To:
Subject: [chef] Re: Chef Role and integration

 

if you invoke chef-client with -o , the override option, it should not save the node data back (iirc). you have to check no recipes or other code does not use node.save explicitly ,

 

im curious why you dont want to run the complete run list (all the roles+ extra recipes), is performance (time) a concern ?

regards

ranjib

 

On Sat, Jun 28, 2014 at 11:20 PM, Mingfei Hua < " target="_blank"> > wrote:

 

 

Hello,

 

we have several roles defined for different type of servers, like DB, web, rabbitmq, redis. and the integration is depend on roles, such as how the WEB server find the DB servers. in each role, there are cookbooks or sub roles in 3 layers, there are cookbooks for system, cookbooks for install tomcat/database, cookbooks to install war packages. But in some case, I just need to run the cookbooks for system or just need to deploy the war package, the easiest way is to change the run-list, but it changes the roles attribute in chef server which integration depend on. Any tips on my issue.

 

 

A typical role definition:

{

         "name": "hmweb",

         "chef_type": "role",

         "json_class": "Chef::Role",

         "description": "for web application deployment, include hm-webapp",

         "override_attributes": {

                   "aerohive_webapp": {

                            "wars_array": {

                                     "hm-webapp.war": {

                                               "name": "hm-webapp",

                                               "url": "http://nexus-nms.aerohive.com/service/local/artifact/maven/redirect?r=hive-repository&g=com.aerohive.nms.web&a=hm-webapp&e=war&v=1.0-SNAPSHOT"

                                     },

                                     "sysmgr-regional-webapp.war": {

                                               "name": "sysmgr-regional-webapp",

                                               "url": "http://nexus-nms.aerohive.com/service/local/artifact/maven/redirect?r=hive-repository&g=com.aerohive.nms&a=sysmgr-regional-webapp&e=war&v=1.0-SNAPSHOT"

                                     }

                            },

                            "service_log_enabled": "true"

                   }

         },

         "run_list": [

             "role[_base]",

             "role[_webappbase]",

                   "recipe[aerohive-webapp::deploy]"

         ]

}

 

Sincerely,

Mingfei Hua

 

 




Archive powered by MHonArc 2.6.16.

§