Categories

Versions

You are viewing the RapidMiner Scoring-agent documentation for version 9.9 - Check here for latest version

Create deployment file from repository

The deployment file can now be downloaded from RapidMiner Server either via command line or via browser. Both possibilities are described below.

Ensure that you already have a deployable asset meaning at least one process in your project.

Downloading the deployment from RapidMiner AI Hub will create a .zip file with a snapshot of the current deployment folder content together with a configuration file that defines the endpoints of deployment.

Download via command line

To trigger the deployment creation via command line you can, for example, use curl or any other tool which fits the needs. The creation URL is defined as http://$RM_SERVER/api/rest/resources/$LOCATION?format=webservice. Where

  • $RM_SERVER is the host name of the RapidMiner Server (e.g. localhost:8080)
  • $LOCATION is the repository location of the deployment folder (e.g. deployments/score-fraud)

So, in our case the URL looks like this:

http://localhost:8080/api/rest/resources/deployments/score-fraud?format=webservice

and an example curl command looks like this:

curl -u user:password 'http://localhost:8080/api/rest/resources/deployments/score-fraud?format=webservice' -o deployment.zip

It's also possible to include one or more connections from the central repository into the deployment.zip file by referencing the name of it. Assume a connection is called MyDB and it resides in the default location /Connections/MyDB of the repository, then adding a query parameter with &connection=MyDB will include the connection into the created deployment file.

So, in our case the URL might look like this if we like to include connections MyDB and MySecondDB at the same time:

http://localhost:8080/api/rest/resources/deployments/score-fraud?format=webservice&connection=MyDB&connection=MySecondDB

Connections having injected parameters are not supported within the Scoring Agent. Please ensure that you didn’t define any injected parameters for the connections you like to include into your deployment ZIP file.

Download via browser

To trigger the deployment creation via browser you just need to visit the resource URL of your created deployment folder. The URL is defined as http://$RM_SERVER/internal/rest/resources/$LOCATION?format=webservice. Where

  • $RM_SERVER is the host name of the RapidMiner Server (e.g. localhost:8080)
  • $LOCATION is the repository location of the deployment folder (e.g. deployments/score-fraud)

So, in our case the browser URL looks like this:

http://localhost:8080/internal/rest/resources/deployments/score-fraud?format=webservice

Enable 'continuous mode' for deployment

You can enable the continuous mode during the download of a deployment by adding the query parameter &continuous=true. You can also define a delay in milliseconds between each execution by adding the query parameter &sleep=5000. If you omit the sleep parameter a default of 1 milliseconds will be used.

So, as an example, if you want to enable the continuous mode with a delay of 5000 milliseconds between each execution the browser URL would look like this:

http://localhost:8080/internal/rest/resources/deployments/score-fraud?format=webservice&continuous=true&sleep=5000

What's next?

After you have downloaded the deployment file you can install it on a Scoring Agent.