Skip to content

Commit

Permalink
Update aws examples (#3307)
Browse files Browse the repository at this point in the history
* Update ECS Fargate deployment

* Update ecs ec2 deployment

* Update ec2 deployment

* use endpoint, switch to default OT ports
  • Loading branch information
mat-rumian authored Dec 15, 2021
1 parent a6e93ab commit a073314
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: "localhost:55680"
http:

exporters:
otlphttp:
Expand Down
20 changes: 4 additions & 16 deletions examples/non-kubernetes/aws-otel-config-file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,12 @@ receivers:
awsxray:
endpoint: 0.0.0.0:2000
transport: udp
jaeger:
protocols:
thrift_compact:
endpoint: 0.0.0.0:6831
thrift_binary:
endpoint: 0.0.0.0:6832
grpc:
endpoint: 0.0.0.0:14250
thrift_http:
endpoint: 0.0.0.0:14268
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
endpoint:
http:
endpoint: 0.0.0.0:55681
zipkin:
endpoint: 0.0.0.0:9411
endpoint:
processors:
batch/traces:
timeout: 5s
Expand All @@ -32,11 +20,11 @@ processors:
override: true
exporters:
otlphttp:
endpoint: $SUMO_HTTP_TRACES_URL
endpoint: SUMO_HTTP_TRACES_URL
service:
extensions: [health_check]
pipelines:
traces:
receivers: [awsxray,jaeger,otlp,zipkin]
receivers: [awsxray,otlp]
processors: [resourcedetection,batch/traces]
exporters: [otlphttp]
24 changes: 12 additions & 12 deletions examples/non-kubernetes/aws-otel-ec2-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Parameters:
ConstraintDescription: Must be an existing IAM Instance Profile which will be attached to IAM Role.
SumoHttpTracesURL:
Type: String
Description: Enther the Sumologic HTTP Traces Endpoint URL
Description: Enter the Sumologic HTTP Traces Endpoint URL
Resources:
EC2Instance:
Type: AWS::EC2::Instance
Expand All @@ -57,9 +57,9 @@ Resources:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
endpoint:
http:
endpoint: 0.0.0.0:55681
endpoint:
awsxray:
endpoint: 0.0.0.0:2000
transport: udp
Expand All @@ -69,6 +69,10 @@ Resources:
send_batch_size: 50
batch/metrics:
timeout: 60s
resourcedetection:
detectors: [env, ec2]
timeout: 5s
override: true
exporters:
otlphttp:
endpoint: ${sumo_http_traces_url}
Expand All @@ -77,11 +81,7 @@ Resources:
pipelines:
traces:
receivers: [otlp,awsxray]
processors: [batch/traces]
exporters: [otlphttp]
metrics:
receivers: [otlp]
processors: [batch/metrics]
processors: [resourcedetection,batch/traces]
exporters: [otlphttp]
- sumo_http_traces_url: !Ref SumoHttpTracesURL
# Invoke aws-otel-collector-ctl to restart aws-otel-collector.
Expand Down Expand Up @@ -153,7 +153,7 @@ Resources:
#!/bin/bash
# Download AWS OTel Collector RPM
sudo rpm -Uvh https://aws-otel-collector.s3.amazonaws.com/amazon_linux/amd64/latest/aws-otel-collector.rpm
sudo rpm -Uvh https://aws-otel-collector.s3.amazonaws.com/amazon_linux/amd64/v0.15.0/aws-otel-collector.rpm
# Setup Sumologic HTTP Traces URL ENV
echo "export SUMO_HTTP_TRACES_URL=${sumo_http_traces_url}" > /etc/profile.d/setSumoVar.sh
Expand Down Expand Up @@ -218,7 +218,7 @@ Resources:
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Enable SSH access via port 22
GroupDescription: Enable access via ports 22, 2000, 4317, 55681
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 22
Expand All @@ -229,8 +229,8 @@ Resources:
ToPort: 4317
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 55680
ToPort: 55680
FromPort: 4318
ToPort: 4318
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 55681
Expand Down
16 changes: 9 additions & 7 deletions examples/non-kubernetes/aws-otel-ecs-ec2-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ Parameters:
ClusterName:
Type: String
Description: Enter the name of your ECS cluster from which you want to collect telemetry data
SumoHttpTracesURL:
Type: String
Description: Enther the Sumologic HTTP Traces Endpoint URL
SumoAWSOTelColConfig:
Type: AWS::SSM::Parameter::Value<String>
Default: sumologic-otel-col-config
Description: AWS SSM Parameter which contains OTel Collector config file
SumologicReplicaServiceName:
Type: String
Default: sumologic-aws-otel-col-svc-ecs-ec2
Description: ECS Service Name
Resources:
ECSTaskDefinition:
Type: 'AWS::ECS::TaskDefinition'
Expand All @@ -48,15 +49,16 @@ Resources:
- hostPort: 4317
protocol: tcp
containerPort: 4317
- hostPort: 4318
protocol: tcp
containerPort: 4318
- hostPort: 55681
protocol: tcp
containerPort: 55681
environment:
- name: SUMO_HTTP_TRACES_URL
value: !Ref SumoHttpTracesURL
- name: AOT_CONFIG_CONTENT
value: !Ref SumoAWSOTelColConfig
image: amazon/aws-otel-collector:latest
image: public.ecr.aws/aws-observability/aws-otel-collector:v0.15.0
name: sumologic-aws-otel-collector
RequiresCompatibilities:
- EC2
Expand All @@ -73,7 +75,7 @@ Resources:
LaunchType: EC2
SchedulingStrategy: REPLICA
DesiredCount: 1
ServiceName: sumologic-aws-otel-col-svc-ecs-ec2
ServiceName: !Ref SumologicReplicaServiceName
ECSTaskRole:
Type: 'AWS::IAM::Role'
Properties:
Expand Down
38 changes: 6 additions & 32 deletions examples/non-kubernetes/aws-otel-ecs-fargate-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ Parameters:
Subnets:
Type: CommaDelimitedList
Description: The list of Subnets in your Virtual Private Cloud (VPC)
SumoHttpTracesURL:
Type: String
Description: Enther the Sumologic HTTP Traces Endpoint URL
SumoAWSOTelColConfig:
Type: AWS::SSM::Parameter::Value<String>
Default: sumologic-otel-col-config
Description: AWS SSM Parameter which contains OTel Collector config file
SumologicReplicaServiceName:
Type: String
Default: sumologic-aws-otel-col-svc-ecs-fargate
Description: ECS Service Name
Resources:
ECSTaskDefinition:
Type: 'AWS::ECS::TaskDefinition'
Expand All @@ -48,37 +49,10 @@ Resources:
awslogs-group: /ecs/aws-otel-collector
awslogs-region: !Ref 'AWS::Region'
awslogs-stream-prefix: ecs
portMappings:
- hostPort: 2000
protocol: udp
containerPort: 2000
- hostPort: 4317
protocol: tcp
containerPort: 4317
- hostPort: 6831
protocol: udp
containerPort: 6831
- hostPort: 6832
protocol: udp
containerPort: 6832
- hostPort: 9411
protocol: tcp
containerPort: 9411
- hostPort: 14250
protocol: tcp
containerPort: 14250
- hostPort: 14268
protocol: tcp
containerPort: 14268
- hostPort: 55681
protocol: tcp
containerPort: 55681
environment:
- name: SUMO_HTTP_TRACES_URL
value: !Ref SumoHttpTracesURL
- name: AOT_CONFIG_CONTENT
value: !Ref SumoAWSOTelColConfig
image: amazon/aws-otel-collector:latest
image: public.ecr.aws/aws-observability/aws-otel-collector:v0.15.0
name: sumologic-aws-otel-collector
RequiresCompatibilities:
- FARGATE
Expand All @@ -95,7 +69,7 @@ Resources:
LaunchType: FARGATE
SchedulingStrategy: REPLICA
DesiredCount: 1
ServiceName: sumologic-aws-otel-col-svc-ecs-fargate
ServiceName: !Ref SumologicReplicaServiceName
NetworkConfiguration:
AwsvpcConfiguration:
AssignPublicIp: ENABLED
Expand Down

0 comments on commit a073314

Please sign in to comment.