To deploy your REST resource adaptor your need to:

  • start a Rhino TAS instance

  • use the Ivy based install to deploy and configure your resource adaptor.

Starting a Rhino TAS SDK

The Rhino REST API Framework includes all you require to use a Rhino TAS SDK. At the root of your Rhino REST API Framework project directory is a rhino-sdk directory. Run ant -p in the rhino-sdk to list all possible targets.

~/work/unified-rest-ra-sdk/rhino-sdk$ ant -p
Buildfile: /home/davidp/work/unified-rest-ra-sdk/rhino-sdk/build.xml

Main targets:

 clean-rhino        Deletes the Rhino SDK's work/ directory. This deletes all logs and deployment state.
 install-rhino      Installs the Rhino SDK into RhinoSDK/.
 start-clean-rhino  Convenience target to run 'clean-rhino' and 'start-rhino'.
 start-rhino        Starts the Rhino SDK.
 stop-rhino         Stops the Rhino SDK.
 uninstall-rhino    Uninstalls (deletes) the Rhino SDK from RhinoSDK/.
Default target: start-rhino

When you run ant for the first time, a Rhino TAS SDK install package is downloaded and installed.

Tip Learn more about the Rhino TAS SDK in the Rhino SDK Getting Started Guide.

Deploying your REST resource adaptor

You can deploy and configure your REST resource adaptor directly from the resource adaptor module. For example to deploy the example-rest-ra described in Creating a REST Resource Adaptor page:

Step 1: Run ant deploy-with-deps

running ant deploy-with-deps for the example REST ra
~/work/unified-rest-ra-sdk/example-rest-ra$ ant deploy-with-deps
Buildfile: /home/davidp/work/unified-rest-ra-sdk/example-rest-ra/build.xml

deploy-with-deps:
     [echo] Deploying module.
[oc:deploy] :: loading settings :: file = /home/davidp/work/unified-rest-ra-sdk/build/ivy/ivysettings.xml
[oc:deploy] Created deployer with options: OutdatedIvyModuleDetection: Enabled, IvyStatusesToCheck: [integration]
[oc:deploy] Invoking the deployer to process root module exampleco#example-rest-ra#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp and its dependencies ...
[oc:deploy] Installing module opencloud#guava-library#third-party;28.2-jre
[oc:deploy] Installing module opencloud#jackson-library#third-party;2.11.0
[oc:deploy] Installing module opencloud#jaxb-api-library#third-party;2.4.0-b2
[oc:deploy] Installing module opencloud#jackson-dataformat-xml-library#third-party;2.11.0
[oc:deploy] Installing module opencloud#rest-api-common#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module exampleco#pingpong-api-server#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] Installing module opencloud#rest-ratype-spi#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module exampleco#pingpong-api-server-plugin#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] Installing module opencloud#base-rest-api-plugin#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module opencloud#netty-library#third-party;4.1.45
[oc:deploy] Installing module opencloud#unified-rest-ra-core#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module exampleco#example-rest-ra#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] Deployment Result:
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] |  Deploy result:
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] |  Modules with no Component:
[oc:deploy] |  opencloud#unified-rest-ra-core#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] |  Deployed Modules:
[oc:deploy] |  opencloud#jackson-dataformat-xml-library#third-party;2.11.0
[oc:deploy] |  |__ LibraryID[name=jackson-dataformat-xml,vendor=com.fasterxml.jackson.dataformat,version=2.11.0]
[oc:deploy] |  opencloud#jaxb-api-library#third-party;2.4.0-b2
[oc:deploy] |  |__ LibraryID[name=jaxb-api,vendor=javax.xml.bind,version=2.4.0-b2]
[oc:deploy] |  opencloud#guava-library#third-party;28.2-jre
[oc:deploy] |  |__ LibraryID[name=guava,vendor=com.google.guava,version=28.2-jre]
[oc:deploy] |  opencloud#rest-ratype-spi#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] |  |__ LibraryID[name=rest-ratype-spi,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |  exampleco#pingpong-api-server-plugin#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] |  |__ LibraryID[name=pingpong-api-server-plugin,vendor=ExampleCo,version=1.0]
[oc:deploy] |  exampleco#pingpong-api-server#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] |  |__ LibraryID[name=pingpong-api-server,vendor=ExampleCo,version=1.0]
[oc:deploy] |      ResourceAdaptorTypeID[name=pingpong-api-server,vendor=ExampleCo,version=1.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.openapi.pingpong_rest_api.api.DummyOperationRequest,vendor=ExampleCo,version=1.0]
[oc:deploy] |  opencloud#rest-api-common#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] |  |__ EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.POST,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.TRACE,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      LibraryID[name=rest-api-common,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.GET,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.DELETE,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      ResourceAdaptorTypeID[name=rest-api-common,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.HEAD,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestResponse,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.PATCH,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.PUT,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.OPTIONS,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |  opencloud#netty-library#third-party;4.1.45
[oc:deploy] |  |__ LibraryID[name=netty,vendor=io.netty,version=4.1.45]
[oc:deploy] |  exampleco#example-rest-ra#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] |  |__ ResourceAdaptorID[name=example-rest-ra,vendor=ExampleCo,version=1.0]
[oc:deploy] |  opencloud#base-rest-api-plugin#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] |  |__ LibraryID[name=base-rest-api-plugin,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |  opencloud#jackson-library#third-party;2.11.0
[oc:deploy] |  |__ LibraryID[name=jackson,vendor=com.fasterxml.jackson.core,version=2.11.0]
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] All modules deployed successfully.
   [delete] Deleting directory /home/davidp/work/unified-rest-ra-sdk/example-rest-ra/target/deployer-work

