diff --git a/CHANGELOG.md b/CHANGELOG.md index d145f2c..740374f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.3.0] - 2020-03-31 +### Added +- Log4j XML for internal Circus Train instance. + ## [1.2.1] - 2020-01-16 ### Added - A new argument `orphaned_data_strategy` to use for handling stale data during replication. diff --git a/README.md b/README.md index 4f52ca3..3ada520 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ For more information please refer to the main [Apiary](https://github.com/Expedi | aws\_region | AWS region to use for resources. | string | n/a | yes | | cpu | The number of CPU units to reserve for the Shunting Yard container. Valid values can be 256, 512, 1024, 2048 and 4096. Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html | string | `"1024"` | no | | ct\_common\_config\_yaml | Common Circus Train configuration to be passed to internal Circus Train instance. It can be used, for example to configure Graphite for Circus Train. Refer to [Circus Train README](https://github.com/HotelsDotCom/circus-train/blob/master/README.md) for an exhaustive list of options supported by Circus Train. | string | n/a | yes | +| ct\_log4j\_xml | Log4j XML file to be passed to internal Circus Train instance to configure logging. | string | n/a | yes | | docker\_image | Full path of Shunting Yard Docker image. | string | n/a | yes | | docker\_registry\_auth\_secret\_name | Docker Registry authentication SecretManager secret name. | string | `""` | no | | docker\_version | Shunting Yard Docker image version. | string | n/a | yes | diff --git a/cloudwatch.tf b/cloudwatch.tf index ccd397a..8662922 100644 --- a/cloudwatch.tf +++ b/cloudwatch.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -98,7 +98,7 @@ data "template_file" "sqs_widgets" { "region": "${var.aws_region}", "title": "Shunting Yard SQS Age of Oldest Message (s)" } - } + } EOF } diff --git a/common.tf b/common.tf index 3b9ecca..0fdfc32 100644 --- a/common.tf +++ b/common.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/ecs.tf b/ecs.tf index 7a7cc42..3f6329b 100644 --- a/ecs.tf +++ b/ecs.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/iam-policy-s3-buckets.tf b/iam-policy-s3-buckets.tf index 33b043b..4a1f2db 100644 --- a/iam-policy-s3-buckets.tf +++ b/iam-policy-s3-buckets.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/iam-policy-secretsmanager.tf b/iam-policy-secretsmanager.tf index 8524a03..c5f2036 100644 --- a/iam-policy-secretsmanager.tf +++ b/iam-policy-secretsmanager.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/iam-policy-sqs.tf b/iam-policy-sqs.tf index 7c2c04a..b1303d7 100644 --- a/iam-policy-sqs.tf +++ b/iam-policy-sqs.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/iam.tf b/iam.tf index 6e55b6c..ac4630a 100644 --- a/iam.tf +++ b/iam.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/sg.tf b/sg.tf index c0b2e15..b2c4b2d 100644 --- a/sg.tf +++ b/sg.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/sns.tf b/sns.tf index 723dc5d..98af4f7 100644 --- a/sns.tf +++ b/sns.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/sqs.tf b/sqs.tf index de21c5b..15a5bcb 100644 --- a/sqs.tf +++ b/sqs.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ diff --git a/templates.tf b/templates.tf index 6ee8df7..9281525 100644 --- a/templates.tf +++ b/templates.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -28,6 +28,7 @@ data "template_file" "shuntingyard" { loggroup = "${aws_cloudwatch_log_group.shuntingyard_ecs.name}" shuntingyard_config_yaml = "${base64encode(data.template_file.shuntingyard_config_yaml.rendered)}" ct_common_config_yaml = "${base64encode(var.ct_common_config_yaml)}" + ct_log4j_xml = "${base64encode(var.ct_log4j_xml)}" #to instruct ECS to use repositoryCredentials for private docker registry docker_auth = "${var.docker_registry_auth_secret_name == "" ? "" : format("\"repositoryCredentials\" :{\n \"credentialsParameter\":\"%s\"\n},", join("", data.aws_secretsmanager_secret.docker_registry.*.arn))}" diff --git a/templates/shuntingyard-config.yml.tmpl b/templates/shuntingyard-config.yml.tmpl index bd38479..12847fd 100644 --- a/templates/shuntingyard-config.yml.tmpl +++ b/templates/shuntingyard-config.yml.tmpl @@ -1,5 +1,5 @@ --- -# Copyright (C) 2019 Expedia, Inc. +# Copyright (C) 2020 Expedia, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); source-catalog: @@ -14,6 +14,6 @@ event-receiver: sqs.queue: ${shuntingyard_sqs_queue} sqs.wait.time.seconds: ${shuntingyard_sqs_queue_wait_timeout} source-table-filter: - table-names: + table-names: ${selected_tables} ${orphaned_data_strategy} diff --git a/templates/shuntingyard.json b/templates/shuntingyard.json index adc4dfa..b5b333d 100644 --- a/templates/shuntingyard.json +++ b/templates/shuntingyard.json @@ -24,6 +24,10 @@ { "name": "CT_COMMON_CONFIG_YAML", "value": "${ct_common_config_yaml}" + }, + { + "name": "CT_LOG4J_XML", + "value": "${ct_log4j_xml}" } ] } diff --git a/variables.tf b/variables.tf index d09c312..0cfb1a9 100644 --- a/variables.tf +++ b/variables.tf @@ -1,5 +1,5 @@ /** - * Copyright (C) 2019 Expedia, Inc. + * Copyright (C) 2020 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -67,6 +67,11 @@ variable "ct_common_config_yaml" { type = "string" } +variable "ct_log4j_xml" { + description = "Log4j XML file to be passed to internal Circus Train instance to configure logging." + type = "string" +} + variable "allowed_s3_buckets" { description = "List of S3 Buckets to which Shunting Yard will have read-write access." type = "list" @@ -101,7 +106,7 @@ variable "shuntingyard_sqs_queue_stale_messages_timeout" { variable "selected_tables" { description = <