Giter Site home page Giter Site logo

demo-app's Introduction

Demo app

This application is intended for demo-ing how to monitor a Go application getting data out of postgres and with an Nginx server in front, serving static assets.

The Datadog agent is deployed as a daemonset. Nginx, the Go app, and postgres have annotations that allow the agent to automatically discover and monitor them. The Go app exposes some expvar metrics.

How to run it

  • configure kubectl to connect to a Kubernetes cluster (minikube is supported)
  • get a Datadog API key and replace the place holder in monitoring/agent-ds.yaml (or replace monitoring/agent-ds.yaml with your favorite monitoring agent)
  • run chmod +x provision.sh && ./provision.sh
  • profit!
  • ... and tear it down with cleanup.sh

Build the images

The following instruction include building the nginx and app images, but they are available on docker hub as well: https://hub.docker.com/r/hkaj/demo-app/ and https://hub.docker.com/r/hkaj/nginx/

Nginx

cd nginx && docker build -t $TAG_NAME .
docker run -d --name nginx $TAG_NAME

App

cd app && docker build -t $TAG_NAME .
docker run -d --name demo $TAG_NAME .

postgres

docker run --name postgres -e POSTGRES_USER=foo -e POSTGRES_PASSWORD=bar -e POSTGRES_DB=app -d -v /path/to/init-app-db.sh:/docker-entrypoint-initdb.d/init-app-db.sh postgres:9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.