Sync docs from master to gh-pages

This commit is contained in:
Dave Syer
2016-07-11 08:26:58 +00:00
parent 78fec64107
commit d6e09ff759

View File

@@ -740,6 +740,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_spring_boot_cloud_cli">Spring Boot Cloud CLI</a>
<ul class="sectlevel1">
<li><a href="#_installation">Installation</a></li>
<li><a href="#_running_spring_cloud_services_in_development">Running Spring Cloud Services in Development</a></li>
<li><a href="#_writing_groovy_scripts_and_running_applications">Writing Groovy Scripts and Running Applications</a></li>
<li><a href="#_encryption_and_decryption_3">Encryption and Decryption</a></li>
</ul>
@@ -3743,7 +3744,7 @@ for details on the properties available.</p>
<div class="title">Note</div>
</td>
<td class="content">
by default the native Netflix behaviour built into Turbine does <em>not</em> 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 <code>turbine.combineHostPort=true</code>
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 <em>not</em> allow multiple processes per host, per cluster (the key to the instance id is the hostname), then set the property <code>turbine.combineHostPort=false</code>.
</td>
</tr>
</table>
@@ -5600,8 +5601,8 @@ When doing this, different instances of an application are placed in a competing
<div class="paragraph">
<p>Spring Cloud Stream models this behavior through the concept of a <em>consumer group</em>.
(Spring Cloud Stream consumer groups are similar to and inspired by Kafka consumer groups.)
Each consumer binding can use the <code>spring.cloud.stream.bindings.input.group</code> property to specify a group name.
For the consumers shown in the following figure, this property would be set as <code>spring.cloud.stream.bindings.input.group=hdfsWrite</code> or <code>spring.cloud.stream.bindings.input.group=average</code>.</p>
Each consumer binding can use the <code>spring.cloud.stream.bindings.&lt;channelName&gt;.group</code> property to specify a group name.
For the consumers shown in the following figure, this property would be set as <code>spring.cloud.stream.bindings.&lt;channelName&gt;.group=hdfsWrite</code> or <code>spring.cloud.stream.bindings.&lt;channelName&gt;.group=average</code>.</p>
</div>
<div class="imageblock">
<div class="content">
@@ -6340,7 +6341,7 @@ The key represents an identifying name for the binder implementation, whereas th
</div>
<div class="paragraph">
<p>Binder selection can either be performed globally, using the <code>spring.cloud.stream.defaultBinder</code> property (e.g., <code>spring.cloud.stream.defaultBinder=rabbit</code>) 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:</p>
For instance, a processor application (that has channels with the names <code>input</code> and <code>output</code> for read/write respectively) which reads from Kafka and writes to RabbitMQ can specify the following configuration:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -7372,7 +7373,7 @@ You can achieve this scenario by correlating the input and output destinations o
<p>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 <code>ticktock</code> for bindings within both applications.</p>
</div>
<div class="paragraph">
<p>Time Source will set the following property:</p>
<p>Time Source (that has the channel name <code>output</code>) will set the following property:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -7380,7 +7381,7 @@ You can achieve this scenario by correlating the input and output destinations o
</div>
</div>
<div class="paragraph">
<p>Log Sink will set the following property:</p>
<p>Log Sink (that has the channel name <code>input</code>) will set the following property:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -7468,7 +7469,7 @@ If a topic already exists with a larger number of partitions than the maximum of
<div class="sect4">
<h5 id="_configuring_input_bindings_for_partitioning">Configuring Input Bindings for Partitioning</h5>
<div class="paragraph">
<p>An input binding is configured to receive partitioned data by setting its <code>partitioned</code> property, as well as the <code>instanceIndex</code> and <code>instanceCount</code> properties on the application itself, as in the following example:</p>
<p>An input binding (with the channel name <code>input</code>) is configured to receive partitioned data by setting its <code>partitioned</code> property, as well as the <code>instanceIndex</code> and <code>instanceCount</code> properties on the application itself, as in the following example:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -7511,7 +7512,7 @@ The following example shows how to test both input and output channels on a proc
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>@RunWith(SpringJUnit4ClassRunner.class)
<pre class="highlight"><code class="language-java" data-lang="java">@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = ExampleTest.MyProcessor.class)
@IntegrationTest({"server.port=-1"})
@DirtiesContext
@@ -10437,10 +10438,15 @@ config/application</pre>
<h1 id="_spring_boot_cloud_cli" class="sect0">Spring Boot Cloud CLI</h1>
<div class="openblock partintro">
<div class="content">
Spring Boot CLI provides <a href="http://projects.spring.io/spring-boot">Spring Boot</a> command line features for
<a href="https://github.com/spring-cloud">Spring Cloud</a>. You can write Groovy scripts to run Spring Cloud component applications
(e.g. <code>@EnableEurekaServer</code>). You can also easily do things like encryption and decryption to support Spring Cloud
Config clients with secret configuration values.
Spring Boot CLI provides <a href="http://projects.spring.io/spring-boot">Spring
Boot</a> command line features for <a href="https://github.com/spring-cloud">Spring
Cloud</a>. You can write Groovy scripts to run Spring Cloud component
applications (e.g. <code>@EnableEurekaServer</code>). 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).
</div>
</div>
<div class="sect1">
@@ -10468,12 +10474,13 @@ $ sdk use springboot 1.3.5.RELEASE</code></pre>
</div>
</div>
<div class="paragraph">
<p>and install the Spring Cloud plugin:</p>
<p>and install the Spring Cloud plugins (they are independeny so you can install one or the other or both):</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>$ mvn install
$ spring install org.springframework.cloud:spring-cloud-cli:1.1.2.RELEASE</code></pre>
$ 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</code></pre>
</div>
</div>
<div class="admonitionblock important">
@@ -10495,6 +10502,86 @@ in the JRE lib/security directory with the ones that you downloaded).
</div>
</div>
<div class="sect1">
<h2 id="_running_spring_cloud_services_in_development">Running Spring Cloud Services in Development</h2>
<div class="sectionbody">
<div class="paragraph">
<p>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 <code>spring cloud --list</code>, and to launch a default set
of services just <code>spring cloud</code>. To choose the services to deploy,
just list them on the command line, e.g.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>$ spring cloud eureka configserver h2 kafka zipkin</pre>
</div>
</div>
<div class="paragraph">
<p>Summary of supported deployables:</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 25%;">
<col style="width: 25%;">
<col style="width: 25%;">
<col style="width: 25%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Service</th>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Address</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">eureka</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Eureka Server</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:8761" class="bare">http://localhost:8761</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Eureka server for service registration and discovery. All the other services show up in its catalog by default.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">configserver</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Config Server</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:8888" class="bare">http://localhost:8888</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Spring Cloud Config Server running in the "native" profile and serving configuration from the local directory ./launcher</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">h2</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">H2 Database</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:9095" class="bare">http://localhost:9095</a> (console), jdbc:h2:tcp://localhost:9096/{data}</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Relation database service. Use a file path for <code>{data}</code> (e.g. <code>./target/test</code>) when you connect. Remember that you can add <code>;MODE=MYSQL</code> or <code>;MODE=POSTGRESQL</code> to connect with compatibility to other server types.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">kafka</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kafka Broker</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:9091" class="bare">http://localhost:9091</a> (actuator endpoints), localhost:9092</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">hystrixdashboard</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Hystrix Dashboard</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:7979" class="bare">http://localhost:7979</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Any Spring Cloud app that declares Hystrix circuit breakers publishes metrics on <code>/hystrix.stream</code>. Type that address into the dashboard to visualize all the metrics,</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">dataflow</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dataflow Server</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:9393" class="bare">http://localhost:9393</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Spring Cloud Dataflow server with UI at /admin-ui. Connect the Dataflow shell to target at root path.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">zipkin</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Zipkin Server</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://localhost:9411" class="bare">http://localhost:9411</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Zipkin Server with UI for visualizing traces. Stores span data in memory and accepts them via HTTP POST of JSON data.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="_writing_groovy_scripts_and_running_applications">Writing Groovy Scripts and Running Applications</h2>
<div class="sectionbody">
<div class="paragraph">
@@ -13089,7 +13176,7 @@ created during auto-configuration.</p>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2016-07-06 13:41:38 UTC
Last updated 2016-07-11 08:25:47 UTC
</div>
</div>
</body>