Skip to main content Skip to complementary content

Creating and pairing a Remote Engine programmatically

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. 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.

    Information noteNote:

    To get the full list of parameters, check the Swagger UI API reference available at https://api.<env>.cloud.talend.com/tmc where <env> is the name of your Cloud region. If you do not know what your region name is, see Talend Cloud regions and URLs.

    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 'personal_access_token or service_account_token' -d '{
           "name": "My Remote Engine",
    		"environmentId": "5d1619bb818cfe3dca795e41",  
            "workspaceId": "5d1619bb818cfe3dca795e44" 
           }' 
    'https://api.us.cloud.talend.com/tmc/v1.3/runtimes/remote-engines'
    
  2. Retrieve and insert the pairing key of the new Remote Engine into the preauthorized.key.cfg file of the Remote Engine installation directory. This pairing key is also referred to as a pre-authorization key. You can obtain it either on the Engines tab of the Processing page in Talend Management Console or from the preAuthorizedKey parameter of the Remote Engine creation response body.
    echo "remote.engine.pre.authorized.key = $PAIRING_KEY" > <RemoteEngineInstallationDirectory>/etc/preauthorized.key.cfg 
  3. 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.

Remote Engine uses a key pair to secure its communication with Talend Management Console. A random password is generated during the pairing process.

If you need to define your own password, complete this Securing the public and the private keys of your engine procedure before pairing your engine.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!