Reply
Explorer
Posts: 8
Registered: ‎05-21-2018
Accepted Solution

Create Environment API - config object

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.

 

Highlighted
Explorer
Posts: 8
Registered: ‎05-21-2018

Re: Create Environment API - config object

[ Edited ]

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

 

Cloudera Employee
Posts: 55
Registered: ‎10-28-2014

Re: Create Environment API - config object

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

 

Announcements