You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bu...@apache.org on 2017/07/25 20:31:29 UTC

svn commit: r1802999 - in /uima/uima-ducc/trunk: src/main/assembly/ uima-ducc-duccdocs/src/site/tex/duccbook/part1/ uima-ducc-duccdocs/src/site/tex/duccbook/part2/ uima-ducc-duccdocs/src/site/tex/duccbook/part4/ uima-ducc-examples/src/main/resources/or...

Author: burn
Date: Tue Jul 25 20:31:29 2017
New Revision: 1802999

URL: http://svn.apache.org/viewvc?rev=1802999&view=rev
Log:
UIMA-5499 Updated docs to describe how to set up an application broker and deploy a test service

Added:
    uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.service
Modified:
    uima/uima-ducc/trunk/src/main/assembly/bin.xml
    uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part1/overview.tex
    uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/services.tex
    uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/install.tex
    uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/sim.tex
    uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/org/apache/uima/ducc/test/randomsleep/FixedSleepCR.xml

Modified: uima/uima-ducc/trunk/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/src/main/assembly/bin.xml?rev=1802999&r1=1802998&r2=1802999&view=diff
==============================================================================
--- uima/uima-ducc/trunk/src/main/assembly/bin.xml (original)
+++ uima/uima-ducc/trunk/src/main/assembly/bin.xml Tue Jul 25 20:31:29 2017
@@ -510,6 +510,7 @@ under the License.
         <include>1.dd.sync.job</include>
         <include>1.job</include>
         <include>1.inputs</include>
+        <include>1.service</include>
       </includes>
     </fileSet>
 

Modified: uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part1/overview.tex
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part1/overview.tex?rev=1802999&r1=1802998&r2=1802999&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part1/overview.tex (original)
+++ uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part1/overview.tex Tue Jul 25 20:31:29 2017
@@ -277,6 +277,9 @@
     comprising userid and password.
     \item[ActiveMQ] DUCC uses ActiveMQ for administrative communication.
     AMQ authentication is used to prevent arbitrary processes from participating.
+    But when testing DUCC on a simulated cluster the AMQ broker runs without any access restrictions 
+    so that it can be used as an application broker for UIMA-AS services used in simulation tests. 
+    See \hyperref[subsec:sim.start-sim]{{\em start\_sim}}.
     \end{description}
     
     \subsection{ducc\_ling}   

Modified: uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/services.tex
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/services.tex?rev=1802999&r1=1802998&r2=1802999&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/services.tex (original)
+++ uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part2/services.tex Tue Jul 25 20:31:29 2017
@@ -146,6 +146,18 @@
       A service is registered with DUCC using the \hyperref[sec:cli.ducc-services]{ducc\_services}
       API/CLI. Service registrations are persisted by DUCC and last over DUCC and cluster restarts.
 
+      \section{Application Broker for UIMA-AS Services}
+      \label{sec:service.uima-as-broker}
+      UIMA-AS services require a separate ActiveMQ broker.  An application broker can be started
+      using a script in the UIMA-AS distribution bundled with DUCC.
+\begin{verbatim}
+      export UIMA_HOME=$DUCC_HOME/apache-uima
+      $UIMA_HOME/bin/startBroker.sh
+\end{verbatim}
+      This uses the default configuration of port 61616 for tcp access and 1099 for JMX access (used
+      by the default UIMA-AS pinger.)  The internal DUCC broker uses different ports so both may run
+      on the same node.
+
       \section{Service Management Policies}
       \label{sec:service.management-policy}
 

Modified: uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/install.tex
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/install.tex?rev=1802999&r1=1802998&r2=1802999&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/install.tex (original)
+++ uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/install.tex Tue Jul 25 20:31:29 2017
@@ -310,7 +310,7 @@ All threads returned
   WaitingForResources.  In a few minutes this should change to Assigned.
   Now jobs can be submitted.
   
-  To submit a job,
+\subsection{Submitting a test job}
   \begin{enumerate}
     \item \duccruntime/bin/ducc\_submit --specification \duccruntime/examples/simple/1.job
     \end{enumerate}
@@ -334,11 +334,33 @@ $HOME/ducc/logs/job-id
 
     Notice also, in the upper-right corner is a link to the full DUCC documentation, the ``DuccBook''.
 
