Skip to content

Deploy the bookinfo microservices example configured for consul service mesh

Notifications You must be signed in to change notification settings

tonyp-hc/consul-bookinfo

Repository files navigation

consul-bookinfo

Overview

These examples deploy Istio's Bookinfo application and then adapt it to demonstrate Consul's Service Mesh functionality.

This deploys the following microservices:

  • productpage: calls details and reviews services to populate the pages
  • details: provides book information
  • reviews: calls the ratings service to provide book reviews and the "star" ratings
  • ratings: provides book ranking information through the reviews service

The reviews service has three versions:

  • v1: does not call the ratings service
  • v2: calls ratings service, displays ratings as 1 to 5 black stars
  • v3: calls ratings service, displays ratings as 1 to 5 red stars

Deployment Architecture

TODO: diagram comparing Istio vs Consul architecture

Dependencies

All of these examples use the following images:

docker.io/istio/examples-bookinfo-details-v1:1.16.2
docker.io/istio/examples-bookinfo-productpage-v1:1.16.2
docker.io/istio/examples-bookinfo-ratings-v1:1.16.2
docker.io/istio/examples-bookinfo-reviews-v1:1.16.2
docker.io/istio/examples-bookinfo-reviews-v2:1.16.2
docker.io/istio/examples-bookinfo-reviews-v3:1.16.2

All examples are tested with Consul 1.9.0 but many will also work with Consul 1.6.0+

Repository Structure

There are several directories included in this repo and additional examples will be included over time. If an example expects certain prerequisities or dependencies, it will define those.

This repository currently contains:

consul-bookinfo
├── 0-default
├── 1-service-defaults
├── 2-service-splitter
├── 3-intentions
├── 4-service-router
├── 5-k8s-namespaces 
├── 6-consul-namespaces 
└── README.md
  • 0-default: original bookinfo application [github]
  • 1-service-defaults: baseline bookinfo deployment for consul (including service-default and service-router configuration)
  • 2-service-splitter: extend 1-service-defaults with consul service-splitter to weight traffic between reviews services
  • 3-intentions: authorize connectivity between service mesh applications without redeployments using Consul Intentions
  • 4-service-router: extend 1-service-defaults to route traffic based on L7 data like HTTP headers
  • 5-k8s-namespaces: distinguish between Consul and K8s namespaces
  • 6-consul-namespaces: set up Consul Enterprise namespaces and mirror K8s namespaces into Consul Enterprise

About

Deploy the bookinfo microservices example configured for consul service mesh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages