Skip to content

Commit

Permalink
revised ingress questions
Browse files Browse the repository at this point in the history
Signed-off-by: njayp <[email protected]>
  • Loading branch information
njayp committed Sep 30, 2021
1 parent 2a1a284 commit 12ce289
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 103 deletions.
56 changes: 30 additions & 26 deletions howtos/intercepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import QSCards from '../quick-start/qs-cards'
</Alert>

## Prerequisites

You’ll need [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) or `oc` installed
and set up
([Linux](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#verify-kubectl-configuration) /
Expand Down Expand Up @@ -278,40 +277,45 @@ will be routed to your cluster as usual.

```console
$ telepresence intercept example-service --port 8080:http --env-file ~/example-service-intercept.env
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Confirm the ingress to use.
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.

1/4: What's your ingress' layer 3 (IP) address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).

[default: -]: ambassador.ambassador
[default: example-service.default]: ambassador.ambassador

2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?

[default: -]: 443
[default: 80]: 443

3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?

[default: n]: y
[default: n]: y

4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.

[default: ambassador.ambassador]: dev-environment.edgestack.me
[default: ambassador.ambassador]: dev-environment.edgestack.me

Using Deployment example-service
intercepted
Intercept name : example-service
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:8080
Service Port Identifier: http
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("<intercept id>:example-service")
Preview URL : https://<random domain name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me
```
Using Deployment example-service
intercepted
Intercept name : example-service
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:8080
Service Port Identifier: http
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("<intercept id>:example-service")
Preview URL : https://<random domain name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me

```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Start your local service as [in the previous
step](#start-local-instance).
Expand Down
47 changes: 26 additions & 21 deletions howtos/preview-urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,42 +62,47 @@ Need a sample app to try with preview URLs? Check out the <a href="../../quick-

For the example below, you will create a preview URL for `example-service` which listens on port 8080. The preview URL for ingress will use the `ambassador` service in the `ambassador` namespace on port `443` using TLS encryption and the hostname `dev-environment.edgestack.me`:

```
$ telepresence intercept example-service --port 8080 --env-file ~/ex-svc.env
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Confirm the ingress to use.
```console
$ telepresence intercept example-service --port 8080:http --env-file ~/example-service-intercept.env
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.

1/4: What's your ingress' layer 3 (IP) address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).

[default: -]: ambassador.ambassador
[default: example-service.default]: ambassador.ambassador

2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?

[default: -]: 443
[default: 80]: 443

3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?

[default: n]: y
[default: n]: y

4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.

[default: ambassador.ambassador]: dev-environment.edgestack.me
[default: ambassador.ambassador]: dev-environment.edgestack.me

Using deployment example-service
intercepted
Using Deployment example-service
intercepted
Intercept name : example-service
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:8080
Service Port Identifier: http
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("<intercept-id>:example-service")
Preview URL : https://<random-domain-name>.preview.edgestack.me
header("x-telepresence-intercept-id") ~= regexp("<intercept id>:example-service")
Preview URL : https://<random domain name>.preview.edgestack.me
Layer 5 Hostname : dev-environment.edgestack.me
```

```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Start your local environment using the environment variables retrieved in the previous step.

Expand Down
20 changes: 12 additions & 8 deletions quick-start/qs-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,25 +280,25 @@ easily share the services you’re working on with your teammates.
```
$ telepresence intercept dataprocessingservice --port 3000
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Select the ingress to use.
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.
1/4: What's your ingress' layer 3 (IP) address?
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
[no default]: verylargejavaservice.default
[default: dataprocessingservice.default]: verylargejavaservice.default
2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?
[no default]: 8080
[default: 80]: 8080
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
[default: n]:
4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.
[default: verylargejavaservice.default]:
Expand All @@ -314,6 +314,10 @@ easily share the services you’re working on with your teammates.
Layer 5 Hostname: verylargejavaservice.default
```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Wait a moment for the intercept to start; it will also output a preview URL. Go to this URL in your browser, it will be the <strong style="color:orange">orange</strong> version of the app.

5. Now go again to [http://verylargejavaservice:8080](http://verylargejavaservice:8080), it’s still <strong style="color:green">green</strong>.
Expand Down
20 changes: 12 additions & 8 deletions quick-start/qs-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,25 +274,25 @@ easily share the services you’re working on with your teammates.
```
$ telepresence intercept dataprocessingservice --port 3000
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Select the ingress to use.
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.
1/4: What's your ingress' layer 3 (IP) address?
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
[no default]: verylargejavaservice.default
[default: dataprocessingservice.default]: verylargejavaservice.default
2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?
[no default]: 8080
[default: 80]: 8080
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
[default: n]:
4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.
[default: verylargejavaservice.default]:
Expand All @@ -308,6 +308,10 @@ easily share the services you’re working on with your teammates.
Layer 5 Hostname: verylargejavaservice.default
```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Wait a moment for the intercept to start; it will also output a preview URL. Go to this URL in your browser, it will be the <strong style="color:orange">orange</strong> version of the app.

5. Now go again to [http://verylargejavaservice:8080](http://verylargejavaservice:8080), it’s still <strong style="color:green">green</strong>.
Expand Down
52 changes: 28 additions & 24 deletions quick-start/qs-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,42 +266,46 @@ easily share the services you’re working on with your teammates.
Then when asked for the port, type `8080`, for "use TLS", type `n` and finally confirm the layer 5 hostname.

```
$ telepresence intercept dataprocessingservice --port 3000
$ telepresence intercept dataprocessingservice --port 3000
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Select the ingress to use.
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.
1/4: What's your ingress' layer 3 (IP) address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
[no default]: verylargejavaservice.default
[default: dataprocessingservice.default]: verylargejavaservice.default
2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?
[no default]: 8080
[default: 80]: 8080
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
[default: n]:
[default: n]:
4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.
[default: verylargejavaservice.default]:
[default: verylargejavaservice.default]:
Using Deployment dataprocessingservice
intercepted
Intercept name : dataprocessingservice
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:3000
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("86cb4a70-c7e1-1138-89c2-d8fed7a46cae:dataprocessingservice")
Preview URL : https://<random-subdomain>.preview.edgestack.me
Layer 5 Hostname: verylargejavaservice.default
Using Deployment dataprocessingservice
intercepted
Intercept name : dataprocessingservice
State : ACTIVE
Workload kind : Deployment
Destination : 127.0.0.1:3000
Intercepting : HTTP requests that match all of:
header("x-telepresence-intercept-id") ~= regexp("86cb4a70-c7e1-1138-89c2-d8fed7a46cae:dataprocessingservice")
Preview URL : https://<random-subdomain>.preview.edgestack.me
Layer 5 Hostname: verylargejavaservice.default
```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Wait a moment for the intercept to start; it will also output a preview URL. Go to this URL in your browser, it will be the <strong style="color:orange">orange</strong> version of the app.

5. Now go again to [http://verylargejavaservice:8080](http://verylargejavaservice:8080), it’s still <strong style="color:green">green</strong>.
Expand Down
20 changes: 12 additions & 8 deletions quick-start/qs-python-fastapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,25 +265,25 @@ easily share the services you’re working on with your teammates.
```
$ telepresence intercept dataprocessingservice --port 3000
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Select the ingress to use.
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.
1/4: What's your ingress' layer 3 (IP) address?
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
[no default]: verylargejavaservice.default
[default: dataprocessingservice.default]: verylargejavaservice.default
2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?
[no default]: 8080
[default: 80]: 8080
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
[default: n]:
4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.
[default: verylargejavaservice.default]:
Expand All @@ -299,6 +299,10 @@ easily share the services you’re working on with your teammates.
Layer 5 Hostname: verylargejavaservice.default
```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Wait a moment for the intercept to start; it will also output a preview URL. Go to this URL in your browser, it will be the <strong style="color:orange">orange</strong> version of the app.

5. Go again to [http://verylargejavaservice:8080](http://verylargejavaservice:8080) and it’s still <strong style="color:green">green</strong>.
Expand Down
20 changes: 12 additions & 8 deletions quick-start/qs-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,25 +276,25 @@ easily share the services you’re working on with your teammates.
```
$ telepresence intercept dataprocessingservice --port 3000
To create a preview URL, telepresence needs to know how cluster
ingress works for this service. Please Select the ingress to use.
To create a preview URL, telepresence needs to know how requests enter
your cluster. Please Select the ingress to use.
1/4: What's your ingress' layer 3 (IP) address?
1/4: What's your ingress' IP address?
You may use an IP address or a DNS name (this is usually a
"service.namespace" DNS name).
[no default]: verylargejavaservice.default
[default: dataprocessingservice.default]: verylargejavaservice.default
2/4: What's your ingress' layer 4 address (TCP port number)?
2/4: What's your ingress' TCP port number?
[no default]: 8080
[default: 80]: 8080
3/4: Does that TCP port on your ingress use TLS (as opposed to cleartext)?
[default: n]:
4/4: If required by your ingress, specify a different layer 5 hostname
(TLS-SNI, HTTP "Host" header) to access this service.
4/4: If required by your ingress, specify a different hostname
(TLS-SNI, HTTP "Host" header) to be used in requests.
[default: verylargejavaservice.default]:
Expand All @@ -310,6 +310,10 @@ easily share the services you’re working on with your teammates.
Layer 5 Hostname: verylargejavaservice.default
```

<Alert severity="info">
These questions were modified for clarity and given defaults in release 2.4.5.
</Alert>

4. Wait a moment for the intercept to start; it will also output a preview URL. Go to this URL in your browser, it will be the <strong style="color:orange">orange</strong> version of the app.

5. Now go again to [http://verylargejavaservice:8080](http://verylargejavaservice:8080), it’s still <strong style="color:green">green</strong>.
Expand Down

0 comments on commit 12ce289

Please sign in to comment.