mirror of https://github.com/apache/cloudstack.git
Summary: changed the path from cloud to cloudstack.
The change in package script allowed us to create proper tar under rpmbuild/SOURCES directory The change in the path enabled us to launch the management server properly. Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com> Committed-by: Hugo Trippaers <htrippaers@schubergphilis.com>
This commit is contained in:
parent
db3b0d3256
commit
a9955f155a
|
|
@ -34,11 +34,11 @@ else
|
|||
fi
|
||||
|
||||
mkdir -p $RPMDIR/SPECS
|
||||
mkdir -p $RPMDIR/SOURCES/cloud-$VERSION
|
||||
mkdir -p $RPMDIR/SOURCES/cloudstack-$VERSION
|
||||
|
||||
|
||||
(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/cloud-$VERSION -x )
|
||||
(cd $RPMDIR/SOURCES/; tar -czf cloud-$VERSION.tgz cloud-$VERSION)
|
||||
(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/cloudstack-$VERSION -x )
|
||||
(cd $RPMDIR/SOURCES/; tar -czf cloudstack-$VERSION.tgz cloudstack-$VERSION)
|
||||
|
||||
cp cloud.spec $RPMDIR/SPECS
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ class serviceCfgBase(object):
|
|||
except:
|
||||
logging.debug(formatExceptionInfo())
|
||||
if self.syscfg.env.mode == "Server":
|
||||
raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloud/setupManagement.log for detail"%self.serviceName)
|
||||
raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/setupManagement.log for detail"%self.serviceName)
|
||||
else:
|
||||
raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloud/setupAgent.log for detail"%self.serviceName)
|
||||
raise CloudRuntimeException("Configure %s failed, Please check the /var/log/cloudstack/setupAgent.log for detail"%self.serviceName)
|
||||
|
||||
def backup(self):
|
||||
if self.status is None:
|
||||
|
|
@ -386,7 +386,7 @@ class securityPolicyConfigUbuntu(serviceCfgBase):
|
|||
|
||||
return True
|
||||
except:
|
||||
raise CloudRuntimeException("Failed to configure apparmor, please see the /var/log/cloud/setupAgent.log for detail, \
|
||||
raise CloudRuntimeException("Failed to configure apparmor, please see the /var/log/cloudstack/setupAgent.log for detail, \
|
||||
or you can manually disable it before starting myCloud")
|
||||
|
||||
def restore(self):
|
||||
|
|
@ -416,7 +416,7 @@ class securityPolicyConfigRedhat(serviceCfgBase):
|
|||
cfo.replace_line("SELINUX=", "SELINUX=permissive")
|
||||
return True
|
||||
except:
|
||||
raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloud/setupAgent.log for detail, \
|
||||
raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloudstack/setupAgent.log for detail, \
|
||||
or you can manually disable it before starting myCloud")
|
||||
else:
|
||||
return True
|
||||
|
|
@ -602,7 +602,7 @@ class cloudAgentConfig(serviceCfgBase):
|
|||
|
||||
def configMyCloud(self):
|
||||
try:
|
||||
cfo = configFileOps("/etc/cloud/agent/agent.properties", self)
|
||||
cfo = configFileOps("/etc/cloudstack/agent/agent.properties", self)
|
||||
cfo.addEntry("host", self.syscfg.env.mgtSvr)
|
||||
cfo.addEntry("zone", self.syscfg.env.zone)
|
||||
cfo.addEntry("port", "443")
|
||||
|
|
@ -624,7 +624,7 @@ class cloudAgentConfig(serviceCfgBase):
|
|||
|
||||
def configAgent(self):
|
||||
try:
|
||||
cfo = configFileOps("/etc/cloud/agent/agent.properties", self)
|
||||
cfo = configFileOps("/etc/cloudstack/agent/agent.properties", self)
|
||||
cfo.addEntry("host", self.syscfg.env.mgtSvr)
|
||||
cfo.addEntry("zone", self.syscfg.env.zone)
|
||||
cfo.addEntry("pod", self.syscfg.env.pod)
|
||||
|
|
@ -639,16 +639,16 @@ class cloudAgentConfig(serviceCfgBase):
|
|||
cfo.addEntry("resource", "com.cloud.hypervisor.kvm.resource.LibvirtComputingResource")
|
||||
cfo.save()
|
||||
|
||||
self.syscfg.svo.stopService("cloud-agent")
|
||||
self.syscfg.svo.stopService("cloudstack-agent")
|
||||
bash("sleep 30")
|
||||
self.syscfg.svo.enableService("cloud-agent")
|
||||
self.syscfg.svo.enableService("cloudstack-agent")
|
||||
return True
|
||||
except:
|
||||
raise
|
||||
|
||||
def configConsole(self):
|
||||
try:
|
||||
cfo = configFileOps("/etc/cloud/agent/agent.properties", self)
|
||||
cfo = configFileOps("/etc/cloudstack/agent/agent.properties", self)
|
||||
cfo.addEntry("host", self.syscfg.env.mgtSvr)
|
||||
cfo.addEntry("zone", self.syscfg.env.zone)
|
||||
cfo.addEntry("pod", self.syscfg.env.pod)
|
||||
|
|
@ -661,8 +661,8 @@ class cloudAgentConfig(serviceCfgBase):
|
|||
cfo.addEntry("resource", "com.cloud.agent.resource.computing.consoleProxyResource")
|
||||
cfo.save()
|
||||
|
||||
self.syscfg.svo.stopService("cloud-agent")
|
||||
self.syscfg.svo.enableService("cloud-agent")
|
||||
self.syscfg.svo.stopService("cloudstack-agent")
|
||||
self.syscfg.svo.enableService("cloudstack-agent")
|
||||
return True
|
||||
except:
|
||||
raise
|
||||
|
|
|
|||
|
|
@ -80,32 +80,32 @@ class cloudManagementConfig(serviceCfgBase):
|
|||
if not cmd.isSuccess():
|
||||
raise CloudInternalException(cmd.getErrMsg())
|
||||
|
||||
cfo = configFileOps("/etc/cloud/management/tomcat6.conf", self)
|
||||
cfo = configFileOps("/etc/cloudstack/management/tomcat6.conf", self)
|
||||
cfo.add_lines("JAVA_OPTS+=\" -Djavax.net.ssl.trustStore=%s \""%keyPath)
|
||||
elif self.syscfg.env.svrMode == "HttpsServer":
|
||||
if not os.path.exists("/etc/cloud/management/server-ssl.xml") or not os.path.exists("/etc/cloud/management/tomcat6-ssl.conf"):
|
||||
raise CloudRuntimeException("Cannot find /etc/cloud/management/server-ssl.xml or /etc/cloud/management/tomcat6-ssl.conf, https enables failed")
|
||||
if os.path.exists("/etc/cloud/management/server.xml"):
|
||||
bash("rm -f /etc/cloud/management/server.xml")
|
||||
if os.path.exists("/etc/cloud/management/tomcat6.conf"):
|
||||
bash("rm -f /etc/cloud/management/tomcat6.conf")
|
||||
bash("ln -s /etc/cloud/management/server-ssl.xml /etc/cloud/management/server.xml")
|
||||
bash("ln -s /etc/cloud/management/tomcat6-ssl.conf /etc/cloud/management/tomcat6.conf")
|
||||
if not os.path.exists("/etc/cloudstack/management/server-ssl.xml") or not os.path.exists("/etc/cloudstack/management/tomcat6-ssl.conf"):
|
||||
raise CloudRuntimeException("Cannot find /etc/cloudstack/management/server-ssl.xml or /etc/cloudstack/management/tomcat6-ssl.conf, https enables failed")
|
||||
if os.path.exists("/etc/cloudstack/management/server.xml"):
|
||||
bash("rm -f /etc/cloudstack/management/server.xml")
|
||||
if os.path.exists("/etc/cloudstack/management/tomcat6.conf"):
|
||||
bash("rm -f /etc/cloudstack/management/tomcat6.conf")
|
||||
bash("ln -s /etc/cloudstack/management/server-ssl.xml /etc/cloudstack/management/server.xml")
|
||||
bash("ln -s /etc/cloudstack/management/tomcat6-ssl.conf /etc/cloudstack/management/tomcat6.conf")
|
||||
if not bash("iptables-save |grep PREROUTING | grep 6443").isSuccess():
|
||||
bash("iptables -A PREROUTING -t nat -p tcp --dport 443 -j REDIRECT --to-port 6443")
|
||||
else:
|
||||
if not os.path.exists("/etc/cloud/management/server-nonssl.xml") or not os.path.exists("/etc/cloud/management/tomcat6-nonssl.conf"):
|
||||
raise CloudRuntimeException("Cannot find /etc/cloud/management/server-nonssl.xml or /etc/cloud/management/tomcat6-nonssl.conf, https enables failed")
|
||||
if os.path.exists("/etc/cloud/management/server.xml"):
|
||||
bash("rm -f /etc/cloud/management/server.xml")
|
||||
if os.path.exists("/etc/cloud/management/tomcat6.conf"):
|
||||
bash("rm -f /etc/cloud/management/tomcat6.conf")
|
||||
bash("ln -s /etc/cloud/management/server-nonssl.xml /etc/cloud/management/server.xml")
|
||||
bash("ln -s /etc/cloud/management/tomcat6-nonssl.conf /etc/cloud/management/tomcat6.conf")
|
||||
if not os.path.exists("/etc/cloudstack/management/server-nonssl.xml") or not os.path.exists("/etc/cloudstack/management/tomcat6-nonssl.conf"):
|
||||
raise CloudRuntimeException("Cannot find /etc/cloudstack/management/server-nonssl.xml or /etc/cloudstack/management/tomcat6-nonssl.conf, https enables failed")
|
||||
if os.path.exists("/etc/cloudstack/management/server.xml"):
|
||||
bash("rm -f /etc/cloudstack/management/server.xml")
|
||||
if os.path.exists("/etc/cloudstack/management/tomcat6.conf"):
|
||||
bash("rm -f /etc/cloudstack/management/tomcat6.conf")
|
||||
bash("ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml")
|
||||
bash("ln -s /etc/cloudstack/management/tomcat6-nonssl.conf /etc/cloudstack/management/tomcat6.conf")
|
||||
|
||||
#distro like sl 6.1 needs this folder, or tomcat6 failed to start
|
||||
checkHostName()
|
||||
bash("mkdir /var/log/cloud-management/")
|
||||
bash("mkdir /var/log/cloudstack-management/")
|
||||
#set max process per account is unlimited
|
||||
if os.path.exists("/etc/security/limits.conf"):
|
||||
cfo = configFileOps("/etc/security/limits.conf")
|
||||
|
|
@ -118,9 +118,8 @@ class cloudManagementConfig(serviceCfgBase):
|
|||
except:
|
||||
pass
|
||||
|
||||
self.syscfg.svo.stopService("cloud-management")
|
||||
if self.syscfg.svo.enableService("cloud-management"):
|
||||
self.syscfg.svo.stopService("cloudstack-management")
|
||||
if self.syscfg.svo.enableService("cloudstack-management"):
|
||||
return True
|
||||
else:
|
||||
raise CloudRuntimeException("Failed to configure %s, please see the /var/log/cloud/setupManagement.log for detail"%self.serviceName)
|
||||
|
||||
raise CloudRuntimeException("Failed to configure %s, please see the /var/log/cloudstack/setupManagement.log for detail"%self.serviceName)
|
||||
|
|
|
|||
Loading…
Reference in New Issue