Code Monkey home page Code Monkey logo

cloud-foundry-microservice-demo's Introduction

Microservices in Cloud Foundry Demo

This repository contains a demo of how to run multiple services within Cloud Foundry. It will focus on the technical details instead of how to decompose your domain into microservices.

This demo deploys the applications, packaged as Docker images, to a Lattice instance running locally.

DISCLAIMER: This mono-repo may or may not be the best structure for your microservice repository. These services are all in one repository for simplicity of explanation. For more details, see Building Microservices by Sam Newman.

Applications

  • service-discovery - A Spring Boot application that uses a Eureka server from Spring Cloud to handle service discovery

  • property-lookup - A Java 8/Spring Boot based service that can look up property data.

  • tax-calculator - A Java 8/Spring Boot based service that queries the property-lookup service and calculates property tax based on the property information.

  • property-lookup-app - A Ruby/Sinatra application that uses the property-lookup service to display property information.

Building Docker images

The Docker images are built using a Gradle plugin and can be created by running ./gradlew build buildDocker. Prerequisites for building Docker images are:

Before running the buildDocker command in a terminal window, you must have the 3 boot2docker env variables set in that window (see docker up for details). You also need to be logged in to DockerHub via docker login.

Deploying to Lattice

See the Lattice walkthrough for details on how to use Lattice. You can use the bin/deploy-to-lattice.sh <DockerHub tag> script to deploy Docker containers pushed to DockerHub to your local Lattice installation.

Service information

You can query the service-discovery service for information about the registered services using curl:

curl http://service-discovery.192.168.11.11.xip.io/eureka/apps

Please note that it takes ~30 seconds for a new service instance to be registered with the service-discovery service.

cloud-foundry-microservice-demo's People

Watchers

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