Git Product home page Git Product logo

whoami's Introduction

whoamI

This is a fork from https://github.com/containous/whoami.

Tiny Go webserver that prints os information and HTTP request to output

$ docker run -d -P --name iamfoo bee42/whoami:1.2.0
$ docker inspect --format '{{ .NetworkSettings.Ports }}'  iamfoo
map[80/tcp:[{0.0.0.0 32769}]]
$ curl "http://0.0.0.0:32769"
Hostname :  6e0030e67d6a
IP :  127.0.0.1
IP :  ::1
IP :  172.17.0.27
IP :  fe80::42:acff:fe11:1b
GET / HTTP/1.1
Host: 0.0.0.0:32769
User-Agent: curl/7.35.0
Accept: */*

Endpoints

1.2.0

  • GET / prints runtime information, ip addresses
  • GET /health returns current healthstatus of the app
  • POST /health sets current healthstatus of the app
  • GET /echo prints an echo back
  • GET /api prints runtime information, ip addresses in json
  • GET /bench wait a long time before repsonse

2.0.0

  • GET /version prints podinfo version and git commit hash

Versions

Setting version in 2.0.0

$ docker run -d -p 8086:80 -e WHOAMI_VERSION=2.0.0-release bee42/whoami:2.0.0
$ curl 127.0.0.1:8086/version

Metrics with prometheus

  • GET /metrics get prometheus metrics form go process

2.1.0

$ docker run -d -p 8087:80 -e WHOAMI_VERSION=2.1.0-release bee42/whoami:2.1.0
$ curl 127.0.0.1:8087/
$ curl 127.0.0.1:8087/metrics

Currently the request of ´/api´ and ´/´ are measured.

Kubernetes deployment with the helm charts

$ cd whoami
$ helm install -n whoami --namespace whoami .

With --set nginx-ingress.enabled=trueyou can deploy a local NodePort nginx

Look inside values.yaml for more options.

Links of metrics

Regards Peter Rossbach ([email protected])

whoami's People

Contributors

rossbachp avatar emilevauge avatar solidnerd avatar vozerov avatar

Watchers

James Cloos avatar

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.