Reference application for deploying microservice-based applications onto IBM Bluemix, leveraging the Netflix OSS framework.
Reference applications for deploying microservice-based applications onto IBM Bluemix, leveraging the Netflix OSS framework.
This application has been developed and designed to run in the IBM Bluemix us-south public region. Changes may be required if it is to run on a different IBM Bluemix public region or on a local/dedicated environment.
The application is a simple dinner menu that displays available appetizers, entrees, and desserts for a non-existent restaurant. There are several components of this architecture:
This project runs itself like a microservice project, as such each component in the architecture has its own Git Repository and tutorial listed below.
Infrastructure Components:
Application Components:
Resiliency Components:
DevOps Components:
Install Java JDK 1.8 and ensure it is available in your PATH
Install Docker on Windows or Mac
Acquire the code
git clone https://github.com/ibm-cloud-architecture/refarch-cloudnative-netflix
master
branch, which is the active development branch:
./clone_peers.sh
master
is selected if no parameter is supplied:
./clone_peers.sh BUILD
to clone peer projects and use the BUILD branch for all projectsYou can run the entire application locally on your laptop via Docker Compose, a container orchestration tool provided by Docker.
Run one of the following build script to build all the necessary Java projects.
./build-all.sh [-d]
will build all the components required runnable JARs using Gradle and optionally package them into Docker containers.
./build-all.sh -m [-d]
will build all the components required runnable JARs using Apache Maven and optionally package them into Docker containers.
Run one of the following Docker Compose commands to start all the application components locally:
docker-compose up
to run with output sent to the console (for all 7 microservices)docker-compose up -d
to run in detached mode and run the containers in the background.You can access the application after a few moments via http://localhost/whats-for-dinner
! That's easy enough!
The backing services are automatically registered with Eureka and routed to the necessary dependent microservices, upon calling the Menu service.
Run the following script to deploy all the necessary Java projects as Cloud Foundry apps.
./deploy-to-cf.sh
Run the following script to deploy all the necessary Java projects as Container Groups.
./deploy-to-ics.sh