BUILD SUCCESSFUL
Total time: 14 seconds

Step 2: Run ant configure-with-deps

running ant configure-with-deps for the example REST ra
~/work/unified-rest-ra-sdk/example-rest-ra$ ant deploy-with-deps
Buildfile: /home/davidp/work/unified-rest-ra-sdk/example-rest-ra/build.xml

deploy-with-deps:
     [echo] Deploying module.
[oc:deploy] :: loading settings :: file = /home/davidp/work/unified-rest-ra-sdk/build/ivy/ivysettings.xml
[oc:deploy] Created deployer with options: OutdatedIvyModuleDetection: Enabled, IvyStatusesToCheck: [integration]
[oc:deploy] Invoking the deployer to process root module exampleco#example-rest-ra#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp and its dependencies ...
[oc:deploy] Installing module opencloud#guava-library#third-party;28.2-jre
[oc:deploy] Installing module opencloud#jackson-library#third-party;2.11.0
[oc:deploy] Installing module opencloud#jaxb-api-library#third-party;2.4.0-b2
[oc:deploy] Installing module opencloud#jackson-dataformat-xml-library#third-party;2.11.0
[oc:deploy] Installing module opencloud#rest-api-common#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module exampleco#pingpong-api-server#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] Installing module opencloud#rest-ratype-spi#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module exampleco#pingpong-api-server-plugin#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] Installing module opencloud#base-rest-api-plugin#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module opencloud#netty-library#third-party;4.1.45
[oc:deploy] Installing module opencloud#unified-rest-ra-core#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] Installing module exampleco#example-rest-ra#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] Deployment Result:
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] |  Deploy result:
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] |  Modules with no Component:
[oc:deploy] |  opencloud#unified-rest-ra-core#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] |  Deployed Modules:
[oc:deploy] |  opencloud#jackson-dataformat-xml-library#third-party;2.11.0
[oc:deploy] |  |__ LibraryID[name=jackson-dataformat-xml,vendor=com.fasterxml.jackson.dataformat,version=2.11.0]
[oc:deploy] |  opencloud#jaxb-api-library#third-party;2.4.0-b2
[oc:deploy] |  |__ LibraryID[name=jaxb-api,vendor=javax.xml.bind,version=2.4.0-b2]
[oc:deploy] |  opencloud#guava-library#third-party;28.2-jre
[oc:deploy] |  |__ LibraryID[name=guava,vendor=com.google.guava,version=28.2-jre]
[oc:deploy] |  opencloud#rest-ratype-spi#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] |  |__ LibraryID[name=rest-ratype-spi,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |  exampleco#pingpong-api-server-plugin#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] |  |__ LibraryID[name=pingpong-api-server-plugin,vendor=ExampleCo,version=1.0]
[oc:deploy] |  exampleco#pingpong-api-server#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] |  |__ LibraryID[name=pingpong-api-server,vendor=ExampleCo,version=1.0]
[oc:deploy] |      ResourceAdaptorTypeID[name=pingpong-api-server,vendor=ExampleCo,version=1.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.openapi.pingpong_rest_api.api.DummyOperationRequest,vendor=ExampleCo,version=1.0]
[oc:deploy] |  opencloud#rest-api-common#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] |  |__ EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.POST,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.TRACE,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      LibraryID[name=rest-api-common,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.GET,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.DELETE,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      ResourceAdaptorTypeID[name=rest-api-common,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.HEAD,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestResponse,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.PATCH,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.PUT,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |      EventTypeID[name=com.opencloud.slee.rest.common.RestRequest.OPTIONS,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |  opencloud#netty-library#third-party;4.1.45
[oc:deploy] |  |__ LibraryID[name=netty,vendor=io.netty,version=4.1.45]
[oc:deploy] |  exampleco#example-rest-ra#exampleco-rest-ra/trunk;1.0.0.0-DEV1-davidp
[oc:deploy] |  |__ ResourceAdaptorID[name=example-rest-ra,vendor=ExampleCo,version=1.0]
[oc:deploy] |  opencloud#base-rest-api-plugin#rest-api-framework/1.0.0;1.0.0.0
[oc:deploy] |  |__ LibraryID[name=base-rest-api-plugin,vendor=OpenCloud,version=1.0.0]
[oc:deploy] |  opencloud#jackson-library#third-party;2.11.0
[oc:deploy] |  |__ LibraryID[name=jackson,vendor=com.fasterxml.jackson.core,version=2.11.0]
[oc:deploy] ---------------------------------------------------------------------
[oc:deploy] All modules deployed successfully.
   [delete] Deleting directory /home/davidp/work/unified-rest-ra-sdk/example-rest-ra/target/deployer-work

