Skip to content

Commit 1d08e77

Browse files
authored
Merge pull request #24 from wyTrivail/terraform
renaming
2 parents 8e505e6 + 320d405 commit 1d08e77

File tree

16 files changed

+165
-39
lines changed

16 files changed

+165
-39
lines changed

terraform/ec2/amis.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@ variable "ami_family" {
22
default = {
33
ubuntu = {
44
login_user = "ubuntu"
5-
install_package = "aws-observability-collector.deb"
5+
install_package = "aws-otel-collector.deb"
66
instance_type = "t2.micro"
77
otconfig_destination = "/tmp/ot-default.yml"
88
download_command_pattern = "wget %s"
9-
install_command = "sudo dpkg -i aws-observability-collector.deb"
10-
start_command = "sudo /opt/aws/aws-observability-collector/bin/aws-observability-collector-ctl -c /tmp/ot-default.yml -a start"
9+
install_command = "sudo dpkg -i aws-otel-collector.deb"
10+
start_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c /tmp/ot-default.yml -a start"
1111
connection_type = "ssh"
1212
user_data = ""
1313
},
1414
amazon_linux = {
1515
login_user = "ec2-user"
16-
install_package = "aws-observability-collector.rpm"
16+
install_package = "aws-otel-collector.rpm"
1717
instance_type = "t2.micro"
1818
otconfig_destination = "/tmp/ot-default.yml"
1919
download_command_pattern = "wget %s"
20-
install_command = "sudo rpm -Uvh aws-observability-collector.rpm"
21-
start_command = "sudo /opt/aws/aws-observability-collector/bin/aws-observability-collector-ctl -c /tmp/ot-default.yml -a start"
20+
install_command = "sudo rpm -Uvh aws-otel-collector.rpm"
21+
start_command = "sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c /tmp/ot-default.yml -a start"
2222
connection_type = "ssh"
2323
user_data = ""
2424
}
2525
windows = {
2626
login_user = "Administrator"
27-
install_package = "aws-observability-collector.msi"
28-
instance_type = "t2.micro"
27+
install_package = "aws-otel-collector.msi"
28+
instance_type = "t3.medium"
2929
otconfig_destination = "C:\\ot-default.yml"
30-
download_command_pattern = "powershell -command \"Invoke-WebRequest -Uri %s -OutFile C:\\aws-observability-collector.msi\""
31-
install_command = "msiexec /i C:\\aws-observability-collector.msi"
32-
start_command = "powershell \"& 'C:\\Program Files\\Amazon\\AwsObservabilityCollector\\aws-observability-collector-ctl.ps1' -ConfigLocation C:\\ot-default.yml -Action start\""
30+
download_command_pattern = "powershell -command \"Invoke-WebRequest -Uri %s -OutFile C:\\aws-otel-collector.msi\""
31+
install_command = "msiexec /i C:\\aws-otel-collector.msi"
32+
start_command = "powershell \"& 'C:\\Program Files\\Amazon\\AwsOtelCollector\\aws-otel-collector-ctl.ps1' -ConfigLocation C:\\ot-default.yml -Action start\""
3333
connection_type = "winrm"
3434
user_data = <<EOF
3535
<powershell>

terraform/ec2/variables.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## right now there's no good way to share variables across modules,
2+
## so we have to define some of the common vars like region, otconfig_path in each module
3+
14
variable "otconfig_path" {
25
default = "../template/otconfig/default_otconfig.tpl"
36
}
@@ -7,7 +10,7 @@ variable "docker_compose_path" {
710
}
811

912
variable "package_s3_bucket" {
10-
default = "aws-observability-collector-test"
13+
default = "aws-otel-collector-test"
1114
}
1215

1316
variable "aoc_version" {
@@ -39,7 +42,7 @@ variable "sshkey_s3_bucket" {
3942
}
4043

4144
variable "sshkey_s3_private_key" {
42-
default = "aoc-ssh-key-2020-07-22.txt"
45+
default = "aoc-ssh-key-2020-07-22.pem"
4346
}
4447

4548
# set this option to false will disable validator to call the sample app

terraform/ecs/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ data "template_file" "task_def" {
6262
ssm_parameter_arn = aws_ssm_parameter.otconfig.name
6363
sample_app_container_name = module.common.sample_app_container_name
6464
sample_app_listen_address = "${module.common.sample_app_listen_address_ip}:${module.common.sample_app_listen_address_port}"
65+
sample_app_listen_port = module.common.sample_app_listen_address_port
6566
}
6667
}
6768

@@ -113,7 +114,7 @@ resource "aws_lb_target_group" "aoc_lb_tg" {
113114
unhealthy_threshold = 10
114115
healthy_threshold = 2
115116
interval = 10
116-
matcher = "202,404"
117+
matcher = "200,404"
117118
}
118119
}
119120

terraform/ecs/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variable "data_emitter_image" {
1919
}
2020

2121
variable "aoc_image_repo" {
22-
default = "611364707713.dkr.ecr.us-west-2.amazonaws.com/aws/aws-observability-collector"
22+
default = "611364707713.dkr.ecr.us-west-2.amazonaws.com/aws/aws-otel-collector"
2323
}
2424

2525
variable "aoc_version" {

terraform/eks/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ variable "data_emitter_image" {
1515
}
1616

1717
variable "aoc_image_repo" {
18-
default = "611364707713.dkr.ecr.us-west-2.amazonaws.com/aws/aws-observability-collector"
18+
default = "611364707713.dkr.ecr.us-west-2.amazonaws.com/aws/aws-otel-collector"
1919
}
2020

2121
variable "aoc_version" {

terraform/release/s3/main.tf

Whitespace-only changes.

terraform/template/ecstaskdef/default_ecs_taskdef.tpl

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@
2525
"name": "OTEL_RESOURCE_ATTRIBUTES",
2626
"value": "service.namespace=${otel_service_namespace},service.name=${otel_service_name}"
2727
},
28-
{
29-
"name": "S3_REGION",
30-
"value": "${region}"
31-
},
32-
{
33-
"name": "TRACE_DATA_BUCKET",
34-
"value": "trace-expected-data"
35-
},
36-
{
37-
"name": "TRACE_DATA_S3_KEY",
38-
"value": "${testing_id}"
39-
},
4028
{
4129
"name": "LISTEN_ADDRESS",
4230
"value": "${sample_app_listen_address}"
@@ -68,6 +56,10 @@
6856
"containerPort": 55680,
6957
"hostPort": 55680,
7058
"protocol": "tcp"
59+
},
60+
{
61+
"containerPort": 2000,
62+
"hostPort": 2000
7163
}
7264
],
7365
"secrets": [
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[
2+
{
3+
"name": "${sample_app_container_name}",
4+
"image": "${data_emitter_image}",
5+
"cpu": 10,
6+
"memory": 256,
7+
"portMappings": [
8+
{
9+
"containerPort": ${sample_app_listen_port},
10+
"hostPort": ${sample_app_listen_port},
11+
"protocol": "tcp"
12+
}
13+
],
14+
"command": [],
15+
"environment": [
16+
{
17+
"name": "LISTEN_ADDRESS",
18+
"value": "${sample_app_listen_address}"
19+
},
20+
{
21+
"name": "AWS_XRAY_DAEMON_ADDRESS",
22+
"value": "127.0.0.1:2000"
23+
}
24+
],
25+
"dependsOn": [
26+
{
27+
"containerName": "aoc-collector",
28+
"condition": "START"
29+
}
30+
],
31+
"logConfiguration": {
32+
"logDriver": "awslogs",
33+
"options": {
34+
"awslogs-group": "/ecs/ecs-cwagent-sidecar-emitter",
35+
"awslogs-region": "${region}",
36+
"awslogs-stream-prefix": "ecs",
37+
"awslogs-create-group": "True"
38+
}
39+
}
40+
},
41+
{
42+
"name": "aoc-collector",
43+
"image": "${aoc_image}",
44+
"cpu": 10,
45+
"memory": 256,
46+
"portMappings": [
47+
{
48+
"containerPort": 2000,
49+
"hostPort": 2000,
50+
"protocol": "udp"
51+
}
52+
],
53+
"secrets": [
54+
{
55+
"name": "AOT_CONFIG_CONTENT",
56+
"valueFrom": "${ssm_parameter_arn}"
57+
}
58+
],
59+
"essential": true,
60+
"entryPoint": [],
61+
"command": [],
62+
"environment": [],
63+
"environmentFiles": [],
64+
"dependsOn": [],
65+
"logConfiguration": {
66+
"logDriver": "awslogs",
67+
"options": {
68+
"awslogs-group": "/ecs/ecs-cwagent-sidecar-collector",
69+
"awslogs-region": "${region}",
70+
"awslogs-stream-prefix": "ecs",
71+
"awslogs-create-group": "True"
72+
}
73+
}
74+
}
75+
]

terraform/template/otconfig/default_otconfig.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ service:
2222
pipelines:
2323
traces:
2424
receivers: [otlp]
25-
exporters: [awsxray]
25+
exporters: [logging, awsxray]
2626
metrics:
2727
receivers: [otlp]
2828
exporters: [logging, awsemf]

terraform/template/otconfig/ecscontainermetric_otconfig.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exporters:
55
loglevel: debug
66
awsemf:
77
namespace: '${otel_service_namespace}/${otel_service_name}'
8-
region: 'us-west-2'
8+
region: '${region}'
99

1010
service:
1111
pipelines:

0 commit comments

Comments
 (0)