This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
Added console basic routing guide #111
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8fbe00c
Added console basic routing guide
scranton 0b1c518
Added console basic routing link
scranton a22cf79
Updated images to 0.10.7, and tweaked text
scranton 642d4da
image cleanpu
scranton 8d5caf6
more image cleanup
scranton f1d0ad4
image cleanup
scranton d12371b
fixed spelling
scranton File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,144 @@ | ||
--- | ||
title: Basic Routing in Gloo Enterprise Console (Enterprise) | ||
weight: 1 | ||
--- | ||
|
||
This is a quick walk through guide on using the Gloo Enterprise Console. This guide will show you how to create a route | ||
rules (proxy) to a monolith application, and then re-directing a page request to a new microservice. | ||
|
||
## Route Rule to an Existing Application | ||
|
||
This example will show creating route rules in Gloo to a "Lift and Shift" monolith application hosted in Kubernetes. | ||
|
||
1. Install example application into your Kubernetes cluster. This is the classic Spring PetClinic application that has been moved into a container. | ||
|
||
```bash | ||
kubectl apply \ | ||
--namespace default \ | ||
--filename https://raw.githubusercontent.com/solo-io/gloo/master/example/petclinic/petclinic.yaml | ||
``` | ||
|
||
1. Open the Gloo Enterprise console | ||
|
||
* If you're running `minikube`, the quick way to open the Gloo Enterprise Console is the following command, which | ||
will automatically open the console in a browser window. | ||
|
||
```bash | ||
minikube service --namespace gloo-system apiserver-ui | ||
``` | ||
|
||
You can use the `--url` option to see the url. | ||
|
||
```bash | ||
minikube service --namespace gloo-system apiserver-ui --url | ||
``` | ||
|
||
* Otherwise, you can get your Kubernetes Cluster IP using `kubectl cluster-info`. In this example, my Cluster IP is | ||
`192.168.99.102`; where the Kubernetes master is running. | ||
|
||
```bash | ||
kubectl cluster-info | ||
|
||
Kubernetes master is running at https://192.168.99.102:8443 | ||
KubeDNS is running at https://192.168.99.102:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy | ||
|
||
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. | ||
``` | ||
|
||
And the console port number using the following. In this example, the port number is `31242`. | ||
|
||
``` bash | ||
kubectl get service --namespace gloo-system apiserver-ui | ||
|
||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
apiserver-ui NodePort 10.97.69.208 <none> 8088:31242/TCP 129m | ||
``` | ||
|
||
So to open the Gloo Enterprise Console, in this example, I'd open a browser to `192.168.99.102:31242`. | ||
|
||
1. Your console should look something like the following. | ||
|
||
![Basic Console](../basic_console.png "Basic Console") | ||
|
||
1. Create a new Virtual Service. | ||
|
||
* Click on the `Create Virtual Service +` link in the upper right corner of the console. | ||
|
||
![Create Virtual Service](../create_virtual_service.png "Create Virtual Service") | ||
|
||
* In the New Virtual Service pop up, enter the following information. | ||
|
||
* Name: `default` | ||
* Add Domain: `*` and click on `+` | ||
* Namespace: `gloo-system` | ||
* Click Submit | ||
|
||
![New Virtual Service](../new_virtual_service.png "New Virtual Service") | ||
|
||
1. Add a route by right clicking in the `DEFAULT` Virtual Service, and selecting `New Route` in the pop up. | ||
|
||
![Add Route](../add_route.png "Add Route") | ||
|
||
* In the New Route pop up, enter the following information. | ||
|
||
* Virtual Service: `default` | ||
* Path: `/` | ||
* Upstream Name: `default-petclinic-8080` | ||
* Click Submit | ||
|
||
![New Route](../new_route.png "New Route") | ||
|
||
1. Test the route. | ||
|
||
* Get Gloo gateway url. The following command will return the base url for the Gloo Gateway proxy. Since we setup | ||
our route rules for `/` for the petclinic app, you can open your browser to the url returned by the following | ||
command. | ||
|
||
```bash | ||
glooctl proxy url | ||
``` | ||
|
||
* You should see the petclinic app in your browser | ||
|
||
![petclinic](../petclinic.png "petclinic") | ||
|
||
## Routing Rule to Redirect a Page Request in an Existing Application | ||
|
||
In the petclinic application, if you click on the `Veterinarians` tab you will see a table with 2 columns. Let's say | ||
that our team created a new microservice `petclinic-vet` that returns a new 3 column table with additional information | ||
our customers want. This example will show how to redirect a page (HTTP GET) request such that we can enhance the | ||
functionality of our application **without** needing to change the original monolithic petclinic application. This | ||
allows you to provide new functionality independent of efforts to change original code. | ||
|
||
![Petclinic Veterinarians](../petclinic-vet-original.png "Petclinic Veterinarians") | ||
|
||
Let's create a new route rule to redirect requests to `/vets` to our new microservice | ||
|
||
1. On the Catalog tab of the Gloo Enterprise Console, right click on the `DEFAULT` Virtual Service to add a new route. | ||
|
||
![Add Route](../add_route.png "Add Route") | ||
|
||
* In the New Route pop up, enter the following information. | ||
|
||
* Virtual Service: `default` | ||
* Path: `/vets` | ||
* Ensure Match type is set to `PREFIX` (default) | ||
* Upstream Name: `default-petclinic-vets-8080` | ||
* Click Submit | ||
|
||
![New Route Vet](../new_route_vets.png "New Route Vet") | ||
|
||
1. On the Routes tab of the Console, on the `default` Virtual Service expand the routes, and re-order the routes so that | ||
`/vets` is first. That way the `/vets` path prefix will be matched before `/`. | ||
|
||
![Reorder Routes](../reorder_routes.png "Reorder Routes") | ||
|
||
1. Test the new route by refreshing the petclinic app, and clicking on the `VETERINARIANS` tab. If the redirect route | ||
rule is working correctly, you should now see 3 columns in the Veterinarians table. | ||
|
||
![petclinic Vet New](../petclinic_vet_new.png "Petclinic Vet New") | ||
|
||
## Summary | ||
|
||
This guide hopefully gave you a taste for how Gloo Enterprise can help you solve some of your challenges. Please | ||
look at the rest of our documentation for more information on using Gloo. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
There are a few spots in here where the first person voice feels a bit much -- "I'd open a browser", "my cluster IP". I would change these to something like:
"So to open the Gloo Enterprise Console, navigate to
...
in the browser. ""In this example, the Cluster IP is
...
"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.
In general I think technical docs are usually in 3rd person / passive voice, but I don't really mind the rest (not worth changing all the "you"s, etc) especially as a user guide