Created on 06-18-2018 07:35 AM - edited 09-16-2022 08:29 AM
I am trying to use the Create Environment API for cluster automation, which I believe to be the first step (based on the GUI) in setting up my cluster.
{ "name": "", "provider": { "type": "", "config": "object" }, "credentials": { "username": "", "password": "", "privateKey": "", "passphrase": "", "port": 0, "hostKeyFingerprint": "", "bastionHost": "" } }
First off, am I on the right track? And if so where do I find details on this portion which appears to be the section for my clouder provider details?
config (object): Provider specific configurations [redacted on read]
I am using AWS.
Created on 06-18-2018 09:19 AM - edited 06-18-2018 09:22 AM
OK I figured this missing piece (at least for AWS) to be:
{ 'accessKeyId': "accessKeyId", 'secretAccessKey': "secretAccessKey", 'region': "region" }
I figured this out using the Cloudera's python example here:
https://github.com/cloudera/director-sdk/blob/master/python-client-samples/cluster.py
Created on 06-18-2018 09:19 AM - edited 06-18-2018 09:22 AM
OK I figured this missing piece (at least for AWS) to be:
{ 'accessKeyId': "accessKeyId", 'secretAccessKey': "secretAccessKey", 'region': "region" }
I figured this out using the Cloudera's python example here:
https://github.com/cloudera/director-sdk/blob/master/python-client-samples/cluster.py
Created 06-20-2018 12:47 PM
I'm glad you figured this out.
There are some other places you can look for information about provider-specific configuration properties as well.
There are reference configuration files here:
https://github.com/cloudera/director-scripts/tree/master/configs
From the help menu in the Director UI, you can access the API console, and the provider-metadata endpoints there will show you all the valid provider-specific configuration properties.
If you're comfortable reading code, the plugins that enable Director to work with multiple cloud providers are open source. If you search those repositories for ConfigurationPropertyToken, you will see the classes that define the metadata for the provider-specific configuration properties. The AWS repository, for example, is here:
https://github.com/cloudera/director-aws-plugin/tree/v2