From 43a16eb5e8a9a53e2c0509baead0b572196faaa6 Mon Sep 17 00:00:00 2001 From: Greg Hanson Date: Fri, 31 Mar 2017 11:00:33 -0500 Subject: [PATCH 1/4] removed service list commands --- _docs/1-demo/bookinfo.md | 29 +++++------------------------ _docs/1-demo/helloworld.md | 18 +----------------- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/_docs/1-demo/bookinfo.md b/_docs/1-demo/bookinfo.md index f3e6a16..f2630c2 100644 --- a/_docs/1-demo/bookinfo.md +++ b/_docs/1-demo/bookinfo.md @@ -116,31 +116,12 @@ _IBM Bluemix_ ``` where is the route name used in the `bluemix cf create-route` command. -### List the Services in the App +### Services in the App -You can view the microservices that are running using the following command: - -```bash -a8ctl service-list -``` - -The expected output is the following: - -```bash -+-------------+------------------------------+ -| Service | Instances | -+-------------+------------------------------+ -| details | version=v1(1) | -| productpage | version=v1(1) | -| ratings | version=v1(1) | -| reviews | version=v1(1), version=v2(1) | -+-------------+------------------------------+ -``` - -There are 4 microservices as described in the diagram above. The `reviews` -microservice has 3 versions v1, v2, and v3. Note that in a realistic -deployment, new versions of a microservice are deployed over time -instead of deploying all versions simultaneously. +There are 4 microservices. The `reviews` microservice has 3 versions +v1, v2, and v3. Note that in a realistic deployment, new versions of +a microservice are deployed over time instead of deploying all versions +simultaneously. ## Set the default routes diff --git a/_docs/1-demo/helloworld.md b/_docs/1-demo/helloworld.md index 0ba3fbf..9f77983 100644 --- a/_docs/1-demo/helloworld.md +++ b/_docs/1-demo/helloworld.md @@ -90,23 +90,7 @@ _IBM Bluemix_ export GATEWAY_URL=helloworld.mybluemix.net ``` -### List the Services in the App - -You can view the microservices that are running using the following command: - -```bash -a8ctl service-list -``` - -The expected output is the following: - -```bash -+------------+------------------------------+ -| Service | Instances | -+------------+------------------------------+ -| helloworld | version=v1(1), version=v2(1) | -+------------+------------------------------+ -``` +### Services in the App There are 4 instances of the helloworld service. Two are instances of version "v1" and the other two belong to version "v2". From 554bbefcdfad62777001c0a9e60b8c16b2c4c832 Mon Sep 17 00:00:00 2001 From: Greg Hanson Date: Fri, 31 Mar 2017 11:06:23 -0500 Subject: [PATCH 2/4] removed reference to k8srules and replace with controller --- _docs/2-controlplane/1-controller/kubernetes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/2-controlplane/1-controller/kubernetes.md b/_docs/2-controlplane/1-controller/kubernetes.md index 22cc2ce..6f72f90 100644 --- a/_docs/2-controlplane/1-controller/kubernetes.md +++ b/_docs/2-controlplane/1-controller/kubernetes.md @@ -32,7 +32,7 @@ order: 2 $ git clone git@github.com:amalgam8/amalgam8.git $ cd amalgam8 # trick makefile to generate all with a "latest" version tag by setting version to "vlatest" - $ APP_VER_ABBR=vlatest make build.sidecar build.exampleapps build.k8srules dockerize.sidecar.envoy.ubuntu dockerize.k8srules + $ APP_VER_ABBR=vlatest make build.controller build.sidecar build.exampleapps dockerize.sidecar.envoy.ubuntu dockerize.controller ``` From 9ccdff1514fc6ab3af7ccdc7167f157239a6e43b Mon Sep 17 00:00:00 2001 From: Greg Hanson Date: Fri, 31 Mar 2017 13:07:46 -0500 Subject: [PATCH 3/4] fixed missing/broken link in rules DSL --- .../2-controlplane/1-controller/rules-dsl.md | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/_docs/2-controlplane/1-controller/rules-dsl.md b/_docs/2-controlplane/1-controller/rules-dsl.md index 6dcfe42..0a6b9bc 100644 --- a/_docs/2-controlplane/1-controller/rules-dsl.md +++ b/_docs/2-controlplane/1-controller/rules-dsl.md @@ -53,10 +53,10 @@ but must rather be represented using two seperate rules in the DSL. * [route.backends.weight](#route-backends-weight) * [route.backends.name](#route-backends-name) * [route.backends.resilience](#route-backends-resilience) - * [route.backends.lbtype])(#route-backends-lbtype) - * [route.httpreqtimeout](#route.httpreqtimeout) - * [route.httpreqretries](#route.httpreqretries) - * [route.uri](#route.uri) + * [route.backends.lbtype](#route-backends-lbtype) + * [route.httpreqtimeout](#route-httpreqtimeout) + * [route.httpreqretries](#route-httpreqretries) + * [route.uri](#route-uri) * [Action Rules](#action-rules) * [actions](#actions) * [actions.action](#actions-action) @@ -222,6 +222,22 @@ A routing rule is one that contains a `route` field in the A8 Rules DSL. The `route` field is an object, although currently with only one nested field, `backends`, a list of weighted backends for the route. *(Note: More fields will be added to the route object in future versions of the Rules DSL.)* + +#### Property route.httpreqtimeout + +Timeout for a HTTP request. Includes retries as well. Unit is in floating point seconds. Default 15.0s + +#### Property route.httpreqretries + +Number of retries for a given request. The interval between retries will be determined automatically (25ms+). +Actual number of retries attempted depends on the http_req_timeout. + +#### Property route.uri + +* `path` +* `prefix` +* `prefix_rewrite` + #### Property: route.backends Each backend in the `backends` list is an object with the following fields. @@ -275,6 +291,26 @@ the "v2" tag and the remaining traffic (i.e., 75%) to "v1". The `name` field is optional and specifies the service name of the target instances. If not specified, it defaults to the value of the rule's `destination` field. +#### Property: route.backends.resilience + +* `max_connections`: Maximum number of connections to a backend. Defaults to 1024. +* `max_pending_requests`: Maximum number of pending requests to a backend. Defaults to 1024. +* `max_requests`: Maximum number of requests to a backend. Defaults to 1024 +* `sleep_window`: Minimum time the circuit will be closed. Defaults to 30s +* `consecutive_errors`: Number of 5XX errors before circuit is opened. Defaults to 5 +* `detection_interval`: Interval for checking state of circuit. Defaults to 10s. +* `max_requests_per_connection`: Maximum number of requests per connection to an backend. + +#### Property: route.backends.lbtype + +Supported proxy load balancing algorithms are: + +* `round_robin` +* `least_request` +* `random` + +Default is `round_robin`. + ### Routing Rule Execution Whenever the routing story for a particular microservice is purely weight base, From baed95ade4b6da9ca5da8f2502b8609a8a02d972 Mon Sep 17 00:00:00 2001 From: Greg Hanson Date: Fri, 31 Mar 2017 13:20:09 -0500 Subject: [PATCH 4/4] put lbtype under route --- .../2-controlplane/1-controller/rules-dsl.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/_docs/2-controlplane/1-controller/rules-dsl.md b/_docs/2-controlplane/1-controller/rules-dsl.md index 0a6b9bc..fdee838 100644 --- a/_docs/2-controlplane/1-controller/rules-dsl.md +++ b/_docs/2-controlplane/1-controller/rules-dsl.md @@ -53,7 +53,7 @@ but must rather be represented using two seperate rules in the DSL. * [route.backends.weight](#route-backends-weight) * [route.backends.name](#route-backends-name) * [route.backends.resilience](#route-backends-resilience) - * [route.backends.lbtype](#route-backends-lbtype) + * [route.lbtype](#route-lbtype) * [route.httpreqtimeout](#route-httpreqtimeout) * [route.httpreqretries](#route-httpreqretries) * [route.uri](#route-uri) @@ -222,6 +222,15 @@ A routing rule is one that contains a `route` field in the A8 Rules DSL. The `route` field is an object, although currently with only one nested field, `backends`, a list of weighted backends for the route. *(Note: More fields will be added to the route object in future versions of the Rules DSL.)* +#### Property: route.lbtype + +Supported proxy load balancing algorithms are: + +* `round_robin` +* `least_request` +* `random` + +Default is `round_robin`. #### Property route.httpreqtimeout @@ -301,16 +310,6 @@ to the value of the rule's `destination` field. * `detection_interval`: Interval for checking state of circuit. Defaults to 10s. * `max_requests_per_connection`: Maximum number of requests per connection to an backend. -#### Property: route.backends.lbtype - -Supported proxy load balancing algorithms are: - -* `round_robin` -* `least_request` -* `random` - -Default is `round_robin`. - ### Routing Rule Execution Whenever the routing story for a particular microservice is purely weight base,