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
-
Log in to the CDP web interface and navigate to the Management Console.
-
Navigate to environment details > Actions > Show CLI commands:
-
Click COPY three times to copy the three commands. These commands allow you to:
- Create an environment with the same settings as the existing environment.
- Set the same IDBroker mappings as in the original environment.
- Create a Data Lake with the same settings.
- Before you can use these commands, make sure to update the following:
- In
cdp environments create-<cloud-platform>-environment
, update the value of--environment-name
. It should be unique within CDP. - 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. - In
cdp datalake create-<cloud-platform>-datalake
, update the value of--datalake-name
. It should be unique within CDP. - 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.
- In
-
Run the three commands to:
- Register an environment.
- Set IDBroker mappings.
- 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
-
Log in to the CDP web interface and navigate to the Management Console.
-
Navigate to Environments > Register Environment.
-
Provide all the parameters for your environment.
-
On the last page, click SHOW CLI COMMAND in the bottom of the page.
-
Copy the three commands (for creating an environment, setting IDBroker mappings, and creating a Data Lake).
-
Run the commands:
- First run the command that creates the environment.
- Once the command finishes and the environment is running, run the command that sets IDBroker mappings.
- Next, run the command that creates the Data Lake.