-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ca1b28
commit 2e60a86
Showing
7 changed files
with
110 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,51 @@ | ||
{% import 'routing_helper.template.json' as helper with context -%} | ||
|
||
{ | ||
"virtual_hosts": [] | ||
"virtual_hosts": [ | ||
{ | ||
"name": "www", | ||
"require_ssl": "all", | ||
"domains": ["www.yourcompany.net"], | ||
"routes": [ | ||
{ | ||
"prefix": "/foo/bar", | ||
"runtime": { | ||
"key": "routing.www.use_service_2", | ||
"default": 0 | ||
}, | ||
{{ helper.make_route('service2') }} | ||
}, | ||
{ | ||
"prefix": "/", | ||
{{ helper.make_route('service1') }} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "www_redirect", | ||
"require_ssl": "all", | ||
"domains": ["wwww.yourcompany.net"], | ||
"routes": [ | ||
{ | ||
"prefix": "/", | ||
"host_redirect": "www.yourcompany.net" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "api", | ||
"require_ssl": "external_only", | ||
"domains": ["api.yourcompany.net"], | ||
"routes": [ | ||
{ | ||
"path": "/foo/bar", | ||
{{ helper.make_route('service3') }} | ||
}, | ||
{ | ||
"prefix": "/", | ||
{{ helper.make_route('service1') }} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,52 @@ | ||
.. _install_ref_configs: | ||
|
||
Reference configurations | ||
======================== | ||
|
||
FIXFIX | ||
The source distribution includes a set of example configuration templates for each of the three | ||
major Envoy deployment types: | ||
|
||
* :ref:`Service to service <deployment_type_service_to_service>` | ||
* :ref:`Front proxy <deployment_type_front_proxy>` | ||
* :ref:`Double proxy <deployment_type_double_proxy>` | ||
|
||
The goal of this set of example configurations is to demonstrate the full capabilities of Envoy in | ||
a complex deployment. All features will not be applicable to all use cases. For full documentation | ||
see the :ref:`configuration reference <config>`. | ||
|
||
Configuration generator | ||
----------------------- | ||
|
||
Envoy configurations can become relatively complicated. At Lyft we use `jinja | ||
<http://jinja.pocoo.org/>`_ templating to make the configurations easier to create and manage. The | ||
source distribution includes a version of the configuration generator that loosely approximates what | ||
we use at Lyft. We have also included three example configuration templates for each of the above | ||
three scenarios. | ||
|
||
* Generator script: :repo:`configs/configgen.py` | ||
* Service to service template: :repo:`configs/envoy_service_to_service.template.json` | ||
* Front proxy template: :repo:`configs/envoy_front_proxy.template.json` | ||
* Double proxy template: :repo:`configs/envoy_double_proxy.template.json` | ||
|
||
To generate the example configurations run the following from the root of the repo: | ||
|
||
.. code-block:: console | ||
mkdir -p generated/configs | ||
configs/configgen.sh generated/configs | ||
The previous command will produce three fully expanded configurations using some variables | ||
defined inside of `configgen.py`. See the comments inside of `configgen.py` for detailed | ||
information on how the different expansions work. | ||
|
||
configgen | ||
--------- | ||
A few notes about the example configurations: | ||
|
||
FIXFIX | ||
* An instance of :ref:`service discovery service <arch_overview_service_discovery_sds>` is assumed | ||
to be running at `discovery.yourcompany.net`. | ||
* DNS for `yourcompany.net` is assumed to be setup for various things. Search the configuration | ||
templates for different instances of this. | ||
* Tracing is configured for `LightStep <http://lightstep.com/>`_. To disable this delete the | ||
:ref:`tracing configuration <config_tracing>`. | ||
* The configuration demonstrates the use of a :ref:`global rate limiting service | ||
<arch_overview_rate_limit>`. To disable this delete the :ref:`rate limit configuration | ||
<config_rate_limit_service>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters