-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge tmp branch with original files to the monorepo feature branch
- Loading branch information
Showing
4 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,4 +126,4 @@ docs/_build/ | |
target/ | ||
|
||
# Ipython Notebook | ||
.ipynb_checkpoints | ||
.ipynb_checkpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM public.ecr.aws/aws-observability/aws-otel-collector:latest as aws-otel | ||
|
||
FROM otel/opentelemetry-collector-contrib:0.113.0 | ||
|
||
COPY --from=aws-otel /healthcheck /healthcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 T. Thyer | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Purpose | ||
|
||
As discussed in this Github Issue: <https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30798#issuecomment-2009233014> | ||
The official opentelemetry (OTEL) collector image does not contain cURL or related shell | ||
commands required to do container level health checks. It is reliant on external | ||
services such as the application load balancer in AWS to perform these checks. This is | ||
problematic with our deployment of the OTEL collector as we are using AWS | ||
service connect with AWS ECS to allow other containers within the namespace to connect | ||
to the collector. As such, there is no load balancer in-front of the container to handle | ||
its lifecycle. Within ECS, the recommended way from AWS to handle container level health | ||
checks is to let ECS perform commands in the container. | ||
Source: <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html> | ||
|
||
Since the OTEL collector does not have a shell, nor cURL available we need to accomplish | ||
this another way. In the official AWS OTEL collector distro they accomplish this by | ||
compiling a golang script down into a binary that can be run within the container. | ||
Unfortunately we cannot use the AWS OTEL collector because they are not supporting the | ||
`oauth2clientauthextension`: <https://github.com/aws-observability/aws-otel-collector/issues/1492>. | ||
|
||
For our purposes we are creating a new image based off the `otel/opentelemetry-collector-contrib` image, | ||
but with the addition of the healthcheck binary from the AWS OTEL distro. This | ||
combination lets us use the oauth2 extension, and have container level health checks. | ||
|
||
## Creating a new image (To automate later on) | ||
|
||
As new base images are updated we will need to in-turn create a new otel collector | ||
image that we deploy to ECS. | ||
|
||
1. Update values in the `Dockerfile` | ||
2. Run `docker build -t ghcr.io/sage-bionetworks/sage-otel-collector:vX.X.X .` (Replace the version) | ||
3. Run `docker push ghcr.io/sage-bionetworks/sage-otel-collector:vX.X.X` (Replace the version) | ||
|
||
Once a new image is built and pushed, then you'll want to update the values in the CDK | ||
scripts to use the new image version. |