perfsonar-dev - r1717 - in branches/romradz-ant4rel-20061017/ant: . rrdma
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: r1717 - in branches/romradz-ant4rel-20061017/ant: . rrdma
- Date: Fri, 27 Oct 2006 06:54:23 -0400
Author: roman
Date: 2006-10-27 06:54:21 -0400 (Fri, 27 Oct 2006)
New Revision: 1717
Removed:
branches/romradz-ant4rel-20061017/ant/webservice-env-targets.xml
Modified:
branches/romradz-ant4rel-20061017/ant/build-rrdma.xml
branches/romradz-ant4rel-20061017/ant/configure-targets.xml
branches/romradz-ant4rel-20061017/ant/pre-install-targets.xml
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-axis-deploy-targets.xml
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-configure-targets.xml
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-exist-xmldb-targets.xml
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-pre-install-targets.xml
Log:
- updated eXist management using Ant targets
- deploy step is more userfriendly
- the content of webservice-env-targets.xml has moved to
pre-install-targets.xml
Modified: branches/romradz-ant4rel-20061017/ant/build-rrdma.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/build-rrdma.xml 2006-10-25
13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/build-rrdma.xml 2006-10-27
10:54:21 UTC (rev 1717)
@@ -39,7 +39,6 @@
<import file="configure-targets.xml"/>
<import file="javadoc-targets.xml"/>
- <import file="webservice-env-targets.xml"/>
<import file="pre-install-targets.xml"/>
<import file="java-compile-targets.xml"/>
<import file="axis-deploy-targets.xml"/>
Modified: branches/romradz-ant4rel-20061017/ant/configure-targets.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/configure-targets.xml 2006-10-25
13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/configure-targets.xml 2006-10-27
10:54:21 UTC (rev 1717)
@@ -255,54 +255,6 @@
<!-- configuring xml database eXist-->
- <target name="exist-install-question">
-
- <input message="Do you want to install the xml database eXist? "
- addproperty="_exist.install.decision"
- validargs="y,n"
- defaultvalue="n" />
-
- <condition property="exist.install.decision">
- <equals arg1="y" arg2="${_exist.install.decision}"/>
- </condition>
-
- </target>
-
-
- <target name="exist-install"
- depends="exist-install-question"
- if="exist.install.decision">
-
- <echo>Visit the download page
http://prdownloads.sourceforge.net/exist</echo>
- <echo>and download the file eXist-1.0.jar. </echo>
- <echo></echo>
- <echo>Install the application executing the following command:</echo>
- <echo></echo>
- <echo> java -jar eXist-1.0.jar</echo>
- <echo></echo>
- <echo>By dafault eXist is available on the port 8080.</echo>
- <echo>To change this number open the file bin/startup.sh</echo>
- <echo>and replace the line:</echo>
- <echo></echo>
- <echo> OPTIONS="-Dexist.home=$EXIST_HOME"</echo>
- <echo></echo>
- <echo>with the line:</echo>
- <echo></echo>
- <echo> OPTIONS="-Dexist.home=$EXIST_HOME -Djetty.port=8585"</echo>
- <echo></echo>
- <echo>(port number 8585 is only an example).</echo>
- <echo></echo>
- <echo>When installed run the application executing</echo>
- <echo>the script startup.sh .</echo>
- <echo></echo>
- <echo>Please, do it now.</echo>
-
- <echo></echo>
- <input message="Press Return key ..."/>
-
- </target>
-
-
<target name="exist-use-question">
<input message="Do you want to use the xml database eXist as a
metadata configuration storage? "
@@ -337,8 +289,6 @@
depends="exist-use-question"
if="exist.use.decision">
- <antcall target="exist-location-question"/>
-
<propertyfile file="conf/service.properties"
comment="This file was created by the Ant configuration script.">
@@ -385,10 +335,10 @@
addproperty="_exist.port"
defaultvalue="8080" />
- <input message="Enter the user name []:"
+ <input message="Enter the eXist user name []:"
addproperty="_exist.username"/>
- <input message="Enter the pasword for user name []:"
+ <input message="Enter the pasword for eXist user name
${_exist.username} []:"
addproperty="_exist.password"/>
<propertyfile file="ant/const.properties"
Modified: branches/romradz-ant4rel-20061017/ant/pre-install-targets.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/pre-install-targets.xml
2006-10-25 13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/pre-install-targets.xml
2006-10-27 10:54:21 UTC (rev 1717)
@@ -17,6 +17,17 @@
+ <!-- Download URLs -->
+
+ <property name="_tomcat.download.url"
+
value="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.tar.gz"
/>
+ <property name="tomcat.dir" value="apache-tomcat-5.5.20" />
+
+ <property name="exist.war.file" value="exist-1.0.1.war" />
+ <property name="exist.war.dir" value="exist" />
+
+
+
<target name="get-service-home" depends="get-service-directory">
<propertyfile file="ant/const.properties"
@@ -26,8 +37,196 @@
</propertyfile>
- </target>
+ </target>
+ <!-- downloading Tomcat -->
+
+ <target name="get-tomcat-download-url">
+
+ <input message="Enter a URL of the Tomcat download (mirrors can be
found on http://tomcat.apache.org/) [${_tomcat.download.url}]:"
+ addproperty="tomcat.download.url"
+ defaultvalue="${_tomcat.download.url}"
+ />
+ <echo message="Installing..."/>
+
+ </target>
+
+
+ <target name="get-tomcat" depends="get-tomcat-download-url">
+
+ <basename property="tomcat.name" file="${tomcat.download.url}" />
+ <get src="${tomcat.download.url}"
+ dest="${tomcat.name}"
+ verbose="true"
+ usetimestamp="true"/>
+
+ </target>
+
+
+ <target name="unpack-tomcat" depends="get-tomcat">
+
+ <untar src="${tomcat.name}"
+ overwrite="true"
+ compression="gzip"
+ dest="."/>
+ <delete file="${tomcat.name}" failonerror="false"/>
+ <chmod dir="${tomcat.dir}/bin" perm="u+x" includes="**/*.sh"
verbose="true"/>
+
+ </target>
+
+
+ <target name="webservice-container-question">
+
+ <input message="Do you want me to download and install the
application server Tomcat for you? "
+ addproperty="_tomcat.install.decision"
+ validargs="y,n"
+ defaultvalue="n" />
+
+ <condition property="tomcat.install.decision">
+ <equals arg1="y" arg2="${_tomcat.install.decision}"/>
+ </condition>
+
+ </target>
+
+
+ <target name="webservice-container-download"
+ depends="webservice-container-question"
+ if="tomcat.install.decision">
+
+ <dirname property="_tomcat.install.location" file="${basedir}"/>
+
+ <input message="Enter the path for the Tomcat installation:
[${_tomcat.install.location}/${tomcat.dir}]:"
+ addproperty="tomcat.install.location"
+ defaultvalue="${_tomcat.install.location}/${tomcat.dir}" />
+
+ <propertyfile file="ant/const.properties"
+ comment="This file was created by the Ant configuration script.">
+ <entry key="tomcat.home" value="${tomcat.install.location}"/>
+ </propertyfile>
+
+ <antcall target="unpack-tomcat" />
+
+ <move todir="${tomcat.install.location}">
+ <fileset dir="${tomcat.dir}"/>
+ </move>
+
+ </target>
+
+
+ <!-- downloading eXist war (web application) -->
+
+
+ <target name="exist-war-question">
+
+ <input message="Do you want to use the xml database eXist as a web
application in your Tomcat? "
+ addproperty="_exist.war.install.decision"
+ validargs="y,n"
+ defaultvalue="n" />
+
+ <condition property="exist.war.install.decision">
+ <equals arg1="y" arg2="${_exist.war.install.decision}"/>
+ </condition>
+
+ </target>
+
+
+ <target name="exist-war-download"
+ depends="exist-war-question"
+ if="exist.war.install.decision">
+
+ <echo>Go to to http://prdownloads.sourceforge.net/exist/</echo>
+ <echo>and download eXist war file. Suggested is
exist-1.0.1.war.</echo>
+ <echo></echo>
+
+ <echo>Please, do it now. I will wait for you.</echo>
+ <input message="Press Return key ..."/>
+
+ <input message="Enter the name of downloaded eXist war file
[${exist.war.file}]:"
+ addproperty="__exist.war.file"
+ defaultvalue="${exist.war.file}" />
+ <property name="_exist.war.file" value="${__exist.war.file}" />
+
+ <propertyfile file="ant/const.properties"
+ comment="This file was created by the Ant configuration script.">
+ <entry key="exist.war.file" value="${_exist.war.file}"/>
+ </propertyfile>
+
+
+ <dirname property="_exist.war.install.location" file="${basedir}"/>
+
+ <input message="Enter the path of directory where downloaded eXist
war file is located [${_exist.war.install.location}/${exist.war.dir}]:"
+ addproperty="exist.war.install.location"
+ defaultvalue="${_exist.war.install.location}/${exist.war.dir}" />
+
+ <propertyfile file="ant/const.properties"
+ comment="This file was created by the Ant configuration script.">
+ <entry key="exist.home" value="${exist.war.install.location}"/>
+ </propertyfile>
+
+ </target>
+
+
+ <!-- downloading eXist jar (stand-alone application) -->
+
+
+ <target name="exist-install-question">
+
+ <input message="Do you want to install the xml database eXist as a
stand-alone application? "
+ addproperty="_exist.install.decision"
+ validargs="y,n"
+ defaultvalue="n" />
+
+ <condition property="exist.install.decision">
+ <equals arg1="y" arg2="${_exist.install.decision}"/>
+ </condition>
+
+ </target>
+
+
+ <target name="exist-install"
+ depends="exist-install-question"
+ if="exist.install.decision">
+
+ <echo>Visit the download page
http://prdownloads.sourceforge.net/exist</echo>
+ <echo>and download the file eXist-1.0.jar. </echo>
+ <echo></echo>
+ <echo>Install the application executing the following command:</echo>
+ <echo></echo>
+ <echo> java -jar eXist-1.0.jar</echo>
+ <echo></echo>
+ <echo>By dafault eXist is available on the port 8080.</echo>
+ <echo>To change this number open the file bin/startup.sh</echo>
+ <echo>and replace the line:</echo>
+ <echo></echo>
+ <echo> OPTIONS="-Dexist.home=$EXIST_HOME"</echo>
+ <echo></echo>
+ <echo>with the line:</echo>
+ <echo></echo>
+ <echo> OPTIONS="-Dexist.home=$EXIST_HOME -Djetty.port=8585"</echo>
+ <echo></echo>
+ <echo>(port number 8585 is only an example).</echo>
+ <echo></echo>
+ <echo>When installed run the application executing</echo>
+ <echo>the script startup.sh .</echo>
+ <echo></echo>
+ <echo>Please, do it now.</echo>
+
+ <echo></echo>
+ <input message="Press Return key ..."/>
+
+ </target>
+
+
+ <target name="exist"
+ depends="exist-war-download"
+ unless="exist.war.install.decision">
+
+ <antcall target="exist-install"/>
+
+ </target>
+
+
+
</project>
\ No newline at end of file
Modified:
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-axis-deploy-targets.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-axis-deploy-targets.xml
2006-10-25 13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-axis-deploy-targets.xml
2006-10-27 10:54:21 UTC (rev 1717)
@@ -100,7 +100,8 @@
if="tomcat.start.decision">
<echo>Please, insert now the following xml tag Context</echo>
- <echo>into Tomcat configuration file server.xml
(${tomcat.home}/conf/server.xml)</echo>
+ <echo>into Tomcat configuration file server.xml</echo>
+ <echo>(${tomcat.home}/conf/server.xml)</echo>
<echo>inside existing xml tag Host:</echo>
<echo></echo>
<echo message=" <Context path='/${deploy.root}'"/>
@@ -129,7 +130,8 @@
unless="tomcat.start.decision">
<echo>Please, insert now the following xml tag Context</echo>
- <echo>into Tomcat configuration file server.xml
(${tomcat.home}/conf/server.xml)</echo>
+ <echo>into Tomcat configuration file server.xml</echo>
+ <echo>(${tomcat.home}/conf/server.xml)</echo>
<echo>inside existing xml tag Host:</echo>
<echo></echo>
<echo message=" <Context path='/${deploy.root}'"/>
@@ -140,7 +142,9 @@
<input message="Press Return key ..."/>
- <echo>${line.separator}You have to manually set up the env variable
LD_LIBRARY_PATH which should be seen by the Tomcat instance.</echo>
+ <echo>${line.separator}You have to manually set up the env variable
LD_LIBRARY_PATH</echo>
+ <echo>which should be seen by the Tomcat instance.</echo>
+ <echo></echo>
<echo>After setting up the variable (re)start the Tomcat.</echo>
<echo>${line.separator}Example:</echo>
@@ -187,6 +191,9 @@
<echo>Deploying the service...</echo>
<antcall target="tomcat-start-for-rrdma" />
+
+ <antcall target="xmldb-adduser-rrdma" />
+
<antcall target="deploy-adminclient" />
</target>
Modified:
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-configure-targets.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-configure-targets.xml
2006-10-25 13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-configure-targets.xml
2006-10-27 10:54:21 UTC (rev 1717)
@@ -117,7 +117,7 @@
<entry key="service.ma.class_name"
value="org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine"/>
<entry key="component.ma.xmldb.db_status" value="off"/>
- <entry key="component.ma.xmldb.db_access" value="http"/>
+ <entry key="component.ma.xmldb.db_access" value="xmlrpc"/>
<entry key="component.ma.xmldb.db_uri" value=""/>
<entry key="component.ma.xmldb.db_uri.xmlrpc" value=""/>
<entry key="component.ma.xmldb.db_username"
value="rrdmaservice"/>
@@ -235,7 +235,7 @@
<antcall target="set-service-properties-for-rrdma"/>
<antcall target="set-log4j-properties"/>
<antcall target="create-testrrdconfig-for-rrdma"/>
- <antcall target="exist-use-rrdma"/>
+ <antcall target="exist-rrdma"/>
<antcall target="store-fuctionality-for-rrdma"/>
<antcall target="register-fuctionality-for-rrdma"/>
Modified:
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-exist-xmldb-targets.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-exist-xmldb-targets.xml
2006-10-25 13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-exist-xmldb-targets.xml
2006-10-27 10:54:21 UTC (rev 1717)
@@ -24,6 +24,7 @@
<taskdef name="extract" classname="org.exist.ant.XMLDBExtractTask"
classpathref="classpath" onerror="ignore"/>
<taskdef name="create" classname="org.exist.ant.XMLDBCreateTask"
classpathref="classpath" onerror="ignore"/>
<taskdef name="list" classname="org.exist.ant.XMLDBListTask"
classpathref="classpath" onerror="ignore"/>
+ <taskdef name="xquery" classname="org.exist.ant.XMLDBXQueryTask"
classpathref="classpath" onerror="ignore"/>
<property name="dump" value="dump"/>
@@ -190,9 +191,7 @@
</target>
- <target name="exist-use-rrdma"
- depends="exist-use"
- if="exist.use.decision">
+ <target name="exist-use-rrdma">
<antcall target="exist-adduser"/>
<antcall target="exist-datails-question"/>
@@ -203,7 +202,7 @@
comment="This file was created by the Ant configuration script.">
<entry key="component.ma.xmldb.db_uri"
value="http://${exist.hostname}:${exist.port}/exist/xmlrpc/db/rrdmaconfig"/>
- <entry key="component.ma.xmldb.db_uri.xmlrpc"
value="http://${exist.hostname}:${exist.port}/exist/xmlrpc/db/rrdmaconfig"/>
+ <entry key="component.ma.xmldb.db_uri.xmlrpc"
value="xmldb:exist://${exist.hostname}:${exist.port}/exist/xmlrpc/db/rrdmaconfig"/>
</propertyfile>
@@ -212,5 +211,137 @@
</target>
+ <target name="__exist-rrdma"
+ depends="exist-use"
+ if="exist.use.decision">
+ <input message="Do you want to use the xml database eXist installed
eithter in your Tomcat (A) or as a stand-alone application (B)? "
+ addproperty="_exist.type.decision"
+ validargs="A,B"
+ defaultvalue="A" />
+
+ <condition property="exist.type.B.decision">
+ <equals arg1="B" arg2="${_exist.type.decision}"/>
+ </condition>
+
+ <condition property="exist.type.A.decision">
+ <equals arg1="A" arg2="${_exist.type.decision}"/>
+ </condition>
+
+ </target>
+
+
+ <target name="_exist-rrdma"
+ depends="__exist-rrdma"
+ if="exist.type.B.decision">
+
+ <antcall target="exist-location-question"/>
+ <antcall target="exist-use-rrdma"/>
+
+ </target>
+
+
+ <target name="exist-rrdma"
+ depends="_exist-rrdma"
+ if="exist.type.A.decision">
+
+ <echo>Make sure that you have downloaded war file of eXist in
pre-install step.</echo>
+ <input message="Press Return key ..."/>
+
+ <echo>Please, insert now the following xml tag Context</echo>
+ <echo>into Tomcat configuration file server.xml</echo>
+ <echo>(${tomcat.home}/conf/server.xml)</echo>
+ <echo>inside existing xml tag Host:</echo>
+ <echo></echo>
+ <echo message=" <Context path='/${exist.war.dir}'"/>
+ <echo message="
docBase='${exist.home}/${exist.war.file}'>"/>
+ <echo message=" </Context>"/>
+ <echo></echo>
+ <echo>Please, do it now. I will wait for you.</echo>
+ <input message="Press Return key ..."/>
+
+ <propertyfile file="conf/service.properties"
+ comment="This file was created by the Ant configuration script.">
+
+ <entry key="component.ma.xmldb.db_uri"
value="xmldb:exist://${target.server}:${target.port}/exist/xmlrpc/db/rrdmaconfig"/>
+ <entry key="component.ma.xmldb.db_uri.xmlrpc"
value="xmldb:exist://${target.server}:${target.port}/exist/xmlrpc/db/rrdmaconfig"/>
+
+ </propertyfile>
+
+ <input message="Enter the eXist user name []:"
+ addproperty="_exist.username"/>
+
+ <input message="Enter the pasword for eXist user name
${_exist.username} []:"
+ addproperty="_exist.password"/>
+
+ <input message="Enter the password for admin eXist user []:"
+ addproperty="_exist.adminpassword"
+ defaultvalue=""/>
+
+ <propertyfile file="conf/service.properties"
+ comment="This file was created by the Ant configuration script.">
+
+ <entry key="component.ma.xmldb.db_username"
value="${_exist.username}"/>
+ <entry key="component.ma.xmldb.db_password"
value="${_exist.password}"/>
+ <entry key="component.ma.xmldb.db_adminpassword"
value="${_exist.adminpassword}"/>
+
+ </propertyfile>
+
+ </target>
+
+
+ <target name="xmldb-adduser-init-question-rrdma">
+
+ <input message="Do you want me to add new user
${component.ma.xmldb.db_username} (provided in the configure step) and
initiate the xml database eXist? "
+ addproperty="_exist.adduser.init"
+ validargs="y,n"
+ defaultvalue="y" />
+
+ <condition property="exist.adduser.init">
+ <equals arg1="y" arg2="${_exist.adduser.init}"/>
+ </condition>
+
+ </target>
+
+
+ <target name="xmldb-adduser-rrdma"
+ depends="xmldb-adduser-init-question-rrdma"
+ if="exist.adduser.init">
+
+ <xquery
+
uri="xmldb:exist://${target.server}:${target.port}/exist/xmlrpc/db"
+ user="admin"
+ password="${component.ma.xmldb.db_adminpassword}"
+ query="xmldb:create-user('${component.ma.xmldb.db_username}',
'${component.ma.xmldb.db_password}', 'dba', '/db')" />
+
+ <antcall target="xmldb-init-rrdma"/>
+
+ </target>
+
+
+ <target name="xmldb-password-rrdma">
+
+ <input message="Enter eXist admin password []?"
+ addproperty="adminpass"
+ defaultvalue=""/>
+
+ <input message="Enter eXist username []?"
+ addproperty="username"/>
+
+ <input message="Enter new password for ${username} []?"
+ addproperty="password"/>
+
+ <input message="Enter the URL of eXist
[xmldb:exist://${target.server}:${target.port}/exist/xmlrpc/db]?"
+ addproperty="url"/>
+
+ <xquery
+ uri="${url}"
+ user="admin"
+ password="${adminpass}"
+ query="xmldb:change-user('${username}', '${password}', 'dba',
'/')" />
+
+ </target>
+
+
+
</project>
Modified:
branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-pre-install-targets.xml
===================================================================
--- branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-pre-install-targets.xml
2006-10-25 13:47:30 UTC (rev 1716)
+++ branches/romradz-ant4rel-20061017/ant/rrdma/rrdma-pre-install-targets.xml
2006-10-27 10:54:21 UTC (rev 1717)
@@ -138,7 +138,7 @@
<echo>${line.separator}Building the rrdjtool library...</echo>
<antcall target="rrdjtool"/>
- <antcall target="exist-install"/>
+ <antcall target="exist"/>
</target>
Deleted: branches/romradz-ant4rel-20061017/ant/webservice-env-targets.xml
- r1717 - in branches/romradz-ant4rel-20061017/ant: . rrdma, svnlog, 10/27/2006
Archive powered by MHonArc 2.6.16.