Skip to content

Commit

Permalink
Fixing deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekraus45 committed Apr 15, 2024
1 parent 4c33f23 commit ec7fd8e
Show file tree
Hide file tree
Showing 204 changed files with 5,582 additions and 10,205 deletions.
95 changes: 92 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,103 @@
# Changelog

Please update changelog as part of any significant pull request. Place short
description of your change into "Unreleased" section. As part of release process
content of "Unreleased" section content will generate release notes for the
release.
description of your change into "Unreleased" section. As part of release
process content of "Unreleased" section content will generate release notes for
the release.

## Unreleased

* [featureflag] deprecate in favor of flagd
([#1338](https://github.com/open-telemetry/opentelemetry-demo/pull/1388))
* [checkoutservice] add producer interceptor for tracing
([#1400](https://github.com/open-telemetry/opentelemetry-demo/pull/1400))
* [chore] increase memory for Collector and Jaeger
([#1396](https://github.com/open-telemetry/opentelemetry-demo/pull/1396))
* [chore] fix Make targets for restart and redeploy
([#1397](https://github.com/open-telemetry/opentelemetry-demo/pull/1397))
* [chore] add nightly releases
([#1398](https://github.com/open-telemetry/opentelemetry-demo/pull/1398))
* [checkoutservice] add producer interceptor for tracing
([#1400](https://github.com/open-telemetry/opentelemetry-demo/pull/1400))
* [productcatalogservice] fix graceful shutdown issues
([#1402](https://github.com/open-telemetry/opentelemetry-demo/pull/1402))
* [chore] remove unused integration test
([#1406](https://github.com/open-telemetry/opentelemetry-demo/pull/1406))
* [CartService] - Add Host Detector
([#1415](https://github.com/open-telemetry/opentelemetry-demo/pull/1415))

## 1.8.0

* [grafana] update grafana to 10.2.3
([#1332](https://github.com/open-telemetry/opentelemetry-demo/pull/1332))
* [frontendproxy] Enable envoy environment resource detector
([#1291](https://github.com/open-telemetry/opentelemetry-demo/pull/1291))
* [currencyservice] - add package name prefix to `rpc.service` attribute
([#1333](https://github.com/open-telemetry/opentelemetry-demo/pull/1333))
* [currency] fix metric exporter options
([#1335](https://github.com/open-telemetry/opentelemetry-demo/pull/1335))
* [ffspostgres] define and use demo specific postgres image
([#1338](https://github.com/open-telemetry/opentelemetry-demo/pull/1338))
* [loadgenerator, frontend] enable browser traffic in loadgenerator using playwright
([#1345](https://github.com/open-telemetry/opentelemetry-demo/pull/1345))
* [accountingservice] update wiki link
([#1346](https://github.com/open-telemetry/opentelemetry-demo/pull/1346))
* [checkoutservice] update wiki link
([#1346](https://github.com/open-telemetry/opentelemetry-demo/pull/1346))
* [productcatalogservice] update wiki link
([#1346](https://github.com/open-telemetry/opentelemetry-demo/pull/1346))
* [adservice] added group and anonymous read permission to
opentelemetry-javaagent.jar
([#1348](https://github.com/open-telemetry/opentelemetry-demo/pull/1348))
* [frauddetectionservice] added group and anonymous read permission to
opentelemetry-javaagent.jar
([#1348](https://github.com/open-telemetry/opentelemetry-demo/pull/1348))
* [adservice] Major version update for Java instrumentation, version 2.0.0
([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352))
* [frauddetectionservice] Major version update for Java instrumentation,
version 2.0.0
([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352))
* [kafka] Major version update for Java instrumentation, version 2.0.0
([#1352](https://github.com/open-telemetry/opentelemetry-demo/pull/1352))
* Align env variables for OTLP ports
([#1353](https://github.com/open-telemetry/opentelemetry-demo/pull/1353))
* Update dependent services - Collector, Grafana, Jaeger, Prometheus, etc.
([#1354](https://github.com/open-telemetry/opentelemetry-demo/pull/1354))
* [OpenSearch] Use native OpenSearch exporter from Collector
([#1356](https://github.com/open-telemetry/opentelemetry-demo/pull/1356))
* Update GO SDKs & fix metrics config
([#1357](https://github.com/open-telemetry/opentelemetry-demo/pull/1357))
* Update Python SDKs
([#1358](https://github.com/open-telemetry/opentelemetry-demo/pull/1358))
* [loadgenerator] fix browser traffic enabled flag
([#1359](https://github.com/open-telemetry/opentelemetry-demo/pull/1359))
* [productcatalog] allow products to be extended
([#1363](https://github.com/open-telemetry/opentelemetry-demo/pull/1363))
* [tests] update trace based tests for semantic conventions
([#1377](https://github.com/open-telemetry/opentelemetry-demo/pull/1377))
* [currencyservice] Add OTLP logs
([#1378](https://github.com/open-telemetry/opentelemetry-demo/pull/1378))
* [cartservice] update .NET to .NET 8.0.2
([#1380](https://github.com/open-telemetry/opentelemetry-demo/pull/1380))

## 1.7.2

* [cartservice] update .NET package to 1.7.0 release
([#1326](https://github.com/open-telemetry/opentelemetry-demo/pull/1326))
* [loadgenerator and recommendationservice] Update python base image
([#1329](https://github.com/open-telemetry/opentelemetry-demo/pull/1329))

## 1.7.1

* [grafana] revert to 10.2.0
* [cartservice] disable config reload
([#1312](https://github.com/open-telemetry/opentelemetry-demo/pull/1312))
* [cartservice] fixed cartServiceFailure feature flag
([#1313](https://github.com/open-telemetry/opentelemetry-demo/pull/1313))
* [accountingservice] Update dependencies and semconv
* ([#1316](https://github.com/open-telemetry/opentelemetry-demo/pull/1316))
* [featureflagservice] Allow setting initial feature flag values
([#1319](https://github.com/open-telemetry/opentelemetry-demo/pull/1319))

## 1.7.0

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ GitHub pull requests (PRs).

To create a new PR, fork the project in GitHub and clone the upstream repo:

> **Note**
> [!NOTE]
> Please fork to a personal GitHub account rather than a corporate/enterprise
> one so maintainers can push commits to your branch.
> **Pull requests from protected forks will not be accepted.**
Expand Down
41 changes: 36 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ build-env-file:
sed -i '/IMAGE_VERSION=.*/c\IMAGE_VERSION=${RELEASE_VERSION}' .ghcr.env
sed -i '/IMAGE_NAME=.*/c\IMAGE_NAME=${GHCR_REPO}' .ghcr.env

.PHONY: run-tests
run-tests:
docker compose run frontendTests
docker compose run integrationTests
docker compose run traceBasedTests

.PHONY: run-tracetesting
run-tracetesting:
docker compose run traceBasedTests ${SERVICES_TO_TEST}

Expand Down Expand Up @@ -161,10 +162,40 @@ stop:
@echo ""
@echo "OpenTelemetry Demo is stopped."


# Use to rebuild and restart a single service component
# Use to restart a single service component
# Example: make restart service=frontend
.PHONY: restart
restart:
# work with `service` or `SERVICE` as input
./restart-service.sh ${service}${SERVICE}
# work with `service` or `SERVICE` as input
ifdef SERVICE
service := $(SERVICE)
endif

ifdef service
docker compose stop $(service)
docker compose rm --force $(service)
docker compose create $(service)
docker compose start $(service)
else
@echo "Please provide a service name using `service=[service name]` or `SERVICE=[service name]`"
endif

# Use to rebuild and restart (redeploy) a single service component
# Example: make redeploy service=frontend
.PHONY: redeploy
redeploy:
# work with `service` or `SERVICE` as input
ifdef SERVICE
service := $(SERVICE)
endif

ifdef service
docker compose build $(service)
docker compose stop $(service)
docker compose rm --force $(service)
docker compose create $(service)
docker compose start $(service)
else
@echo "Please provide a service name using `service=[service name]` or `SERVICE=[service name]`"
endif

21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ keeping it up to date for you.
| | | |
|-----------------------------------------|-----------------------------|----------------------------------------------------------------|
| [AlibabaCloud LogService][AlibabaCloud] | [Elastic][Elastic] | [OpenSearch][OpenSearch] |
| [AppDynamics][AppDynamics] | [Grafana Labs][GrafanaLabs] | [Sentry][Sentry] |
| [Aspecto][Aspecto] | [Guance][Guance] | [ServiceNow Cloud Observability][ServiceNowCloudObservability] |
| [Axiom][Axiom] | [Helios][Helios] | [Splunk][Splunk] |
| [Axoflow][Axoflow] | [Honeycomb.io][Honeycombio] | [Sumo Logic][SumoLogic] |
| [Azure Data Explorer][Azure] | [Instana][Instana] | [TelemetryHub][TelemetryHub] |
| [Coralogix][Coralogix] | [Kloudfuse][Kloudfuse] | [Teletrace][Teletrace] |
| [Datadog][Datadog] | [Logz.io][Logzio] | [Tracetest][Tracetest] |
| [Dynatrace][Dynatrace] | [New Relic][NewRelic] | [Uptrace][Uptrace] |
| [AppDynamics][AppDynamics] | [Google Cloud][GoogleCloud] | [Sentry][Sentry] |
| [Aspecto][Aspecto] | [Grafana Labs][GrafanaLabs] | [ServiceNow Cloud Observability][ServiceNowCloudObservability] |
| [Axiom][Axiom] | [Guance][Guance] | [Splunk][Splunk] |
| [Axoflow][Axoflow] | [Helios][Helios] | [Sumo Logic][SumoLogic] |
| [Azure Data Explorer][Azure] | [Honeycomb.io][Honeycombio] | [TelemetryHub][TelemetryHub] |
| [Coralogix][Coralogix] | [Instana][Instana] | [Teletrace][Teletrace] |
| [Dash0][Dash0] | [Kloudfuse][Kloudfuse] | [Tracetest][Tracetest] |
| [Datadog][Datadog] | [Logz.io][Logzio] | [Uptrace][Uptrace] |
| [Dynatrace][Dynatrace] | [New Relic][NewRelic] | |

## Contributing

Expand All @@ -79,7 +80,7 @@ Monday at 8:30 AM PST and anyone is welcome.

- [Austin Parker](https://github.com/austinlparker), Honeycomb
- [Carter Socha](https://github.com/cartersocha), Lightstep
- [Juliano Costa](https://github.com/julianocosta89), Dynatrace
- [Juliano Costa](https://github.com/julianocosta89), Datadog
- [Pierre Tessier](https://github.com/puckpuck), Honeycomb

[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
Expand Down Expand Up @@ -111,9 +112,11 @@ Emeritus:
[Axoflow]: https://axoflow.com/opentelemetry-support-in-more-detail-in-axosyslog-and-syslog-ng/
[Azure]: https://github.com/Azure/Azure-kusto-opentelemetry-demo
[Coralogix]: https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix
[Dash0]: https://github.com/dash0hq/opentelemetry-demo
[Datadog]: https://github.com/DataDog/opentelemetry-demo
[Dynatrace]: https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/
[Elastic]: https://github.com/elastic/opentelemetry-demo
[GoogleCloud]: https://github.com/GoogleCloudPlatform/opentelemetry-demo
[GrafanaLabs]: https://github.com/grafana/opentelemetry-demo
[Guance]: https://github.com/GuanceCloud/opentelemetry-demo
[Helios]: https://otelsandbox.gethelios.dev
Expand Down
22 changes: 22 additions & 0 deletions ci/datadog-agent-ddvalues-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
agents:
image:
tag: 7.51.0-rc.1
tagSuffix: jmx
datadog:
apiKey: $DD_API_KEY
logs:
enabled: true
otlp:
receiver:
protocols:
grpc:
enabled: true
http:
enabled: true
env:
- name: DD_API_KEY
valueFrom:
secretKeyRef:
name: datadog-secrets
key: api-key
optional: false
23 changes: 23 additions & 0 deletions ci/datadog-agent-ddvalues-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
agents:
image:
repository: docker.io/datadog/agent-dev
tag: stanley-liu-top-level-spans-poc-py3-jmx
doNotCheckTag: true
datadog:
apiKey: $DD_API_KEY
logs:
enabled: true
otlp:
receiver:
protocols:
grpc:
enabled: true
http:
enabled: true
env:
- name: DD_API_KEY
valueFrom:
secretKeyRef:
name: datadog-secrets
key: api-key
optional: false
6 changes: 6 additions & 0 deletions ci/datadog-agent-values-dd-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
agents:
nodeSelector:
alpha.eksctl.io/nodegroup-name: ng-7
datadog:
tags:
- "env:dd-ingest-staging"
18 changes: 18 additions & 0 deletions ci/datadog-agent-values-dd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
agents:
image:
tag: 7.51.0-rc.1
tagSuffix: jmx
datadog:
apiKey: $DD_API_KEY
apm:
portEnabled: true
port: 8126
logs:
enabled: true
env:
- name: DD_API_KEY
valueFrom:
secretKeyRef:
name: datadog-secrets
key: api-key
optional: false
3 changes: 3 additions & 0 deletions ci/datadog-agent-values-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
datadog:
tags:
- "env:otel-ingest"
6 changes: 6 additions & 0 deletions ci/datadog-agent-values-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
agents:
nodeSelector:
alpha.eksctl.io/nodegroup-name: ng-4
datadog:
tags:
- "env:otel-ingest-staging"
34 changes: 34 additions & 0 deletions ci/scripts/ci-deploy-agent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

# This script is used to deploy collector on demo account cluster

set -euo pipefail
IFS=$'\n\t'

clusterName=$CLUSTER_NAME
clusterArn=$CLUSTER_ARN
region=$REGION
namespace=$NAMESPACE
releaseName=$RELEASE_NAME
ddValues=$DD_VALUES
values=$VALUES

install_agent() {
# if repo already exists, helm 3+ will skip
helm repo add datadog https://helm.datadoghq.com

# --install will run `helm install` if not already present.
helm upgrade "${releaseName}" -n "${namespace}" datadog/datadog --install \
-f "${ddValues}" \
-f "${values}"
}

###########################################################################################################

aws eks --region "${region}" update-kubeconfig --name "${clusterName}"
kubectl config use-context "${clusterArn}"

install_agent
48 changes: 48 additions & 0 deletions ci/scripts/ci-deploy-demo-staging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

# This script is used to deploy collector on demo account cluster

set -euo pipefail
IFS=$'\n\t'
set -x

clusterName=$CLUSTER_NAME
clusterArn=$CLUSTER_ARN
region=$REGION
namespace=$NAMESPACE
nodeGroup=$NODE_GROUP
values=$VALUES

install_demo() {
# Set the namespace and release name
release_name="opentelemetry-demo"

# Deploy zookeeper which is not a default component.
sed -i "s/PLACEHOLDER_NODE_GROUP/$nodeGroup/g" ./src/zookeeperservice/deployment-staging.yaml
kubectl apply -f ./src/zookeeperservice/deployment-staging.yaml -n "${namespace}"

# if repo already exists, helm 3+ will skip
helm --debug repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts

# --install will run `helm install` if not already present.
helm --debug upgrade "${release_name}" -n "${namespace}" open-telemetry/opentelemetry-demo --install \
-f ./ci/values.yaml \
-f $values \
--set-string default.image.tag="v$CI_COMMIT_SHORT_SHA" \
--set-string default.image.repository="601427279990.dkr.ecr.us-east-1.amazonaws.com/otel-demo"

# Deploy java order producer which is not a default component.
sed -i "s/PLACEHOLDER_COMMIT_SHA/v$CI_COMMIT_SHORT_SHA/g" ./src/orderproducerservice/deployment-staging.yaml
sed -i "s/PLACEHOLDER_NODE_GROUP/$nodeGroup/g" ./src/orderproducerservice/deployment-staging.yaml
kubectl apply -f ./src/orderproducerservice/deployment-staging.yaml -n "${namespace}"
}

###########################################################################################################

aws eks --region "${region}" update-kubeconfig --name "${clusterName}"
kubectl config use-context "${clusterArn}"

install_demo
Loading

0 comments on commit ec7fd8e

Please sign in to comment.