Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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.
**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:
```yaml
web_envoy:
Expand All @@ -29,7 +29,7 @@ All central config is stored in the `central_config` folder in each example.
### [Traffic Splitting](traffic_split/)
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_split/images/shifting_1.png)
![](traffic_splitting/images/shifting_1.png)

### [Traffic Routing](traffic_routing/)
This demonstration shows how upstream traffic can be routed between two services using HTTP paths.
Expand All @@ -43,7 +43,7 @@ This demonstration shows how to configure Consul Service Mesh for Observability.
### [Service Failover](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.

![](failover/images/failover.png)
![](images/failover.png)

### [Consul Gateways](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.
Expand All @@ -55,7 +55,7 @@ This demonstration shows how to route traffic to a second Consul Datacenter usin
### [Traffic Splitting](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_split/images/shifting_1.png)
![](traffic_splitting/images/shifting_1.png)

### [Traffic Routing](kubernetes/traffic_routing/)
This demonstration shows how upstream traffic can be routed between two services using HTTP paths.
Expand Down
14 changes: 7 additions & 7 deletions gateways/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ services:
CONSUL_HTTP_ADDR: 10.5.0.2:8500
CONSUL_GRPC_ADDR: 10.5.0.2:8502
SERVICE_CONFIG: /config/web_v1.hcl
#CENTRAL_CONFIG: "/central_config/web-defaults.hcl;/central_config/api-defaults.hcl;/central_config/api-resolver.hcl"
CENTRAL_CONFIG: "/central_config/web-defaults.hcl;/central_config/payments-defaults.hcl;/central_config/payments-resolver.hcl"
volumes:
- "./service_config:/config"
- "./central_config:/central_config"
command: ["consul", "connect", "envoy","-sidecar-for", "web-v1"]
network_mode: "service:web"


# Define currency service and envoy sidecar proxy for version 2 of the service
currency_dc1:
image: nicholasjackson/fake-service:v0.7.3
Expand Down Expand Up @@ -85,7 +85,7 @@ services:
wan:
ipv4_address: 192.169.7.3


consul-dc2:
image: consul:1.6.1
command: ["consul","agent","-config-file=/config/consul-dc2.hcl"]
Expand Down Expand Up @@ -116,14 +116,14 @@ services:
CONSUL_HTTP_ADDR: 10.6.0.2:8500
CONSUL_GRPC_ADDR: 10.6.0.2:8502
SERVICE_CONFIG: /config/payments_v2.hcl
# CENTRAL_CONFIG: "/central_config/api_service_resolver.hcl;/central_config/api_service_splitter_100_0.hcl"
CENTRAL_CONFIG: "/central_config/web-defaults.hcl;/central_config/currency-defaults.hcl;/central_config/currency-resolver.hcl"
volumes:
- "./service_config:/config"
- "./central_config:/central_config"
command: ["consul", "connect", "envoy","-sidecar-for", "payments-v2"]
network_mode: "service:payments_v2"


gateway-dc2:
image: nicholasjackson/consul-envoy:v1.6.1-v0.10.0
environment:
Expand Down
8 changes: 4 additions & 4 deletions gateways/service_config/web_v1.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ service {
id = "web-v1"
address = "10.5.0.3"
port = 9090
connect {

connect {
sidecar_service {
port = 20000

check {
name = "Connect Envoy Sidecar"
tcp = "10.5.0.3:20000"
Expand All @@ -21,6 +21,6 @@ service {
local_bind_port = 9091
}
}
}
}
}
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes