The skeleton example below uses hosting and SAS warrants downloaded from Jtrix.org. But if we have our own hosting service then we can create our own warrants and use those. Here's how we do that through the launcher console.
Roughly this is what we're going to do. First we connect to our hosting service as its administrator, and get make a new contract and warrant for someone to run their netlets on our hosting service. Then we connect to SAS as its administrator and do a similar thing, creating a contract and warrant for a consumer to store JARs and netlet descriptors. Along the way we dump these warrants into files and see what other commands we might issue as users of these services. Please do expect pauses which some code is downloaded to be run (securely) in the launcher.
% launcher
Initialising Nodality...
launcher> connect hostadmin {warrant:hos01-real-admin.xml}
launcher> contract=`hostadmin.createContract sample`
launcher> echo $contract
1
launcher> hw=`hostadmin.getWarrant $contract`
launcher> echo $hw
<<warrant>>
launcher> dump $hw hosting-warrant.xml
launcher> disconnect hostadmin
launcher> connect sasadmin {warrant:sas01-warrant.xml}
launcher> list sasadmin
Facet: org.jtrix.facets1.service.common.IConsoleFacet
Facet: org.jtrix.facets1.service.common.IWarrantFacet
Facet: org.jtrix.project.sas2.facet.ISASAdmin
sasadmin.add-hosting - <id> <warrant> - Add a hosting service to this application
sasadmin.createContract - ( Arguments: org.jtrix.base.X500DN boolean Return: org.jtrix.
base.Warrant )
sasadmin.deleteContract - ( Arguments: org.jtrix.base.X500DN Return: void )
sasadmin.fetchContract - ( Arguments: org.jtrix.base.X500DN boolean Return: org.jtrix.
base.Warrant )
sasadmin.get-warrant - <type> [<service-data>] Get refreshed warrant
sasadmin.list-hosting - Display the hosting services
sasadmin.list-management-state - Display the management state
sasadmin.list-managers - Show all managers and their nodes
sasadmin.list-workers - Show all workers and their nodes
sasadmin.listContracts - ( Return: List of org.jtrix.base.X500DN )
sasadmin.quit - Shut down the application
sasadmin.refresh - ( Return: org.jtrix.base.Warrant )
sasadmin.set-manager-redundancy - <min> <max> Set the manager redundancy
launcher> sasadmin.listContracts
N=hos01
O=jtrix, CN=sas2, N=sas01, PID=9433
launcher> sasadmin.createContract {x500dn:uid=nik,o=jtrix.org} {boolean:false}
<<warrant>>
launcher> sw=$0
launcher> dump $sw sas-warrant.xml
launcher> sasadmin.listContracts
N=hos01
O=jtrix, CN=sas2, N=sas01, PID=9433
UID=nik, O=jtrix.org
launcher> disconnect sasadmin
launcher> quit
%
The two dump commands have created two new warrants. These can now be used to run the skeleton application, or indeed any other.
Nik Silver 2002-03-09