Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
* Various improvement to the module structures
* Documentation update
* Marking sensitive variables

---------

Co-authored-by: Eugene Istrati <[email protected]>
  • Loading branch information
eistrati and Eugene Istrati authored Oct 23, 2024
1 parent 8202a6b commit dfc9d4a
Show file tree
Hide file tree
Showing 18 changed files with 208 additions and 182 deletions.
8 changes: 7 additions & 1 deletion .header.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AWS Lambda UDF (User Defined Function).

## Architecture Diagram

![Architecture Diagram](./docs/diagram.png "Architecture Diagram")
![Architecture Diagram](./docs/architecture-diagram.png "Architecture Diagram")

## Usage

Expand All @@ -25,5 +25,11 @@ module "udf" {
vpc_subnet_ids = null # replace with comma separated values
security_group_ids = null # replace with comma separated values
storage_url = null # replace with storage url
storage_user = null # replace with storage user
storage_pass = null # replace with storage pass
storage_token = null # replace with storage token (optional)
storage_secret_arn = null # replace with secrets manager arn (optional)
}
```
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AWS Lambda UDF (User Defined Function).

## Architecture Diagram

![Architecture Diagram](./docs/diagram.png "Architecture Diagram")
![Architecture Diagram](./docs/architecture-diagram.png "Architecture Diagram")

## Usage

Expand All @@ -26,6 +26,12 @@ module "udf" {
vpc_subnet_ids = null # replace with comma separated values
security_group_ids = null # replace with comma separated values
storage_url = null # replace with storage url
storage_user = null # replace with storage user
storage_pass = null # replace with storage pass
storage_token = null # replace with storage token (optional)
storage_secret_arn = null # replace with secrets manager arn (optional)
}
```

