How to install Envoy Proxy on Ubuntu 18

Reading Time: 5 minutes

Today we will demonstrate how to install Envoy Proxy on Ubuntu. 

Envoy is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures. Built on the learnings of solutions such as NGINX, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner.

envoyproxy.io/

Envoy was fashioned mainly for microservices and systems using NginX and HAProxy in a mesh-based environment. It includes options for hot restarts, resilience, observability, as well as an advanced load balancing system. Envoy Proxy works well with all application and networks, providing standardized functions regardless of the platform. Envoy also works well with distributed architectures, using built in high-availability concepts which exposing dynamic APIs for configuration. Traditionally, proxies have been configured using static configuration files. Envoy, however supporting a static configuration model, which allows for configurations to be set via gRPC/protobuf API’s. This makes management at scale easier, and also allows Envoy to work better in environments with transient services.

Advantages of Using Envoy Proxy

Here are some advantages of using Envoy Proxy:

  • We do not need to embed Envoy within the application’s architecture as it works autonomously on the server.
  • Envoy can be used in on minimally sized servers as it only takes a small amount of RAM to operate. Envoy also works in conjunction with any programming language or framework.
  • Envoy Proxy supports both HTTP/ 1.1 and HTTP/ 2, as well as gRPC.
  • It also supports advanced load balancing features, including automatic retries, open circuit, global speed limit, and query shadowing.
  • Additionally, Envoy provides a robust API for detailed configuration management.
  • Lastly, Envoy provides Layer 7 traffic monitoring, built-in support for distributed tracing, and observability of mongodb, dynamodb, and many other applications.

Installation

Let’s begin the installation. First, we need to update our OS and server software to ensure we are fully upgraded to the latest versions.

root@host:~# apt -y update && apt -y upgrade
Hit:1 http://by.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://by.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://by.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done                                  
Building dependency tree   	
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree   	
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  efibootmgr fonts-liberation2 fonts-opensymbol gir1.2-geocodeglib-1.0
  gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gudev-1.0
  gir1.2-udisks-2.0 grilo-plugins-0.3-base gstreamer1.0-gtk3
  libboost-date-time1.65.1 libboost-filesystem1.65.1 libboost-iostreams1.65.1
  libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5
  libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0
  libe-book-0.1-1 libedataserverui-1.2-2 libeot0 libepubgen-0.1-1
  libetonyek-0.1-1 libevent-2.1-6 libexiv2-14 libfreerdp-client2-2
  libfreerdp2-2 libfwup1 libgc1c2 libgee-0.8-2 libgexiv2-2 libgom-1.0-0
  libgpgmepp6 libgpod-common libgpod4 liblangtag-common liblangtag1
  liblirc-client0 libllvm8 liblua5.3-0 libmediaart-2.0-0 libmspub-0.1-1
  libodfgen-0.1-1 libqqwing2v5 libraw16 librevenge-0.0-0 libsgutils2-2
  libssh-4 libsuitesparseconfig5 libvncclient1 libwayland-egl1-mesa
  libwinpr2-2 libxapian30 libxmlsec1 libxmlsec1-nss lp-solve
  media-player-info python3-mako python3-markupsafe syslinux syslinux-common
  syslinux-legacy usb-creator-common
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@host:~#
Note:
We strongly recommend you reboot the server after this step.

After the reboot, we will install the underlying dependencies that are necessary for Envoy to run.

root@host:~# apt-get install -y pt-transport-https a-certificates curl gnupg-agent software-properties-common

