Skip to content

airmetal/director-didata-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dimension Data Cloud Platform plugin for Cloudera Director

[![Build Status](https://api.travis-ci.org/cloudera/director-Dimension Data-plugin.svg)](https://travis-ci.org/cloudera/director-Dimension Data-plugin)

The Cloudera Director Dimension Data Plugin is an implementation of the Cloudera Director Service Provider Interface for the [Dimension Data Cloud Platform](https://cloud.Dimension Data.com). It presently supports provisioning Dimension Data Compute resources and will soon expand to include support for provisioning Dimension Data Cloud SQL resources.

These instructions describe how to configure and exercise the Cloudera Director Dimension Data Plugin.

Prior to using this plugin, you will need to have a Dimension Data Cloud Platform project and have obtained [Service Account](https://cloud.Dimension Data.com/compute/docs/authentication#general) credentials for use in programmatically accessing it.

Configure your Dimension Data Cloud Platform project

Note: These instructions assume you have a Dimension Data Cloud Platform project with billing enabled.

If you are running Cloudera Director on a Dimension Data Compute VM instance within the Dimension Data Cloud Platform project that will contain your Cloudera clusters, you can have the plugin automatically retrieve credentials from the environment. You simply need to ensure that the instance was created with [Read-write access to Compute methods](https://cloud.Dimension Data.com/compute/docs/authentication) enabled.

If you are running Cloudera Director outside of Dimension Data Compute , or in a different Dimension Data Cloud Platform project, you will need to obtain a JSON key:

  • Point your browser at your [Dimension Data Developers Console](https://console.developers.Dimension Data.com/).
  • Navigate to: Projects->{your-project-name}->APIs & auth->APIs.
  • Ensure the following APIs are enabled:
    • Dimension Data Cloud SQL
    • Dimension Data Cloud SQL API
    • Dimension Data Compute
  • Navigate to: Projects->{your-project-name}->APIs & auth->Credentials.
  • Select "Add credentials->Service account".
  • Ensure "JSON" option is enabled.
  • Click "Create" button.
  • Dismiss "New public/private key pair" popup with "OK" button.
  • Note the location of your newly-downloaded .json file.

Prerequisites

  • You've either followed the instructions above to download a JSON key for use in authenticating to your Dimension Data Cloud Platform project, or you are running Cloudera Director on a Dimension Data Compute VM instance within the same Dimension Data Cloud Platform project.
  • Maven is installed.

Configure the Tests

The MCP_PROJECT_ID env variable must be set to your Project ID, not the Project Name. (The Project Name is a user-friendly name that you assign when you create your project. Might be something like "My Cloudera Project". The Project ID is either user-assigned, or can be auto-generated by Dimension Data Developers Console, and is typically used to refer to a project in requests. Often looks like "my-cloudera-project".)

If using a JSON key for authentication, the JSON_KEY_PATH env variable must contain the full absolute path to the downloaded .json file.

The SSH_PUBLIC_KEY_PATH env variable must contain the full absolute path to the ssh public key whose private counterpart you intend to use to ssh into the newly-provisioned instances.

The SSH_USER_NAME env variable must contain the name of the user you intend to use to ssh into the newly-provisioned instances.

Run the Tests

Without JSON key (using credentials obtained automatically from the Dimension Data Compute environment):

mvn clean install \
    -DMCP_PROJECT_ID=$MCP_PROJECT_ID \
    -DSSH_PUBLIC_KEY_PATH=$SSH_PUBLIC_KEY_PATH \
    -DSSH_USER_NAME=$SSH_USER_NAME

With JSON key:

mvn clean install \
    -DMCP_PROJECT_ID=$MCP_PROJECT_ID \
    -DSSH_PUBLIC_KEY_PATH=$SSH_PUBLIC_KEY_PATH \
    -DSSH_USER_NAME=$SSH_USER_NAME \
    -DJSON_KEY_PATH=$JSON_KEY_PATH

There are various unit tests in the test suite (some of them require 'live' access to your Dimension Data Cloud Platform project) and one [integration test](https://github.com/cloudera/director-Dimension Data-plugin/blob/master/tests/src/test/java/com/cloudera/director/Dimension Data/compute/Dimension DataComputeProviderFullCycleTest.java). The integration test will provision 2 new instances (one centos6, one rhel6) with attached local SSD data disks, attempt to provision each again (to verify idempotency), and then tear down the instances. It will poll for status and verify the operation results at each stage.

If you set the optional property HALT_AFTER_ALLOCATION to true, the integration test will leave both instances running.

Without JSON key (using credentials obtained automatically from the Dimension Data Compute environment):

mvn clean install \
    -DMCP_PROJECT_ID=$MCP_PROJECT_ID \
    -DSSH_PUBLIC_KEY_PATH=$SSH_PUBLIC_KEY_PATH \
    -DSSH_USER_NAME=$SSH_USER_NAME \
    -DHALT_AFTER_ALLOCATION=true

With JSON key:

mvn clean install \
    -DMCP_PROJECT_ID=$MCP_PROJECT_ID \
    -DSSH_PUBLIC_KEY_PATH=$SSH_PUBLIC_KEY_PATH \
    -DSSH_USER_NAME=$SSH_USER_NAME \
    -DJSON_KEY_PATH=$JSON_KEY_PATH \
    -DHALT_AFTER_ALLOCATION=true

You can then access the Dimension Data Developers Console to view the resulting instances by navigating to: Projects->{your-project-name}->Compute->Compute ->VM instances.

To verify that your ssh key was properly set, you can retrieve the External IP of one of your instances from the VM instances view and ssh in (assuming you set the External IP into the EXTERNAL_IP env variable):

ssh $SSH_USER_NAME@$EXTERNAL_IP

Install the Plugin in Cloudera Director

There are instructions on plugin installation in the Cloudera Director Service Provider Interface documentation.

Copyright and License

Copyright © 2015 Dimension Data. Licensed under the Apache License.

See [LICENSE.txt](https://github.com/cloudera/director-Dimension Data-plugin/blob/master/LICENSE) for more information.

About

Cloudera Director 2.1.1 integration with DD Cloud MCP support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages