Hybrid method 1: Automatic Wasm pull

To configure nodegen-server for automatic Wasm module retrieval, you need to set the following environment variables.
USE_SAAS
false
This must always be set as false. The setting of true is for Coherent deployments on our SaaS environments. The default value is true.
SERVICE_ENDPOINTS__EXCELENGINE_SERVICEURL
The base URL of your Spark SaaS account https://excel.{environment}.coherent.global.
SAAS_SERVICE_AUTH_TYPE
syntheticKey or OAuth2
SAAS_SERVICE_SYNTHETIC_KEY
If SAAS_SERVICE_AUTH_TYPE is syntheticKey then this value has to be configured.
API key created from Authorization - API keys.
The API key groups must contain User groups that are also assigned to Permissions - Features permissions Spark.GetNodegenZip.json
and Spark.Resolver.json or assigned to Spark.AllEncompassingProxy.json.
SAAS_SERVICE_OAUTH_ISSUER_BASE_URL
If SAAS_SERVICE_AUTH_TYPE is OAuth2 then this value has to be configured.
https://keycloak.{environment}.coherent.global
SAAS_SERVICE_OAUTH_CLIENT_ID
If SAAS_SERVICE_AUTH_TYPE is OAuth2 then this value has to be configured.
This can be setup with Client Credentials.
SAAS_SERVICE_OAUTH_CLIENT_SECRET
If SAAS_SERVICE_AUTH_TYPE is OAuth2 then this value has to be configured.
This can be setup with Client Credentials.
CLEANUP_INTERVAL
The interval in milliseconds before cleaning up any downloaded Wasm modules. The default value is 43200000 milliseconds (12 hours).
Ensure that the Docker engine/daemon is up and running.
pullthenodegen-serverDocker image using the following command:runthe service and create a container calledwasm-server.Define the parameters that will be used for authorization to the Spark servers. In this example we are using a
syntheticKeyfor authorization.
Test the service using the
healthcheckendpoint. You should receive the message{"msg":"ok"}.Execute a request similar to that in the API Tester.
Note the change in the URI to
localhost:3000and make sure to updatemytenantin the URI to your tenant name.See Execute API (v3) for more information on the request_data and request_meta structure and options.
Also see the Hybrid Runner API reference for alternative endpoints available from the runner.
nodegen-serverwill first perform a lookup and verify whether the Spark service was already downloaded and cached locally.If the service is not found locally,
nodegen-serverwill use the provided Spark credentials to download the Wasm module from the SaaS platform and cache it until theCLEANUP_INTERVALis reached.If the service is found locally,
nodegen-serverwill execute the Wasm module by loading it into memory, running the encapsulated logic, and returning the results back to the end-user.
Last updated
