From d6e09ff75994619cc8f3fa12a6ff2ec41329480c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 11 Jul 2016 08:26:58 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud.html | 117 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 102 insertions(+), 15 deletions(-) diff --git a/spring-cloud.html b/spring-cloud.html index f394818f..9e4c24ef 100644 --- a/spring-cloud.html +++ b/spring-cloud.html @@ -740,6 +740,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Spring Boot Cloud CLI @@ -3743,7 +3744,7 @@ for details on the properties available.

    Note
    -by default the native Netflix behaviour built into Turbine does not allow multiple processes per host, per cluster (the key to the instance id is the hostname). Spring Cloud generalizes this a bit, allowing the host and port to be used as the key, but only if you set the property turbine.combineHostPort=true +by default Spring Cloud allows Turbine to use the host and port to allow multiple processes per host, per cluster. If you want the native Netflix behaviour built into Turbine that does not allow multiple processes per host, per cluster (the key to the instance id is the hostname), then set the property turbine.combineHostPort=false. @@ -5600,8 +5601,8 @@ When doing this, different instances of an application are placed in a competing

    Spring Cloud Stream models this behavior through the concept of a consumer group. (Spring Cloud Stream consumer groups are similar to and inspired by Kafka consumer groups.) -Each consumer binding can use the spring.cloud.stream.bindings.input.group property to specify a group name. -For the consumers shown in the following figure, this property would be set as spring.cloud.stream.bindings.input.group=hdfsWrite or spring.cloud.stream.bindings.input.group=average.

    +Each consumer binding can use the spring.cloud.stream.bindings.<channelName>.group property to specify a group name. +For the consumers shown in the following figure, this property would be set as spring.cloud.stream.bindings.<channelName>.group=hdfsWrite or spring.cloud.stream.bindings.<channelName>.group=average.

    @@ -6340,7 +6341,7 @@ The key represents an identifying name for the binder implementation, whereas th

    Binder selection can either be performed globally, using the spring.cloud.stream.defaultBinder property (e.g., spring.cloud.stream.defaultBinder=rabbit) or individually, by configuring the binder on each channel binding. -For instance, a processor application which reads from Kafka and writes to RabbitMQ can specify the following configuration:

    +For instance, a processor application (that has channels with the names input and output for read/write respectively) which reads from Kafka and writes to RabbitMQ can specify the following configuration:

    @@ -7372,7 +7373,7 @@ You can achieve this scenario by correlating the input and output destinations o

    Supposing that a design calls for the Time Source application to send data to the Log Sink application, you can use a common destination named ticktock for bindings within both applications.

    -

    Time Source will set the following property:

    +

    Time Source (that has the channel name output) will set the following property:

    @@ -7380,7 +7381,7 @@ You can achieve this scenario by correlating the input and output destinations o
    -

    Log Sink will set the following property:

    +

    Log Sink (that has the channel name input) will set the following property:

    @@ -7468,7 +7469,7 @@ If a topic already exists with a larger number of partitions than the maximum of
    Configuring Input Bindings for Partitioning
    -

    An input binding is configured to receive partitioned data by setting its partitioned property, as well as the instanceIndex and instanceCount properties on the application itself, as in the following example:

    +

    An input binding (with the channel name input) is configured to receive partitioned data by setting its partitioned property, as well as the instanceIndex and instanceCount properties on the application itself, as in the following example:

    @@ -7511,7 +7512,7 @@ The following example shows how to test both input and output channels on a proc
    -
    @RunWith(SpringJUnit4ClassRunner.class)
    +
    @RunWith(SpringJUnit4ClassRunner.class)
     @SpringApplicationConfiguration(classes = ExampleTest.MyProcessor.class)
     @IntegrationTest({"server.port=-1"})
     @DirtiesContext
    @@ -10437,10 +10438,15 @@ config/application

    Spring Boot Cloud CLI

    -Spring Boot CLI provides Spring Boot command line features for -Spring Cloud. You can write Groovy scripts to run Spring Cloud component applications -(e.g. @EnableEurekaServer). You can also easily do things like encryption and decryption to support Spring Cloud -Config clients with secret configuration values. +Spring Boot CLI provides Spring +Boot command line features for Spring +Cloud. You can write Groovy scripts to run Spring Cloud component +applications (e.g. @EnableEurekaServer). You can also easily do +things like encryption and decryption to support Spring Cloud Config +clients with secret configuration values. With the Launcher CLI you +can also launch services like Eureka, Zipkin, Config Server +conveniently all at once from the command line (very useful at +development time).
    @@ -10468,12 +10474,13 @@ $ sdk use springboot 1.3.5.RELEASE
    -

    and install the Spring Cloud plugin:

    +

    and install the Spring Cloud plugins (they are independeny so you can install one or the other or both):

    $ mvn install
    -$ spring install org.springframework.cloud:spring-cloud-cli:1.1.2.RELEASE
    +$ spring install org.springframework.cloud:spring-cloud-cli:1.2.0.BUILD-SNAPSHOT +$ spring install org.springframework.cloud:spring-cloud-launcher-cli:1.2.0.BUILD-SNAPSHOT
    @@ -10495,6 +10502,86 @@ in the JRE lib/security directory with the ones that you downloaded).
    +

    Running Spring Cloud Services in Development

    +
    +
    +

    The Launcher CLI can be used to run common services like Eureka, +Config Server etc. from the command line. To list the available +services you can do spring cloud --list, and to launch a default set +of services just spring cloud. To choose the services to deploy, +just list them on the command line, e.g.

    +
    +
    +
    +
    $ spring cloud eureka configserver h2 kafka zipkin
    +
    +
    +
    +

    Summary of supported deployables:

    +
    + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ServiceNameAddressDescription

    eureka

    Eureka Server

    http://localhost:8761

    Eureka server for service registration and discovery. All the other services show up in its catalog by default.

    configserver

    Config Server

    http://localhost:8888

    Spring Cloud Config Server running in the "native" profile and serving configuration from the local directory ./launcher

    h2

    H2 Database

    http://localhost:9095 (console), jdbc:h2:tcp://localhost:9096/{data}

    Relation database service. Use a file path for {data} (e.g. ./target/test) when you connect. Remember that you can add ;MODE=MYSQL or ;MODE=POSTGRESQL to connect with compatibility to other server types.

    kafka

    Kafka Broker

    http://localhost:9091 (actuator endpoints), localhost:9092

    hystrixdashboard

    Hystrix Dashboard

    http://localhost:7979

    Any Spring Cloud app that declares Hystrix circuit breakers publishes metrics on /hystrix.stream. Type that address into the dashboard to visualize all the metrics,

    dataflow

    Dataflow Server

    http://localhost:9393

    Spring Cloud Dataflow server with UI at /admin-ui. Connect the Dataflow shell to target at root path.

    zipkin

    Zipkin Server

    http://localhost:9411

    Zipkin Server with UI for visualizing traces. Stores span data in memory and accepts them via HTTP POST of JSON data.

    +
    +
    +

    Writing Groovy Scripts and Running Applications

    @@ -13089,7 +13176,7 @@ created during auto-configuration.