Skip to content

Commit 125cf5e

Browse files
authored
Merge pull request #12 from clientIO/modifications
Modifications
2 parents 01e037b + 2afd532 commit 125cf5e

File tree

10 files changed

+2635
-22
lines changed

10 files changed

+2635
-22
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ terraform.rc
3636
.terraform.lock.hcl
3737

3838
.env
39+
40+
.DS_Store
41+
42+
.idea

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elasticsearch.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
locals {
22
elasticsearch_master_username = random_pet.elasticsearch_username.id
33
elasticsearch_enabled = var.external_elasticsearch == null
4-
elasticsearch_subnet_ids = slice(local.private_subnet_ids, 0, min(length(local.private_subnet_ids), var.elasticsearch.instance_count))
4+
elasticsearch_subnet_ids = [local.private_subnet_ids[0]]
55
}
66

77
module "elasticsearch" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"registry.appmixer.com":{"username":"<replace-with-username>","password":"<replace-with-password>"}}

examples/production/global-bundle.pem

Lines changed: 2584 additions & 0 deletions
Large diffs are not rendered by default.

examples/production/main.tf

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ module "appmixer_module" {
2525
}
2626

2727
init_user = {
28-
email = "XXX"
29-
username = "XXX"
30-
password = "XXX"
28+
email = "<[email protected]>"
29+
username = "<init-user>"
30+
password = "<init-user-password>"
3131
}
3232

33-
ecs_registry_auth_data = "XXX"
33+
ecs_registry_auth_data = "base64-encoded-docker-registry-auth-dockerconfigjson"
3434

3535
ecs_common_service_config = {
3636
wait_for_steady_state = true
@@ -116,6 +116,18 @@ module "appmixer_module" {
116116
}
117117
}
118118

119+
# Engine fix to use MongoDB TLS
120+
ecs_per_service_config = {
121+
engine = {
122+
entrypoint = ["/bin/bash", "-c"]
123+
command = ["apt-get update; apt-get -y install wget; wget -O /root/global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem; node gridd.js --http --emails"]
124+
}
125+
quota = {
126+
entrypoint = ["/bin/bash", "-c"]
127+
command = ["apt-get update; apt-get -y install wget; wget -O /root/global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem; npm start"]
128+
}
129+
}
130+
119131
elasticsearch = {
120132
instance_count = length(local.availability_zones)
121133
}

