{"id":13706338,"url":"https://github.com/instana/robot-shop","last_synced_at":"2025-05-11T02:08:23.058Z","repository":{"id":37622994,"uuid":"116983346","full_name":"instana/robot-shop","owner":"instana","description":"Sample microservices application for playing with","archived":false,"fork":false,"pushed_at":"2024-06-09T14:39:57.000Z","size":105605,"stargazers_count":915,"open_issues_count":24,"forks_count":4713,"subscribers_count":86,"default_branch":"master","last_synced_at":"2025-05-11T02:08:17.213Z","etag":null,"topics":["distributed-tracing","microservice-example","microservices","performance-monitoring","robot"],"latest_commit_sha":null,"homepage":"http://instana.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-10T16:37:17.000Z","updated_at":"2025-05-08T03:55:39.000Z","dependencies_parsed_at":"2024-05-12T22:35:19.663Z","dependency_job_id":"858743b6-92c1-4494-b4b3-9941417f1c06","html_url":"https://github.com/instana/robot-shop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Frobot-shop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Frobot-shop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Frobot-shop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Frobot-shop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instana","download_url":"https://codeload.github.com/instana/robot-shop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253505664,"owners_count":21918942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-tracing","microservice-example","microservices","performance-monitoring","robot"],"created_at":"2024-08-02T22:00:54.283Z","updated_at":"2025-05-11T02:08:23.048Z","avatar_url":"https://github.com/instana.png","language":"JavaScript","funding_links":[],"categories":["Misc"],"sub_categories":[],"readme":"# Sample Microservice Application\n\nStan's Robot Shop is a sample microservice application you can use as a sandbox to test and learn containerised application orchestration and monitoring techniques. It is not intended to be a comprehensive reference example of how to write a microservices application, although you will better understand some of those concepts by playing with Stan's Robot Shop. To be clear, the error handling is patchy and there is not any security built into the application.\n\nYou can get more detailed information from my [blog post](https://www.instana.com/blog/stans-robot-shop-sample-microservice-application/) about this sample microservice application.\n\nThis sample microservice application has been built using these technologies:\n- NodeJS ([Express](http://expressjs.com/))\n- Java ([Spring Boot](https://spring.io/))\n- Python ([Flask](http://flask.pocoo.org))\n- Golang\n- PHP (Apache)\n- MongoDB\n- Redis\n- MySQL ([Maxmind](http://www.maxmind.com) data)\n- RabbitMQ\n- Nginx\n- AngularJS (1.x)\n\nThe various services in the sample application already include all required Instana components installed and configured. The Instana components provide automatic instrumentation for complete end to end [tracing](https://docs.instana.io/core_concepts/tracing/), as well as complete visibility into time series metrics for all the technologies.\n\nTo see the application performance results in the Instana dashboard, you will first need an Instana account. Don't worry a [trial account](https://instana.com/trial?utm_source=github\u0026utm_medium=robot_shop) is free.\n\n## Build from Source\nTo optionally build from source (you will need a newish version of Docker to do this) use Docker Compose. Optionally edit the `.env` file to specify an alternative image registry and version tag; see the official [documentation](https://docs.docker.com/compose/env-file/) for more information.\n\nTo download the tracing module for Nginx, it needs a valid Instana agent key. Set this in the environment before starting the build.\n\n```shell\n$ export INSTANA_AGENT_KEY=\"\u003cyour agent key\u003e\"\n```\n\nNow build all the images.\n\n```shell\n$ docker-compose build\n```\n\nIf you modified the `.env` file and changed the image registry, you need to push the images to that registry\n\n```shell\n$ docker-compose push\n```\n\n## Run Locally\nYou can run it locally for testing.\n\nIf you did not build from source, don't worry all the images are on Docker Hub. Just pull down those images first using:\n\n```shell\n$ docker-compose pull\n```\n\nFire up Stan's Robot Shop with:\n\n```shell\n$ docker-compose up\n```\n\nIf you want to fire up some load as well:\n\n```shell\n$ docker-compose -f docker-compose.yaml -f docker-compose-load.yaml up\n```\n\nIf you are running it locally on a Linux host you can also run the Instana [agent](https://docs.instana.io/quick_start/agent_setup/container/docker/) locally, unfortunately the agent is currently not supported on Mac.\n\nThere is also only limited support on ARM architectures at the moment.\n\n## Marathon / DCOS\n\nThe manifests for robotshop are in the *DCOS/* directory. These manifests were built using a fresh install of DCOS 1.11.0. They should work on a vanilla HA or single instance install.\n\nYou may install Instana via the DCOS package manager, instructions are here: https://github.com/dcos/examples/tree/master/instana-agent/1.9\n\n## Kubernetes\nYou can run Kubernetes locally using [minikube](https://github.com/kubernetes/minikube) or on one of the many cloud providers.\n\nThe Docker container images are all available on [Docker Hub](https://hub.docker.com/u/robotshop/).\n\nInstall Stan's Robot Shop to your Kubernetes cluster using the [Helm](K8s/helm/README.md) chart.\n\nTo deploy the Instana agent to Kubernetes, just use the [helm](https://github.com/instana/helm-charts) chart.\n\n## Accessing the Store\nIf you are running the store locally via *docker-compose up* then, the store front is available on localhost port 8080 [http://localhost:8080](http://localhost:8080/)\n\nIf you are running the store on Kubernetes via minikube then, find the IP address of Minikube and the Node Port of the web service.\n\n```shell\n$ minikube ip\n$ kubectl get svc web\n```\n\nIf you are using a cloud Kubernetes / Openshift / Mesosphere then it will be available on the load balancer of that system.\n\n## Load Generation\nA separate load generation utility is provided in the `load-gen` directory. This is not automatically run when the application is started. The load generator is built with Python and [Locust](https://locust.io). The `build.sh` script builds the Docker image, optionally taking *push* as the first argument to also push the image to the registry. The registry and tag settings are loaded from the `.env` file in the parent directory. The script `load-gen.sh` runs the image, it takes a number of command line arguments. You could run the container inside an orchestration system (K8s) as well if you want to, an example descriptor is provided in K8s directory. For End-user Monitoring ,load is not automatically generated but by navigating through the Robotshop from the browser .For more details see the [README](load-gen/README.md) in the load-gen directory.  \n\n## Website Monitoring / End-User Monitoring\n\n### Docker Compose\n\nTo enable Website Monioring / End-User Monitoring (EUM) see the official [documentation](https://docs.instana.io/website_monitoring/) for how to create a configuration. There is no need to inject the JavaScript fragment into the page, this will be handled automatically. Just make a note of the unique key and set the environment variable `INSTANA_EUM_KEY` and `INSTANA_EUM_REPORTING_URL` for the web image within `docker-compose.yaml`.\n\n### Kubernetes\n\nThe Helm chart for installing Stan's Robot Shop supports setting the key and endpoint url required for website monitoring, see the [README](K8s/helm/README.md).\n\n## Prometheus\n\nThe cart and payment services both have Prometheus metric endpoints. These are accessible on `/metrics`. The cart service provides:\n\n* Counter of the number of items added to the cart\n\nThe payment services provides:\n\n* Counter of the number of items perchased\n* Histogram of the total number of items in each cart\n* Histogram of the total value of each cart\n\nTo test the metrics use:\n\n```shell\n$ curl http://\u003chost\u003e:8080/api/cart/metrics\n$ curl http://\u003chost\u003e:8080/api/payment/metrics\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstana%2Frobot-shop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstana%2Frobot-shop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstana%2Frobot-shop/lists"}