Creating and pairing a Remote Engine programmatically - Cloud

Talend Remote Engine User Guide for Linux

EnrichVersion
Cloud
EnrichProdName
Talend Cloud
EnrichPlatform
Talend Remote Engine
task
Design and Development
Installation and Upgrade

Create and pair a Remote Engine programmatically through an API to automate your flow.

Before you begin

You have downloaded the archive file of the Remote Engine and unzipped it locally on the machine that will execute the following API requests. The Remote Engine is not paired yet.

About this task

The code samples in the following example show the different parts of a shell script.

Procedure

  1. From your profile preferences in Talend Cloud, generate a Personal Access Token. This token allows to sign the API calls.
  2. Create a Remote Engine with a POST on the runtimes/remote-engines endpoint.

    A few parameters are defined in the payload, some of which are optional.

    Note:

    To get the full list of parameters, check the Swagger UI API reference available at https://api.us.cloud.talend.com/tmc/ for AWS USA, https://api.eu.cloud.talend.com/tmc/ for AWS Europe, https://api.ap.cloud.talend.com/tmc/ for AWS Asia-Pacific, or https://api.us-west.cloud.talend.com/tmc/ for Azure West.

    To find the values of the environmentId and workspaceId parameters, send a GET request to the workspaces endpoint.

    curl -X POST 
    --header 'Content-Type: application/json' 
    --header 'Accept: application/json' 
    --header 'Authorization: Bearer 'VtBmuAoYSse6FW4zh8JqlnQsl73P8xAB4j9-qD98qx8HI48DDJEUKCBKncU5FSGi' -d '{
           "name": "My Remote Engine",
    		"environmentId": "5d1619bb818cfe3dca795e41",  
            "workspaceId": "5d1619bb818cfe3dca795e44" 
           }' 
    'https://api.us.cloud.talend.com/tmc/v1.3/runtimes/remote-engines'
    
  3. Retrieve and insert the pairing key of the new Remote Engine into the preauthorized.key.cfg file of the Remote Engine installation directory.
    echo "remote.engine.pre.authorized.key = $PAIRING_KEY" > <RemoteEngineInstallationDirectory>/etc/preauthorized.key.cfg 
    Tip: You can retrieve the pairing key from the preAuthorizedKey parameter of the Remote Engine creation response body.
  4. Update the URL of the pairing service to match the region of your deployment in the org.talend.ipaas.rt.pairing.client.cfg file of the Remote Engine installation directory.
    Adapt the following example to your Talend Cloud region.
    echo "pairing.service.url=https://pair.us.cloud.talend.com" > <RemoteEngineInstallationDirectory>/etc/org.talend.ipaas.rt.pairing.client.cfg

Results

Your new Remote Engine will be paired when started. The next example shows how to add the created Remote Engine to an existing Remote Engine Cluster.