Skip to content

Commit 80a7240

Browse files
committed
change port 80 to 8080 for sample app
1 parent f8206da commit 80a7240

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

terraform/common/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,7 @@ output "sample_app_listen_address_ip" {
7272
output "sample_app_listen_address_port" {
7373
value = "4567"
7474
}
75+
76+
output "sample_app_lb_port" {
77+
value = "8080"
78+
}

terraform/ec2/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ data "template_file" "docker_compose" {
120120

121121
vars = {
122122
data_emitter_image = var.data_emitter_image
123+
sample_app_external_port = module.common.sample_app_lb_port
123124
sample_app_listen_address_port = module.common.sample_app_listen_address_port
124125
listen_address = "${module.common.sample_app_listen_address_ip}:${module.common.sample_app_listen_address_port}"
125126
otel_resource_attributes = "service.namespace=${module.common.otel_service_namespace},service.name=${module.common.otel_service_name}"
@@ -158,7 +159,7 @@ resource "null_resource" "sample-app-validator" {
158159
}
159160

160161
provisioner "local-exec" {
161-
command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --metric-namespace ${module.common.otel_service_namespace}/${module.common.otel_service_name} --endpoint http://${aws_instance.emitter.public_ip}:80'"
162+
command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --metric-namespace ${module.common.otel_service_namespace}/${module.common.otel_service_name} --endpoint http://${aws_instance.emitter.public_ip}:${module.common.sample_app_lb_port}'"
162163
working_dir = "../../"
163164
}
164165
}

terraform/ecs/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ resource "aws_lb_listener" "aoc_lb_listener" {
138138
count = var.sample_app_callable ? 1 : 0
139139

140140
load_balancer_arn = aws_lb.aoc_lb[0].arn
141-
port = 80
141+
port = module.common.sample_app_lb_port
142142
protocol = "HTTP"
143143

144144
default_action {
@@ -170,7 +170,7 @@ resource "aws_ecs_service" "aoc" {
170170

171171
provisioner "local-exec" {
172172
working_dir = "../../"
173-
command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --metric-namespace ${module.common.otel_service_namespace}/${module.common.otel_service_name} --endpoint http://${aws_lb.aoc_lb[0].dns_name}:80'"
173+
command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --metric-namespace ${module.common.otel_service_namespace}/${module.common.otel_service_name} --endpoint http://${aws_lb.aoc_lb[0].dns_name}:${module.common.sample_app_lb_port}'"
174174
}
175175
}
176176

terraform/ecs/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ variable "aoc_image_repo" {
3838
}
3939

4040
variable "aoc_version" {
41-
default = "v0.1.12-296689894"
41+
default = "v0.1.0-324996423"
4242
}
4343

4444
variable "validation_config" {

terraform/eks/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ resource "kubernetes_service" "sample_app_service" {
211211
type = "LoadBalancer"
212212

213213
port {
214-
port = 80
214+
port = module.common.sample_app_lb_port
215215
target_port = module.common.sample_app_listen_address_port
216216
}
217217
}
@@ -297,7 +297,7 @@ resource "kubernetes_pod" "aoc_pod" {
297297
resource "null_resource" "callable_sample_app_validator" {
298298
count = var.sample_app_callable ? 1 : 0
299299
provisioner "local-exec" {
300-
command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --metric-namespace ${module.common.otel_service_namespace}/${module.common.otel_service_name} --endpoint http://${kubernetes_service.sample_app_service[0].load_balancer_ingress.0.hostname}:80'"
300+
command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --metric-namespace ${module.common.otel_service_namespace}/${module.common.otel_service_name} --endpoint http://${kubernetes_service.sample_app_service[0].load_balancer_ingress.0.hostname}:${module.common.sample_app_lb_port}'"
301301
working_dir = "../../"
302302
}
303303
}

terraform/template/ec2-docker-compose-config/default_ec2_docker_compose.yml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
sample_app:
44
image: ${data_emitter_image}
55
ports:
6-
- "80:${sample_app_listen_address_port}"
6+
- "${sample_app_external_port}:${sample_app_listen_address_port}"
77
environment:
88
LISTEN_ADDRESS: ${listen_address}
99
OTEL_RESOURCE_ATTRIBUTES: ${otel_resource_attributes}

0 commit comments

Comments
 (0)