mirror of https://github.com/istio/istio.io.git
Rename demos to samples and use paths relative to root of the installation (#207)
* Rename demos to samples * Use paths relative to the root * Use paths relative to the root * Use relative paths * Put back istioctl instr
This commit is contained in:
parent
a7e3e348da
commit
4d2d209e25
|
|
@ -449,7 +449,7 @@ manifests:
|
|||
## Examples
|
||||
|
||||
You can find fully formed examples of Mixer configuration by visiting the [Samples]({{home}}/docs/samples). As
|
||||
a specific example, here is the [BookInfo configuration](https://raw.githubusercontent.com/istio/istio/master/demos/mixer-config-quota-bookinfo.yaml).
|
||||
a specific example, here is the [BookInfo configuration](https://raw.githubusercontent.com/istio/istio/master/samples/mixer-config-quota-bookinfo.yaml).
|
||||
|
||||
## Configuration API
|
||||
|
||||
|
|
|
|||
|
|
@ -46,25 +46,18 @@ This application is polyglot, i.e., the microservices are written in different l
|
|||
|
||||
## Start the application
|
||||
|
||||
1. Source the Istio configuration file from the root of the installation directory:
|
||||
1. Change directory to the root of the Istio installation directory.
|
||||
|
||||
1. Source the Istio configuration file:
|
||||
|
||||
```bash
|
||||
cd istio
|
||||
```
|
||||
```bash
|
||||
source istio.VERSION
|
||||
```
|
||||
|
||||
1. Change your current working directory to the `bookinfo` application directory:
|
||||
|
||||
```bash
|
||||
cd demos/apps/bookinfo
|
||||
```
|
||||
|
||||
1. Bring up the application containers:
|
||||
|
||||
```bash
|
||||
kubectl apply -f <(istioctl kube-inject -f bookinfo.yaml)
|
||||
kubectl apply -f <(istioctl kube-inject -f samples/apps/bookinfo/bookinfo.yaml)
|
||||
```
|
||||
|
||||
The above command launches four microservices and creates the gateway
|
||||
|
|
@ -155,6 +148,11 @@ This application is polyglot, i.e., the microservices are written in different l
|
|||
gcloud compute firewall-rules create allow-book --allow tcp:31201
|
||||
```
|
||||
|
||||
If loadbalancers are not supported, or the ADDRESS field remains empty, use the service NodePort instead:
|
||||
```bash
|
||||
export GATEWAY_URL=$(kubectl get po -l istio=ingress -o jsonpath={.items[0].status.hostIP}):$(kubectl get svc istio-ingress -o jsonpath={.spec.ports[0].nodePort})
|
||||
```
|
||||
|
||||
1. Confirm that the BookInfo application is running by opening in your browser http://$GATEWAY_URL/productpage , or with the following `curl` command:
|
||||
|
||||
```bash
|
||||
|
|
@ -248,7 +246,7 @@ inject faults, rate limit services, etc..
|
|||
1. Delete the routing rules and terminate the application pods
|
||||
|
||||
```bash
|
||||
./cleanup.sh
|
||||
samples/apps/bookinfo/cleanup.sh
|
||||
```
|
||||
|
||||
1. Confirm shutdown
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ This task shows how to use Istio to control access to a service.
|
|||
commands:
|
||||
|
||||
```bash
|
||||
istioctl create -f route-rule-all-v1.yaml
|
||||
istioctl replace -f route-rule-reviews-v2-v3.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-all-v1.yaml
|
||||
istioctl replace -f samples/apps/bookinfo/route-rule-reviews-v2-v3.yaml
|
||||
```
|
||||
|
||||
* Ensure that you can use [istioctl mixer]({{home}}/docs/reference/commands/istioctl/istioctl_mixer.html#synopsis) by setting up port forwarding if needed.
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ service or, alternatively, to simply enable direct calls to an external service.
|
|||
|
||||
* Start a service pod that you can use as a test source for external calls.
|
||||
Any pod that you can `exec` and `curl` from will do, for example,
|
||||
the [sleep sample](https://github.com/istio/istio/tree/master/demos/apps/sleep)
|
||||
the [sleep sample](https://github.com/istio/istio/tree/master/samples/apps/sleep)
|
||||
is a good choice.
|
||||
|
||||
## Using the Istio Egress service
|
||||
|
|
@ -119,13 +119,13 @@ The values used for internal IP range(s), however, depends on where your cluster
|
|||
For example, with Minikube the range is 10.0.0.1/24, so you would start the sleep service like this:
|
||||
|
||||
```bash
|
||||
kubectl apply -f <(istioctl kube-inject -f sleep.yaml --includeIPRanges=10.0.0.1/24)
|
||||
kubectl apply -f <(istioctl kube-inject -f samples/apps/sleep/sleep.yaml --includeIPRanges=10.0.0.1/24)
|
||||
```
|
||||
|
||||
On IBM Bluemix, use:
|
||||
|
||||
```bash
|
||||
kubectl apply -f <(istioctl kube-inject -f sleep.yaml --includeIPRanges=172.30.0.0/16,172.20.0.0/16)
|
||||
kubectl apply -f <(istioctl kube-inject -f samples/apps/sleep/sleep.yaml --includeIPRanges=172.30.0.0/16,172.20.0.0/16)
|
||||
```
|
||||
|
||||
On Google Container Engine (GKE) the ranges are not fixed, so you will
|
||||
|
|
@ -139,7 +139,7 @@ clusterIpv4Cidr: 10.4.0.0/14
|
|||
servicesIpv4Cidr: 10.7.240.0/20
|
||||
```
|
||||
```bash
|
||||
kubectl apply -f <(istioctl kube-inject -f sleep.yaml --includeIPRanges=10.4.0.0/14,10.7.240.0/20)
|
||||
kubectl apply -f <(istioctl kube-inject -f samples/apps/sleep/sleep.yaml --includeIPRanges=10.4.0.0/14,10.7.240.0/20)
|
||||
```
|
||||
|
||||
After starting your service this way, the Istio sidecar will only intercept and manage internal requests
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ This task shows how to inject delays and test the resiliency of your application
|
|||
commands:
|
||||
|
||||
```bash
|
||||
istioctl create -f route-rule-all-v1.yaml
|
||||
istioctl create -f route-rule-reviews-test-v2.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-all-v1.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-reviews-test-v2.yaml
|
||||
```
|
||||
|
||||
## Fault injection
|
||||
|
|
@ -37,7 +37,7 @@ continue without any errors.
|
|||
1. Create a fault injection rule to delay traffic coming from user "jason" (our test user)
|
||||
|
||||
```bash
|
||||
istioctl create -f destination-ratings-test-delay.yaml
|
||||
istioctl create -f samples/apps/bookinfo/destination-ratings-test-delay.yaml
|
||||
```
|
||||
|
||||
Confirm the rule is created:
|
||||
|
|
|
|||
|
|
@ -37,14 +37,20 @@ default namespace. They can be modified for deployment in a different namespace.
|
|||
|
||||
1. Go to the [Istio release](https://github.com/istio/istio/releases) page, to download the installation file corresponding to your OS.
|
||||
|
||||
2. Extract the installation file, and change directory to the location where the files were extracted. Following instructions are relative to this installation directory.
|
||||
1. Extract the installation file, and change directory to the location where the files were extracted. Following instructions are relative to this installation directory.
|
||||
The installation directory contains:
|
||||
* yaml installation files for Kubernetes
|
||||
* sample apps
|
||||
* the `istioctl` client binary, needed to inject Envoy as a sidecar proxy, and useful for creating routing rules and policies.
|
||||
* a text file containing the Istio version.
|
||||
* the istio.VERSION configuration file.
|
||||
|
||||
3. Run the following command to determine if your cluster has [RBAC (Role-Based Access Control)](https://kubernetes.io/docs/admin/authorization/rbac/)
|
||||
1. Add the `istioctl` client to your PATH. For example, run the following commands on a Mac system:
|
||||
|
||||
```bash
|
||||
sudo ln -s $PWD/istioctl /usr/local/bin/
|
||||
```
|
||||
|
||||
1. Run the following command to determine if your cluster has [RBAC (Role-Based Access Control)](https://kubernetes.io/docs/admin/authorization/rbac/)
|
||||
enabled:
|
||||
|
||||
```bash
|
||||
|
|
@ -60,7 +66,7 @@ enabled:
|
|||
kubectl apply -f install/kubernetes/istio-rbac-alpha.yaml
|
||||
```
|
||||
|
||||
4. Install Istio's core components .
|
||||
1. Install Istio's core components .
|
||||
There are two mutually exclusive options at this stage:
|
||||
|
||||
* Install Istio without enabling [Istio Auth](https://istio.io/docs/concepts/network-and-auth/auth.html) feature:
|
||||
|
|
@ -79,7 +85,7 @@ enabled:
|
|||
This command will install Istio-Manager, Mixer, Ingress-Controller, and Egress-Controller, and the Istio CA (Certificate Authority).
|
||||
|
||||
|
||||
5. *Optional:* To view metrics collected by Mixer, install [Prometheus](https://prometheus.io), [Grafana](http://staging.grafana.org) or
|
||||
1. *Optional:* To view metrics collected by Mixer, install [Prometheus](https://prometheus.io), [Grafana](http://staging.grafana.org) or
|
||||
ServiceGraph addons.
|
||||
|
||||
*Note 1*: The Prometheus addon is *required* as a prerequisite for Grafana and the ServiceGraph addons.
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ This task shows you how to use Istio to dynamically limit the traffic to a servi
|
|||
commands:
|
||||
|
||||
```bash
|
||||
istioctl create -f route-rule-all-v1.yaml
|
||||
istioctl replace -f route-rule-reviews-v2-v3.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-all-v1.yaml
|
||||
istioctl replace -f samples/apps/bookinfo/route-rule-reviews-v2-v3.yaml
|
||||
```
|
||||
* Ensure that you can use [istioctl mixer]({{home}}/docs/reference/commands/istioctl.html#istioctl-mixer) by setting up port forwading if needed.
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ route requests to all available versions of a service in a random fashion.
|
|||
1. Set the default version for all microservices to v1.
|
||||
|
||||
```bash
|
||||
istioctl create -f route-rule-all-v1.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-all-v1.yaml
|
||||
```
|
||||
|
||||
You can display the routes that are defined with the following command:
|
||||
|
|
@ -97,7 +97,7 @@ route requests to all available versions of a service in a random fashion.
|
|||
`reviews:v2` instances.
|
||||
|
||||
```bash
|
||||
istioctl create -f route-rule-reviews-test-v2.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-reviews-test-v2.yaml
|
||||
```
|
||||
|
||||
Confirm the rule is created:
|
||||
|
|
@ -140,7 +140,7 @@ to `reviews:v3` in two steps as follows:
|
|||
1. First, transfer 50% of traffic from `reviews:v1` to `reviews:v3` with the following command:
|
||||
|
||||
```bash
|
||||
istioctl replace -f route-rule-reviews-50-v3.yaml
|
||||
istioctl replace -f samples/apps/bookinfo/route-rule-reviews-50-v3.yaml
|
||||
```
|
||||
|
||||
Notice that we are using `istioctl replace` instead of `create`.
|
||||
|
|
@ -162,7 +162,7 @@ that we created exclusively for him:
|
|||
3. When version v3 of the reviews microservice is stable, route 100% of the traffic to `reviews:v3`:
|
||||
|
||||
```bash
|
||||
istioctl replace -f route-rule-reviews-v3.yaml
|
||||
istioctl replace -f samples/apps/bookinfo/route-rule-reviews-v3.yaml
|
||||
```
|
||||
|
||||
You can now log in to the `productpage` as any user and you should always see book reviews
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ This task shows you how to setup request timeouts in Envoy using Istio.
|
|||
* Initialize the application version routing by running the following command:
|
||||
|
||||
```bash
|
||||
istioctl create -f route-rule-all-v1.yaml
|
||||
istioctl create -f samples/apps/bookinfo/route-rule-all-v1.yaml
|
||||
```
|
||||
|
||||
## Request timeouts
|
||||
|
|
|
|||
Loading…
Reference in New Issue