Expand Down Expand Up @@ -69,7 +75,8 @@ module "udf" {
| <a name="input_name"></a> [name](#input\_name) | Lambda UDF function name | `string` | `"redshift-copy-udf"` | no |
| <a name="input_security_group_ids"></a> [security\_group\_ids](#input\_security\_group\_ids) | Security Group IDs (comma separated values) | `string` | `null` | no |
| <a name="input_storage_pass"></a> [storage\_pass](#input\_storage\_pass) | Storage Password to Access S3 API Compliant Storage | `string` | `null` | no |
| <a name="input_storage_secret_arn"></a> [storage\_secret\_arn](#input\_storage\_secret\_arn) | Secrets Manager ARN for S3 API Compliant Storage Credentials | `string` | `null` | no |
| <a name="input_storage_secret_arn"></a> [storage\_secret\_arn](#input\_storage\_secret\_arn) | Secrets Manager ARN Holding Credentials to Access S3 API Compliant Storage (Optional) | `string` | `null` | no |
| <a name="input_storage_token"></a> [storage\_token](#input\_storage\_token) | Storage Token to Access S3 API Compliant Storage (Optional) | `string` | `null` | no |
| <a name="input_storage_url"></a> [storage\_url](#input\_storage\_url) | Storage URL to Access S3 API Compliant Storage | `string` | `null` | no |
| <a name="input_storage_user"></a> [storage\_user](#input\_storage\_user) | Storage Username to Access S3 API Compliant Storage | `string` | `null` | no |
| <a name="input_timeout"></a> [timeout](#input\_timeout) | Lambda UDF timeout | `number` | `300` | no |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0
v1.0.1
Binary file renamed docs/diagram.png → docs/architecture-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/minio-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions examples/basic/.header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Basic Example

This terraform module provides complimentary capabilities to
[COPY command](https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html)
by enabling data copy from S3 API compliant storage solutions such as
[Cloudian](https://github.com/cloudian/cloudian-s3-operator),
[MinIO](https://github.com/minio/minio), and
[Weka](https://github.com/weka/csi-wekafs) into Amazon Redshift with
AWS Lambda UDF (User Defined Function).

## Architecture Diagram

![Architecture Diagram](../../docs/architecture-diagram.png "Architecture Diagram")

## Usage

* Initialize terraform configs and modules

```sh
terraform init
```

* Review the resources to be created by terraform

```sh
terraform plan
```

* Apply the changes reviewed in the previous step

```sh
terraform apply
```

* When you need to clean up resources

```sh
terraform destroy
```
40 changes: 40 additions & 0 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
<!-- BEGIN_TF_DOCS -->
# Basic Example

This terraform module provides complimentary capabilities to
[COPY command](https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html)
by enabling data copy from S3 API compliant storage solutions such as
[Cloudian](https://github.com/cloudian/cloudian-s3-operator),
[MinIO](https://github.com/minio/minio), and
[Weka](https://github.com/weka/csi-wekafs) into Amazon Redshift with
AWS Lambda UDF (User Defined Function).

## Architecture Diagram

![Architecture Diagram](../../docs/architecture-diagram.png "Architecture Diagram")

## Usage

* Initialize terraform configs and modules

```sh
terraform init
```

* Review the resources to be created by terraform

```sh
terraform plan
```

* Apply the changes reviewed in the previous step

```sh
terraform apply
```

* When you need to clean up resources

```sh
terraform destroy
```

## Requirements

| Name | Version |
Expand Down
39 changes: 39 additions & 0 deletions examples/minio/.header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# MinIO Example

This terraform module provides complimentary capabilities to
[COPY command](https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html)
by enabling data copy from S3 API compliant storage solutions such as
[Cloudian](https://github.com/cloudian/cloudian-s3-operator),
[MinIO](https://github.com/minio/minio), and
[Weka](https://github.com/weka/csi-wekafs) into Amazon Redshift with
AWS Lambda UDF (User Defined Function).

## Architecture Diagram

![Architecture Diagram](../../docs/minio-diagram.png "Architecture Diagram")

## Usage

* Initialize terraform configs and modules

```sh
terraform init
```

* Review the resources to be created by terraform

```sh
terraform plan
```

* Apply the changes reviewed in the previous step

```sh
terraform apply
```

* When you need to clean up resources

```sh
terraform destroy
```
44 changes: 42 additions & 2 deletions examples/minio/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
<!-- BEGIN_TF_DOCS -->
# MinIO Example

This terraform module provides complimentary capabilities to
[COPY command](https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html)
by enabling data copy from S3 API compliant storage solutions such as
[Cloudian](https://github.com/cloudian/cloudian-s3-operator),
[MinIO](https://github.com/minio/minio), and
[Weka](https://github.com/weka/csi-wekafs) into Amazon Redshift with
AWS Lambda UDF (User Defined Function).

## Architecture Diagram

![Architecture Diagram](../../docs/minio-diagram.png "Architecture Diagram")

## Usage

* Initialize terraform configs and modules

```sh
terraform init
```

* Review the resources to be created by terraform

```sh
terraform plan
```

* Apply the changes reviewed in the previous step

```sh
terraform apply
```

* When you need to clean up resources

```sh
terraform destroy
```

## Requirements

| Name | Version |
Expand Down Expand Up @@ -44,7 +84,7 @@
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cidr"></a> [cidr](#input\_cidr) | This is the CIDR block for your EKS cluster | `string` | `"10.0.0.0/16"` | no |
| <a name="input_k8s"></a> [k8s](#input\_k8s) | This is the version of your EKS cluster | `string` | `"1.29"` | no |
| <a name="input_k8s"></a> [k8s](#input\_k8s) | This is the version of your EKS cluster | `string` | `"1.31"` | no |
| <a name="input_name"></a> [name](#input\_name) | This is the name of your EKS cluster | `string` | `"redshift-minio-demo"` | no |

## Outputs
Expand All @@ -56,5 +96,5 @@
| <a name="output_iam_role_name"></a> [iam\_role\_name](#output\_iam\_role\_name) | IAM Role Name for Redshift Permissions |
| <a name="output_lambda_function_arn"></a> [lambda\_function\_arn](#output\_lambda\_function\_arn) | Lambda Function ARN for Redshift UDF |
| <a name="output_lambda_function_name"></a> [lambda\_function\_name](#output\_lambda\_function\_name) | Lambda Function Name for Redshift UDF |
| <a name="output_storage_instructions"></a> [storage\_instructions](#output\_storage\_instructions) | n/a |
| <a name="output_storage_instructions"></a> [storage\_instructions](#output\_storage\_instructions) | Instructions to install the MinIO storage solution |
<!-- END_TF_DOCS -->
10 changes: 5 additions & 5 deletions examples/minio/minio-tenant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
apiVersion: v1
kind: Secret
metadata:
name: storage-configuration
name: minio-config
namespace: minio-tenant
type: Opaque
stringData:
Expand All @@ -25,14 +25,14 @@ metadata:
name: minio
namespace: minio-tenant
spec:
serviceMetadata:
minioServiceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-security-groups: "sg-0a4cecff434c80e6e"
# serviceMetadata:
# minioServiceAnnotations:
# service.beta.kubernetes.io/aws-load-balancer-security-groups: ""
exposeServices:
console: true
minio: true
configuration:
name: storage-configuration
name: minio-config
image: quay.io/minio/minio:RELEASE.2023-05-27T05-56-19Z
pools:
- servers: 4
Expand Down
8 changes: 6 additions & 2 deletions examples/minio/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ output "lambda_function_name" {
}

output "storage_instructions" {
value = <<INSTRUCTIONS
# To install open source storage solution into an existing EKS cluster:
description = "Instructions to install the MinIO storage solution"
value = <<INSTRUCTIONS
# To install open source storage solution on EKS cluster:
1) Associate OIDC provider
eksctl utils associate-iam-oidc-provider \
Expand All @@ -48,5 +49,8 @@ output "storage_instructions" {
3) Install EBS CSI Driver and Kubernetes Operator
aws eks update-kubeconfig --name ${var.name} --region ${data.aws_region.this.name}
kubectl apply -k "github.com/miniohq/marketplace/eks/resources"
4) Install MinIO Tenant
kubectl apply -k minio-tenant.yaml
INSTRUCTIONS
}
2 changes: 1 addition & 1 deletion examples/minio/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variable "name" {

variable "k8s" {
type = string
default = "1.29"
default = "1.31"
description = "This is the version of your EKS cluster"
}

Expand Down
16 changes: 0 additions & 16 deletions lambda_cfn/function.sql

This file was deleted.

Empty file removed lambda_cfn/input.csv
Empty file.
Loading

0 comments on commit dfc9d4a

Please sign in to comment.