Building Custom Gloo

TheTool supports building a lean Gloo, that only contains desired features without bloat. It also suports the addition of user-contributed plugins.

A Lean Gloo

TheTool allows you to build a lean Gloo by disabling the features you don't need.

You can get a list of available features by using the list command.

thetool list

This will show all the features that are available and whether they are enabled or disabled.

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             aws_lambda
Gloo Directory:   aws
Envoy Directory:  aws/envoy
Enabled:          true

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             google_functions
Gloo Directory:   google
Envoy Directory:  google/envoy
Enabled:          true

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             kubernetes
Gloo Directory:   kubernetes
Envoy Directory:  
Enabled:          true

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             transformation
Gloo Directory:   transformation
Envoy Directory:  transformation/envoy
Enabled:          true

You can disable a feature by passing the name of the feature to the disable command.

thetool disable -n google_functions

You can verify the feature is disabled by listing the features.

thetool list
Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             aws_lambda
Gloo Directory:   aws
Envoy Directory:  aws/envoy
Enabled:          true

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             google_functions
Gloo Directory:   google
Envoy Directory:  google/envoy
Enabled:          false

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             kubernetes
Gloo Directory:   kubernetes
Envoy Directory:  
Enabled:          true

Repository:       https://github.com/solo-io/gloo-plugins.git
Name:             transformation
Gloo Directory:   transformation
Envoy Directory:  transformation/envoy
Enabled:          true

You can enable a disabled feature using the enable command.

Once you have selected the set of features you want to build Gloo with, you can proceed to build and deploy with build and deploy commands respectively.

Different Version of Gloo

Changing the version of Gloo

You can change the version of Gloo using the configure command. If you call the configure command without any arguments, it shows the current configuration.

thetool configure
Work Dir            : repositories
Docker User         : axhixh
Envoy Builder Hash  : 6153d9787cb894c2dd6b17a1539eaeba88ae15d79f66f63eec0f4713436d74f0
Envoy Hash          : f79a62b7cc9ca55d20104379ee0576617630cdaa
Gloo Chart Hash     : b40c791412bd0c72be28cfb9c761ca9d71e604aa
Gloo Chart Repo     : https://github.com/solo-io/gloo-install.git
Gloo Hash           : cf08737718cf62bf597f88aa2068c6f6b28b9992
Gloo Repo           : https://github.com/solo-io/gloo.git

To use a different version of Gloo we can change the commit hash of Gloo.

thetool configure --gloo-hash 92c98f792ca466dbfee9e4d61a02ddf28ebe3715
Work Dir            : repositories
Docker User         : axhixh
Envoy Builder Hash  : 6153d9787cb894c2dd6b17a1539eaeba88ae15d79f66f63eec0f4713436d74f0
Envoy Hash          : f79a62b7cc9ca55d20104379ee0576617630cdaa
Gloo Chart Hash     : b40c791412bd0c72be28cfb9c761ca9d71e604aa
Gloo Chart Repo     : https://github.com/solo-io/gloo-install.git
Gloo Hash           : 92c98f792ca466dbfee9e4d61a02ddf28ebe3715
Gloo Repo           : https://github.com/solo-io/gloo.git

Changing the version of Gloo plugins

You can get a list of Gloo feature repositories using the list-repo command. By default, TheTool initializes with https://github.com/solo-io/gloo-plugins.git as a single Gloo feature repository.

thetool list-repo
Repository:  https://github.com/solo-io/gloo-plugins.git
Commit:      282a844ea3ed2527f5044408c9c98bc7ee027cd2

You can use the update command to update the commit hash of any feature repository. To update the commit hash of the default feature repository we can use the command:

thetool update -r https://github.com/solo-io/gloo-plugins.git -c bf260ff8a0d110ba9e43463f0a08445f4e858f8b
Updated repository https://github.com/solo-io/gloo-plugins.git to commit hash bf260ff8a0d110ba9e43463f0a08445f4e858f8b

You can verify it updated by getting the list of feature repository.

thetool list-repo
Repository:  https://github.com/solo-io/gloo-plugins.git
Commit:      bf260ff8a0d110ba9e43463f0a08445f4e858f8b

You can now build a new version of Gloo with updated plugins using build command.

Gloo with User-contributed Plugins

TheTool will also help you build Gloo with user contributed features. A Gloo feature consists of a Gloo plugin and/or an Envoy filter.

The first thing you need to do is add a repository with user contributed features.

You can add or remove your feature repository using add and delete commands.

thetool add -r https://github.com/axhixh/gloo-magic.git -c 37a53fefe0a267fe3f4704c35e3721a4b6032f2a

You can verify by looking at the repository list with list-repo command.

thetool list-repo
Repository:  https://github.com/solo-io/gloo-plugins.git
Commit:      7bff2ff6c6ee707d8c09100de0bb7f869bd7488d

Repository:  https://github.com/axhixh/gloo-magic.git
Commit:      7bff2ff6c6ee707d8c09100de0bb7f869bd7488d

When you add a Gloo feature repository, it loads the file features.json in the root folder to find what features are available. It uses the file to identify the gloo plugin folder and envoy filter folder for the feature. A sample features.json is available atgloo-plugins repository.

Once the repository is added, you can use enable and disable command to select the features you want to build Gloo with before running the build command.