Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove lambda cfn #2

Merged
merged 8 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -->
6 changes: 3 additions & 3 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 @@ -27,12 +27,12 @@ metadata:
spec:
serviceMetadata:
minioServiceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-security-groups: "sg-0a4cecff434c80e6e"
service.beta.kubernetes.io/aws-load-balancer-security-groups: "sg-abcdefg12344567890"
wellsiau-aws marked this conversation as resolved.
Show resolved Hide resolved
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