Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gastaldi/try-bee
Generated by the Red Hat Developer Launcher (https://developers.redhat.com/launch)
https://github.com/gastaldi/try-bee
Last synced: 5 days ago
JSON representation
Generated by the Red Hat Developer Launcher (https://developers.redhat.com/launch)
- Host: GitHub
- URL: https://github.com/gastaldi/try-bee
- Owner: gastaldi
- Created: 2019-03-19T02:50:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-19T02:51:03.000Z (almost 6 years ago)
- Last Synced: 2024-11-08T09:47:37.458Z (about 2 months ago)
- Language: HTML
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Istio Routing Mission for Thorntail
## Purpose
Showcase Routing in Istio with a Thorntail application
## Prerequisites
* Docker installed and running
* OpenShift and Istio environment up and running (See https://github.com/openshift-istio/istio-docs/blob/master/content/rhoar-workflow.adoc for details)## Launcher Flow Setup
If the Booster is installed through the Launcher and the Continuous Delivery flow, no additional steps are necessary.
Skip to the _Use Cases_ section.
## Local Source to Image Build (S2I)
### Prepare the Namespace
Create a new namespace/project:
```
oc new-project
```### Build and Deploy the Application
#### With Source to Image build (S2I)
Run the following commands to apply and execute the OpenShift templates that will configure and deploy the applications:
```bash
find . | grep openshiftio | grep application | xargs -n 1 oc apply -foc new-app --template=thorntail-istio-routing-client-service -p SOURCE_REPOSITORY_URL=https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-istio-routing -p SOURCE_REPOSITORY_REF=master -p SOURCE_REPOSITORY_DIR=routing-client
oc new-app --template=thorntail-istio-routing-service-a-service -p SOURCE_REPOSITORY_URL=https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-istio-routing -p SOURCE_REPOSITORY_REF=master -p SOURCE_REPOSITORY_DIR=routing-service-a
oc new-app --template=thorntail-istio-routing-service-b-service -p SOURCE_REPOSITORY_URL=https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-istio-routing -p SOURCE_REPOSITORY_REF=master -p SOURCE_REPOSITORY_DIR=routing-service-b
```## Use Cases
Any steps issuing `oc` commands require the user to have run `oc login` first and switched to the appropriate project with `oc project `.
### Default Service load balancing
1. Create a Gateway and Virtual Service in Istio so that we can access the service within the Mesh:
```
oc apply -f istio-config/gateway.yaml
```
2. Retrieve the URL for the Istio Ingress Gateway route, with the below command, and open it in a web browser.
```
echo http://$(oc get route istio-ingressgateway -o jsonpath='{.spec.host}{"\n"}' -n istio-system)/thorntail-istio-routing
```
3. The user will be presented with the web page of the Booster
4. Click the "Invoke" button. You should see a message in the result box indicating which service instance was called.
5. Click "Invoke" several more times.
Notice that there is an even 50% split between service a and b.### Transfer load between services
1. Modify the load balancing such that all requests go to service a:
```
oc apply -f istio-config/load-balancing-rule.yaml
```
2. Clicking on "Invoke" in the UI you will see that more requests are now being sent to service b.