Skip to content

Latest commit

 

History

History

stock-gen

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

The stock generator

Local development

Set it up locally (assumes Go 1.9 or above installed):

$ go get github.com/kubernauts/dok-example-us/stock-gen

Build and run in one terminal:

$ go install . && DOK_STOCKGEN_PORT=9876 DOK_STOCKGEN_CRASHEPOCH=20 stock-gen

In another terminal (requires http and jq installed):

$ while true; do \
   http localhost:9876/stockdata | jq .[].symbol,.[].value ; \
   sleep 1 ; \
  done

Containerized deployment

The stock-gen app container image is defined in Dockerfile and publicly available via quay.io/mhausenblas/stock-gen:0.3.

To deploy it as an Kubernetes application, use the provided manifest like so:

$ kubectl create -f app.yaml
$ kubectl get deploy,svc,po