Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Create Environment API - config object

avatar
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

avatar
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

 

View solution in original post

2 REPLIES 2

avatar
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

 

avatar
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