[chef] Chef Role and integration


Chronological Thread 
  • From: Mingfei Hua < >
  • To: " " < >
  • Subject: [chef] Chef Role and integration
  • Date: Sun, 29 Jun 2014 06:20:58 +0000
  • Accept-language: zh-CN, en-US
  • Authentication-results: mx2.aerohive.com (amavisd-new); dkim=pass

 

 

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.

§