Getting Started

There are several ways to install Flightpath.

  • Docker Image
  • Executable Binary
  • Building From Source

Installation

Docker Image

Docker images are available for each release, you can pull the image for any tag using

1
2
# pull the image for release tag 1.2.3
docker pull gufran/flightpath:1.2.3

or you can also pull an image built from the head of master branch using latest tag. It is not recommended to use latest docker image in production since the master branch is not guaranteed to be stable or even in a working state.

Caution

Always use a specific release tag in production. The latest docker image always contains the most recent commits to master branch and expected to be highly unstable.

Executable Binary

Executable binaries can be downloaded from Github Releases page. Note that only a tagged release is available for download from the release page. There are unstable binaries that are built from master branch and can be downloaded from Github Actions Artifacts page. Simply select the build you want and download the binaries.

Info

Executable binaries are only available for Linux, MacOS and Windows operating systems with AMD64 architecture. If you want to run Flightpath on other OS or CPU architecture you should consider building from source.

Building From Source

To build from source you need to have Golang v1.13 or better installed on your machine. You can build Flightpath using

1
go get github.com/Gufran/flightpath

Binary built with go get will not have the build metadata embedded in it. If you care for build metadata then you should build with following command:

1
2
3
git clone https://github.com/Gufran/flightpath.git
cd flightpath
bash build.sh #-> will build ./flightpath

Test Flight

Flightpath depends on Consul Catalog to generate Envoy configuration. You are going to need Consul version 1.6 or better and Envoy version 1.12 or better installed before you can run Flightpath.

Caution

A docker based setup does not work properly on OSX because Docker on OSX runs on a virtualized linux host. This added layer of virtualization causes network problems in both bridged and host mode. It is possible to make it work on OSX with some effort but for now Docker is not involved.

The quick start script uses http-echo to run a simple web server. You can pull it with go get:

1
go get github.com/hashicorp/http-echo

On OSX you can install Consul and Envoy using Homebrew

1
brew install consul envoy

Once you've ensured the dependencies you can use internal/testflight.sh script to spin up an environment with following components:

  • Consul agent
  • HTTP service without connect sidecar
  • HTTP service with connect sidecar
  • Flightpath
  • Envoy

At this point you should have the address of consul UI and both the services printed in your terminal. If you go to the Consul UI you should see the web services and flightpath registered in the catalog.

You can now navigate to Service Without Connect or Service With Connect and be greeted with the static text response from http-echo service.

Feel free to browse around in Consul UI or read the internal/testflight.sh script to get an understanding of what is going on.