Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test d127f6d62 -> 8540e700b


Updating default cloud-controller.xml and file permissions


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8540e700
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8540e700
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8540e700

Branch: refs/heads/4.1.0-test
Commit: 8540e700be2760075c6a767d571b476f727eb527
Parents: d127f6d
Author: Imesh Gunaratne <[email protected]>
Authored: Thu Dec 11 22:40:08 2014 +0530
Committer: Imesh Gunaratne <[email protected]>
Committed: Thu Dec 11 22:40:23 2014 +0530

----------------------------------------------------------------------
 .../parser/CloudControllerConfigParser.java     | 21 ++++++-------
 .../main/resources/conf/cloud-controller.xml    | 32 ++++++--------------
 .../modules/distribution/src/assembly/bin.xml   | 32 ++++++++++----------
 .../distribution/src/main/conf/mock-iaas.xml    |  2 +-
 4 files changed, 36 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8540e700/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/config/parser/CloudControllerConfigParser.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/config/parser/CloudControllerConfigParser.java
 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/config/parser/CloudControllerConfigParser.java
index 8e9ba26..73380b8 100644
--- 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/config/parser/CloudControllerConfigParser.java
+++ 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/config/parser/CloudControllerConfigParser.java
@@ -46,22 +46,22 @@ public class CloudControllerConfigParser {
 
     /**
      * Parse the cloud-controller.xml file.
-     * @param elt document element.
+     * @param documentElement document element.
      * @throws MalformedConfigurationFileException
      */
-    public static void parse(OMElement elt) throws 
MalformedConfigurationFileException {
+    public static void parse(OMElement documentElement) throws 
MalformedConfigurationFileException {
 
-        extractIaasProviders(elt, AxiomXpathParserUtil.getMatchingNodes(elt, 
CloudControllerConstants.IAAS_PROVIDER_XPATH));
-        extractDataPublisherConfig(elt, 
AxiomXpathParserUtil.getElement(FILE_NAME, elt, 
CloudControllerConstants.DATA_PUBLISHER_ELEMENT,
+        extractIaasProviders(documentElement, 
AxiomXpathParserUtil.getMatchingNodes(documentElement, 
CloudControllerConstants.IAAS_PROVIDER_XPATH));
+        extractDataPublisherConfig(documentElement, 
AxiomXpathParserUtil.getElement(FILE_NAME, documentElement, 
CloudControllerConstants.DATA_PUBLISHER_ELEMENT,
                                         
CloudControllerConstants.DATA_PUBLISHER_XPATH));
-        extractTopologySyncConfig(elt, 
AxiomXpathParserUtil.getElement(FILE_NAME, elt, 
CloudControllerConstants.TOPOLOGY_SYNC_ELEMENT,
+        extractTopologySyncConfig(documentElement, 
AxiomXpathParserUtil.getElement(FILE_NAME, documentElement, 
CloudControllerConstants.TOPOLOGY_SYNC_ELEMENT,
                         CloudControllerConstants.TOPOLOGY_SYNC_XPATH));
     }
 
 
 
 
-    private static void extractIaasProviders(OMElement elt, List<OMNode> 
nodeList) {
+    private static void extractIaasProviders(OMElement documentElement, 
List<OMNode> nodeList) {
         List<IaasProvider> iaasProviders = 
CloudControllerConfig.getInstance().getIaasProviders();
 
         if (iaasProviders == null) {
@@ -77,11 +77,11 @@ public class CloudControllerConfigParser {
         }
         
         for (OMNode node : nodeList) {
-            
iaasProviders.add(IaasProviderConfigParser.getIaasProvider(FILE_NAME, elt, 
node, null));
+            
iaasProviders.add(IaasProviderConfigParser.getIaasProvider(FILE_NAME, 
documentElement, node, null));
         }
     }
     
-    private static void extractDataPublisherConfig(OMElement rootElt, 
OMElement element) {
+    private static void extractDataPublisherConfig(OMElement documentElement, 
OMElement element) {
         if (element == null) {
             log.debug("No data publisher config found in "+FILE_NAME);
             return;
@@ -117,7 +117,7 @@ public class CloudControllerConfigParser {
                         AxiomXpathParserUtil.getFirstChildElement(childElement,
                                 
CloudControllerConstants.BAM_SERVER_ADMIN_PASSWORD_ELEMENT);
                 if (elt != null) {
-                    String password = 
AxiomXpathParserUtil.resolveSecret(rootElt, elt);
+                    String password = 
AxiomXpathParserUtil.resolveSecret(documentElement, elt);
                     if (password == null) {
                         
AxiomXpathParserUtil.plainTextWarn(CloudControllerConstants.BAM_SERVER_ADMIN_PASSWORD_ELEMENT);
                         password = elt.getText();
@@ -153,7 +153,7 @@ public class CloudControllerConfigParser {
                 // set password
                 elt = AxiomXpathParserUtil.getFirstChildElement(childElement, 
CloudControllerConstants.PASSWORD_ELEMENT);
                 if (elt != null) {
-                    String password = 
AxiomXpathParserUtil.resolveSecret(rootElt, elt);
+                    String password = 
AxiomXpathParserUtil.resolveSecret(documentElement, elt);
                     if (password == null) {
                         
AxiomXpathParserUtil.plainTextWarn(CloudControllerConstants.PASSWORD_ELEMENT);
                         password = elt.getText();
@@ -197,5 +197,4 @@ public class CloudControllerConfigParser {
             config.setTopologyConfig(topologyConfig);
         }
     }
-    
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8540e700/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
----------------------------------------------------------------------
diff --git 
a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
 
b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
index c246e67..5d364ba 100644
--- 
a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
+++ 
b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
@@ -18,30 +18,22 @@
   #  under the License.
   --> 
 <cloudController xmlns:svns="http://org.wso2.securevault/configuration";>
+       <svns:secureVault 
provider="org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler"
 />
 
-       <svns:secureVault
-               
provider="org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler"
 />
-
-       <dataPublisher enable="false">
-               <!-- BAM Server Info - default values are 'admin' and 'admin' 
-                        Optional element. -->
+    <!-- BAM data publisher configuration -->
+    <dataPublisher enable="false">
                <bamServer>
-               <!-- BAM server URL should be specified in carbon.xml -->
+            <!-- BAM server URL should be specified in carbon.xml -->
                        <adminUserName>admin</adminUserName>
                        <adminPassword 
svns:secretAlias="cloud.controller.bam.server.admin.password">admin</adminPassword>
                </bamServer>
                <!-- Default cron expression is '1 * * * * ? *' meaning 'first 
second of every minute'.
                         Optional element. -->
                <cron>1 * * * * ? *</cron>
-               <!-- Cassandra cluster related info -->
-               <!--cassandraInfo>
-                       <connectionUrl>localhost:9160</connectionUrl>
-                       <userName>admin</userName>
-                       <password 
svns:secretAlias="cloud.controller.cassandra.server.password">admin</password>
-               </cassandraInfo-->
        </dataPublisher>
 
-       <topologySync enable="true">
+    <!-- Complete topology event publisher cron configuration -->
+    <topologySync enable="true">
                <property name="cron" value="1 * * * * ? *" />
        </topologySync> 
 
@@ -49,24 +41,18 @@
                is not necessary [0..1]. But you can use this section to avoid 
specifying 
                same property over and over again. -->
        <iaasProviders>
-               <!-- iaasProvider type="openstack" name="openstack specific 
details">
-                       
<className>org.apache.stratos.cloud.controller.iaases.JcloudsOpenstackIaas</className>
+               <!-- iaasProvider type="openstack" name="Openstack">
+            
<className>org.apache.stratos.cloud.controller.iaases.JcloudsOpenstackIaas</className>
                        <provider>openstack-nova</provider>
                        <identity 
svns:secretAlias="cloud.controller.openstack.identity">demo:demo</identity>
                        <credential 
svns:secretAlias="cloud.controller.openstack.credential">openstack</credential>
                        <property name="jclouds.endpoint" 
value="http://192.168.16.20:5000/"; />
-                       <property 
name="jclouds.openstack-nova.auto-create-floating-ips" value="false"/>
+               <property 
name="jclouds.openstack-nova.auto-create-floating-ips" value="false"/>
                        <property name="jclouds.api-version" value="2.0/" />
                        <property name="openstack.networking.provider" 
value="nova" />
                        <property name="X" value="x" />
                        <property name="Y" value="y" />
                </iaasProvider -->
-        <iaasProvider type="docker" name="Docker">
-            
<className>org.apache.stratos.cloud.controller.iaases.JcloudsDockerIaas</className>
-            <provider>docker</provider>
-            <identity 
svns:secretAlias="cloud.controller.docker.identity">identity</identity>
-            <credential 
svns:secretAlias="cloud.controller.docker.credential">credential</credential>
-        </iaasProvider>
         <iaasProvider type="mock" name="Mock">
             
<className>org.apache.stratos.cloud.controller.iaases.MockIaas</className>
             <provider>mock</provider>

http://git-wip-us.apache.org/repos/asf/stratos/blob/8540e700/products/stratos/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/assembly/bin.xml 
b/products/stratos/modules/distribution/src/assembly/bin.xml
index a7abaf9..622c81a 100755
--- a/products/stratos/modules/distribution/src/assembly/bin.xml
+++ b/products/stratos/modules/distribution/src/assembly/bin.xml
@@ -491,7 +491,7 @@
     <fileSet>
          <directory>src/main/autoscale-policies</directory>
          
<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/autoscale-policies</outputDirectory>
-         <directoryMode>0755</directoryMode>
+         <directoryMode>0600</directoryMode>
            <includes>
               <include>*.xml</include>
            </includes>
@@ -500,7 +500,7 @@
        <fileSet>
          <directory>src/main/deployment-policies</directory>
          
<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/deployment-policies</outputDirectory>
-         <directoryMode>0755</directoryMode>
+         <directoryMode>0600</directoryMode>
            <includes>
               <include>*.xml</include>
            </includes>
@@ -509,7 +509,7 @@
        <fileSet>
          <directory>src/main/partitions</directory>
          
<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/partitions</outputDirectory>
-         <directoryMode>0755</directoryMode>
+         <directoryMode>0600</directoryMode>
            <includes>
               <include>*.xml</include>
            </includes>
@@ -660,81 +660,81 @@
             <source>src/main/conf/autoscaler.xml</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/mock-iaas.xml</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
        <!--iindentity.xml and application-authentication.xml for oAuth feature 
-->
         <file>
             <source>src/main/conf/identity.xml</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             
<source>src/main/conf/security/application-authentication.xml</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/metadataservice.xml</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
        <file>
             <source>src/main/conf/drools/mincheck.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/drools/obsoletecheck.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/drools/scaling.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/drools/dependent-scaling.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/drools/terminateall.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
                 <!-- container-drools files -->
         <file>
             <source>src/main/conf/drools/container-mincheck.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/drools/container-obsoletecheck.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
         <file>
             <source>src/main/conf/drools/container-scaling.drl</source>
             
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/drools</outputDirectory>
             <filtered>true</filtered>
-            <fileMode>755</fileMode>
+            <fileMode>600</fileMode>
         </file>
                <!-- container-drools files -->
                <!-- /drools files end-->

http://git-wip-us.apache.org/repos/asf/stratos/blob/8540e700/products/stratos/modules/distribution/src/main/conf/mock-iaas.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/main/conf/mock-iaas.xml 
b/products/stratos/modules/distribution/src/main/conf/mock-iaas.xml
index a535a4c..06d63d2 100644
--- a/products/stratos/modules/distribution/src/main/conf/mock-iaas.xml
+++ b/products/stratos/modules/distribution/src/main/conf/mock-iaas.xml
@@ -17,7 +17,7 @@
   ~ under the License.
   -->
 
-<mock-iaas>
+<mock-iaas enabled="true">
     <health-statistics>
         <cartridge type="tomcat">
             <pattern factor="memory-consumption">

Reply via email to