cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: refs/heads/4.1 - CLOUDSTACK-1713 and CLOUDSTACK-1719: AWSAPI packaging fixes
Date Thu, 21 Mar 2013 00:40:11 GMT
Updated Branches:
  refs/heads/4.1 54f45e254 -> 88b750c8e


CLOUDSTACK-1713 and CLOUDSTACK-1719: AWSAPI packaging fixes

Summary: EC2 REST API: AWS APIs are not getting translated on the
CloudStack Management Server and AWS API Installation Problems.
This fixes the above two defects and other packaging related issues.

Signed-off-by: Chip Childers <chip.childers@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/88b750c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/88b750c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/88b750c8

Branch: refs/heads/4.1
Commit: 88b750c8e4fbac21a19d28b15d25b60260163070
Parents: 54f45e2
Author: Pradeep Soundararajan <pradeep.soundararajan@citrix.com>
Authored: Thu Mar 21 00:38:59 2013 +0000
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Thu Mar 21 00:38:59 2013 +0000

----------------------------------------------------------------------
 awsapi-setup/setup/cloud-setup-bridge        |    2 +-
 packaging/centos63/cloud.spec                |   51 ++++++++++++---------
 python/lib/cloudutils/serviceConfigServer.py |    4 +-
 3 files changed, 32 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/88b750c8/awsapi-setup/setup/cloud-setup-bridge
----------------------------------------------------------------------
diff --git a/awsapi-setup/setup/cloud-setup-bridge b/awsapi-setup/setup/cloud-setup-bridge
index d25072d..d456387 100644
--- a/awsapi-setup/setup/cloud-setup-bridge
+++ b/awsapi-setup/setup/cloud-setup-bridge
@@ -20,7 +20,7 @@
 # Cloud.com Bridge setup script.
 #
 
-settingsFile="/usr/share/cloud/bridge/conf/ec2-service.properties"
+settingsFile="/etc/cloudstack/management/ec2-service.properties"
 
 function readCurrentSettings () {
 	readVar managementServer

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/88b750c8/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index b4aa519..a7a6927 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -165,7 +165,7 @@ echo Doing CloudStack build
 cp packaging/centos63/replace.properties build/replace.properties
 echo VERSION=%{_maventag} >> build/replace.properties
 echo PACKAGE=%{name} >> build/replace.properties
-mvn -P awsapi package -Dsystemvm
+mvn -P awsapi package -Dsystemvm 
 
 %install
 [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
@@ -282,27 +282,30 @@ cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/
 install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloudapis.py
 
 # AWS API
-mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge
+mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
-cp -r awsapi/target/cloud-awsapi-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge
+cp -r awsapi/target/cloud-awsapi-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
 install -D awsapi-setup/setup/cloud-setup-bridge ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-setup-bridge
 install -D awsapi-setup/setup/cloudstack-aws-api-register ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-aws-api-register
 cp -r awsapi-setup/db/mysql/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup
 
+for name in applicationContext.xml cloud-bridge.properties commons-logging.properties ; do
+  mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/$name \
+    ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
+done
+
+install -D ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/ec2-service.properties
${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/ec2-service.properties
+
 #Don't package the below for AWS API
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/applicationContext.xml
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/cloud-bridge.properties
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/com
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/commons-logging.properties
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/db.properties
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/ec2-service.properties
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/LICENSE.txt
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/log4j.properties
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/log4j-vmops.xml
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/META-INF
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/NOTICE.txt
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/org
-rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/bridge/WEB-INF/classes/services.xml
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/com
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/db.properties
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/META-INF
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/org
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml
 
 %clean
 [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
@@ -312,10 +315,10 @@ id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack
unprivileged us
      -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
 
 %preun management
-/sbin/service cloud-management stop || true
+/sbin/service cloudstack-management stop || true
 if [ "$1" == "0" ] ; then
-    /sbin/chkconfig --del cloud-management  > /dev/null 2>&1 || true
-    /sbin/service cloud-management stop > /dev/null 2>&1 || true
+    /sbin/chkconfig --del cloudstack-management > /dev/null 2>&1 || true
+    /sbin/service cloudstack-management stop > /dev/null 2>&1 || true
 fi
 
 %pre management
@@ -332,8 +335,8 @@ rm -rf %{_localstatedir}/cache/cloud
 
 %post management
 if [ "$1" == "1" ] ; then
-    /sbin/chkconfig --add cloud-management > /dev/null 2>&1 || true
-    /sbin/chkconfig --level 345 cloud-management on > /dev/null 2>&1 || true
+    /sbin/chkconfig --add cloudstack-management > /dev/null 2>&1 || true
+    /sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true
 fi
 
 if [ -d "%{_datadir}/%{name}-management" ] ; then
@@ -387,6 +390,10 @@ fi
 %config(noreplace) %{_sysconfdir}/%{name}/management/tomcat-users.xml
 %config(noreplace) %{_sysconfdir}/%{name}/management/web.xml
 %config(noreplace) %{_sysconfdir}/%{name}/management/environment.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/applicationContext.xml
+%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
+%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
 %attr(0755,root,root) %{_initrddir}/%{name}-management
 %attr(0755,root,root) %{_bindir}/%{name}-setup-management
 %attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses
@@ -460,7 +467,7 @@ fi
 
 %files awsapi
 %defattr(0644,cloud,cloud,0755)
-%{_datadir}/%{name}-bridge/webapps/bridge
+%{_datadir}/%{name}-bridge/webapps/awsapi
 %attr(0644,root,root) %{_datadir}/%{name}-bridge/setup/*
 %attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register
 %attr(0755,root,root) %{_bindir}/cloudstack-setup-bridge

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/88b750c8/python/lib/cloudutils/serviceConfigServer.py
----------------------------------------------------------------------
diff --git a/python/lib/cloudutils/serviceConfigServer.py b/python/lib/cloudutils/serviceConfigServer.py
index a08ce02..2c19d7e 100644
--- a/python/lib/cloudutils/serviceConfigServer.py
+++ b/python/lib/cloudutils/serviceConfigServer.py
@@ -33,11 +33,11 @@ class cloudManagementConfig(serviceCfgBase):
                raise CloudInternalException("Cannot get hostname, 'hostname --fqdn failed'")
 
         if self.syscfg.env.svrMode == "mycloud":
-            cfo = configFileOps("/usr/share/cloud/management/conf/environment.properties",
self)
+            cfo = configFileOps("/usr/share/cloudstack-management/conf/environment.properties",
self)
             cfo.addEntry("cloud-stack-components-specification", "components-cloudzones.xml")
             cfo.save()
 
-            cfo = configFileOps("/usr/share/cloud/management/conf/db.properties", self)
+            cfo = configFileOps("/usr/share/cloudstack-management/conf/db.properties", self)
             dbHost = cfo.getEntry("db.cloud.host")
             dbPort = cfo.getEntry("db.cloud.port")
             dbUser = cfo.getEntry("db.cloud.username")


Mime
View raw message