improved notes
This commit is contained in:
@@ -2,3 +2,32 @@
|
|||||||
|
|
||||||
With the new release of Kubernetes support for Instana, the agent install is now available as a helm [chart](https://hub.helm.sh/charts/stable/instana-agent). This is the easiest way to install the agent, however if you really want to do it by hand, template descriptors are available in the official [documentation](https://docs.instana.io/ecosystem/kubernetes/).
|
With the new release of Kubernetes support for Instana, the agent install is now available as a helm [chart](https://hub.helm.sh/charts/stable/instana-agent). This is the easiest way to install the agent, however if you really want to do it by hand, template descriptors are available in the official [documentation](https://docs.instana.io/ecosystem/kubernetes/).
|
||||||
|
|
||||||
|
# Quotas and Scaling
|
||||||
|
|
||||||
|
You can apply resource quotas to the namespace where you installed Stan's Robot Shop.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ kubectl -n robot-shop apply -f resource-quota.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
The quotas and usage are shown in the Instana Kubernetes dashboards.
|
||||||
|
|
||||||
|
Optinally you can also run the `autoscale.sh` script to configure automatic scaling of the deployments. You will need to edit the script if you did not deploy to the `robot-shop` namespace. Varying the load on the application will cause Kubernetes to scale up/down the various deployments.
|
||||||
|
|
||||||
|
# Istio
|
||||||
|
|
||||||
|
Stan's Robot Shop will run on Kubernetes with Istio service mesh. Configure Istio ingress.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ kubectl -n robot-shop apply -f Istio/gateway.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Now use the exposed Istio gateway to access Robot Shop.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ kubectl -n istio-system get svc istio-ingressgateway
|
||||||
|
```
|
||||||
|
|
||||||
|
The above will display the IP address of the Istio gateway.
|
||||||
|
|
||||||
|
**NOTE** The Instana agent only works with later versions of Istio.
|
56
README.md
56
README.md
@@ -24,22 +24,30 @@ To see the application performance results in the Instana dashboard, you will fi
|
|||||||
## Build from Source
|
## Build from Source
|
||||||
To optionally build from source (you will need a newish version of Docker to do this) use Docker Compose. Optionally edit the *.env* file to specify an alternative image registry and version tag; see the official [documentation](https://docs.docker.com/compose/env-file/) for more information.
|
To optionally build from source (you will need a newish version of Docker to do this) use Docker Compose. Optionally edit the *.env* file to specify an alternative image registry and version tag; see the official [documentation](https://docs.docker.com/compose/env-file/) for more information.
|
||||||
|
|
||||||
$ docker-compose build
|
```shell
|
||||||
|
$ docker-compose build
|
||||||
|
```
|
||||||
|
|
||||||
If you modified the *.env* file and changed the image registry, you may need to push the images to that registry
|
If you modified the *.env* file and changed the image registry, you may need to push the images to that registry
|
||||||
|
|
||||||
$ docker-compose push
|
```shell
|
||||||
|
$ docker-compose push
|
||||||
|
```
|
||||||
|
|
||||||
## Run Locally
|
## Run Locally
|
||||||
You can run it locally for testing.
|
You can run it locally for testing.
|
||||||
|
|
||||||
If you did not build from source, don't worry all the images are on Docker Hub. Just pull down those images first using:
|
If you did not build from source, don't worry all the images are on Docker Hub. Just pull down those images first using:
|
||||||
|
|
||||||
$ docker-compose pull
|
```shell
|
||||||
|
$ docker-compose pull
|
||||||
|
```
|
||||||
|
|
||||||
Fire up Stan's Robot Shop with:
|
Fire up Stan's Robot Shop with:
|
||||||
|
|
||||||
$ docker-compose up
|
```shell
|
||||||
|
$ docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
If you are running it locally on a Linux host you can also run the Instana [agent](https://docs.instana.io/quick_start/agent_setup/container/docker/) locally, unfortunately the agent is currently not supported on Mac.
|
If you are running it locally on a Linux host you can also run the Instana [agent](https://docs.instana.io/quick_start/agent_setup/container/docker/) locally, unfortunately the agent is currently not supported on Mac.
|
||||||
|
|
||||||
@@ -54,10 +62,12 @@ You may install Instana via the DCOS package manager, instructions are here: htt
|
|||||||
## Kubernetes
|
## Kubernetes
|
||||||
You can run Kubernetes locally using [minikube](https://github.com/kubernetes/minikube) or on one of the many cloud providers.
|
You can run Kubernetes locally using [minikube](https://github.com/kubernetes/minikube) or on one of the many cloud providers.
|
||||||
|
|
||||||
The Docker container images are all available on [Docker Hub](https://hub.docker.com/u/robotshop/). The deployment and service definition files using these images are in the *K8s* directory, use these to deploy to a Kubernetes cluster. If you pushed your own images to your registry the deployment files will need to be updated to pull from your registry.
|
The Docker container images are all available on [Docker Hub](https://hub.docker.com/u/robotshop/). The deployment and service definition files using these images are in the [K8s](K8s/README.md) directory, use these to deploy to a Kubernetes cluster. If you pushed your own images to your registry the deployment files will need to be updated to pull from your registry.
|
||||||
|
|
||||||
$ kubectl create namespace robot-shop
|
```shell
|
||||||
$ kubectl -n robot-shop apply -f K8s/descriptors
|
$ kubectl create namespace robot-shop
|
||||||
|
$ kubectl -n robot-shop apply -f K8s/descriptors
|
||||||
|
```
|
||||||
|
|
||||||
To deploy the Instana agent to Kubernetes, just use the [helm](https://hub.helm.sh/charts/stable/instana-agent) chart.
|
To deploy the Instana agent to Kubernetes, just use the [helm](https://hub.helm.sh/charts/stable/instana-agent) chart.
|
||||||
|
|
||||||
@@ -77,25 +87,31 @@ If you are running the store locally via *docker-compose up* then, the store fro
|
|||||||
|
|
||||||
If you are running the store on Kubernetes via minikube then, to make the store front accessible edit the *web* service definition and change the type to *NodePort* and add a port entry *nodePort: 30080*.
|
If you are running the store on Kubernetes via minikube then, to make the store front accessible edit the *web* service definition and change the type to *NodePort* and add a port entry *nodePort: 30080*.
|
||||||
|
|
||||||
$ kubectl -n robot-shop edit service web
|
```shell
|
||||||
|
$ kubectl -n robot-shop edit service web
|
||||||
|
```
|
||||||
|
|
||||||
Snippet
|
Snippet
|
||||||
|
|
||||||
spec:
|
```yaml
|
||||||
ports:
|
spec:
|
||||||
- name: "8080"
|
ports:
|
||||||
port: 8080
|
- name: "8080"
|
||||||
protocol: TCP
|
port: 8080
|
||||||
targetPort: 8080
|
protocol: TCP
|
||||||
nodePort: 30080
|
targetPort: 8080
|
||||||
selector:
|
nodePort: 30080
|
||||||
io.kompose.service: web
|
selector:
|
||||||
sessionAffinity: None
|
service: web
|
||||||
type: NodePort
|
sessionAffinity: None
|
||||||
|
type: NodePort
|
||||||
|
```
|
||||||
|
|
||||||
The store front is then available on the IP address of minikube port 30080. To find the IP address of your minikube instance.
|
The store front is then available on the IP address of minikube port 30080. To find the IP address of your minikube instance.
|
||||||
|
|
||||||
$ minikube ip
|
```shell
|
||||||
|
$ minikube ip
|
||||||
|
```
|
||||||
|
|
||||||
If you are using a cloud Kubernetes / Openshift / Mesosphere then it will be available on the load balancer of that system.
|
If you are using a cloud Kubernetes / Openshift / Mesosphere then it will be available on the load balancer of that system.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user