-    Finally, stop DUCC:
-    \begin{enumerate}
-      \item cd \duccruntime/admin
-      \item./stop\_ducc -a
-      \end{enumerate}
+\subsection{Registering a test service}
+
+    First start an application broker using the UIMA-AS script included in the DUCC installation,
+    see \hyperref[sec:service.uima-as-broker]{UIMA-AS broker}.
+    Then in another shell define the broker URL using the name of the host the broker was started
+    on, and register the service. On your browser select the
+    Services page and wait for the service to become Available.
+    \begin{verbatim}
+    export DefaultBrokerURL=tcp://<broker-host-name>:61616
+    $DUCC\_HOME/bin/ducc\_services --register $DUCC\_HOME/examples/simple/1.service
+    \end{verbatim}
+    The service can be tested by sending it CASes that specify a sleep value.
+    \begin{verbatim}
+    export UIMA\_HOME=$DUCC\_HOME/apache-uima
+    $UIMA\_HOME/bin/runRemoteAsyncAE.sh -c $DUCC\_HOME/examples/simple/resources/randomsleep/FixedSleepCR.xml -o out $DefaultBrokerURL TopLevelTaeQueue 
+    \end{verbatim}
+
+    To remove the service use:
+    \begin{verbatim}
+    $DUCC\_HOME/bin/ducc\_services --unregister <service-id-number>
+    \end{verbatim}
+
+\subsection{To stop DUCC}
+    \begin{verbatim}
+      cd $DUCC\_HOME/admin
+      ./stop_ducc -a
+    \end{verbatim}
       
 
 \section{Add additional nodes to the DUCC cluster}
@@ -672,4 +694,4 @@ Files created by script:
  - /tmp/<user>/ducc_watcher.log
    + comprises a log produced by the script
       
-\end{verbatim}
\ No newline at end of file
+\end{verbatim}

Modified: uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/sim.tex
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/sim.tex?rev=1802999&r1=1802998&r2=1802999&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/sim.tex (original)
+++ uima/uima-ducc/trunk/uima-ducc-duccdocs/src/site/tex/duccbook/part4/sim.tex Tue Jul 25 20:31:29 2017
@@ -209,6 +209,7 @@ agentn.79 = 6
       user are bypassed when {\em ducc.runmode=Test} is configured.
 
       \subsection{Starting a Simulated Cluster}
+      \label{subsec:sim.start-sim}
       DUCC provides a start-up script in the directory {\tt \duccruntime/examples/systemtest} 
       called {\tt start\_sim}.  
 
@@ -217,7 +218,9 @@ agentn.79 = 6
       checking is done and processes may be started multiple time regardless of whether is sane to
       do this.
 
-      To start a simulated cluster, use the {\em start\_sim} script:
+      To start a simulated cluster, use the {\em start\_sim} script.
+      The DUCC broker will be started without any access restrictions so that it can be used as an
+      application broker for any UIMA-AS services used in the simulation tests.
 
       \paragraph{Description:}
       The {\em start\_sim} script is used to start a simulated cluster.

Modified: uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/org/apache/uima/ducc/test/randomsleep/FixedSleepCR.xml
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/org/apache/uima/ducc/test/randomsleep/FixedSleepCR.xml?rev=1802999&r1=1802998&r2=1802999&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/org/apache/uima/ducc/test/randomsleep/FixedSleepCR.xml (original)
+++ uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/org/apache/uima/ducc/test/randomsleep/FixedSleepCR.xml Tue Jul 25 20:31:29 2017
@@ -80,7 +80,7 @@
    	 	  <nameValuePair>
 		    <name>jobfile</name>
 		    <value>
-		      <string>../ducc_test/jobs/1.job</string>
+		      <string><envVarRef>DUCC_HOME</envVarRef>/examples/simple/1.inputs</string>
 		    </value>
 		  </nameValuePair>
 

Added: uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.service
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.service?rev=1802999&view=auto
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.service (added)
+++ uima/uima-ducc/trunk/uima-ducc-examples/src/main/resources/sleepjobs/1.service Tue Jul 25 20:31:29 2017
@@ -0,0 +1,31 @@
+# 
+# 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.
+# 
+
+service_request_endpoint       UIMA-AS:TopLevelTaeQueue:${DefaultBrokerURL}
+description                    Test service 1
+
+process_DD				       ${DUCC_HOME}/examples/simple/resources/randomsleep/DDSleepDescriptor.xml
+
+classpath                      ${DUCC_HOME}/lib/uima-ducc/examples/*:${DUCC_HOME}/apache-uima/lib/*:${DUCC_HOME}/apache-uima/apache-activemq/lib/*:${DUCC_HOME}/apache-uima/apache-activemq/lib/optional/*
+
+process_jvm_args               -Xmx100M -DDefaultBrokerURL=${DefaultBrokerURL}
+process_memory_size            2
+environment                    AE_INIT_TIME=5 AE_INIT_RANGE=5 INIT_ERROR=0 LD_LIBRARY_PATH=/yet/a/nother/dumb/path
+instances                      1
+autostart					   true