Replace puppet node definition with regular expression 19/13819/1
authorwangyaoguang <sunshine.wang@huawei.com>
Tue, 10 May 2016 06:29:00 +0000 (14:29 +0800)
committerwangyaoguang <sunshine.wang@huawei.com>
Tue, 10 May 2016 06:32:55 +0000 (14:32 +0800)
The old method of node definition is a hostname string.
It is not generic and problematic in OpenStack.
Puppet agents send FQDN instead of hostname during catalog execution.

JIRA: BOTTLENECK-76

Change-Id: Icd004d0450ff84fc890e7962f8767cfbde90a9ad
Signed-off-by: wangyaoguang <sunshine.wang@huawei.com>
testsuites/rubbos/puppet_manifests/site_off.pp
testsuites/rubbos/puppet_manifests/site_on.pp

index 05663eb..a0d0b5e 100644 (file)
 node default { }
 
 # mysql node:
-node REPLACED_MYSQL_NODES {
+node /.*rubbos[-|_]mysql.*/ {
   include rubbos_mysql::rubbos_mysql_off
   include rubbos_monitor::rubbos_monitor_off
 }
 
 # tomcat node:
-node REPLACED_TOMCAT_NODES {
+node /.*rubbos[-|_]tomcat.*/ {
   include rubbos_tomcat::rubbos_tomcat_off
   include rubbos_monitor::rubbos_monitor_off
 }
 
 # httpd node:
-node REPLACED_HTTPD_NODES {
+node /.*rubbos[-|_]httpd.*/ {
   include rubbos_httpd::rubbos_httpd_off
   include rubbos_monitor::rubbos_monitor_off
 }
 
 # clients
-node REPLACED_CLIENT_NODES {
+node /.*rubbos[-|_]client.*/ {
   include rubbos_monitor::rubbos_monitor_off
   include rubbos_client::rubbos_client_off
 }
index edec33c..a9164ea 100644 (file)
 node default { }
 
 # mysql node:
-node REPLACED_MYSQL_NODES {
+node /.*rubbos[-|_]mysql.*/ {
   include rubbos_common::rubbos_common_on
   include rubbos_mysql::rubbos_mysql_on
   include rubbos_monitor::rubbos_monitor_on
 }
 
 # tomcat node:
-node REPLACED_TOMCAT_NODES {
+node /.*rubbos[-|_]tomcat.*/ {
   include rubbos_common::rubbos_common_on
   include rubbos_tomcat::rubbos_tomcat_on
   include rubbos_monitor::rubbos_monitor_on
 }
 
 # httpd node:
-node REPLACED_HTTPD_NODES {
+node /.*rubbos[-|_]httpd.*/ {
   include rubbos_common::rubbos_common_on
   include rubbos_httpd::rubbos_httpd_on
   include rubbos_monitor::rubbos_monitor_on
 }
 
 # clients
-node REPLACED_CLIENT_NODES {
+node /.*rubbos[-|_]client.*/ {
   include rubbos_common::rubbos_common_on
   include rubbos_monitor::rubbos_monitor_on
   include rubbos_client::rubbos_client_on