{"id":21803512,"url":"https://github.com/orbit/orbit-sample","last_synced_at":"2025-07-25T11:39:26.868Z","repository":{"id":92958320,"uuid":"265927467","full_name":"orbit/orbit-sample","owner":"orbit","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-18T10:59:28.000Z","size":153,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T09:52:16.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-05-21T18:51:56.000Z","updated_at":"2025-02-28T16:39:47.000Z","dependencies_parsed_at":"2023-04-12T23:16:41.007Z","dependency_job_id":null,"html_url":"https://github.com/orbit/orbit-sample","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/orbit%2Forbit-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit%2Forbit-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit%2Forbit-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit%2Forbit-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbit","download_url":"https://codeload.github.com/orbit/orbit-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766749,"owners_count":21158301,"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":[],"created_at":"2024-11-27T11:44:26.843Z","updated_at":"2025-04-13T19:13:54.058Z","avatar_url":"https://github.com/orbit.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orbit Sample App (The Carnival)\n\nThis is a sample app to help illustrate the concepts of an Orbit Client application. It simulates a carnival games, players, and prizes!\n\n## Getting Started\n\nThis sample app will install Orbit Server, its depenedencies, and a client application called Carnival. \n\n### Prerequisites\n* [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube) or [Docker for Desktop](https://docs.docker.com/get-docker/)\n* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) Kubernetes Command Line Tools \n* [Skaffold](https://skaffold.dev) to easily bring up the environment\n* [Insomnia](https://insomnia.rest/) or [Postman](https://www.postman.com/) for testing\n\n### Set up Kubernetes environment\n\n#### Minikube\n\nAfter [installing](https://kubernetes.io/docs/tasks/tools/install-minikube) Minikube, start up a new Minikube instance.\n```shell script\n\u003e minikube start\n``` \n\nTo verify your Minikube VM is working, you can use the minikube status command.\n```shell script\n\u003e minikube status\nm01\nhost: Running\nkubelet: Running\napiserver: Running\nkubeconfig: Configured\n```\n\n#### Docker for Desktop\nWith Docker for Desktop running, open settings and enable Kubernetes.\n\n* [Mac](https://docs.docker.com/docker-for-mac/kubernetes/)\n* [Windows](https://docs.docker.com/docker-for-windows/kubernetes/)\n\n### Kubectl Context and Namespace\nWe want to assure all the further commands are happening in the right Kubernetes cluster and isolate the project using a namespace. Tp use Docker For Desktop, replace `minikube` with `docker-desktop`.\n\n```shell script\n\u003e kubectl config use-context minikube\nSwitched to context \"minikube\".\n\u003e kubectl create namespace orbit-carnival\nnamespace/orbit-carnival created\n\u003e kubectl config set-context --current --namespace=orbit-carnival\nContext \"minikube\" modified.\n```\n\nVerify the orbit-carnival namespace is selected in the right context.\n```shell script\n\u003e kubectl config get-contexts\nCURRENT   NAME                        CLUSTER                     AUTHINFO                    NAMESPACE\n          docker-desktop              docker-desktop              docker-desktop              \n          docker-for-desktop          docker-desktop              docker-desktop              \n*         minikube                    minikube                    minikube                    orbit-carnival\n```\n\n### Clone the repository\n\n```shell script\n\u003e git clone git@github.com:orbit/orbit-sample.git\n```\n\n### Run Skaffold\n\n```shell script\n\u003e skaffold dev --port-forward\n```\n\nTo assure the proper pods are running, you can run kubectl get pod. You should see the pods for the Carnival, Orbit Server, and the Node and Addressable directories.\n\n```shell script\n\u003e kubectl get pod\nNAME                                           READY   STATUS    RESTARTS   AGE\norbit-addressable-directory-8666f4fbc6-j6lmz   1/1     Running   0          59s\norbit-carnival-5c6f59bb-kw2zr                  1/1     Running   0          59s\norbit-node-directory-bdb45ff8d-g9fjt           1/1     Running   0          59s\norbit-server-78fb97dd58-lx466                  1/1     Running   0          59s\n```\n\nFun tip: Use the [`watch`](https://www.geeksforgeeks.org/watch-command-in-linux-with-examples/\n) command to keep a live view of running containers.\n```shell script\n\u003e watch kubectl get pod\n```\n\n### Test\n\nThe Carnival test app exposes a REST endpoint for playing the game. By default, the carnival is exposed at `http://localhost:8001`\n\n| Method | Url                     | Payload\n|--------|-------------------------|-----------\n| GET    | /games                  |\n| GET    | /game/{gameId}          |\n| GET    | /player/{playerId}      |\n| POST   | /player/{playerId}/play | ex. { \"game\": \"BalloonDarts\" }\n\n\nOne more endpoint exists for load testing by continuously playing games:\n\n| Method | Url | Payload |\n|---|---|---\n| POST | /load/play | ex. { \"games\": 5, \"players\": 4, \"count\": 800 }\n\nTo help more easily test the endpoints, you can drive it through a REST request application like Insomnia or Postman. These are some collections to get you started.\n* Insomnia [collection](https://github.com/orbit/orbit-sample/blob/master/Orbit-Carnival.insomnia_collection.json)\n* Postman [collection](https://github.com/orbit/orbit-sample/blob/master/Orbit-Carnival.postman_collection.json)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbit%2Forbit-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbit%2Forbit-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbit%2Forbit-sample/lists"}