Skip to content

Commit

Permalink
Add license headers (#124)
Browse files Browse the repository at this point in the history
* Add license headers (#122)
* Update public cloud/aws projects (#125)
* Update links to ansible-navigator setup and cldr-runner FAQ
* Update TF submodules to v0.3.0 for public-cloud/aws/datalake-tf
* Rename play in public-cloud/aws/datalake-tf main.yml
* Add TF lock files and SSH key artifacts to .gitignore in public-cloud/aws/datalake-tf
* Update README for datalake-tf for relocated links and runtime parameters
* Update the name of the teardown.yml play for datalake-tf

Signed-off-by: Webster Mudge <wmudge@cloudera.com>
  • Loading branch information
wmudge authored Sep 28, 2023
1 parent 1647749 commit 802e3a4
Show file tree
Hide file tree
Showing 17 changed files with 155 additions and 17 deletions.
5 changes: 3 additions & 2 deletions public-cloud/aws/cde/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To run, you need:

## Set Up

First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the top-level [README](../../../README.md#setting-up-ansible-navigator).
First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the [NAVIGATOR document](https://github.com/cloudera-labs/cldr-runner/blob/main/NAVIGATOR.md) in `cloudera-labs/cldr-runner`.

Then, clone this project and change your working directory.

Expand All @@ -37,7 +37,8 @@ admin_password: "Secret" # 1 upper, 1 special, 1 number, 8-64 chars.
infra_region: us-east-2
```
NOTE: You can override these parameters with any typical Ansible _extra variables_ flags, i.e. `-e admin_password=my_password`. See the [FAQ](../../../FAQ.md#how-to-i-add-extra-variables-and-tags-to-ansible-navigator) for details.
> [!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](https://github.com/cloudera-labs/cldr-runner/blob/main/FAQ.md#how-do-i-add-extra-variables-and-tags-to-ansible-navigator) for details.

### SSH Keys

Expand Down
5 changes: 3 additions & 2 deletions public-cloud/aws/cdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To run, you need:

## Set Up

First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the top-level [README](../../../README.md#setting-up-ansible-navigator).
First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the [NAVIGATOR document](https://github.com/cloudera-labs/cldr-runner/blob/main/NAVIGATOR.md) in `cloudera-labs/cldr-runner`.

Then, clone this project and change your working directory.

Expand All @@ -37,7 +37,8 @@ admin_password: "Secret" # 1 upper, 1 special, 1 number, 8-64 chars.
infra_region: us-east-2
```
NOTE: You can override these parameters with any typical Ansible _extra variables_ flags, i.e. `-e admin_password=my_password`. See the [FAQ](../../../FAQ.md#how-to-i-add-extra-variables-and-tags-to-ansible-navigator) for details.
> [!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](https://github.com/cloudera-labs/cldr-runner/blob/main/FAQ.md#how-do-i-add-extra-variables-and-tags-to-ansible-navigator) for details.

### SSH Keys

Expand Down
5 changes: 3 additions & 2 deletions public-cloud/aws/cml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To run, you need:

## Set Up

First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the top-level [README](../../../README.md#setting-up-ansible-navigator).
First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the [NAVIGATOR document](https://github.com/cloudera-labs/cldr-runner/blob/main/NAVIGATOR.md) in `cloudera-labs/cldr-runner`.

Then, clone this project and change your working directory.

Expand All @@ -37,7 +37,8 @@ admin_password: "Secret" # 1 upper, 1 special, 1 number, 8-64 chars.
infra_region: us-east-2
```
NOTE: You can override these parameters with any typical Ansible _extra variables_ flags, i.e. `-e admin_password=my_password`. See the [FAQ](../../../FAQ.md#how-to-i-add-extra-variables-and-tags-to-ansible-navigator) for details.
> [!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](https://github.com/cloudera-labs/cldr-runner/blob/main/FAQ.md#how-do-i-add-extra-variables-and-tags-to-ansible-navigator) for details.

### SSH Keys

Expand Down
9 changes: 8 additions & 1 deletion public-cloud/aws/datalake-tf/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ context
# Local .terraform directories
**/.terraform/*

# .lock files
**/*.terraform.lock.*

# .tfstate files
**/*.tfstate
**/*.tfstate.*
Expand All @@ -32,4 +35,8 @@ context
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
**/*.tfvars
**/*.tfvars.json
**/*.tfvars.json

# Exclude any generated SSH keys
**/*.pem
**/*.pub
11 changes: 6 additions & 5 deletions public-cloud/aws/datalake-tf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ To run, you need:

## Set Up

First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the top-level [README](../../../README.md#setting-up-ansible-navigator).
First, set up your `ansible-navigator` aka `cdp-navigator` environment -- follow the instructions in the [NAVIGATOR document](https://github.com/cloudera-labs/cldr-runner/blob/main/NAVIGATOR.md) in `cloudera-labs/cldr-runner`.

Then, clone this project and change your working directory.

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

## Configure
Expand All @@ -40,7 +40,8 @@ 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 name_prefix=ex01`. See the [FAQ](../../../FAQ.md#how-to-i-add-extra-variables-and-tags-to-ansible-navigator) for details.
> [!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](https://github.com/cloudera-labs/cldr-runner/blob/main/FAQ.md#how-do-i-add-extra-variables-and-tags-to-ansible-navigator) for details.

### SSH Keys

Expand All @@ -51,7 +52,7 @@ This definition will create a new SSH keypair on the host of the name `<name_pre
Then set up the CDP Public Cloud by running the playbook:

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

### Terraform resource files
Expand All @@ -65,5 +66,5 @@ Standard Terraform commands - e.g. `terraform output`, `terraform console`, can
Tear down the CDP Public Cloud by running the playbook:

```bash
ansible-navigator run teardown.yml
ansible-navigator run teardown.yml -e @config.yml
```
15 changes: 15 additions & 0 deletions public-cloud/aws/datalake-tf/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
---

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name_prefix: "<ENTER_VALUE>" # You must specify a name prefix

infra_region: eu-west-1 # CSP region for infra
Expand Down
2 changes: 1 addition & 1 deletion public-cloud/aws/datalake-tf/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Set up the cloudera-deploy variables
- name: Set up CDP Public Cloud infrastructure, Environment, and Datalake (Terraform-based)
hosts: localhost
connection: local
gather_facts: no
Expand Down
16 changes: 15 additions & 1 deletion public-cloud/aws/datalake-tf/pbc_deploy_tf/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module "cdp_deploy" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.2.0"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.3.0"

env_prefix = var.env_prefix
infra_type = "aws"
Expand Down
14 changes: 14 additions & 0 deletions public-cloud/aws/datalake-tf/pbc_deploy_tf/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output "cdp_environment_name" {
value = module.cdp_deploy.cdp_environment_name
}
Expand Down
14 changes: 14 additions & 0 deletions public-cloud/aws/datalake-tf/pbc_deploy_tf/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ------- Global settings -------
variable "aws_region" {
type = string
Expand Down
16 changes: 15 additions & 1 deletion public-cloud/aws/datalake-tf/pbc_infra_tf/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

##### Terraform and Provider Configuration #####
terraform {
required_providers {
Expand Down Expand Up @@ -50,7 +64,7 @@ data "cdp_environments_aws_credential_prerequisites" "cdp_prereqs" {}
##### Create the AWS pre-requisite resources for CDP #####
# Using the terraform-cdp-aws-pre-reqs module
module "cdp_aws_prereqs" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-aws-pre-reqs?ref=v0.2.0"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-aws-pre-reqs?ref=v0.3.0"

env_prefix = var.env_prefix
aws_region = var.aws_region
Expand Down
14 changes: 14 additions & 0 deletions public-cloud/aws/datalake-tf/pbc_infra_tf/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output "aws_key_name" {
value = aws_key_pair.cdp_keypair.key_name
}
Expand Down
14 changes: 14 additions & 0 deletions public-cloud/aws/datalake-tf/pbc_infra_tf/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ------- Global settings -------
variable "env_prefix" {
type = string
Expand Down
2 changes: 1 addition & 1 deletion public-cloud/aws/datalake-tf/teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Set up the cloudera-deploy variables
- name: Tear down CDP Public Cloud infrastructure, Environment, and Datalake (Terraform-based)
hosts: localhost
connection: local
gather_facts: yes
Expand Down
14 changes: 14 additions & 0 deletions public-cloud/aws/datalake-tf/templates/cdp_aws_deploy.tfvars.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ------- Global settings -------
env_prefix = "{{ name_prefix }}"
infra_type = "{{ infra_type }}"
Expand Down
14 changes: 14 additions & 0 deletions public-cloud/aws/datalake-tf/templates/cdp_aws_prereqs.tfvars.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ------- Global settings -------
env_prefix = "{{ name_prefix }}"
aws_region = "{{ infra_region }}"
Expand Down
2 changes: 1 addition & 1 deletion public-cloud/aws/datalake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ infra_region: us-east-2
```
> [!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](https://github.com/cloudera-labs/cldr-runner/blob/main/FAQ.md#how-to-i-add-extra-variables-and-tags-to-ansible-navigator) for details.
> You can override these parameters with any typical Ansible _extra variables_ flags, i.e. `-e admin_password=my_password`. See the [cldr-runner FAQ](https://github.com/cloudera-labs/cldr-runner/blob/main/FAQ.md#how-do-i-add-extra-variables-and-tags-to-ansible-navigator) for details.

### SSH Keys

Expand Down

0 comments on commit 802e3a4

Please sign in to comment.