Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Create Environment API - config object

Solved Go to solution

Create Environment API - config object

Explorer

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Create Environment API - config object

Explorer

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

 

2 REPLIES 2

Re: Create Environment API - config object

Explorer

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

 

Highlighted

Re: Create Environment API - config object

Expert Contributor

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

 

Don't have an account?
Coming from Hortonworks? Activate your account here