diff --git a/README.md b/README.md
index f1d4412..1c9ec2d 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,7 @@ module "iglu_server" {
|------|--------|---------|
| [instance\_type\_metrics](#module\_instance\_type\_metrics) | snowplow-devops/ec2-instance-type-metrics/aws | 0.1.2 |
| [service](#module\_service) | snowplow-devops/service-ec2/aws | 0.2.1 |
-| [telemetry](#module\_telemetry) | snowplow-devops/telemetry/snowplow | 0.4.0 |
+| [telemetry](#module\_telemetry) | snowplow-devops/telemetry/snowplow | 0.5.0 |
## Resources
@@ -142,13 +142,14 @@ module "iglu_server" {
| [vpc\_id](#input\_vpc\_id) | The VPC to deploy the Iglu Server within | `string` | n/a | yes |
| [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 |
| [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 |
+| [app\_version](#input\_app\_version) | App version to use. This variable facilitates dev flow, the modules may not work with anything other than the default value. | `string` | `"0.12.0"` | no |
| [associate\_public\_ip\_address](#input\_associate\_public\_ip\_address) | Whether to assign a public ip address to this instance | `bool` | `true` | no |
| [cloudwatch\_logs\_enabled](#input\_cloudwatch\_logs\_enabled) | Whether application logs should be reported to CloudWatch | `bool` | `true` | no |
| [cloudwatch\_logs\_retention\_days](#input\_cloudwatch\_logs\_retention\_days) | The length of time in days to retain logs for | `number` | `7` | no |
| [enable\_auto\_scaling](#input\_enable\_auto\_scaling) | Whether to enable auto-scaling policies for the service (WARN: ensure you have sufficient db\_connections available for the max number of nodes in the ASG) | `bool` | `true` | no |
| [iam\_permissions\_boundary](#input\_iam\_permissions\_boundary) | The permissions boundary ARN to set on IAM roles created | `string` | `""` | no |
| [instance\_type](#input\_instance\_type) | The instance type to use | `string` | `"t3a.micro"` | no |
-| [java\_opts](#input\_java\_opts) | Custom JAVA Options | `string` | `"-Dorg.slf4j.simpleLogger.defaultLogLevel=info -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75"` | no |
+| [java\_opts](#input\_java\_opts) | Custom JAVA Options | `string` | `"-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"` | no |
| [max\_size](#input\_max\_size) | The maximum number of servers in this server-group | `number` | `2` | no |
| [min\_size](#input\_min\_size) | The minimum number of servers in this server-group | `number` | `1` | no |
| [patches\_allowed](#input\_patches\_allowed) | Whether or not patches are allowed for published Iglu Schemas | `bool` | `true` | no |
diff --git a/main.tf b/main.tf
index 894b0ca..c7d1fc6 100644
--- a/main.tf
+++ b/main.tf
@@ -3,7 +3,7 @@ locals {
module_version = "0.4.4"
app_name = "iglu-server"
- app_version = "0.10.0"
+ app_version = var.app_version
local_tags = {
Name = var.name
@@ -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
@@ -220,7 +220,7 @@ locals {
accept_limited_use_license = var.accept_limited_use_license
port = var.ingress_port
- config = local.iglu_server_hocon
+ config_b64 = base64encode(local.iglu_server_hocon)
version = local.app_version
db_host = var.db_host
db_port = var.db_port
diff --git a/templates/user-data.sh.tmpl b/templates/user-data.sh.tmpl
index 721accf..e874c53 100644
--- a/templates/user-data.sh.tmpl
+++ b/templates/user-data.sh.tmpl
@@ -1,8 +1,8 @@
readonly CONFIG_DIR=/opt/snowplow/config
sudo mkdir -p $${CONFIG_DIR}
-sudo cat << EOF > $${CONFIG_DIR}/iglu-server.hocon
-${config}
+sudo base64 --decode << EOF > $${CONFIG_DIR}/iglu-server.hocon
+${config_b64}
EOF
# Run the server setup
@@ -15,9 +15,9 @@ sudo docker run \
--log-opt awslogs-group=${cloudwatch_log_group_name} \
--log-opt awslogs-stream=$(get_instance_id) \
%{ endif ~}
- -v $${CONFIG_DIR}:/snowplow/config \
- -e 'JAVA_OPTS=${java_opts}' \
- -e 'ACCEPT_LIMITED_USE_LICENSE=${accept_limited_use_license}' \
+ --mount type=bind,source=$${CONFIG_DIR},target=/snowplow/config \
+ --env JDK_JAVA_OPTIONS='${java_opts}' \
+ --env ACCEPT_LIMITED_USE_LICENSE=${accept_limited_use_license} \
snowplow/iglu-server:${version} \
setup --config /snowplow/config/iglu-server.hocon
set -e
@@ -37,10 +37,10 @@ sudo docker run \
--log-opt max-size=10m \
--log-opt max-file=5 \
%{ endif ~}
- -v $${CONFIG_DIR}:/snowplow/config \
+ --mount type=bind,source=$${CONFIG_DIR},target=/snowplow/config \
+ --env JDK_JAVA_OPTIONS='${java_opts}' \
+ --env ACCEPT_LIMITED_USE_LICENSE=${accept_limited_use_license} \
-p ${port}:${port} \
- -e 'JAVA_OPTS=${java_opts}' \
- -e 'ACCEPT_LIMITED_USE_LICENSE=${accept_limited_use_license}' \
snowplow/iglu-server:${version} \
--config /snowplow/config/iglu-server.hocon
diff --git a/variables.tf b/variables.tf
index 1d001e3..e2137af 100644
--- a/variables.tf
+++ b/variables.tf
@@ -14,6 +14,12 @@ variable "name" {
type = string
}
+variable "app_version" {
+ description = "App version to use. This variable facilitates dev flow, the modules may not work with anything other than the default value."
+ type = string
+ default = "0.12.0"
+}
+
variable "vpc_id" {
description = "The VPC to deploy the Iglu Server within"
type = string
@@ -106,7 +112,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
}