GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - orbit/orbit-sample

BranchesTags
Open more actions menu

Latest commit

 

History

45 Commits
45 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
charts/orbit-carnival
charts/orbit-carnival
 
 
docker
docker
 
 
gradle/wrapper
gradle/wrapper
 
 
src/main
src/main
 
 
.gitignore
.gitignore
 
 
Orbit-Carnival.insomnia_collection.json
Orbit-Carnival.insomnia_collection.json
 
 
Orbit-Carnival.postman_collection.json
Orbit-Carnival.postman_collection.json
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 
docker-compose.yaml
docker-compose.yaml
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
grafana-dashboard.json
grafana-dashboard.json
 
 
settings.gradle
settings.gradle
 
 
skaffold.yaml
skaffold.yaml
 
 

Repository files navigation

Orbit Sample App (The Carnival)

This is a sample app to help illustrate the concepts of an Orbit Client application. It simulates a carnival games, players, and prizes!

Getting Started

This sample app will install Orbit Server, its depenedencies, and a client application called Carnival.

Prerequisites

  • Minikube or Docker for Desktop
  • kubectl Kubernetes Command Line Tools
  • Skaffold to easily bring up the environment
  • Insomnia or Postman for testing

Set up Kubernetes environment

Minikube

After installing Minikube, start up a new Minikube instance.

> minikube start

To verify your Minikube VM is working, you can use the minikube status command.

> minikube status
m01
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

Docker for Desktop

With Docker for Desktop running, open settings and enable Kubernetes.

  • Mac
  • Windows

Kubectl Context and Namespace

We 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.

> kubectl config use-context minikube
Switched to context "minikube".
> kubectl create namespace orbit-carnival
namespace/orbit-carnival created
> kubectl config set-context --current --namespace=orbit-carnival
Context "minikube" modified.

Verify the orbit-carnival namespace is selected in the right context.

> kubectl config get-contexts
CURRENT   NAME                        CLUSTER                     AUTHINFO                    NAMESPACE
          docker-desktop              docker-desktop              docker-desktop              
          docker-for-desktop          docker-desktop              docker-desktop              
*         minikube                    minikube                    minikube                    orbit-carnival

Clone the repository

> git clone [email protected]:orbit/orbit-sample.git

Run Skaffold

> skaffold dev --port-forward

To 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.

> kubectl get pod
NAME                                           READY   STATUS    RESTARTS   AGE
orbit-addressable-directory-8666f4fbc6-j6lmz   1/1     Running   0          59s
orbit-carnival-5c6f59bb-kw2zr                  1/1     Running   0          59s
orbit-node-directory-bdb45ff8d-g9fjt           1/1     Running   0          59s
orbit-server-78fb97dd58-lx466                  1/1     Running   0          59s

Fun tip: Use the watch command to keep a live view of running containers.

> watch kubectl get pod

Test

The Carnival test app exposes a REST endpoint for playing the game. By default, the carnival is exposed at http://localhost:8001

Method Url Payload
GET /games
GET /game/{gameId}
GET /player/{playerId}
POST /player/{playerId}/play ex. { "game": "BalloonDarts" }

One more endpoint exists for load testing by continuously playing games:

Method Url Payload
POST /load/play ex. { "games": 5, "players": 4, "count": 800 }

To 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.

  • Insomnia collection
  • Postman collection

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

21 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.