Reading package lists... Done
Building dependency tree   	
Reading state information... Done
ca-certificates is already the newest version (20180409).
ca-certificates set to manually installed.
software-properties-common is already the newest version (0.96.24.32.12).
software-properties-common set to manually installed.
The following packages were automatically installed and are no longer required:
  efibootmgr fonts-liberation2 fonts-opensymbol gir1.2-geocodeglib-1.0
  gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gudev-1.0
  gir1.2-udisks-2.0 grilo-plugins-0.3-base gstreamer1.0-gtk3
  libboost-date-time1.65.1 libboost-filesystem1.65.1 libboost-iostreams1.65.1
  libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5
  libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0
  libe-book-0.1-1 libedataserverui-1.2-2 libeot0 libepubgen-0.1-1
  libetonyek-0.1-1 libevent-2.1-6 libexiv2-14 libfreerdp-client2-2
  libfreerdp2-2 libfwup1 libgc1c2 libgee-0.8-2 libgexiv2-2 libgom-1.0-0
  libgpgmepp6 libgpod-common libgpod4 liblangtag-common liblangtag1
  liblirc-client0 libllvm8 liblua5.3-0 libmediaart-2.0-0 libmspub-0.1-1
  libodfgen-0.1-1 libqqwing2v5 libraw16 librevenge-0.0-0 libsgutils2-2
  libssh-4 libsuitesparseconfig5 libvncclient1 libwayland-egl1-mesa
  libwinpr2-2 libxapian30 libxmlsec1 libxmlsec1-nss lp-solve
  media-player-info python3-mako python3-markupsafe syslinux syslinux-common
  syslinux-legacy usb-creator-common
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  apt-transport-https curl gnupg-agent libcurl4
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 380 kB of archives.
After this operation, 1.234 kB of additional disk space will be used.
Get:1 http://by.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.12 [1.692 B]
Get:2 http://by.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.8 [214 kB]
Get:3 http://by.archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.8 [159 kB]
Get:4 http://by.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 gnupg-agent all 2.2.4-1ubuntu1.2 [4.880 B]
Fetched 380 kB in 0s (5.718 kB/s)   	
Selecting previously unselected package apt-transport-https.
(Reading database ... 172938 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.12_all.deb ...
Unpacking apt-transport-https (1.6.12) ...
Selecting previously unselected package libcurl4:amd64.
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.8_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.8) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.58.0-2ubuntu3.8_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.8) ...
Selecting previously unselected package gnupg-agent.
Preparing to unpack .../gnupg-agent_2.2.4-1ubuntu1.2_all.deb ...
Unpacking gnupg-agent (2.2.4-1ubuntu1.2) ...
Setting up apt-transport-https (1.6.12) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.8) ...
Setting up gnupg-agent (2.2.4-1ubuntu1.2) ...
Setting up curl (7.58.0-2ubuntu3.8) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@host:~#

Next, we want to import the GPG key needed to verify the integrity of the apt package.

root@host:~# curl -sL 'https://getenvoy.io/gpg' | apt-key add -
OK
root@host:~#

Now, we want to double-check the fingerprint key to ensure the file is authentic and has not been tampered with in any way.

root@host:~# apt-key fingerprint 6FF974DB
pub   rsa4096 2019-03-01 [SC]
  	5270 CEAC 57F6 3EBD 9EA9  005D 0253 D0B2 6FF9 74DB
uid       	[ unknown] GetEnvoy <getenvoy@tetrate.io>
sub   rsa4096 2019-03-01 [E]
 
root@host:~#

Next, we can add the Envy repository from which we will install the software.

root@host:~# add-apt-repository "deb [arch=amd64] https://dl.bintray.com/tetrate/getenvoy-deb $(lsb_release -cs) stable"

Hit:1 http://by.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://by.archive.ubuntu.com/ubuntu bionic-updates InRelease        	
Hit:3 http://by.archive.ubuntu.com/ubuntu bionic-backports InRelease      	
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease         	
Ign:5 https://dl.bintray.com/tetrate/getenvoy-deb bionic InRelease        	
Get:6 https://dl.bintray.com/tetrate/getenvoy-deb bionic Release [5.356 B]
Get:7 https://dl.bintray.com/tetrate/getenvoy-deb bionic Release.gpg [821 B]
Get:8 https://dl.bintray.com/tetrate/getenvoy-deb bionic/stable amd64 Packages [1.611 B]
Fetched 7.788 B in 1s (9.353 B/s)     
Reading package lists... Done
root@host:~#

Now, let’s update our available OS packages, and then we can install Envy using apt-get.

root@host:~# apt-get update

