Next we pretend to be the owner of the applications.
First we copy an example WAR file into our current directory (from the Jtrix binary directory) and create launch descriptors:
% cp /usr/lib/jtrix/examples.war . % dns_init nikdns % http_init nikhttp configuring http listener... % webtrix_init nikwebtrix configuring tomcat backend.. %
As mentioned above, a launch descriptor is an XML file used by the command line launcher application. It allows the launcher to start an application running on a remote node, with all the SAS uploads etc taken care of. The launcher also allows general command line access to running applications.
Let us concentrate on the job of the owner of the DNS application.
We launch our application and then create a contract for our consumer who will manage their own domain, acme.com. (Note that the DNS's command dns.putDomain can produce a NullPointerException; this appears harmless but is being investigated.)
% launcher
Initialising Nodality...
launcher> host {warrant:hosting-warrant1.xml}
launcher> sas {warrant:sas-warrant.xml}
SAS warrant recognised: will upload jars
launcher> run dns-admin dns.xml
Uploading beatrix [5....4....3....2....1....0]
Uploading parser.jar [5....4....3....2....1....0]
Uploading dns_facets.jar [5....4....3....2....1....0]
Uploading dns_test.jar [5....4....3....2....1....0]
Uploading libjtrix [5....4....3....2....1....0]
Uploading dns.jar [5....4....3....2....1....0]
Uploading jaxp.jar [5....4....3....2....1....0]
Uploading facets1.jar [5....4....3....2....1....0]
Waiting for application to initialise... done
launcher>
launcher> dns-admin.putDomain acme.com
launcher> consumer=feedback@jtrix.org
launcher> dns-admin.createContract acme.com {boolean:false} $consumer AREC CNAME SUB MX
6231210018156006958
launcher> contractid=$0
launcher> consumer-warrant=`dns-admin.getContractWarrant $contractid`
launcher> dump $consumer-warrant acme-dns-warrant.xml
launcher>
Notice that we dump the consumer's warrant into a file. They'll be able to use this later to connect to our DNS service and manage their domain.
Next we pretend to be the owner of the HTTP application. Again we launch the application, make a new warrant for the consumer, and dump it into a file for them:
launcher> host {warrant:hosting-warrant2.xml}
launcher> run http-admin http-service.xml
Uploading facets1.jar Jar already uploaded with same hash and label
Uploading http_service.jar [5....4....3....2....1....0]
Uploading libjtrix Jar already uploaded with same hash and label
Uploading parser.jar Jar already uploaded with same hash and label
Uploading beatrix Jar already uploaded with same hash and label
Uploading http_facet.jar [5....4....3....2....1....0]
Uploading dns_facets.jar Jar already uploaded with same hash and label
Uploading tomcat-3.2.3.jar [5....4....3....2....1....0]
Uploading jaxp.jar Jar already uploaded with same hash and label
Waiting for application to initialise... done
launcher>
launcher> http-admin.createContract {x500dn:o=acme,uid=bob}
<<warrant>>
launcher> dump $0 acme-http-warrant.xml
launcher>
Notice the HTTP service has a different way of distinguighing contracts--it uses an X.500 DN.
Next we pretend to be the owner of Webtrix. We launch it and create a consumer warrant, which we dump into a file once again:
launcher> host {warrant:hosting-warrant3.xml}
launcher> run webtrix-admin webtrix.xml
Uploading facets1.jar Jar already uploaded with same hash and label
Uploading cos.jar [5....4....3....2....1....0]
Uploading libjtrix Jar already uploaded with same hash and label
Uploading jasper-3.2.3.jar [5....4....3....2....1....0]
Uploading parser.jar Jar already uploaded with same hash and label
Uploading beatrix Jar already uploaded with same hash and label
Uploading http_facet.jar Jar already uploaded with same hash and label
Uploading servlet-3.2.3.jar [5....4....3....2....1....0]
Uploading tomcat-3.2.3.jar Jar already uploaded with same hash and label
Uploading webtrix.jar [5....4....3....2....1....0]
Uploading jaxp.jar Jar already uploaded with same hash and label
Waiting for application to initialise... done
launcher>
launcher> webtrix-admin.createContract {x500dn:o=acme,uid=bob}
<<warrant>>
launcher> dump $0 acme-webtrix-warrant.xml
launcher> quit
%
Now that we've launched our three services we quit the launcher.
Nik Silver 2002-03-09