• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    Shell
  • Created over 5 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Demos built using Docker Compose showing Consul Service Mesh features

Consul Service Mesh Demos

This repository contains various demonstrations to highlight features and configuration in Consul Service Mesh.

Docker Compose

NOTE: All service registration and central config is automatically applied when running these examples.
To apply configuration manually you can comment out the CENTRAL_CONFIG environment variable in the docker-compose.yml files:

  web_envoy:
    image: nicholasjackson/consul-envoy:v1.6.0-v0.10.0
    environment:
      CONSUL_HTTP_ADDR: 10.5.0.2:8500
      CONSUL_GRPC_ADDR: 10.5.0.2:8502
      SERVICE_CONFIG: /config/web_v1.json
#     CENTRAL_CONFIG: "/central_config/web-defaults.hcl;/central_config/api-defaults.hcl;/central_config/api-v1-defaults.hcl;/central_config/api-v2-defaults.hcl;/central_config/api-router.hcl"
    volumes:
      - "./service_config:/config"
      - "./central_config:/central_config"
    command: ["consul", "connect", "envoy","-sidecar-for", "web-v1"]
    network_mode: "service:web"

Config can then be manually applied using the following command once you have started the example with docker-compose up:

$ consul config write config_file.hcl

All central config is stored in the central_config folder in each example.

Traffic Splitting

This demonstration shows how traffic can be split between two service instances. This feature could be used for a Canary or Dark deployment testing strategy.

Traffic Routing

This demonstration shows how upstream traffic can be routed between two services using HTTP paths.

Metrics / Tracing

This demonstration shows how to configure Consul Service Mesh for Observability.

Service Failover

This demonstration shows how to failover upstream services to a different datacenter. This feature could be used to main uptime during a partial or regional service outage.

Consul Gateways

This demonstration shows how to route traffic to a second Consul Datacenter using Consul Gateways. This feature could be used to route traffic between Virtual Machines and Kubernetes.

Kubernetes

Traffic Splitting

This demonstration shows how traffic can be split between two service instances. This feature could be used for a Canary or Dark deployment testing strategy.

Traffic Routing

This demonstration shows how upstream traffic can be routed between two services using HTTP paths.

Exposing Health Checks

Example showing how to bypass proxy security to expose Service health checks publicly.

More Repositories

1

building-microservices-youtube

Code repository for my Building Microservices YouTube series https://www.youtube.com/playlist?list=PLmD8u-IFdreyh6EUfevBcbiuCKzFk0EW_
Go
1,104
star
2

fake-service

Simple service for testing upstream service communications
Go
387
star
3

mtls-go-example

Simple example using mutual TLS authentication with a Golang server
Shell
146
star
4

building-microservices-in-go

Example code to accompany the book building Microservices in go
Go
100
star
5

cnitch

Container Snitch checks running processes under the Docker Engine and alerts if any are found to be running as root
Go
70
star
6

go-microservice-template

Template setup for a microservice written in Go - DEPRECATED
Go
54
star
7

minke

Tools for building Microservices with Docker
Ruby
45
star
8

env

Package to provide configuration as environment variables for 12 factor applications
Go
42
star
9

shipyard

Consul and Kubernetes running on Docker https://shipyard.demo.gs/
Shell
41
star
10

wasp

Wasm System Plugins for Go
WebAssembly
37
star
11

protractor-cucumber-example

Small example of how to use protractor with cucumber for angular application testing.
JavaScript
37
star
12

envoy-experiments

Experiments with Envoy Proxy
WebAssembly
35
star
13

demo-vault

Demos for Hashicorp Vault
Java
34
star
14

docker-consul-envoy

Docker image with Consul and Envoy
HCL
30
star
15

terraform-digitalocean-k8s

Terraform / Packer example for Kubernetes on DigitalOcean
HCL
29
star
16

terraform-digitalocean-lifecycle

Zero downtime upgrades of images in Terraform
HCL
28
star
17

helloworld

Example microservice to show the use of go-microservice-template and minke build gem.
Go
26
star
18

open-faas-functions