locals.tf

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ locals {
5858

5959
# Frontend service configuration
6060
frontend = {
61-
image = "registry.appmixer.com/appmixer-frontend:5.2.0"
61+
image = "registry.appmixer.com/appmixer-frontend:6.0.12"
6262
url = "my.${var.root_dns_name}"
6363
env = {
6464
APPMIXER_BO_URL = "https://${local.backoffice.url}"
@@ -69,7 +69,7 @@ locals {
6969

7070
# Backoffice service configuration
7171
backoffice = {
72-
image = "registry.appmixer.com/appmixer-backoffice:5.2.0"
72+
image = "registry.appmixer.com/appmixer-backoffice:6.0.12"
7373
url = "bo.${var.root_dns_name}"
7474
env = {}
7575
cpu = 256
@@ -78,19 +78,23 @@ locals {
7878

7979
# Engine service configuration
8080
engine = {
81-
image = "registry.appmixer.com/appmixer-engine:5.2.0-nocomp"
81+
image = "registry.appmixer.com/appmixer-engine:6.0.12-nocomp"
8282
url = "api.${var.root_dns_name}"
8383
env = {
84-
SYSTEM_PLUGINS = "minio"
85-
MINIO_ACCESS_KEY = module.s3_bucket.access_key_id
86-
MINIO_SECRET_KEY = module.s3_bucket.secret_access_key
87-
MINIO_ENDPOINT = "s3.amazonaws.com"
88-
MINIO_USE_SSL = true
89-
MINIO_REGION = data.aws_region.current.name
90-
MINIO_BUCKET_NAME = module.s3_bucket.bucket_id
91-
DB_TLS_CA_FILE = "global-bundle.pem"
92-
DB_USE_TLS = "true"
93-
DB_SSL_VALIDATE = "true"
84+
SYSTEM_PLUGINS = "minio,auth_hub"
85+
MINIO_ACCESS_KEY = module.s3_bucket.access_key_id
86+
MINIO_SECRET_KEY = module.s3_bucket.secret_access_key
87+
MINIO_ENDPOINT = "s3.amazonaws.com"
88+
MINIO_USE_SSL = true
89+
MINIO_REGION = data.aws_region.current.name
90+
MINIO_BUCKET_NAME = module.s3_bucket.bucket_id
91+
DB_TLS_CA_FILE = "/root/global-bundle.pem"
92+
DB_USE_TLS = "true"
93+
DB_SSL_VALIDATE = "true"
94+
AUTH_HUB_URL = "https://auth-hub.${var.root_dns_name}"
95+
AUTH_HUB_TOKEN = "<replace-with-token-value>"
96+
ENCRYPTION_ENABLED = "true"
97+
ENCRYPTION_SECRET = "<replace-with-encryption-secret>"
9498
}
9599
cpu = 512
96100
memory = 1024
@@ -105,7 +109,7 @@ locals {
105109

106110
# Quota service configuration
107111
quota = {
108-
image = "registry.appmixer.com/appmixer-quota:5.2.0"
112+
image = "registry.appmixer.com/appmixer-quota:6.0.12"
109113
env = {
110114
DB_TLS_CA_FILE = "/root/global-bundle.pem"
111115
DB_USE_TLS = "true"

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ output "alb_dns_name" {
33
description = "DNS name of the ALB"
44
}
55

6+
output "elasticsearch_subnet_ids" {
7+
value = local.elasticsearch_subnet_ids
8+
description = "ES subnets"
9+
}
10+
611
output "services_urls" {
712
value = {
813
backoffice = local.backoffice.url

user-init.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ resource "aws_ecs_task_definition" "this" {
4545
container_definitions = jsonencode([
4646
{
4747
name = "${module.label.id}-mongo-init-user"
48-
image = "mongo:latest"
48+
image = "mongo:5.0"
4949
cpu = 10
5050
memory = 512
5151
essential = true
52-
entryPoint = ["/bin/bash", "-c", "apt-get update --allow-insecure-repositories; apt-get install wget; wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem; mongosh appmixer --host ${module.documentdb_cluster.endpoint}:27017 --username ${module.documentdb_cluster.master_username} --password ${module.documentdb_cluster.master_password} --retryWrites=false --eval 'db.users.updateOne({ email: \"${local.user_init_email}\"},{$set: {scope: [\"user\",\"admin\"]}});' --tls --tlsCAFile global-bundle.pem"]
52+
entryPoint = ["/bin/bash", "-c", "apt-get update --allow-insecure-repositories; apt-get install wget; wget -O /root/global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem; mongosh appmixer --host ${module.documentdb_cluster.endpoint}:27017 --authenticationMechanism SCRAM-SHA-1 --username ${module.documentdb_cluster.master_username} --password ${module.documentdb_cluster.master_password} --retryWrites=false --eval 'db.users.updateOne({ email: \"${local.user_init_email}\"},{$set: {scope: [\"user\",\"admin\"]}});' --tls --tlsCAFile /root/global-bundle.pem"]
5353
logConfiguration = {
5454
logDriver = "awslogs"
5555
options = {

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ variable "rabbitmq" {
113113
type = object({
114114
auto_minor_version_upgrade = optional(bool, true)
115115
deployment_mode = optional(string, "SINGLE_INSTANCE")
116-
engine_version = optional(string, "3.8.34")
116+
engine_version = optional(string, "3.13")
117117
host_instance_type = optional(string, "mq.t3.micro")
118118
audit_log_enabled = optional(bool, false)
119119
general_log_enabled = optional(bool, true)

0 commit comments

Comments
 (0)