The dmg.cells.services.Domain

Starting the dmg.cells.services.Domain

A virtual machine becomes a Cell Domain as soon as the SystemCell is created. The SystemCell must be the first cell which comes into live. There must be only on SystemCell in a virtual machine.

There is a set of actions which are in common to generic Cell Domains, like

Most of these activities are combined in the dmg.cells.services.Domain class. It contains a static main method and can be started directly from the OS command line. It contains a set of options which determine the services, the Domain will provide.
java dmg.cells.services.Domain

USAGE : <domainName> [options]/cells/docs/guide > java dmg.cells.services.Domain
         -telnet  <telnetPort> [dummy]
         -tunnel  <tunnelPort>
         -connect <host> <port>
         -routed
         -batch <fileName>
         -boot  <bootDomain>
         -spy   <spyListenPort>
         -ic    <interruptHandlerClass>
         -param <key>=<value> [...]

-telnet <telnetPort>

This option starts a TelnetCell which listens on port <telnetPort> for telnet connections. It uses a dummy login where the user can by arbitrary and the passwork is elch. If sucessfully authenticated the user is assiged to a CellShell. It provides a small set of commands to administer the Domain.

-tunnel <tunnelPort>

This option starts a TunnelListener which listens on port <tunnelPort> for tunnel connections from other Domains.

-connect <host> <port>

This option starts a TunnelConnector which tries to connect to host <host> and port <port>>.

-batch <fileName>

This option starts a BatchCell which reads a file <fileName> and executes one line after the other within a CellShell. The CellShell is identical to the Shell whic is used for the telnet login.

-param <key>=<value> [...]

This option sets environment parameters which are accessable by all Cells within this Domain including the telnet and batch CellShell.

Examples


java dmg.cells.services.Domain MyFirstDomain -telnet 22123

A domain MyFirstDomain is created with a telnetCell listening on port 22123. Use telnet and connect to the telnet shell.
telnet localhost 22123
Use your name and the password elch to login. The help command will give you an overview of possible shell commands.

tn-patrick-100 > ps -a
  Cell List
------------------
tlm            Active    0   TelnetLoginManager  P=22123;C=dmg.cells.services.StreamLoginCell
System         Active    0   SystemCell          MyFirstCell:R=0;A=0;F=0;R=0;X=0
tn-patrick-100 Active    0   StreamLoginCell     patrick@localhost/127.0.0.1

java dmg.cells.services.Domain Galactica -telnet 22123 -tunnel 22124 &
java dmg.cells.services.Domain Voyager   -connect localhost 22124 &

Two domains are created and connected by a Tunnel. Log into Galactica.
tn-patrick-100 > ps -a
  Cell List
------------------
tlm            Active    0   TelnetLoginManager  P=22123;C=dmg.cells.services.StreamLoginCell
System         Active    0   SystemCell          Galactica:R=0;A=0;F=0;R=0;X=0
down-100       Active    0   RetryTunnel         M=Accepted;S=<send_ready>;P=Voyager
down           Active    0   GNLCell             Network Listener Cell (port=22124;Class=RetryTunnel)
tn-patrick-101 Active    0   StreamLoginCell     patrick@localhost/127.0.0.1
The name of the tunnel listening cell is down and the instance which is responsible for the connection from Voyager is called down-100.

Throu the tunnel it's possible to inspect Voyager as well. Type 'exit' once in your telnet shell. You will end up in the so called .. shell. Set the destination to System@Voyager.

set dest System@Voyager
From now on, whatever you type is send to the SystemCell at the Domain Voyager. The SystemCell as well contains the CellShell. So a 'ps -a' is send throu the tunnel to the Voyager Domain and interpreted by the CellShell provided by the SystemCell.
System@Voyager > ps -a
  Cell List
------------------
System         Active    0   SystemCell          Voyager:R=1;A=0;F=0;R=0;X=0
up0            Active    0   RetryTunnel         M=Connection;S=;P=Galactica