ocpiserve

Description

When an application is run, the OpenCPI framework finds “local” containers - those that are part of or directly attached to the local system - where workers based on artifacts can execute. A local system can use the ocpiserve tool to offer its local containers to other network-based systems for use as “remote” containers.

The ocpiserve command-line tool is part of OpenCPI’s ‘remote containers’ feature, which adds containers available in other systems on the network to the set of containers considered for application execution.

The ocpiserve tool runs as a ‘container server’, serving up local containers as remotely accessible containers to network clients. Remote clients use ocpirun options to find the systems on the network that are running ocpiserve and list the available containers.

When started, ocpiserve discovers all local network interfaces and prepares to be contacted by clients for all of them. It optionally (if the --discoverable option is used) prepares to receive multicast queries from clients on all network interfaces. The ocpiserve container server is a fully multi-homed server, using all network interfaces for normal use (TCP) discovery (via the User Datagram Protocol (UDP)).

The ocpiserve container server does not run, initiate or control entire OpenCPI applications, so it requires fewer resources than ocpirun or ACI executables.

‘Artifacts’ - binary executables compiled from OpenCPI ‘workers’ - are not required to reside on the system running ocpiserve. Instead, they are downloaded on demand to the ocpiserve container server from the remote system on which the application is initiated and controlled and then cached for possible re-use. The ocpiserve container server maintains this cache in a directory named artifacts unless the --directory option is used to change it. The cache is normally maintained after ocpiserve exits unless the --remove option is used to delete it.

Starting ocpiserve locally requires logging in to the console on the system with a username and password. CTRL/C can be used to exit ocpiserve locally. Alternatively, the ocpiremote tool can be used to start, stop, and otherwise control an ocpiserve container server from a remote client.

Usage

$ ocpiserve
Usage for ocpiserve (executed from /home/user/opencpi/build/autotools/target-rocky9/staging/bin/ocpiserve):
Options are:
  Long name      Letter  Datatype  Multiple? Description
  directory        D       String     No    The directory used for caching artifact/executable files.  Default: artifacts
  verbose          v       Bool       No    Provide verbose output during operation.
  loglevel         l       UChar      No    The logging level to be used during operation.  Default: 0
  processors       n       UShort     No    The number of software (rcc) containers to create.  Default: 1
  remove           r       Bool       No    Remove cached artifacts after execution or control-C.
  port             p       UShort     No    Explicit TCP port for server; default is dynamic.
  discoverable     d       Bool       No    Make this server discoverable, via UDP multicast.
  addresses        a       String     No    Write server's TCP addresses to this file, one per line.
  loopback         L       Bool       No    Allow discovery on the local/loopback subnet.
  onlyloopback     O       Bool       No    Allow discovery ONLY on local/loopback subnet.
  list             C       Bool       No    Show available containers.
  only-platforms   <none>  Bool       No    Modifies the list command to show only platforms.
  max-callers      m       ULong      No    Quits server after connection count (probes included).
Long options are of the form:   --<long-name>[=<value>]
Short options are of the form:  -<letter>[<value>] or -<letter>  <value>
Boolean options have no value; their presence indicates 'true'.  Other types require values.

Usage syntax is: ocpiserve [options]
This command acts as a server allowing other systems to use this system's containers.
Some option must be provided, e.g. -v, or -d, or -p.

Examples

  1. Start the ocpiserve container server, allowing it to be discoverable via UDP multicast from client systems and displaying status and progress information:

    ocpiserve --verbose --discoverable
    
  2. Start the ocpiserve container server and direct it to write its TCP/IP addresses to the file named myserveraddrs:

    ocpiserve --address=myserveraddrs
    
  3. Start the ocpiserve container server and direct it to use the TCP port 9233 as the TCP port:

    ocpiserve --port=9233