-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: example configurations #38
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is '_' here for?
to 'create and manage' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's sphinx syntax for external links. See docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a typo, will fix.