Working with an Example

The example for setting up policy and token files shows two nodes in a cluster called mycluster . One node is an inference engine and the other is a cache engine.

Procedure

  1. Assume that the ListenURL for the cache ( controller ) is tcp://10.98.192.101:9091 and theListenURL for the inference ( requester ) is tcp://10.98.192.101:9090.
  2. Generate the policy and token files from as_admin.
    Edit the metaspace_access line in both files to set the correct cluster name.
  3. Also edit the line to place the listen url of the controller into the discovery= setting.
    metaspace_access=metaspace=mycluster;discovery=tcp://10.98.192.101:9091;
  4. For the inference engine, you can then set the following properties:
    be.engine.cluster.as.security.enable=true
    be.engine.cluster.as.security.mode.role=Requester
    be.engine.cluster.as.security.file=C:/temp/mytoken.txt
  5. For the cache engine, you can then set:
    be.engine.cluster.as.security.enable=true
    be.engine.cluster.as.security.mode.role=Controller
    be.engine.cluster.as.security.file=C:/temp/mypolicy.txt
    Note: There is no rule that caches have to be controllers, or inferences have to be requesters. The roles are interchangeable as long as there is one controller in the cluster.