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

Release/0.2.0 #10

Merged
merged 2 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 0.2.0 (2024-02-05)
--------------------------
Update LICENSE to SLULA (#9)

Version 0.1.3 (2024-01-16)
--------------------------
Bump service module to 0.2.1 (#7)
Expand Down
257 changes: 56 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ resource "aws_sqs_queue" "db_message_queue" {
module "transformer_wrp" {
source = "snowplow-devops/transformer-kinesis-ec2/aws"

accept_limited_use_license = true

name = "transformer-server-wrp"
vpc_id = var.vpc_id
subnet_ids = var.subnet_ids
Expand Down Expand Up @@ -84,6 +86,8 @@ module "transformer_wrp" {
module "db_loader" {
source = "snowplow-devops/databricks-loader-ec2/aws"

accept_limited_use_license = true

name = "db-loader-server"
vpc_id = var.vpc_id
subnet_ids = var.subnet_ids
Expand Down Expand Up @@ -133,7 +137,7 @@ module "db_loader" {
|------|--------|---------|
| <a name="module_instance_type_metrics"></a> [instance\_type\_metrics](#module\_instance\_type\_metrics) | snowplow-devops/ec2-instance-type-metrics/aws | 0.1.2 |
| <a name="module_service"></a> [service](#module\_service) | snowplow-devops/service-ec2/aws | 0.2.1 |
| <a name="module_telemetry"></a> [telemetry](#module\_telemetry) | snowplow-devops/telemetry/snowplow | 0.4.0 |
| <a name="module_telemetry"></a> [telemetry](#module\_telemetry) | snowplow-devops/telemetry/snowplow | 0.5.0 |

## Resources

Expand Down Expand Up @@ -172,10 +176,13 @@ module "db_loader" {
| <a name="input_ssh_key_name"></a> [ssh\_key\_name](#input\_ssh\_key\_name) | The name of the SSH key-pair to attach to all EC2 nodes deployed | `string` | n/a | yes |
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | The list of subnets to deploy Loader across | `list(string)` | n/a | yes |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC to deploy Loader within | `string` | n/a | yes |
| <a name="input_accept_limited_use_license"></a> [accept\_limited\_use\_license](#input\_accept\_limited\_use\_license) | Acceptance of the SLULA terms (https://docs.snowplow.io/limited-use-license-1.0/) | `bool` | `false` | no |
| <a name="input_amazon_linux_2_ami_id"></a> [amazon\_linux\_2\_ami\_id](#input\_amazon\_linux\_2\_ami\_id) | The AMI ID to use which must be based of of Amazon Linux 2; by default the latest community version is used | `string` | `""` | no |
| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Version of rdb loader databricks | `string` | `"5.6.0"` | no |
| <a name="input_associate_public_ip_address"></a> [associate\_public\_ip\_address](#input\_associate\_public\_ip\_address) | Whether to assign a public ip address to this instance | `bool` | `true` | no |
| <a name="input_cloudwatch_logs_enabled"></a> [cloudwatch\_logs\_enabled](#input\_cloudwatch\_logs\_enabled) | Whether application logs should be reported to CloudWatch | `bool` | `true` | no |
| <a name="input_cloudwatch_logs_retention_days"></a> [cloudwatch\_logs\_retention\_days](#input\_cloudwatch\_logs\_retention\_days) | The length of time in days to retain logs for | `number` | `7` | no |
| <a name="input_config_override_b64"></a> [config\_override\_b64](#input\_config\_override\_b64) | App config uploaded as a base64 encoded blob. This variable facilitates dev flow, if config is incorrect this can break the deployment. | `string` | `""` | no |
| <a name="input_custom_iglu_resolvers"></a> [custom\_iglu\_resolvers](#input\_custom\_iglu\_resolvers) | The custom Iglu Resolvers that will be used by Stream Shredder | <pre>list(object({<br> name = string<br> priority = number<br> uri = string<br> api_key = string<br> vendor_prefixes = list(string)<br> }))</pre> | `[]` | no |
| <a name="input_databricks_aws_s3_folder_monitoring_stage_url"></a> [databricks\_aws\_s3\_folder\_monitoring\_stage\_url](#input\_databricks\_aws\_s3\_folder\_monitoring\_stage\_url) | AWS bucket URL of folder monitoring stage - must be within 'databricks\_aws\_s3\_bucket\_name' (NOTE: must be set if 'folder\_monitoring\_enabled' is true) | `string` | `""` | no |
| <a name="input_databricks_aws_s3_folder_monitoring_transformer_output_stage_url"></a> [databricks\_aws\_s3\_folder\_monitoring\_transformer\_output\_stage\_url](#input\_databricks\_aws\_s3\_folder\_monitoring\_transformer\_output\_stage\_url) | AWS bucket URL of transformer output stage - must be within 'databricks\_aws\_s3\_bucket\_name' (NOTE: must be set if 'folder\_monitoring\_enabled' is true) | `string` | `""` | no |
Expand All @@ -191,7 +198,7 @@ module "db_loader" {
| <a name="input_health_check_timeout"></a> [health\_check\_timeout](#input\_health\_check\_timeout) | How long to wait for a response for health check query | `string` | `"1 min"` | no |
| <a name="input_iam_permissions_boundary"></a> [iam\_permissions\_boundary](#input\_iam\_permissions\_boundary) | The permissions boundary ARN to set on IAM roles created | `string` | `""` | no |
| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | The instance type to use | `string` | `"t3a.micro"` | no |
| <a name="input_java_opts"></a> [java\_opts](#input\_java\_opts) | Custom JAVA Options | `string` | `"-Dorg.slf4j.simpleLogger.defaultLogLevel=info -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75"` | no |
| <a name="input_java_opts"></a> [java\_opts](#input\_java\_opts) | Custom JAVA Options | `string` | `"-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"` | no |
| <a name="input_retry_period"></a> [retry\_period](#input\_retry\_period) | How often batch of failed folders should be pulled into a discovery queue | `string` | `"10 min"` | no |
| <a name="input_retry_queue_enabled"></a> [retry\_queue\_enabled](#input\_retry\_queue\_enabled) | Whether retry queue should be enabled or not | `bool` | `false` | no |
| <a name="input_retry_queue_interval"></a> [retry\_queue\_interval](#input\_retry\_queue\_interval) | Artificial pause after each failed folder being added to the queue | `string` | `"10 min"` | no |
Expand Down Expand Up @@ -223,16 +230,9 @@ module "db_loader" {

# Copyright and license

The Terraform AWS Databricks Loader on EC2 project is Copyright 2023-2023 Snowplow Analytics Ltd.

Licensed under the [Apache License, Version 2.0][license] (the "License");
you may not use this software except in compliance with the License.
Copyright 2023-current Snowplow Analytics Ltd.

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.
Licensed under the [Snowplow Limited Use License Agreement][license]. _(If you are uncertain how it applies to your use case, check our answers to [frequently asked questions][license-faq].)_

[duration-doc]: https://github.com/lightbend/config/blob/main/HOCON.md#duration-format

Expand All @@ -242,8 +242,9 @@ limitations under the License.
[ci]: https://github.com/snowplow-devops/terraform-aws-databricks-loader-ec2/actions?query=workflow%3Aci
[ci-image]: https://github.com/snowplow-devops/terraform-aws-databricks-loader-ec2/workflows/ci/badge.svg

[license]: https://www.apache.org/licenses/LICENSE-2.0
[license-image]: https://img.shields.io/badge/license-Apache--2-blue.svg?style=flat
[license]: https://docs.snowplow.io/limited-use-license-1.0/
[license-image]: https://img.shields.io/badge/license-Snowplow--Limited--Use-blue.svg?style=flat
[license-faq]: https://docs.snowplow.io/docs/contributing/limited-use-license-faq/

[registry]: https://registry.terraform.io/modules/snowplow-devops/databricks-loader-ec2/aws/latest
[registry-image]: https://img.shields.io/static/v1?label=Terraform&message=Registry&color=7B42BC&logo=terraform
Expand Down
10 changes: 6 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
locals {
module_name = "databricks-loader-ec2"
module_version = "0.1.3"
module_version = "0.2.0"

app_name = "rdb-loader-databricks"
app_version = "5.6.0"
app_version = var.app_version

local_tags = {
Name = var.name
Expand All @@ -26,7 +26,7 @@ data "aws_caller_identity" "current" {}

module "telemetry" {
source = "snowplow-devops/telemetry/snowplow"
version = "0.4.0"
version = "0.5.0"

count = var.telemetry_enabled ? 1 : 0

Expand Down Expand Up @@ -365,7 +365,9 @@ locals {
})

user_data = templatefile("${path.module}/templates/user-data.sh.tmpl", {
config_b64 = base64encode(local.config)
accept_limited_use_license = var.accept_limited_use_license

config_b64 = var.config_override_b64 == "" ? base64encode(local.config) : var.config_override_b64
iglu_resolver_b64 = base64encode(local.iglu_resolver)
version = local.app_version

Expand Down
1 change: 1 addition & 0 deletions templates/config.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,6 @@
"autoGeneratedId": "${telemetry_auto_gen_id}"
"moduleName": "${telemetry_module_name}"
"moduleVersion": "${telemetry_module_version}"
"instanceId": $${INSTANCE_ID}
}
}
5 changes: 3 additions & 2 deletions templates/user-data.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ sudo docker run \
--log-opt max-size=10m \
--log-opt max-file=5 \
%{ endif ~}
-e 'JAVA_OPTS=-Dconfig.override_with_env_vars=true ${java_opts}' \
-e "CONFIG_FORCE_telemetry_instanceId=$(get_instance_id)" \
--env JDK_JAVA_OPTIONS='${java_opts}' \
--env ACCEPT_LIMITED_USE_LICENSE=${accept_limited_use_license} \
--env INSTANCE_ID=$(get_instance_id) \
snowplow/rdb-loader-databricks:${version} \
--config ${config_b64} \
--iglu-config ${iglu_resolver_b64}
Expand Down
25 changes: 24 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
variable "accept_limited_use_license" {
description = "Acceptance of the SLULA terms (https://docs.snowplow.io/limited-use-license-1.0/)"
type = bool
default = false

validation {
condition = var.accept_limited_use_license
error_message = "Please accept the terms of the Snowplow Limited Use License Agreement to proceed."
}
}

variable "name" {
description = "A name which will be prepended to the resources created"
type = string
}

variable "app_version" {
description = "Version of rdb loader databricks"
type = string
default = "5.6.0"
}

variable "config_override_b64" {
description = "App config uploaded as a base64 encoded blob. This variable facilitates dev flow, if config is incorrect this can break the deployment."
type = string
default = ""
}

variable "iam_permissions_boundary" {
description = "The permissions boundary ARN to set on IAM roles created"
default = ""
Expand Down Expand Up @@ -68,7 +91,7 @@ variable "cloudwatch_logs_retention_days" {

variable "java_opts" {
description = "Custom JAVA Options"
default = "-Dorg.slf4j.simpleLogger.defaultLogLevel=info -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75"
default = "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"
type = string
}

Expand Down
Loading