Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 2.58 KB

File metadata and controls

70 lines (43 loc) · 2.58 KB

CDP Public Cloud - Environment and Datalake Base Example

Constructs a CDP Public Cloud Environment and Datalake. Uses the terraform-cdp-modules, called via Ansible, to generate the AWS infrastructure pre-requisite resources and the CDP artifacts.

NOTE: This deployment example does not use a definition.yml based configuration file. Instead a standard Ansible extra vars configuration file is used.

Requirements

To run, you need:

  • Docker (or a Docker alterative)
  • AWS credentials (set via AWS_PROFILE)
  • CDP credentials (set via CDP_PROFILE)

Set Up

First, set up your ansible-navigator aka cdp-navigator environment -- follow the instructions in the NAVIGATOR document in cloudera-labs/cldr-runner.

Then, clone this project and change your working directory.

git clone https://github.com/cloudera-labs/cloudera-deploy.git; cd cloudera-deploy/public-cloud/aws/datalake-tf

Configure

Set the required environment variables:

export AWS_PROFILE=your-aws-profile
export CDP_PROFILE=your-cdp-profile

Tweak the config.yml parameters to your liking. Notably, you should add and/or change:

name_prefix:    ex01      # Keep this short (4-7 characters)
infra_region:   us-east-2 # CSP region for infra

deployment_template: public # Specify the deployment pattern below. Options are public, semi-private or private

Note

You can override these parameters with any typical Ansible extra variables flags, i.e. -e admin_password=my_password. See the cldr-runner FAQ for details.

SSH Keys

This definition will create a new SSH keypair on the host of the name <name_prefix>-ssh-key.{pem,pub}. This is stored in the ./pbc_infra_tf directory. A AWS Keypair will be created using the generated public key.

Execute

Then set up the CDP Public Cloud by running the playbook:

ansible-navigator run main.yml -e @config.yml

Terraform resource files

The Terraform root module resource files run by the playbook are in the ./pbc_infra_tf/ (for cloud infrastructure deployment) ./pbc_deploy_tf/ (CDP deployment) sub-directories.

Standard Terraform commands - e.g. terraform output, terraform console, can be run from within these directories.

Tear Down

Tear down the CDP Public Cloud by running the playbook:

ansible-navigator run teardown.yml -e @config.yml