BUILD SUCCESSFUL
Total time: 14 seconds

As a last step, use rhino-console to inspect the state of your Rhino TAS SDK.

Inspecting Rhino to see what is installed
~/work/unified-rest-ra-sdk/rhino-sdk/RhinoSDK/client/bin$ ./rhino-console
Interactive Rhino Management Shell
Rhino management console, enter 'help' for a list of commands
Connected to node 101
[admin@localhost (#0)] listresourceadaptors
ResourceAdaptorID[name=example-rest-ra,vendor=ExampleCo,version=1.0] 1
[admin@localhost (#1)] listraentities
example-rest-ra  2
[admin@localhost (#2)] listraentityconfigproperties example-rest-ra
Configuration properties for resource adaptor entity example-rest-ra:  3
 AddressType (java.lang.String):
 AutomaticContentCompression (java.lang.Boolean): false
 AutomaticContentDecompression (java.lang.Boolean): true
 BindAddresses (java.lang.String):
 CipherSuites (java.lang.String):
 CreateIncomingSasTrail (java.lang.Boolean): true
 DefaultClusterCallbackUrl (java.lang.String): http://localhost:8000
 DefaultNodeCallbackUrl (java.lang.String): http://localhost:8000
 IncomingIdleTimeout (java.lang.Long): 60000
 IncomingRequestTimeout (java.lang.Long): 60000
 KeyStore (java.lang.String):
 KeyStorePassword (java.lang.String):
 ListenAddress (java.lang.String): localhost
 ListenPort (java.lang.Integer): 8000
 MaxChannelMemorySize (java.lang.Long): 10485760
 MaxContentLength (java.lang.Integer): 1048576
 MaxDepth (java.lang.Integer): 1
 MaxOutgoingConnections (java.lang.Integer): 30
 MaxTotalMemorySize (java.lang.Long): 0
 NeedClientAuth (java.lang.Boolean): false
 NewConnectionDelay (java.lang.Long): 100
 OutgoingIdleTimeout (java.lang.Long): 60000
 OutgoingRequestTimeout (java.lang.Long): 10000
 QueueTimeout (java.lang.Long): 5000
 SSLSessionTimeout (java.lang.Integer): 0
 SecureBindAddresses (java.lang.String):
 SecureListenPort (java.lang.Integer): 0
 ServerName (java.lang.String): Rhino-HTTP-Server/1.0
 ThreadPoolSize (java.lang.Integer): 10
 TrustStore (java.lang.String): ${java.home}/lib/security/cacerts
 TrustStorePassword (java.lang.String): changeit
 UserAgent (java.lang.String): Rhino-HTTP-Client/1.0
 WorkerCount (java.lang.Integer): 0
 slee-vendor:com.opencloud.rhino_max_activities (java.lang.Integer): 0
 slee-vendor:com.opencloud.rhino_replicate_activities (java.lang.String): none
[admin@localhost (#3)] listresourceadaptortypes 4
ResourceAdaptorTypeID[name=SessionOwnership,vendor=OpenCloud,version=1.0]
ResourceAdaptorTypeID[name=pingpong-api-server,vendor=ExampleCo,version=1.0]
ResourceAdaptorTypeID[name=rest-api-common,vendor=OpenCloud,version=1.0.0]
  1. The resource adaptors installed (via deploy-with-deps)

  2. The resource adaptor entity that was created (via configure-with-deps)

  3. The configuration of the new resource adaptor entity

  4. The resource adaptor types installed

Previous page Next page