Giter Site home page Giter Site logo

uday1bhanu / hello-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from expediagroup/hello-cloud

0.0 2.0 0.0 27 KB

hello world example for Multicloud applications

License: Apache License 2.0

Dockerfile 5.99% JavaScript 46.14% HTML 47.87%

hello-cloud's Introduction

hello-cloud

hello world example for Multicloud applications

Demo

Start the stack

docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up

UI served via Global Load Balancer -> Regional Load Balancer Linkerd -> Region Compute (node.js)

Access live version of the app http://localhost:9000

Oh no! A 404 page.

We can navigate to an upstream application routing-by-convention : http://localhost:9000/live/hello-cloud-app/hello

Let's add a Route using traffic-director:

curl -X POST \
  http://localhost:8080/api/v1/routes \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"path":"/cloud","upstream":{"locator":{"service":"hello-cloud-app"}}}'

Verify that Route was added to traffic-director. In this reference implementation load balancers can poll a simple microservice for updates to the routing data: http://localhost:8080/api/v1/routes/entries

[
    {
        "path": "/cloud", // "vanilla" URL path that maps to any host
        "uri": "/hello-cloud-app" // Service Discovery path for a Consul service in any available region
    },
    {
        "path": "www.homeaway.com/hello", // host and path mapping to support different hosts
        "uri": "/hello-cloud-app" //
    },
    {
        "path": "/cloud/v/ce6836c6-7ca5-4944-8285-647aa9ae39b6", // variant defined as part of the routable path
        "uri": "/live/hello-cloud-app" // Service Discovery path for a Consul tag and service in any available region
    },
    {
        "path": "/cloud/f/84f88ddb-1ceb-4d52-b51a-66ff18d84191", // fallback defined as part of the routable path
        "uri": "/fallback/hello-cloud-app" // Service Discovery path for a Consul tag and service in any available region
    }
]

Refresh the Global Load Balancer http://localhost:9000/?refresh=true

Access a mapped path http://localhost:9000/cloud

Service Registry Consul UI http://localhost:8500/ui/dc1/services

Service Mesh Linkerd UI http://localhost:9990/delegator?router=%2Fhttp-consul#%2Fsvc%2Fhello-cloud-service

Service Metrics Prometheus UI http://localhost:9090/graph?g0.range_input=1h&g0.expr=rt%3Aclient%3Astatus%3A2XX&g0.tab=0

License

LICENSE

hello-cloud's People

Contributors

mtyrrell avatar

Watchers

James Cloos avatar Uday 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.