Obtain CLI commands for registering an environment

Although you can obtain CDP CLI commands for environment creation from CDP CLI help, the easiest way to obtain them is from the CDP web interface.

You can quickly obtain CDP CLI commands for creating an environment:

  • From details of an existing environment
  • From the register environment wizard

Create an environment from an existing environment

Obtain an environment template from an existing environment to create an environment with the exact same settings.

Since creating an environment, setting IDBroker mappings, and creating a Data Lake are separate actions in CDP CLI, you need to obtain three commands.

Required role: EnvironmentUser, EnvironmentAdmin, or Owner

Steps

  1. Log in to the CDP web interface and navigate to the Management Console.

  2. Navigate to environment details > Actions > Show CLI commands:

  3. Click COPY three times to copy the three commands. These commands allow you to:
    1. Create an environment with the same settings as the existing environment.
    2. Set the same IDBroker mappings as in the original environment.
    3. Create a Data Lake with the same settings.
  4. Before you can use these commands, make sure to update the following:
    1. In cdp environments create-<cloud-platform>-environment, update the value of --environment-name. It should be unique within CDP.
    2. In cdp environments set-id-broker-mappings, update the value of --environment-name. It should reference the name of the new environment that you are planning to create.
    3. In cdp datalake create-<cloud-platform>-datalake, update the value of --datalake-name. It should be unique within CDP.
    4. In cdp datalake create-<cloud-platform>-datalake, update the value of --environment-name. It should reference the name of the new environment that you are planning to create.
  5. Run the three commands to:
    1. Register an environment.
    2. Set IDBroker mappings.
    3. Create a Data Lake.

Obtain CLI commands from the register environment wizard

Provide environment parameters in the environment wizard, and then on the last page of the wizard generate a CDP CLI template to create an environment and Data Lake with the parameters specified in the wizard. The obtained cluster template can be used to create an environment with the same settings via CDP CLI.

Since creating an environment, setting IDBroker mappings, and creating a Data Lake are separate actions in CDP CLI, you need to obtain three commands.

Required role: EnvironmentCreator

Steps

  1. Log in to the CDP web interface and navigate to the Management Console.

  2. Navigate to Environments > Register Environment.

  3. Provide all the parameters for your environment.

  4. On the last page, click SHOW CLI COMMAND in the bottom of the page.

  5. Copy the three commands (for creating an environment, setting IDBroker mappings, and creating a Data Lake).

  6. Run the commands:
    1. First run the command that creates the environment.
    2. Once the command finishes and the environment is running, run the command that sets IDBroker mappings.
    3. Next, run the command that creates the Data Lake.