Hi there
In this repository you'll find some labs that may help understand a little bit the basics on how to use Envoy with different control planes like Consul. Now, let's get started.
I really appreciate constructive feedback. So you are more than welcome if you want to add some info or comment on this repository.
The main goal of these labs is to have a better understanding of Envoy and how to integrate it with some of the current Service discovery softwares in order to migrate from Virtual Machine ecosystem to a Container ecosystem. Running all these tools by hand will let you understand which challenges you will face when you deal with mixed infrastructures during a migration.
Also, I realized that most tutorials or demonstrations on how to implement and use these softwares are usually based on a final stage, but lack some explanations of all the painful stories in between a migration from old and big architectures to modern ones.
And finally, I'd like to contribute my 2 cents to the community which always helps.
This repository contains simple labs. Please remember that Envoy, Consul and other tools used in these labs are VERY complex. These labs are not an explanation on how to use these tools but an approximation on how they work to understand them.
The lab environment is created using Vagrant over Virtualbox. So you will need some tools installed in your computer. Also, even it's not mandatory, if you already have some knowledge about Envoy and Service discovery tools like Consul it may help.
- Linux OS: Actually I'm using Debian, but any linux distro will do the job. If you don't use linux, you may need to tweak the Vagrantfile provided in this repository.
- Virtualbox: Used by Vagrant to create the lab Virtual Machines.
- Vagrant: this is an awesome tool by Hashicorp used to set up development environments easily.
Below there is a list of some documentation that may help during these labs.
All the software above is used either to set up the lab or to practice with its configuration.
You'll find some labs in this repository. Each lab has the following file/directory structure:
- README.md: to explain the lab and its contents and details.
- Configuration folders: you may find some folders which contain configuration files for each tool used in the laboratory. For example an envoy or consul folder with some configuration files that you should use in the lab to run them.
Right now this repository have the labs listed below:
- lab1_plain_text_config: where you'll configure Envoy using a static configuration file.
- lab2_integrating_consul_and_envoy: where you will run Consul and Envoy together.
- lab3_consul_traffic_balancing_with_envoy: where you will play with Consul traffic management.
You will only need to run the following command:
$ vagrant up
It will prepare three virtual machines with the following software installed:
- Envoy: you'll find it installed at /opt/getenvoy folder
- Nginx: up and running in port 80 of each node.
- Extra tools: like strace, netstat, net-tools or vim, please edit the Vagrantfile and include or change them for any tools you are comfortable with.
Once Vagrant finishes you should have a set up with the following nodes:
- node-3: with ip 172.28.128.3
- node-4: with ip 172.28.128.4
- node-5: with ip 172.28.128.5
Now you may SSH to the nodes:
ζ vagrant status
Current machine states:
node-3 running (virtualbox)
node-4 running (virtualbox)
node-5 running (virtualbox)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.
ζ # SSH into node-3
ζ vagrant ssh node-3
Last login: Thu Apr 9 19:05:29 2020 from 10.0.2.2
[vagrant@localhost ~]$ cd /opt/consul/bin/
[vagrant@localhost bin]$ ls
consul
- Gigigotrek for all the feedback and help to make this lab useful.