To configure S3 using CDP CLI, follow the below procedure.
- This operation requires CDP CLI version 0.9.84 or above.
- This procedure is applicable under following conditions:
- If you did not have Ozone when you created the base cluster.
- Later you decide to use CDE on the existing base cluster and add Ozone
to the existing base cluster.
-
Create an S3 bucket using the following steps:
-
Make use of the Cloudera Manager API call
/clusters/{clusterName}/getOzoneS3GatewayInfo.
-
The clusterName is the base cluster that has the
Ozone service.
-
You must provide a bucket name by following the guidelines mentioned in
the Bucket naming rules
documentation. You must note down the bucket name as this is different
from the return bucket field mentioned
below.
The API call is in progress and you must wait for the API call
to complete.
-
After the API call is complete, save the returned json output. This
looks similar to
{ “awsAccessKey”: … “awsSecret”: … “restUrl”: …
“bucket”: … }
-
Run the following cdpcli command using the values returned above:
cdp environments --endpoint-url <console-url> --no-verify-tls
--no-parameter-expansion --set-environment-setting --environment-name
<environment-name> --settings ‘{“logType”: “OZONE”, “ozoneS3Key”:
“<awsAccessKey>”, “ozoneS3Secret”: “<awsSecret>”, “ozoneS3RestUrl:
“<restUrl>”, “ozoneLogsBucket”: “<bucket-name>”, “ozoneLogsPath”:
“<bucket>”}’
-
Verify that the environment settings have been correctly configured by running
cdp environments
--no-verify-tls get-environment-setting --environment-name
<environment-name> --attrs logType ozoneS3Key ozoneS3Secret
ozoneS3RestUrl ozoneLogsBucket ozoneLogsPath