Hit:1 http://by.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://by.archive.ubuntu.com/ubuntu bionic-updates InRelease        	
Hit:3 http://by.archive.ubuntu.com/ubuntu bionic-backports InRelease      	
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease         	
Ign:5 https://dl.bintray.com/tetrate/getenvoy-deb bionic InRelease        	
Get:6 https://dl.bintray.com/tetrate/getenvoy-deb bionic Release [5.356 B]
Fetched 5.356 B in 1s (9.339 B/s)              	
Reading package lists... Done
root@host:~#

Next, we will start the actual software installation.

root@host:~# apt-get install -y getenvoy-envoy

Reading package lists... Done
Building dependency tree   	
Reading state information... Done
The following packages were automatically installed and are no longer required:
  efibootmgr fonts-liberation2 fonts-opensymbol gir1.2-geocodeglib-1.0
  gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gudev-1.0
  gir1.2-udisks-2.0 grilo-plugins-0.3-base gstreamer1.0-gtk3
  libboost-date-time1.65.1 libboost-filesystem1.65.1 libboost-iostreams1.65.1
  libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5
  libclucene-core1v5 libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0
  libe-book-0.1-1 libedataserverui-1.2-2 libeot0 libepubgen-0.1-1
  libetonyek-0.1-1 libevent-2.1-6 libexiv2-14 libfreerdp-client2-2
  libfreerdp2-2 libfwup1 libgc1c2 libgee-0.8-2 libgexiv2-2 libgom-1.0-0
  libgpgmepp6 libgpod-common libgpod4 liblangtag-common liblangtag1
  liblirc-client0 libllvm8 liblua5.3-0 libmediaart-2.0-0 libmspub-0.1-1
  libodfgen-0.1-1 libqqwing2v5 libraw16 librevenge-0.0-0 libsgutils2-2
  libssh-4 libsuitesparseconfig5 libvncclient1 libwayland-egl1-mesa
  libwinpr2-2 libxapian30 libxmlsec1 libxmlsec1-nss lp-solve
  media-player-info python3-mako python3-markupsafe syslinux syslinux-common
  syslinux-legacy usb-creator-common
Use 'apt autoremove' to remove them.

The following NEW packages will be installed:
  getenvoy-envoy
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 8.343 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://dl.bintray.com/tetrate/getenvoy-deb bionic/stable amd64 getenvoy-envoy amd64 1.13.1.p0.gb67c140-1p58.g95766ea [8.343 kB]
Fetched 8.343 kB in 1s (6.186 kB/s)     	
Selecting previously unselected package getenvoy-envoy.
(Reading database ... 172959 files and directories currently installed.)
Preparing to unpack .../getenvoy-envoy_1.13.1.p0.gb67c140-1p58.g95766ea_amd64.deb ...
Unpacking getenvoy-envoy (1.13.1.p0.gb67c140-1p58.g95766ea) ...
Setting up getenvoy-envoy (1.13.1.p0.gb67c140-1p58.g95766ea) ...
root@host:~#

We can now verify the version of Envoy installed.

root@host:~# envoy --version
 
envoy  version: b67c14052c49890a7e3afe614d50979c346c024b/1.13.1/clean-getenvoy-95766ea-envoy/RELEASE/BoringSSL
 
root@host:~#

Conclusion

Today we’ve learned what Envoy Proxy is, why it is needed, and where it is best utilized. We have acquainted ourselves with how to install it, and what commands to apply. Further reading about the envoyproxy configuration settings can be found at their website.

Would you like to know more about this software option and how it can fit into your platform? Reach out to one of our knowledgeable Solutions Team at 800.580.4985, or open a chat or ticket with us to learn more about our dedicated server options in which this software can be best utilized!

Author Bio

About the Author: Ellen Sletton

I'm 23 years old Linux Tech who always takes NO as Next Opportunity. Every day I'm trying to learn something new and share my knowledge with others. My free time I spend with my dog Emil or doing some UI/UX design or simply making an inspiring photo for my blog :)

Sharing knowledge helps me generate new ideas and stay motivated.

Refer a friend and get hosting credit!