| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| |
| <project name="CloudDev Targets" basedir="."> |
| |
| |
| <condition property="port" value="${rport}" else="2222"> |
| <isset property="rport"/> |
| </condition> |
| |
| <condition property="host" value="${rhost}" else="localhost"> |
| <isset property="rhost"/> |
| </condition> |
| |
| <target name="deploydbIfSet" if="deploydb.is.set"> |
| <echo message="ant deploydb"/> |
| <sshexec host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java; service cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant deploycddb"/> |
| </target> |
| |
| <target name="rdeploydb"> |
| <echo message="ant rdeploydb"/> |
| <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant deploycddb -Drhost=${host}"/> |
| </target> |
| |
| <target name="deploycddb" description="deploy specific db configuration for clouddev" depends="deploydb"> |
| <exec dir="${db.scripts.dir}" executable="bash"> |
| <arg value="deploy-db-clouddev.sh" /> |
| <arg value="${host}" /> |
| <arg value="8443" /> |
| </exec> |
| </target> |
| |
| <target name="rdebug-suspend" > |
| <echo message="ant debug-suspend"/> |
| <sshexec host="${host}" port="${port}" username="root" password="password" command="killall java;service cloud-management stop;sleep 1;echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server;ant debug-suspend"/> |
| </target> |
| |
| <target name="rdebug"> |
| <echo message="ant debug"/> |
| <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="killall java;service cloud-management stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant debug "/> |
| </target> |
| |
| |
| <target name="rdeploy" description="deploy to remote"> |
| <condition property="zip.uptodate"> |
| <available file="${deploy.work.dir}/client.zip" type="file"/> |
| </condition> |
| |
| |
| |
| <echo message="copying build folder to remote"/> |
| <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/build"> |
| <fileset dir="build"> |
| </fileset> |
| </scp> |
| |
| <scp trust="yes" port="${port}" file="build.xml" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/"> |
| </scp> |
| |
| <echo message="copying deps folder to remote"/> |
| <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/deps"> |
| <fileset dir="deps"> |
| </fileset> |
| </scp> |
| |
| <echo message="copying target folder to remote"/> |
| <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="cd /opt/cloudstack/incubator-cloudstack; mkdir -p target"/> |
| <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/target"> |
| <fileset dir="target"> |
| </fileset> |
| </scp> |
| |
| <echo message="copying dist folder to remote"/> |
| <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="cd /opt/cloudstack/incubator-cloudstack; mkdir -p dist"/> |
| <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/dist"> |
| <fileset dir="dist"> |
| </fileset> |
| </scp> |
| |
| <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server"/> |
| |
| </target> |
| |
| </project> |