Collection of functions for OpenFaas (http://openfaas.com)
Go
24
star
19

microservice-basebox

Docker basebox built on alpine, contains Consul template and Skaware daemon runner.
23
star
20

bakery

Simple tool to backup and restore ChromeOS Crostini containers
Go
20
star
21

minke-generator-go

Minke generator to create a REST API microservice with Golang
HTML
19
star
22

dotfiles

Various configuration dotfiles for Vim, etc
Lua
18
star
23

grpc-consul-resolver

HashiCorp Consul Resolver for use with gRPC load balancer
Go
17
star
24

dagger-example

Simple example to build and deploy a Go app using the Dagger Go SDK
Go
16
star
25

terraform-provider-slack

Terraform provider for administering slack
Go
16
star
26

terraform-nomad-multicloud

Example repository for running a federated Nomad / Consul / Vault cluster in AWS and GCP
HCL
15
star
27

consul-escape-hatch-demo

Example showing how the Envoy configuration escape hatch can be used with Consul
HCL
14
star
28

all-things-microservices

Monorepo for All Things Microservices YouTube Series
Go
13
star
29

terraform-azure-k8s

Example to create a Kubernetes cluster in Azure
HCL
13
star
30

consul-release-controller

Canary deployment controller for Consul Service Mesh
Go
13
star
31

kapsule

Kapsule is a tool for packaging LLM models into encrypted OCI images that can be pushed to a registry like Docker Hub
Go
13
star
32

terraform-modules

Example Terraform modules
HCL
12
star
33

terraform-provider-workshop

MDX
11
star
34

terraform-aws-hashicorp-suite

Terraform module for creating HashiCorp Nomad and Consul clusters
HCL
11
star
35

vault-dev-patterns

Various HashiCorp Vault development patterns
Go
11
star
36

slack-bot-lex-lambda

Example slack bot using AWS Lambda and Lex
JavaScript
11
star
37

pipe

Multi provider event grid written in go
Go
10
star
38

consul-smi-controller

Controller implementing SMI Spec for HashiCorp Consul
Go
9
star
39

nomad-arm6l

Build of Nomad for Arm6l such as the Raspberry Pi Zero
HCL
8
star
40

consul-canary-deployment

Example showing how to do automated canary deployments with Consul and Flagger
HCL
8
star
41

waypoint-ecs

Example repository for running HashiCorp Waypoint on ECS
HCL
8
star
42

testing-microservices

Simple example app to show a holistic testing strategy for micro services in Go
Go
7
star
43

terraform-aws-open-faas-nomad

Example Terraform configuration to create OpenFaas on Nomad for AWS
HCL
7
star
44

terraform-aws-gcp-vpn

Terraform module to create a VPN between AWS and GCP
HCL
7
star
45

open-faas-templates

GoCV OpenCV template for OpenFaaS
Go
6
star
46

config

Config is a simple package for loading JSON formatted config files.
Go
6
star
47

bench

Bench is a simple load testing application for Microservices
Go
6
star
48

wasm-examples

Various language examples to use Wasm and WASI
WebAssembly
6
star
49

ultraclient

Load balancing, circuit breaking client with retries for Go
Go
6
star
50

terraform_ci

Example code from Digital Ocean Tide conference
HCL
6
star
51

cloud-pong

Terminal based Cloud Pong
Shell
6
star
52

drone-face-detection

Golang application to detect faces from an RTSP video stream using OpenCV
Go
6
star
53

consul-gateways-demo

Demo code for multi-cloud Consul gateways
Shell
6
star
54

terraform-for-developers

JavaScript
6
star
55

terraform-alicloud-demo

Simple Demo showing how Terraform can be used with Alibaba Cloud and Circle CI
HCL
6
star
56

consul-connect-router

Simple http router for Consul Connect services
Go
6
star
57

oscon-wasm-plugins-example-code

Example code from OSCON Session - Plugin Development with WASM and Go
WebAssembly
5
star
58

textbox-example

Example of basic sentiment analysis with Machinebox.io
Go
5
star
59

terraform-gcp-hashicorp-suite

Terraform module to run Nomad on Google Cloud
HCL
5
star
60

consul-migrating-brownfield-to-greenfield

Workshop showing how to migrate legacy applications running in VMs to Kubernetes using a Service Mesh
5
star
61

vault-application-secrets

Example showing how to use Vault and Vault Agent to inject application secrets
HCL
5
star
62

terraform-gcp-cloud-run-vault

Terraform module to run HashiCorp Vault on Google Cloud Run
HCL
5
star
63

envoy-binaries

Repo containing Envoy Proxy binaries
5
star
64

expense-report

Example expense report application that uses Vault's transit secrets engine
Go
5
star
65

demo-terraform-minecraft

Deploy a Minecraft Server with Terraform
HCL
4
star
66

workshop-vault-for-developers

Vault for Developers Workshop
Go
4
star
67

terraform-cfgmgmtcamp

Example code for config management camp talk
HCL
4
star
68

consul-loader

Simple gem to push a yaml file into consul key values
Ruby
4
star
69

consul-envoy-windows

Example of running two services using Consul Service Mesh and Envoy on Windows
HCL
4
star
70

consul-servce-mesh-example

HCL
4
star
71

terraform-aws-fargate-example

EKS Cluster with DB and Pod
HCL
3
star
72

hashicraft

HCL
3
star
73

consul-fargate-injection

Utility to inject Consul service mesh containers for EKS Fargate
Go
3
star
74

go-mobile-framework

Example framework for the Go mobile talk
Go
3
star
75

spot-gps-cache

Simple server written in Go to cache calls to Spot GPS Tracker API.
Ruby
3
star
76

waypoint-eks-fargate-example

Example showing how to run Waypoint on EKS Fargate
HCL
3
star
77

measured-application-delivery

Example showing how to use canary deployments and app migration with Consul Service Mesh
HCL
3
star
78

waypoint-plugin-tfc

Waypoint Plugin to interact with Terraform Cloud
Go
3
star
79

terraform-nomad-multi-cloud

Terraform example to demonstrate a multi-cloud instance of Nomad running on AWS and GCP
HCL
3
star
80

workshop-spring-vault

Workshop showing how to use Spring Boot with Vault
MDX
3
star
81

demo-securing-llms-with-vault

Demo repo showing how to secure the training and storage of Large Language Models using HashiCorp Vault
Jupyter Notebook
3
star
82

vault-dotnet

Example app showing how to use Vault with DotNet
C#
2
star
83

vault-plugin-template

Example template repo for creating Vault secrets plugins
Go
2
star
84

demo-terraform-basics

Shell
2
star
85

open-skills

Open source framework to manage and promote skills within an organisation
2
star
86

SwigGo

Example code to create a c++ library that can be wrapped with Swig so that it can be used with Go
Ruby
2
star
87

vault-k8s-demo

Demo showing how to write Vault secrets in Kubernetes containers
Shell
2
star
88

echo-config

Simple service showing how to load json based config
Go
2
star
89

sainsmart-lcd2004

Golang I2C interface for Periph.io and the LCD 2004
Go
2
star
90

m3o-examples

Examples of services built in M3O (https://m3o.com/)
Go
2
star
91

hashicorp-shipyard-modules

HashiCorp modules for Shipyard (shipyard.run)
HCL
2
star
92

nicholasjackson.github.io

Github Pages
CSS
2
star
93

sleepy-client

Useless package, serves no purpose, do not use
Go
2
star
94

sentinel_aws_example

Example Sentinel policy to check AWS providers
HCL
2
star
95

sphero-mini

Library for interacting with the Sphero Mini using Bluetooth LE
Go
2
star
96

tfc-plan

Simple tool to generate a JSON plan from Terraform Enterprise or Terraform Cloud
Go
2
star
97

periph-gpio-simulator

Simple GPIO simulator for Raspberry Pi and Periph.io
Go
2
star
98

kitura-http-test

Swift package to make testing handlers in the Kitura framework super easy
Swift
2
star
99

KituraTesting

Example of effective unit testing for Kitura handlers
Swift
2
star
100

rcswitch

433MHz switch receiving and transmission library for Periph.io
Go
2
star