Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ES-86): keep models up-to-date and add target models for all technologies #10

Merged
merged 13 commits into from
Sep 30, 2024
44 changes: 44 additions & 0 deletions .github/workflows/build-productcatalogservice-fork.yml
heidrifx marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Push Docker Image to GHCR

on:
push:
branches:
- main
- demaf

env:
IMAGE_URL: ghcr.io/ust-demaf
IMAGE_NAME: productcatalogservice
IMAGE_TAG: 1.11.1

jobs:
build-using-dockerfile-push-2-ghcr:
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

# Set up Docker Buildx (for better cross-platform builds, optional)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Log in to GitHub Container Registry (GHCR)
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./src/productcatalogservice/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: ${{ env.IMAGE_URL }}/demo:${{ env.IMAGE_TAG }}-${{ env.IMAGE_NAME }}
provenance: false

184 changes: 54 additions & 130 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,140 +1,64 @@
<!-- markdownlint-disable-next-line -->
# <img src="https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png" alt="OTel logo" width="45"> OpenTelemetry Demo

[![Slack](https://img.shields.io/badge/slack-@cncf/otel/demo-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C03B4CWV4DA)
[![Version](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-demo?color=blueviolet)](https:/open-telemetry/opentelemetry-demo/releases)
[![Commits](https://img.shields.io/github/commits-since/open-telemetry/opentelemetry-demo/latest?color=ff69b4&include_prereleases)](https:/open-telemetry/opentelemetry-demo/graphs/commit-activity)
[![Downloads](https://img.shields.io/docker/pulls/otel/demo)](https://hub.docker.com/r/otel/demo)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=red)](https:/open-telemetry/opentelemetry-demo/blob/main/LICENSE)
[![Integration Tests](https:/open-telemetry/opentelemetry-demo/actions/workflows/run-integration-tests.yml/badge.svg)](https:/open-telemetry/opentelemetry-demo/actions/workflows/run-integration-tests.yml)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/opentelemetry-demo)](https://artifacthub.io/packages/helm/opentelemetry-helm/opentelemetry-demo)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9247/badge)](https://www.bestpractices.dev/en/projects/9247)

## Welcome to the OpenTelemetry Astronomy Shop Demo
## Welcome to the OpenTelemetry Astronomy Shop Demo with DeMAF extension

This repository contains the OpenTelemetry Astronomy Shop, a microservice-based
distributed system intended to illustrate the implementation of OpenTelemetry in
a near real-world environment.

Our goals are threefold:
FOR THE ORIGINAL README [CLICK HERE](./README_original.md).

The purpose of this fork is to extend the Astronomy Shop in three ways:

- Add a database to showcase that a persistence layer can also be part of the architecture without causing any problems.
- Create a deployment model to deploy the shop using [Ansible](https://docs.ansible.com/) and [Terraform](https://developer.hashicorp.com/terraform/docs) besides the given [Docker-Compose](https://opentelemetry.io/docs/demo/docker_deployment/) and [Kubernetes](https://opentelemetry.io/docs/demo/kubernetes_deployment/).
- Add translated EDMM models for [Kubernetes](./edmm/otel-store_k8s_translated.yaml), [Ansible](./edmm/otel-store_ansible_translated.yaml) and [Terraform](./edmm/otel-store_terraform_translated.yaml) to showcase the transformation result of those three DeMAF plugins in [EDMM](https:/UST-EDMM).


### Database Integration
The database integration ensures that also a persistence layer is used in the provided demo-application,
making the architecture more comprehensive.

Therefore, a [MongoDB](http://mongodb.com) is added, which adds the products of the shop into the database as JSON entries.
In the default variant of the astronomy shop, only a plain file is used to provide the products.

Thus, the logic of the `productcatalogservice` is adapted, to initialize and use the additionally provided MongoDB.

The changes of the `productcatalogservice` and the addition of the MongoDB is integrated into all deployment variants in this fork.

### Translation to Ansible

To verify the [Ansible MPS Plugin](https:/UST-DeMAF/ansible-mps-plugin) the Astronomy Shop is available as Ansible installation.
It is based on the [Docker-Compose](https://opentelemetry.io/docs/demo/docker_deployment/) and installs all components of the shop as docker containers on the local Docker runtime.
For each component there is a dedicated Ansible Role representing the loose coupling of the components.

A usage guide can be found in the dedicated [README in /ansible](./ansible/README.md).
eliasmueller marked this conversation as resolved.
Show resolved Hide resolved

### Translation to Terraform

To verify the [Terraform MPS Plugin](https:/UST-DeMAF/terraform-mps-plugin) the Astronomy Shop is available as Terraform installation.
It is based on the [Docker-Compose](https://opentelemetry.io/docs/demo/docker_deployment/) and installs all components of the shop as docker containers on the local Docker runtime.

A usage guide can be found in the dedicated [README in /terraform](./terraform/README.md).

### EDMM Models

For all three evaluated technologies (Ansible, Terraform, Kubernetes) there is a transformed target model available.

The target EDMM models can be found in the [/edmm directory](./edmm)

In each model the goal is to retrieve a component for each deployed Astronomy Shop component
and as many _connects-to_ and _hosted-on_ relations as possible.

This in common, there are also differences in the target models.

Due to the imperative character of Ansible, in the [Ansible target model](./edmm/otel-store_ansible_translated.yaml), each component has operations representing the installation of the Docker containers.

- Provide a realistic example of a distributed system that can be used to
demonstrate OpenTelemetry instrumentation and observability.
- Build a base for vendors, tooling authors, and others to extend and
demonstrate their OpenTelemetry integrations.
- Create a living example for OpenTelemetry contributors to use for testing new
versions of the API, SDK, and other components or enhancements.
In the [Terraform target model](./edmm/otel-store_terraform_translated.yaml), there are common component types for all docker_containers,
eliasmueller marked this conversation as resolved.
Show resolved Hide resolved
as they all use the same terraform ressource type. This is different in the other two evaluated technologies, where each component has a dedicated type.

We've already made [huge
progress](https:/open-telemetry/opentelemetry-demo/blob/main/CHANGELOG.md),
and development is ongoing. We hope to represent the full feature set of
OpenTelemetry across its languages in the future.

If you'd like to help (**which we would love**), check out our [contributing
guidance](./CONTRIBUTING.md).

If you'd like to extend this demo or maintain a fork of it, read our
[fork guidance](https://opentelemetry.io/docs/demo/forking/).

## Quick start

You can be up and running with the demo in a few minutes. Check out the docs for
your preferred deployment method:

- [Docker](https://opentelemetry.io/docs/demo/docker_deployment/)
- [Kubernetes](https://opentelemetry.io/docs/demo/kubernetes_deployment/)

## Documentation

For detailed documentation, see [Demo Documentation][docs]. If you're curious
about a specific feature, the [docs landing page][docs] can point you in the
right direction.

## Demos featuring the Astronomy Shop

We welcome any vendor to fork the project to demonstrate their services and
adding a link below. The community is committed to maintaining the project and
keeping it up to date for you.

| | | |
|-----------------------------------------|-----------------------------|----------------------------------------------------------------|
| [AlibabaCloud LogService][AlibabaCloud] | [Elastic][Elastic] | [New Relic][NewRelic] |
| [AppDynamics][AppDynamics] | [Google Cloud][GoogleCloud] | [OpenSearch][OpenSearch] |
| [Aspecto][Aspecto] | [Grafana Labs][GrafanaLabs] | [Sentry][Sentry] |
| [Axiom][Axiom] | [Guance][Guance] | [ServiceNow Cloud Observability][ServiceNowCloudObservability] |
| [Axoflow][Axoflow] | [Helios][Helios] | [Splunk][Splunk] |
| [Azure Data Explorer][Azure] | [Honeycomb.io][Honeycombio] | [Sumo Logic][SumoLogic] |
| [Coralogix][Coralogix] | [Instana][Instana] | [TelemetryHub][TelemetryHub] |
| [Dash0][Dash0] | [Kloudfuse][Kloudfuse] | [Teletrace][Teletrace] |
| [Datadog][Datadog] | [Liatrio][Liatrio] | [Tracetest][Tracetest] |
| [Dynatrace][Dynatrace] | [Logz.io][Logzio] | [Uptrace][Uptrace] |

## Contributing

To get involved with the project see our [CONTRIBUTING](CONTRIBUTING.md)
documentation. Our [SIG Calls](CONTRIBUTING.md#join-a-sig-call) are every other
Monday at 8:30 AM PST and anyone is welcome.

## Project leadership

[Maintainers](https:/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer)
([@open-telemetry/demo-maintainers](https:/orgs/open-telemetry/teams/demo-maintainers)):

- [Juliano Costa](https:/julianocosta89), Datadog
- [Mikko Viitanen](https:/mviitane), Dynatrace
- [Pierre Tessier](https:/puckpuck), Honeycomb

[Approvers](https:/open-telemetry/community/blob/main/guides/contributor/membership.md#approver)
([@open-telemetry/demo-approvers](https:/orgs/open-telemetry/teams/demo-approvers)):

- [Cedric Ziel](https:/cedricziel) Grafana Labs
- [Penghan Wang](https:/wph95), AppDynamics
- [Reiley Yang](https:/reyang), Microsoft
- [Roger Coll](https:/rogercoll), Elastic
- [Ziqi Zhao](https:/fatsheep9146), Alibaba

Emeritus:

- [Austin Parker](https:/austinlparker)
- [Carter Socha](https:/cartersocha)
- [Michael Maxwell](https:/mic-max)
- [Morgan McLean](https:/mtwo)

### Thanks to all the people who have contributed

[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-demo)](https:/open-telemetry/opentelemetry-demo/graphs/contributors)

[docs]: https://opentelemetry.io/docs/demo/

<!-- Links for Demos featuring the Astronomy Shop section -->

[AlibabaCloud]: https:/aliyun-sls/opentelemetry-demo
[AppDynamics]: https://www.appdynamics.com/blog/cloud/how-to-observe-opentelemetry-demo-app-in-appdynamics-cloud/
[Aspecto]: https:/aspecto-io/opentelemetry-demo
[Axiom]: https://play.axiom.co/axiom-play-qf1k/dashboards/otel.traces.otel-demo-traces
[Axoflow]: https://axoflow.com/opentelemetry-support-in-more-detail-in-axosyslog-and-syslog-ng/
[Azure]: https:/Azure/Azure-kusto-opentelemetry-demo
[Coralogix]: https://coralogix.com/blog/configure-otel-demo-send-telemetry-data-coralogix
[Dash0]: https:/dash0hq/opentelemetry-demo
[Datadog]: https://docs.datadoghq.com/opentelemetry/guide/otel_demo_to_datadog
[Dynatrace]: https://www.dynatrace.com/news/blog/opentelemetry-demo-application-with-dynatrace/
[Elastic]: https:/elastic/opentelemetry-demo
[GoogleCloud]: https:/GoogleCloudPlatform/opentelemetry-demo
[GrafanaLabs]: https:/grafana/opentelemetry-demo
[Guance]: https:/GuanceCloud/opentelemetry-demo
[Helios]: https://otelsandbox.gethelios.dev
[Honeycombio]: https:/honeycombio/opentelemetry-demo
[Instana]: https:/instana/opentelemetry-demo
[Kloudfuse]: https:/kloudfuse/opentelemetry-demo
[Liatrio]: https:/liatrio/opentelemetry-demo
[Logzio]: https://logz.io/learn/how-to-run-opentelemetry-demo-with-logz-io/
[NewRelic]: https:/newrelic/opentelemetry-demo
[OpenSearch]: https:/opensearch-project/opentelemetry-demo
[Sentry]: https:/getsentry/opentelemetry-demo
[ServiceNowCloudObservability]: https://docs.lightstep.com/otel/quick-start-operator#send-data-from-the-opentelemetry-demo
[Splunk]: https:/signalfx/opentelemetry-demo
[SumoLogic]: https://www.sumologic.com/blog/common-opentelemetry-demo-application/
[TelemetryHub]: https:/TelemetryHub/opentelemetry-demo/tree/telemetryhub-backend
[Teletrace]: https:/teletrace/opentelemetry-demo
[Tracetest]: https:/kubeshop/opentelemetry-demo
[Uptrace]: https:/uptrace/uptrace/tree/master/example/opentelemetry-demo
For the Kubernetes model there are two variants. The [first](./edmm/otel-store_k8s_translated.yaml) is the actual result of the translation, lacking _hosted_on_ relations.
That is, as the Kubernetes plugin only creates hosted_on relations when a component named "container_runtime" with a matching type is present in the TADM.
Therefore, there is a [second target model](./edmm/otel-store_k8s_translated_with_container_runtime.yaml) where this "container_runtime" has been manually added, before creating the relations.
Thus, all components obtain a _hosted_on_ relation.
eliasmueller marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading