Skip to content
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

User guide gRPC #2108

Merged
merged 3 commits into from
Sep 16, 2017
Merged

User guide gRPC #2108

merged 3 commits into from
Sep 16, 2017

Conversation

juliens
Copy link
Member

@juliens juliens commented Sep 12, 2017

A example on how to use gRPC with self-signed certficate

@juliens juliens force-pushed the doc/user-guide-grpc branch 2 times, most recently from 5460042 to a95fa3b Compare September 12, 2017 09:35
Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juliens
Many thanks for the user guide.

A few comments.

mkdocs.yml Outdated
@@ -93,4 +93,6 @@ pages:
- 'Marathon': 'user-guide/marathon.md'
- 'Key-value Store Configuration': 'user-guide/kv-config.md'
- 'Clustering/HA': 'user-guide/cluster.md'
- 'Let''s Encrypt & Docker': 'user-guide/docker-and-lets-encrypt.md'
- 'gRPC Example': 'user-guide/grpc.md'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's encrypt entry is already described above.

@@ -0,0 +1,136 @@
# gRPC example

This section explains how to use Traefik has reverse proxy for gRPC application with self-signed certificates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Traefik/Træfik/ s/has/as/


!!! warning
Has gRPC needs HTTP2, we need to have valid HTTPS on both gRPC Server and Traefik.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/has/as ?

we need to have valid HTTPS on

=> we need valid HTTPS certificates on ?

That will prompt for information, the important answer is
```
Common Name (e.g. server FQDN or YOUR name) []: backend.local
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe show the command line with all information to key (with fake values) and add a note to explain the importance of the CN value?

# Set our CSR variables
SUBJ="
C=FR
ST=MP
O=
localityName=Toulouse
commonName=$DOMAIN
organizationalUnitName=Traefik
emailAddress=
"
 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -subj "$(echo -n "$SUBJ" | tr "\n" "/")" -keyout ./backend.key -out ./backend.crt

(command to check)

with
```
Common Name (e.g. server FQDN or YOUR name) []: frontend.local
```
Copy link
Contributor

@nmengin nmengin Sep 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above for the subject argument

## Traefik configuration

At last, we configure our Traefik to use the both self-signed certificate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Traefik/Træfik/

our Traefik to

=> our Træfik instance to ?

## Conclusion

We don't need specific configuration to use gRPC in Traefik, we just need to be careful that all the exchange (between client and Traefik, and between Traefik and backend) are valid HTTPS communication (no InsecureSkipVerify) because gRPC use HTTP2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Traefik/Træfik/
s/exchange/exchanges/ ?
s/communication/communications/ ?

no InsecureSkipVerify

=> without the skipInsecureVerify option enabled


!!! warning
In order to use this gRPC example, we need to modify it in order to use HTTPS

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to modify it in order to use HTTPS

we need to modify it to use HTTPS

(in order to twice in the sentence)

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 📖

Even if you don't want my wonderful command line 😉

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@timoreimann timoreimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, one question.


## Træfik configuration

At last, we configure our Træfik instance to use the both self-signed certificate.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little grammar improvement:

use the both self-signed certificate -> use both self-signed certificates

As gRPC needs HTTP2, we need valid HTTPS certificates on both gRPC Server and Træfik.

<p align="center">
<img src="/img/grpc.svg" alt="gRPC architecture" title="gRPC architecture" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it need to be /docs/img/grpc.svg? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ldez ldez force-pushed the doc/user-guide-grpc branch from 3a02f13 to d256ab0 Compare September 15, 2017 23:33
@traefiker traefiker merged commit 3942f33 into traefik:v1.4 Sep 16, 2017
@juliens juliens deleted the doc/user-guide-grpc branch January 25, 2018 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants