├── .gitignore ├── .gitmodules ├── .mrconfig ├── .mvn ├── jvm.config ├── maven.config └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .travis.yml ├── Guardfile ├── LICENSE ├── README.adoc ├── build.sh ├── demo ├── .gitignore ├── Dockerfile ├── app.groovy ├── application.yml ├── bootstrap.yml ├── client.groovy ├── dash.groovy ├── disc.groovy ├── double.groovy ├── eureka.groovy ├── hystrix.groovy ├── install.sh ├── public │ ├── index.html │ └── js │ │ └── hello.js ├── refresh.groovy ├── resource.groovy ├── ribbon.groovy ├── spa.groovy └── sso.groovy ├── demo_deploy.sh ├── demo_undeploy.sh ├── docker-compose.yml ├── docs ├── pom.xml └── src │ └── main │ └── asciidoc │ ├── .gitignore │ ├── README.adoc │ ├── _attributes.adoc │ ├── _spring-cloud-2020-1-attributes.adoc │ ├── _spring-cloud-2020-1-configprops.adoc │ ├── _spring-cloud-2020-1-links.adoc │ ├── _spring-cloud-2020-1-pdf.adoc │ ├── _spring-cloud-2020-1-single.adoc │ ├── _spring-cloud-2020-1-versions.adoc │ ├── _spring-cloud-2020-1.adoc │ ├── _spring-cloud-edgware.adoc │ ├── _spring-cloud-finchley.adoc │ ├── _spring-cloud-greenwich.adoc │ ├── _spring-cloud-hoxton-attributes.adoc │ ├── _spring-cloud-hoxton-configprops.adoc │ ├── _spring-cloud-hoxton-links.adoc │ ├── _spring-cloud-hoxton-pdf.adoc │ ├── _spring-cloud-hoxton-single.adoc │ ├── _spring-cloud-hoxton-versions.adoc │ ├── _spring-cloud-hoxton.adoc │ ├── documentation-overview.adoc │ ├── ghpages.sh │ ├── index.adoc │ ├── index.htmlsingleadoc │ ├── legal.adoc │ ├── spring-cloud-2020-1-configprops.adoc │ ├── spring-cloud-hoxton-configprops.adoc │ ├── spring-cloud.adoc │ ├── spring-cloud.htmlsingleadoc │ ├── spring-cloud.pdfadoc │ ├── symbolic_links.sh │ └── themes.adoc ├── for_each.sh ├── kill.sh ├── mvnw ├── mvnw.bat ├── mvnw.cmd ├── pom.xml ├── release_train.sh ├── run.sh ├── services_deploy.sh └── services_undeploy.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /application.yml 2 | /application.properties 3 | *~ 4 | .#* 5 | *# 6 | target 7 | bin 8 | /data 9 | /data_rabbit 10 | .classpath 11 | .project 12 | .settings 13 | .springBeans 14 | .DS_Store 15 | *.sw* 16 | *.iml 17 | .idea 18 | .vscode 19 | .factorypath 20 | *.log 21 | # You have to be explicit about adding changes to gitmodules 22 | .gitmodules 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "config-repo"] 2 | path = config-repo 3 | url = git@github.com:spring-cloud-samples/config-repo.git 4 | [submodule "config"] 5 | path = config 6 | url = git@github.com:spring-cloud/spring-cloud-config.git 7 | [submodule "netflix"] 8 | path = netflix 9 | url = git@github.com:spring-cloud/spring-cloud-netflix.git 10 | [submodule "configserver"] 11 | path = configserver 12 | url = git@github.com:spring-cloud-samples/configserver.git 13 | [submodule "eureka"] 14 | path = eureka 15 | url = git@github.com:spring-cloud-samples/eureka.git 16 | [submodule "customers-stores"] 17 | path = customers-stores 18 | url = git@github.com:spring-cloud-samples/customers-stores.git 19 | [submodule "hystrix-dashboard"] 20 | path = hystrix-dashboard 21 | url = git@github.com:spring-cloud-samples/hystrix-dashboard 22 | [submodule "turbine"] 23 | path = turbine 24 | url = git@github.com:spring-cloud-samples/turbine 25 | [submodule "locks"] 26 | path = locks 27 | url = git@github.com:spring-cloud-samples/locks.git 28 | [submodule "starters"] 29 | path = starters 30 | url = git@github.com:spring-cloud/spring-cloud-starters.git 31 | [submodule "cli"] 32 | path = cli 33 | url = git@github.com:spring-cloud/spring-cloud-cli.git 34 | [submodule "cloudfoundry"] 35 | path = cloudfoundry 36 | url = git@github.com:spring-cloud/spring-cloud-cloudfoundry 37 | [submodule "bus"] 38 | path = bus 39 | url = git@github.com:spring-cloud/spring-cloud-bus.git 40 | [submodule "cluster"] 41 | path = cluster 42 | url = git@github.com:spring-cloud/spring-cloud-cluster 43 | [submodule "security"] 44 | path = security 45 | url = git@github.com:spring-cloud/spring-cloud-security 46 | [submodule "build"] 47 | path = build 48 | url = git@github.com:spring-cloud/spring-cloud-build.git 49 | [submodule "authserver"] 50 | path = authserver 51 | url = git@github.com:spring-cloud-samples/authserver 52 | [submodule "sso"] 53 | path = sso 54 | url = git@github.com:spring-cloud-samples/sso 55 | [submodule "aws"] 56 | path = aws 57 | url = git@github.com:spring-cloud/spring-cloud-aws.git 58 | [submodule "commons"] 59 | path = commons 60 | url = git@github.com:spring-cloud/spring-cloud-commons 61 | [submodule "tests"] 62 | path = tests 63 | url = git@github.com:spring-cloud-samples/tests.git 64 | [submodule "zookeeper"] 65 | path = zookeeper 66 | url = git@github.com:spring-cloud/spring-cloud-zookeeper 67 | [submodule "sleuth"] 68 | path = sleuth 69 | url = git@github.com:spring-cloud-incubator/spring-cloud-sleuth 70 | [submodule "stream"] 71 | path = stream 72 | url = git@github.com:spring-cloud/spring-cloud-stream-starters.git 73 | [submodule "brewery"] 74 | path = brewery 75 | url = git@github.com:spring-cloud-samples/brewery 76 | [submodule "consul"] 77 | path = consul 78 | url = git@github.com:spring-cloud/spring-cloud-consul 79 | [submodule "task"] 80 | path = task 81 | url = git@github.com:spring-cloud/spring-cloud-task 82 | [submodule "contract"] 83 | path = contract 84 | url = git@github.com:spring-cloud/spring-cloud-contract 85 | [submodule "stream-core"] 86 | path = stream-core 87 | url = git@github.com:spring-cloud/spring-cloud-stream.git 88 | [submodule "vault"] 89 | path = vault 90 | url = git@github.com:spring-cloud/spring-cloud-vault.git 91 | [submodule "gateway"] 92 | path = gateway 93 | url = git@github.com:spring-cloud/spring-cloud-gateway.git 94 | [submodule "openfeign"] 95 | path = openfeign 96 | url = git@github.com:spring-cloud/spring-cloud-openfeign.git 97 | [submodule "function"] 98 | path = function 99 | url = git@github.com:spring-cloud/spring-cloud-function.git 100 | [submodule "kubernetes"] 101 | path = kubernetes 102 | url = git@github.com:spring-cloud/spring-cloud-kubernetes.git 103 | [submodule "gcp"] 104 | path = gcp 105 | url = git@github.com:spring-cloud/spring-cloud-gcp.git 106 | [submodule "circuitbreaker"] 107 | path = circuitbreaker 108 | url = git@github.com:spring-cloud/spring-cloud-circuitbreaker.git 109 | -------------------------------------------------------------------------------- /.mrconfig: -------------------------------------------------------------------------------- 1 | [build] 2 | clone = echo 'not cloning submodule' 3 | checkout = git checkout master 4 | 5 | [cloudfoundry] 6 | clone = echo 'not cloning submodule' 7 | checkout = git checkout master 8 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 9 | install = mvn install "$@" 10 | 11 | [cluster] 12 | clone = echo 'not cloning submodule' 13 | checkout = git checkout master 14 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 15 | install = mvn install "$@" 16 | 17 | [commons] 18 | clone = echo 'not cloning submodule' 19 | checkout = git checkout master 20 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 21 | install = mvn install "$@" 22 | 23 | [config] 24 | clone = echo 'not cloning submodule' 25 | checkout = git checkout master 26 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 27 | install = mvn install "$@" 28 | 29 | [consul] 30 | clone = echo 'not cloning submodule' 31 | checkout = git checkout master 32 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 33 | install = mvn install "$@" 34 | 35 | [contract] 36 | clone = echo 'not cloning submodule' 37 | checkout = git checkout master 38 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 39 | install = mvn install "$@" 40 | 41 | [aws] 42 | clone = echo 'not cloning submodule' 43 | checkout = git checkout master 44 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 45 | install = mvn install "$@" 46 | 47 | [netflix] 48 | clone = echo 'not cloning submodule' 49 | checkout = git checkout master 50 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 51 | install = mvn install "$@" 52 | 53 | [bus] 54 | clone = echo 'not cloning submodule' 55 | checkout = git checkout master 56 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 57 | install = mvn install "$@" 58 | 59 | [cli] 60 | clone = echo 'not cloning submodule' 61 | checkout = git checkout master 62 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 63 | install = mvn install "$@" && [ -e ~/.gvm/springboot/dev ] && cp target/*.jar ~/.gvm/springboot/dev/lib 64 | 65 | [starters] 66 | clone = echo 'not cloning submodule' 67 | checkout = git checkout master 68 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 69 | install = mvn install "$@" 70 | 71 | [task] 72 | clone = echo 'not cloning submodule' 73 | checkout = git checkout master 74 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 75 | install = mvn install "$@" 76 | 77 | [brewery] 78 | clone = echo 'not cloning submodule' 79 | checkout = git checkout master 80 | 81 | [config-repo] 82 | clone = echo 'not cloning submodule' 83 | checkout = git checkout master 84 | 85 | [configserver] 86 | clone = echo 'not cloning submodule' 87 | checkout = git checkout master 88 | 89 | [eureka] 90 | clone = echo 'not cloning submodule' 91 | checkout = git checkout master 92 | 93 | [customers-stores] 94 | clone = echo 'not cloning submodule' 95 | checkout = git checkout master 96 | 97 | [hystrix-dashboard] 98 | clone = echo 'not cloning submodule' 99 | checkout = git checkout master 100 | 101 | [turbine] 102 | clone = echo 'not cloning submodule' 103 | checkout = git checkout master 104 | 105 | [security] 106 | clone = echo 'not cloning submodule' 107 | checkout = git checkout master 108 | 109 | [sleuth] 110 | clone = echo 'not cloning submodule' 111 | checkout = git checkout master 112 | 113 | [stream] 114 | clone = echo 'not cloning submodule' 115 | checkout = git checkout master 116 | 117 | [stream-core] 118 | clone = echo 'not cloning submodule' 119 | checkout = git checkout master 120 | 121 | [authserver] 122 | clone = echo 'not cloning submodule' 123 | checkout = git checkout master 124 | 125 | [sso] 126 | clone = echo 'not cloning submodule' 127 | checkout = git checkout master 128 | 129 | [tests] 130 | clone = echo 'not cloning submodule' 131 | checkout = git checkout master 132 | 133 | [zookeeper] 134 | clone = echo 'not cloning submodule' 135 | checkout = git checkout master 136 | deploy = mvn deploy "$@" -DaltDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local 137 | install = mvn install "$@" 138 | 139 | [] 140 | clone = git submodule update --init 141 | checkout = git checkout full 142 | 143 | -------------------------------------------------------------------------------- /.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | -Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom -------------------------------------------------------------------------------- /.mvn/maven.config: -------------------------------------------------------------------------------- 1 | -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local -P spring 2 | -------------------------------------------------------------------------------- /.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import java.net.*; 17 | import java.io.*; 18 | import java.nio.channels.*; 19 | import java.util.Properties; 20 | 21 | public class MavenWrapperDownloader { 22 | 23 | private static final String WRAPPER_VERSION = "0.5.3"; 24 | /** 25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 26 | */ 27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + " .jar"; 29 | 30 | /** 31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 32 | * use instead of the default one. 33 | */ 34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 35 | ".mvn/wrapper/maven-wrapper.properties"; 36 | 37 | /** 38 | * Path where the maven-wrapper.jar will be saved to. 39 | */ 40 | private static final String MAVEN_WRAPPER_JAR_PATH = 41 | ".mvn/wrapper/maven-wrapper.jar"; 42 | 43 | /** 44 | * Name of the property which should be used to override the default download url for the wrapper. 45 | */ 46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 47 | 48 | public static void main(String args[]) { 49 | System.out.println("- Downloader started"); 50 | File baseDirectory = new File(args[0]); 51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 52 | 53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 54 | // wrapperUrl parameter. 55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 56 | String url = DEFAULT_DOWNLOAD_URL; 57 | if(mavenWrapperPropertyFile.exists()) { 58 | FileInputStream mavenWrapperPropertyFileInputStream = null; 59 | try { 60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 61 | Properties mavenWrapperProperties = new Properties(); 62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 64 | } catch (IOException e) { 65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 66 | } finally { 67 | try { 68 | if(mavenWrapperPropertyFileInputStream != null) { 69 | mavenWrapperPropertyFileInputStream.close(); 70 | } 71 | } catch (IOException e) { 72 | // Ignore ... 73 | } 74 | } 75 | } 76 | System.out.println("- Downloading from: " + url); 77 | 78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 79 | if(!outputFile.getParentFile().exists()) { 80 | if(!outputFile.getParentFile().mkdirs()) { 81 | System.out.println( 82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 83 | } 84 | } 85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 86 | try { 87 | downloadFileFromURL(url, outputFile); 88 | System.out.println("Done"); 89 | System.exit(0); 90 | } catch (Throwable e) { 91 | System.out.println("- Error downloading"); 92 | e.printStackTrace(); 93 | System.exit(1); 94 | } 95 | } 96 | 97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 99 | String username = System.getenv("MVNW_USERNAME"); 100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 101 | Authenticator.setDefault(new Authenticator() { 102 | @Override 103 | protected PasswordAuthentication getPasswordAuthentication() { 104 | return new PasswordAuthentication(username, password); 105 | } 106 | }); 107 | } 108 | URL website = new URL(urlString); 109 | ReadableByteChannel rbc; 110 | rbc = Channels.newChannel(website.openStream()); 111 | FileOutputStream fos = new FileOutputStream(destination); 112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 113 | fos.close(); 114 | rbc.close(); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/scripts/de04085573a2709ee1c04c1add70d84eb6e12b4b/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | git: 3 | submodules: false 4 | before_install: 5 | - cp .gitmodules .gitmodules~ 6 | - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules 7 | - git submodule update --init --recursive 8 | - mv .gitmodules~ .gitmodules 9 | script: ./mvnw clean install 10 | -------------------------------------------------------------------------------- /Guardfile: -------------------------------------------------------------------------------- 1 | require 'asciidoctor' 2 | require 'erb' 3 | 4 | options = {:mkdirs => true, :safe => :unsafe, :attributes => ['linkcss', 'allow-uri-read'], :type => 'book'} 5 | 6 | guard 'shell' do 7 | watch(/^[A-Za-z][^#]*\.adoc$/) {|m| 8 | print "*********** " + m.inspect 9 | Asciidoctor.render_file('src/main/asciidoc/spring-cloud.adoc', options.merge(:to_dir => 'target/generated-docs')) 10 | } 11 | end -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2015-Present Pivotal Software Inc. 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | # scripts is no longer actively maintained by VMware, Inc. 2 | 3 | //// 4 | DO NOT EDIT THIS FILE. IT WAS GENERATED. 5 | Manual changes to this file will be lost when it is generated again. 6 | Edit the files in the src/main/asciidoc/ directory instead. 7 | //// 8 | 9 | The https://github.com/spring-cloud-samples[spring-cloud-samples] can be 10 | run as a demo locally by just cloning the individual projects and 11 | running them. This project can be used to manage updating and deploying 12 | the sample apps to cloudfoundry. 13 | 14 | [[running-locally]] 15 | Running Locally 16 | ~~~~~~~~~~~~~~~ 17 | 18 | Pre-requisites: Maven (3) and Java (1.7). To run the Customers UI you 19 | also need the Spring Boot CLI. Clone the repository and initialize 20 | submodules: 21 | 22 | .... 23 | $ git clone https://github.com/spring-cloud-samples/scripts 24 | $ cd scripts 25 | $ ./build.sh 26 | .... 27 | 28 | (You can add `-DskipTests' if you like, or just use `./mvnw' directly, 29 | once the submodules are initialized. If you are starting from scratch, 30 | the ``build'' module needs to be installed first, followed by the 31 | ``starters''.) 32 | 33 | You also nee Mongodb and RabbitMQ and Redis. If you don’t have those, 34 | and you do have Docker, you can run them in Docker (via 35 | http://docs.docker.com/compose/[docker-compose]): 36 | 37 | .... 38 | $ docker-compose up 39 | ... 40 | 41 | 42 | 43 | .... 44 | 45 | the containers for the server processes write their data locally in 46 | `./data_*`. Those files will be owned by root, so watch out when it 47 | comes to remove them. 48 | 49 | *NOTE*: Docker version 1.5 and Compose version 1.1.0 are confirmed to 50 | work. The latest versions have not been tested and may have problems. 51 | 52 | [[docker-on-a-mac]] 53 | Docker on a mac 54 | ^^^^^^^^^^^^^^^ 55 | 56 | Docker on a mac requires boot2docker. Because docker is running in a 57 | virtual machine, The ip addresses of mongo, rabbit and redis are not 58 | 127.0.0.1. You can use virtualbox port forwarding to address this issue 59 | with the following commands (from 60 | https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md[here]): 61 | 62 | .... 63 | # vm must be powered off 64 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port27017,tcp,,27017,,27017" 65 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port6379,tcp,,6379,,6379" 66 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port15672,tcp,,15672,,15672" 67 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port5672,tcp,,5672,,5672" 68 | .... 69 | 70 | [[docker-alternative-on-a-mac]] 71 | Docker alternative on a mac 72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 73 | 74 | If you prefer not to use docker-compose you can install mongo, rabbit 75 | and redis: 76 | 77 | .... 78 | brew install mongodb rabbitmq redis 79 | .... 80 | 81 | To run the apps (each in a different terminal) 82 | 83 | .... 84 | $ rabbitmq-server 85 | $ mongod --config /usr/local/etc/mongod.conf 86 | $ redis-server /usr/local/etc/redis.conf 87 | .... 88 | 89 | Run the apps: 90 | 91 | .... 92 | $ ./run.sh 93 | .... 94 | 95 | You can kill the processes using `./kill.sh`, and both scripts know how 96 | to operate on individual apps or subsets, e.g. (the default): 97 | 98 | .... 99 | $ ./run.sh configserver eureka customers stores 100 | .... 101 | 102 | To run the UI with the maps, get the Spring Boot CLI, and install the 103 | platform CLI plugin, e.g. with GVM: 104 | 105 | .... 106 | $ gvm install springboot 1.2.0.RC1 107 | $ gvm use springboot 1.2.0.RC1 108 | .... 109 | 110 | and finally install the Spring Cloud plugin: 111 | 112 | .... 113 | $ spring install org.springframework.cloud:spring-cloud-cli:1.0.0.BUILD-SNAPSHOT 114 | .... 115 | 116 | Then run the app 117 | 118 | .... 119 | $ (cd customers-stores/customers-ui; spring run app.groovy) 120 | .... 121 | 122 | [[running-on-cloud-foundry]] 123 | Running on Cloud Foundry 124 | ~~~~~~~~~~~~~~~~~~~~~~~~ 125 | 126 | Pre-requisites: 127 | 128 | * Maven (3) 129 | * Java (1.8) 130 | * the `cf` CLI 131 | * Cloud Foundry with Java buildpack version 2.5 or greater (for Java 1.8 132 | support) 133 | 134 | Clone the repository and initialize submodules: 135 | 136 | .... 137 | $ git clone https://github.com/spring-cloud-samples/scripts 138 | $ cd scripts 139 | $ ./build.sh 140 | $ ./services_deploy.sh 141 | $ ./demo_deploy.sh 142 | .... 143 | 144 | The result should be a bunch of apps running in the default space for 145 | your default org, with names prefixed by your local userid, e.g. 146 | 147 | .... 148 | $ cf apps 149 | ... 150 | dsyerconfigserver started 1/1 512M 1G dsyerconfigserver.cfapps.io 151 | dsyereureka started 1/1 512M 1G dsyereureka.cfapps.io 152 | dsyercustomers started 1/1 512M 1G dsyercustomers.cfapps.io 153 | dsyerstores started 1/1 512M 1G dsyerstores.cfappps.io 154 | ... 155 | .... 156 | 157 | The `configserver` and `eureka` apps will have been registered as user 158 | provided services, and bound to the other apps: 159 | 160 | .... 161 | $ cf services 162 | ... 163 | name service plan bound apps 164 | dsyerconfigserver user-provided dsyercustomers, dsyereureka, dsyerstores 165 | dsyereureka user-provided dsyerconfigserver, dsyercustomers, dsyerstores 166 | ... 167 | .... 168 | 169 | You can check that it is all working by pinging the `eureka` app 170 | endpoints and seeing the other apps registered. E.g. visit 171 | http://dsyereureka.cfapps.io/eureka/apps in a browser. Other useful 172 | links for diagnosis and investigating what’s going on: 173 | 174 | * http://dsyerconfigserver.cfapps.io/customers/cloud 175 | * http://dsyercustomers.cfapps.io/env 176 | * http://dsyerstores.cfapps.io/env 177 | 178 | The stores app comes pre-populated with a Mongo database full of 179 | Starbucks locations. The customers app is empty to start (and uses an 180 | in-memory database) so you have to POST some data into it, e.g. 181 | 182 | .... 183 | $ curl -i -H "Content-Type: application/json" http://dsyercustomers.cfapps.io/customers -d @customers-stores/rest-microservices-customers/src/test/resources/customers.json 184 | .... 185 | 186 | Then when you visit the customers app at 187 | http://dsyercustomers.cfapps.io/customers you should see a customer 188 | (Ollie) and a link to nearby stores. If the stores app did not register 189 | with eureka, or if you stop the the stores app intentionally 190 | (`cf stop ...`), then the stores link will be missing in the customers 191 | app (simple example of a circuit breaker). 192 | 193 | Sometimes it is also useful to undeploy the services (and unbind them 194 | from apps etc.), and redeploy them: 195 | 196 | .... 197 | $ ./services_undeploy.sh 198 | $ ./services_deploy.sh 199 | $ ./demo_deploy.sh 200 | .... 201 | 202 | It should all work on https://run.pivotal.io[Pivotal Web Services], by 203 | default, or on any Cloudfoundry instance (e.g. PCF or a local single VM 204 | instance) if you set the `DOMAIN` environment variable to the DNS domain 205 | that the service is running in. 206 | 207 | To run on https://github.com/cloudfoundry/bosh-lite[bosh-lite] 208 | 209 | Deploy mongodb using 210 | https://github.com/cloudfoundry-community/cf-services-contrib-release 211 | 212 | .... 213 | export DOMAIN=10.244.0.34.xip.io 214 | export PLATFORM_HOME=/Users/sgibb/workspace/spring/spring-cloud-samples #where all spring-cloud-samples are checked out 215 | export MONGO_URI=mongodb://192.168.50.1/stores #mongo running on host #TODO install mongo as a service 216 | .... 217 | 218 | [[build-documentation]] 219 | Build documentation 220 | ~~~~~~~~~~~~~~~~~~~ 221 | 222 | You can easily create the documentation for a particular release train 223 | using the `release_train.sh` script. You can run it in an interactive 224 | mode - then you’ll get prompted for all entries, or you can provide the 225 | values of the name of the release train together with the names and 226 | versions of modules. You can run `./release_train -h` for more 227 | information. -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | git submodule update --init 6 | git submodule foreach '(git checkout master && git pull --rebase) || echo "Not attempting to sync"' 7 | if [ ".$@" == "." ]; then 8 | ./mvnw clean install -P build,!base,!starters,!apps -DskipTests 9 | ./mvnw clean install -P !build,base,starters,!apps -DskipTests 10 | fi 11 | ./mvnw clean install "$@" -DskipTests 12 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | *.jar 2 | .factorypath 3 | -------------------------------------------------------------------------------- /demo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dsyer/maven 2 | 3 | MAINTAINER dsyer@pivotal.io 4 | 5 | USER user 6 | WORKDIR /home/user/scripts 7 | 8 | RUN sed -i -e 's/answer=false/answer=true/' /home/user/.gvm/etc/config && bash -lc 'gvm install springboot 1.1.8.RELEASE' 9 | 10 | CMD bash -c 'echo "Hello World"' -------------------------------------------------------------------------------- /demo/app.groovy: -------------------------------------------------------------------------------- 1 | @EnableZuulProxy 2 | @RestController 3 | class Demo { 4 | @RequestMapping("/") 5 | def home() { [message: "Hello"] } 6 | } 7 | -------------------------------------------------------------------------------- /demo/application.yml: -------------------------------------------------------------------------------- 1 | info: 2 | id: ${name:application} 3 | spring: 4 | application: 5 | name: ${info.id} 6 | 7 | logging: 8 | level: 9 | com.netflix.discovery: 'OFF' 10 | com.netflix.zuul: 'OFF' 11 | # org.springframework.security: DEBUG 12 | # org.springframework.web: DEBUG 13 | zuul: 14 | routes: 15 | configserver: /config/** 16 | foo: 17 | ribbon: 18 | listOfServers: http://example.com 19 | Eureka: 20 | instance: 21 | leaseRenewalIntervalInSeconds: 10 22 | dataCenterInfo: 23 | availability-zone: us-east-1 24 | --- 25 | spring: 26 | profiles: local 27 | oauth2: 28 | client: 29 | accessTokenUri: http://localhost:8080/uaa/oauth/token 30 | userAuthorizationUri: http://localhost:8080/uaa/oauth/authorize 31 | clientId: acme 32 | clientSecret: acmesecret 33 | resource: 34 | tokenInfoUri: http://localhost:8080/uaa/oauth/check_token 35 | # id: openid 36 | serviceId: ${PREFIX:}resource 37 | 38 | endpoints: 39 | health: 40 | sensitive: false 41 | restart: 42 | enabled: true 43 | shutdown: 44 | enabled: true 45 | 46 | --- 47 | spring: 48 | profiles: github 49 | oauth2: 50 | client: 51 | clientId: bd1c0a783ccdd1c9b9e4 52 | clientSecret: 1a9030fbca47a5b2c28e92f19050bb77824b5ad1 53 | accessTokenUri: https://github.com/login/oauth/access_token 54 | userAuthorizationUri: https://github.com/login/oauth/authorize 55 | clientAuthenticationScheme: form 56 | resource: 57 | userInfoUri: https://api.github.com/user 58 | preferTokenInfo: false 59 | 60 | --- 61 | spring: 62 | profiles: test 63 | oauth2: 64 | client: 65 | tokenUri: https://login.run.pivotal.io/oauth/token 66 | authorizationUri: https://login.run.pivotal.io/oauth/authorize 67 | clientId: acme 68 | clientSecret: ${CLIENT_SECRET} 69 | resource: 70 | tokenInfoUri: http://uaa.run.pivotal.io/check_token 71 | id: openid 72 | serviceId: ${PREFIX:}resource 73 | -------------------------------------------------------------------------------- /demo/bootstrap.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | 3 | spring: 4 | application: 5 | name: ${SPRING_APPLICATION_NAME:demo} 6 | cloud: 7 | config: 8 | uri: http://user:password@localhost:8888 9 | 10 | --- 11 | spring: 12 | profiles: discovery 13 | cloud: 14 | config: 15 | discovery: 16 | enabled: true 17 | 18 | --- 19 | spring: 20 | profiles: cloud 21 | cloud: 22 | config: 23 | uri: ${vcap.services.${PREFIX:}configserver.credentials.uri:http://localhost:8888} 24 | 25 | -------------------------------------------------------------------------------- /demo/client.groovy: -------------------------------------------------------------------------------- 1 | @EnableDiscoveryClient 2 | public class Application { 3 | } 4 | -------------------------------------------------------------------------------- /demo/dash.groovy: -------------------------------------------------------------------------------- 1 | @EnableHystrixDashboard 2 | class Dash { 3 | } -------------------------------------------------------------------------------- /demo/disc.groovy: -------------------------------------------------------------------------------- 1 | package demo 2 | 3 | @Grab('httpclient') 4 | @Configuration 5 | @EnableDiscoveryClient 6 | @Log 7 | class App implements CommandLineRunner { 8 | @Autowired 9 | DiscoveryClient client 10 | @Autowired 11 | EurekaInstanceConfigBean config 12 | @Autowired 13 | EurekaClientConfigBean eureka 14 | @Value('${eureka.instance.hostname:localhost}') 15 | String hostname 16 | @Override 17 | void run(String... args) { 18 | log.info("Hostname: " + config.hostname + ", " + config.ipAddress + ", " + hostname) 19 | log.info("Eureka: " + eureka.serviceUrl) 20 | try { 21 | def instance = client.getNextServerFromEureka("customersui", false) 22 | log.info("SERVICE: " + instance.homePageUrl) 23 | } catch (Exception e) { 24 | log.severe("Cannot locate service " + e) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demo/double.groovy: -------------------------------------------------------------------------------- 1 | @EnableDiscoveryClient 2 | @EnableConfigServer 3 | @RestController 4 | class Demo { 5 | @RequestMapping("/") 6 | def home() { [message: "Hello"] } 7 | } 8 | -------------------------------------------------------------------------------- /demo/eureka.groovy: -------------------------------------------------------------------------------- 1 | @EnableEurekaServer 2 | class Eureka { 3 | } -------------------------------------------------------------------------------- /demo/hystrix.groovy: -------------------------------------------------------------------------------- 1 | package demo 2 | 3 | @EnableDiscoveryClient 4 | @RestController 5 | class Application { 6 | @Autowired 7 | Service service 8 | @RequestMapping("/") 9 | def home() { service.getMessage() } 10 | } 11 | 12 | @Component 13 | @EnableHystrix(proxyTargetClass = true) 14 | class Service { 15 | @Autowired 16 | Fail fail 17 | @HystrixCommand(fallbackMethod = 'getDefault') 18 | Map getMessage() { 19 | if (fail.isFail()) { 20 | throw new RuntimeException("Fail!") 21 | } 22 | [message: "Hello"] 23 | } 24 | Map getDefault() { 25 | [message: "Default"] 26 | } 27 | } 28 | 29 | @Component 30 | @ConfigurationProperties("fail") 31 | class Fail { 32 | boolean enabled = false 33 | private Random random = new Random() 34 | boolean isFail() { 35 | return enabled || random.nextDouble()>0.5 36 | } 37 | } -------------------------------------------------------------------------------- /demo/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cp ../cli/spring-platform-cli/target/*.jar ~/.gvm/springboot/1.1.8.RELEASE/lib 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello AngularJS 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |

Greeting

13 |
14 |

The ID is {{greeting.id}}

15 |

The content is {{greeting.content}}

16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /demo/public/js/hello.js: -------------------------------------------------------------------------------- 1 | function Hello($scope, $http) { 2 | $http.get(window.location.protocol + '//' + window.location.host+'/proxy/'). 3 | success(function(data) { 4 | $scope.greeting = data; 5 | }); 6 | } 7 | -------------------------------------------------------------------------------- /demo/refresh.groovy: -------------------------------------------------------------------------------- 1 | @RestController 2 | @Log 3 | public class Application { 4 | 5 | @Autowired 6 | Service service 7 | 8 | @RequestMapping('/') 9 | def home() { 10 | [message: 'Hello ' + service.name] 11 | } 12 | 13 | } 14 | 15 | class ServiceConfiguration { 16 | 17 | @Autowired 18 | private MyProps props 19 | 20 | @RefreshScope 21 | @Bean 22 | Service service() { 23 | log.info("*************** Hello") 24 | new Service(props.name) 25 | } 26 | 27 | } 28 | 29 | class Service { 30 | String name = 'UNKNOWN' 31 | private Service() { } 32 | Service(String name) { 33 | this.name = name 34 | } 35 | } 36 | 37 | @ConfigurationProperties('myprops') 38 | class MyProps { 39 | String name 40 | } 41 | -------------------------------------------------------------------------------- /demo/resource.groovy: -------------------------------------------------------------------------------- 1 | // Run this app with --spring.application.name=resource 2 | @EnableOAuth2Resource 3 | @EnableDiscoveryClient 4 | @RestController 5 | class Demo { 6 | @RequestMapping("/") 7 | def home() { [id: UUID.randomUUID().toString(), content: "Hello Remote"] } 8 | } 9 | -------------------------------------------------------------------------------- /demo/ribbon.groovy: -------------------------------------------------------------------------------- 1 | @RibbonClient("foo") 2 | class Client implements CommandLineRunner { 3 | @Autowired 4 | RestTemplate restTemplate 5 | @Override 6 | void run(String... args) { 7 | println restTemplate.getForObject("http://foo/", String) 8 | } 9 | } -------------------------------------------------------------------------------- /demo/spa.groovy: -------------------------------------------------------------------------------- 1 | @EnableOAuth2Sso 2 | @RestController 3 | class Demo { 4 | @RequestMapping("/proxy") 5 | def home() { [id: UUID.randomUUID().toString(), content: "Hello Local"] } 6 | } 7 | -------------------------------------------------------------------------------- /demo/sso.groovy: -------------------------------------------------------------------------------- 1 | @EnableOAuth2Sso 2 | @EnableZuulProxy 3 | @Controller 4 | class Demo { 5 | } 6 | -------------------------------------------------------------------------------- /demo_deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DOMAIN=${DOMAIN:-run.pivotal.io} 6 | TARGET=api.${DOMAIN} 7 | APPLICATION_DOMAIN=${APPLICATION_DOMAIN:-"$DOMAIN"} 8 | if [ "$DOMAIN" == "run.pivotal.io" ]; then 9 | APPLICATION_DOMAIN=cfapps.io 10 | fi 11 | 12 | cf api | grep ${TARGET} || cf api ${TARGET} --skip-ssl-validation 13 | cf apps | grep OK || cf login 14 | 15 | TMPHOME=$(cd `dirname "$0"` && pwd) 16 | if [ "$PREFIX" == "NONE" ]; then 17 | PREFIX= 18 | elif [ "$PREFIX" == "" ]; then 19 | PREFIX=$USER 20 | fi 21 | 22 | PLATFORM_HOME=${PLATFORM_HOME:-$TMPHOME} 23 | echo Home: $PLATFORM_HOME 24 | 25 | DEMO_HOME=${DEMO_HOME:-$PLATFORM_HOME/customers-stores} 26 | # TODO: clone and build 27 | 28 | function find_jar() { 29 | if [ -d $1 ]; then 30 | ls $1/*.jar | egrep -v 'javadoc|sources' 31 | else 32 | echo $1/app.jar 33 | fi 34 | } 35 | 36 | function deploy_app() { 37 | 38 | APP=$PREFIX$1 39 | NAME=$1 40 | [ "$1" == "stores" ] && NAME=store 41 | JARPATH=$(find_jar "$DEMO_HOME/rest-microservices-$NAME/target") 42 | [ "$1" == "customersui" ] && JARPATH=$DEMO_HOME/customers-stores-ui/app.jar 43 | [ "$1" == "hystrix-dashboard" -o "$1" == "turbine" ] && JARPATH=$(find_jar "$PLATFORM_HOME/$NAME/target") 44 | 45 | if ! [ -f "$JARPATH" ]; then 46 | echo "No jar for deployment of $1 at: $JARPATH" 47 | exit 0 48 | fi 49 | 50 | cf push $APP -m 1028m -p $JARPATH --no-start 51 | cf env $APP | grep SPRING_PROFILES_ACTIVE || cf set-env $APP SPRING_PROFILES_ACTIVE cloud 52 | cf env $APP | grep ENCRYPT_KEY || cf set-env $APP ENCRYPT_KEY deadbeef 53 | if [ "$PREFIX" != "" ]; then 54 | cf env $APP | grep PREFIX || cf set-env $APP PREFIX $PREFIX 55 | fi 56 | if [ "$APPLICATION_DOMAIN" != "cfapps.io" ]; then 57 | cf set-env $APP APPLICATION_DOMAIN $APPLICATION_DOMAIN 58 | else 59 | cf set-env $APP DOMAIN $APPLICATION_DOMAIN 60 | fi 61 | 62 | cf bind-service $APP ${PREFIX}configserver 63 | cf bind-service $APP ${PREFIX}eureka 64 | cf bind-service $APP ${PREFIX}rabbitmq 65 | [ "$1" == "stores" ] && cf bind-service $APP ${PREFIX}mongodb 66 | 67 | cf restart $APP 68 | 69 | } 70 | 71 | apps=$* 72 | if [ -z $1 ]; then 73 | apps='stores customers customersui hystrix-dashboard turbine' 74 | fi 75 | for f in $apps; do 76 | deploy_app $f 77 | done 78 | -------------------------------------------------------------------------------- /demo_undeploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DOMAIN=${DOMAIN:-run.pivotal.io} 6 | TARGET=api.${DOMAIN} 7 | APPLICATION_DOMAIN=${APPLICATION_DOMAIN:-"$DOMAIN"} 8 | if [ "$DOMAIN" == "run.pivotal.io" ]; then 9 | APPLICATION_DOMAIN=cfapps.io 10 | fi 11 | 12 | cf api | grep ${TARGET} || cf api ${TARGET} --skip-ssl-validation 13 | cf apps | grep OK || cf login 14 | 15 | TMPHOME=$(cd `dirname "$0"` && pwd) 16 | if [ "$PREFIX" == "NONE" ]; then 17 | PREFIX= 18 | elif [ "$PREFIX" == "" ]; then 19 | PREFIX=$USER 20 | fi 21 | 22 | PLATFORM_HOME=${PLATFORM_HOME:-$TMPHOME} 23 | echo Home: $PLATFORM_HOME 24 | 25 | DEMO_HOME=${DEMO_HOME:-$PLATFORM_HOME/customers-stores} 26 | # TODO: clone and build 27 | 28 | function undeploy_app() { 29 | 30 | APP=$PREFIX$1 31 | cf delete -f $APP 32 | 33 | } 34 | 35 | apps=$* 36 | if [ -z $1 ]; then 37 | apps='stores customers customersui hystrix-dashboard turbine' 38 | fi 39 | for f in $apps; do 40 | undeploy_app $f 41 | done 42 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | redis: 2 | image: redis 3 | ports: 4 | - "6379:6379" 5 | rabbitmq: 6 | image: rabbitmq:management 7 | ports: 8 | - "5672:5672" 9 | - "15672:15672" 10 | mongodb: 11 | image: mongo 12 | ports: 13 | - "27017:27017" 14 | -------------------------------------------------------------------------------- /docs/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.cloud 7 | spring-cloud-build 8 | 2.2.0.BUILD-SNAPSHOT 9 | 10 | 11 | spring-cloud-samples-docs 12 | 13 | jar 14 | Spring Cloud Samples Docs 15 | Spring Samples Docs 16 | 2020-1.M1 17 | 18 | 19 | 1.0.x,Dalston,Edgware,Finchley,Greenwich,Hoxton 20 | ${basedir}/.. 21 | spring-cloud 22 | 2020-1.BUILD-SNAPSHOT 23 | 2020-1 24 | ${spring-cloud-release.version} 25 | 1.6.0 26 | ${project.basedir}/src/main/asciidoc/_spring-cloud-${release-train-major}-configprops.adoc 27 | 28 | 29 | 30 | 31 | org.springframework.cloud 32 | spring-cloud-dependencies 33 | ${spring-cloud-release.version} 34 | pom 35 | import 36 | 37 | 38 | 39 | 40 | 41 | 42 | org.springframework.cloud 43 | spring-cloud-starter-bus-amqp 44 | compile 45 | 46 | 47 | org.springframework.cloud 48 | spring-cloud-starter-bus-kafka 49 | compile 50 | 51 | 52 | org.springframework.cloud 53 | spring-cloud-starter-config 54 | compile 55 | 56 | 57 | org.springframework.cloud 58 | spring-cloud-config-server 59 | compile 60 | 61 | 62 | org.springframework.cloud 63 | spring-cloud-starter-security 64 | compile 65 | 66 | 67 | org.springframework.cloud 68 | spring-cloud-starter-oauth2 69 | compile 70 | 71 | 72 | org.springframework.cloud 73 | spring-cloud-starter-consul-all 74 | compile 75 | 76 | 77 | org.springframework.cloud 78 | spring-cloud-starter-zookeeper-all 79 | compile 80 | 81 | 82 | org.springframework.cloud 83 | spring-cloud-starter-sleuth 84 | compile 85 | 86 | 87 | org.springframework.cloud 88 | spring-cloud-starter-zipkin 89 | compile 90 | 91 | 92 | org.springframework.cloud 93 | spring-cloud-starter-cloudfoundry 94 | compile 95 | 96 | 97 | org.springframework.cloud 98 | spring-cloud-cloudfoundry-discovery 99 | compile 100 | 101 | 102 | org.springframework.cloud 103 | spring-cloud-cloudfoundry-web 104 | compile 105 | 106 | 107 | org.springframework.cloud 108 | spring-cloud-starter-contract-verifier 109 | compile 110 | 111 | 112 | org.springframework.cloud 113 | spring-cloud-starter-contract-stub-runner 114 | compile 115 | 116 | 117 | org.springframework.cloud 118 | spring-cloud-vault-config 119 | compile 120 | 121 | 122 | org.springframework.cloud 123 | spring-cloud-vault-config-aws 124 | compile 125 | 126 | 127 | org.springframework.cloud 128 | spring-cloud-vault-config-databases 129 | compile 130 | 131 | 132 | org.springframework.cloud 133 | spring-cloud-vault-config-consul 134 | compile 135 | 136 | 137 | org.springframework.cloud 138 | spring-cloud-vault-config-rabbitmq 139 | compile 140 | 141 | 142 | org.springframework.cloud 143 | spring-cloud-starter-gateway 144 | compile 145 | 146 | 147 | org.springframework.cloud 148 | spring-cloud-gateway-mvc 149 | compile 150 | 151 | 152 | org.springframework.cloud 153 | spring-cloud-gateway-webflux 154 | compile 155 | 156 | 157 | org.springframework.cloud 158 | spring-cloud-stream 159 | compile 160 | 161 | 162 | org.springframework.cloud 163 | spring-cloud-stream-binder-test 164 | compile 165 | 166 | 167 | org.springframework.cloud 168 | spring-cloud-stream-test-support 169 | compile 170 | 171 | 172 | org.springframework.cloud 173 | spring-cloud-stream-binder-kafka 174 | compile 175 | 176 | 177 | org.springframework.cloud 178 | spring-cloud-stream-binder-kafka-streams 179 | compile 180 | 181 | 182 | org.springframework.cloud 183 | spring-cloud-stream-binder-kafka-core 184 | compile 185 | 186 | 187 | org.springframework.cloud 188 | spring-cloud-starter-stream-kafka 189 | compile 190 | 191 | 192 | org.springframework.cloud 193 | spring-cloud-stream-binder-rabbit 194 | compile 195 | 196 | 197 | org.springframework.cloud 198 | spring-cloud-stream-binder-rabbit-core 199 | compile 200 | 201 | 202 | org.springframework.cloud 203 | spring-cloud-starter-stream-rabbit 204 | compile 205 | 206 | 207 | org.springframework.cloud 208 | spring-cloud-stream-binder-rabbit-test-support 209 | compile 210 | 211 | 212 | org.springframework.cloud 213 | spring-cloud-starter-function-web 214 | compile 215 | 216 | 217 | org.springframework.cloud 218 | spring-cloud-function-compiler 219 | compile 220 | 221 | 222 | org.springframework.cloud 223 | spring-cloud-function-adapter-aws 224 | compile 225 | 226 | 227 | org.springframework.cloud 228 | spring-cloud-function-adapter-azure 229 | compile 230 | 231 | 232 | 233 | 234 | 235 | finchley 236 | 237 | 238 | release-train-major 239 | finchley 240 | 241 | 242 | 243 | 244 | 245 | org.apache.maven.plugins 246 | maven-dependency-plugin 247 | 248 | 249 | org.asciidoctor 250 | asciidoctor-maven-plugin 251 | false 252 | 253 | 254 | com.agilejava.docbkx 255 | docbkx-maven-plugin 256 | 257 | 258 | org.apache.maven.plugins 259 | maven-antrun-plugin 260 | false 261 | 262 | 263 | org.codehaus.mojo 264 | build-helper-maven-plugin 265 | false 266 | 267 | 268 | 269 | 270 | 271 | post-finchley 272 | 273 | 274 | release-train-major 275 | !finchley 276 | 277 | 278 | 279 | 280 | org.springframework.cloud 281 | spring-cloud-starter-kubernetes-all 282 | compile 283 | 284 | 285 | org.springframework.cloud 286 | spring-cloud-starter-circuitbreaker-reactor-resilience4j 287 | compile 288 | 289 | 290 | org.springframework.cloud 291 | spring-cloud-starter-circuitbreaker-resilience4j 292 | compile 293 | 294 | 295 | 296 | 297 | 298 | org.apache.maven.plugins 299 | maven-resources-plugin 300 | 301 | 302 | copy-asciidoc-for-post-finchley 303 | generate-resources 304 | 305 | copy-resources 306 | 307 | 308 | 309 | 310 | 311 | ${main.basedir}/kubernetes/src/main/asciidoc 312 | 313 | 314 | images/** 315 | 316 | 317 | *.sh 318 | 319 | 320 | 321 | target/generated-docs 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | docs 332 | 333 | 334 | 335 | pl.project13.maven 336 | git-commit-id-plugin 337 | 338 | 339 | 340 | 341 | 342 | org.apache.maven.plugins 343 | maven-dependency-plugin 344 | 345 | 346 | org.apache.maven.plugins 347 | maven-resources-plugin 348 | 349 | 350 | copy-asciidoc 351 | generate-resources 352 | 353 | copy-resources 354 | 355 | 356 | 357 | 358 | 359 | ${main.basedir}/bus/src/main/asciidoc 360 | 361 | 362 | images/** 363 | 364 | 365 | *.sh 366 | 367 | 368 | 369 | 370 | ${main.basedir}/commons/docs/src/main/asciidoc 371 | 372 | 373 | images/** 374 | 375 | 376 | *.sh 377 | 378 | 379 | 380 | 381 | ${main.basedir}/cli/docs/src/main/asciidoc 382 | 383 | 384 | images/** 385 | 386 | 387 | *.sh 388 | 389 | 390 | 391 | 392 | ${main.basedir}/cloudfoundry/src/main/asciidoc 393 | 394 | 395 | images/** 396 | 397 | 398 | *.sh 399 | 400 | 401 | 402 | 403 | ${main.basedir}/cluster/src/main/asciidoc 404 | 405 | 406 | images/** 407 | 408 | 409 | *.sh 410 | 411 | 412 | 413 | 414 | ${main.basedir}/config/docs/src/main/asciidoc 415 | 416 | 417 | images/** 418 | 419 | 420 | *.sh 421 | 422 | 423 | 424 | 425 | ${main.basedir}/consul/docs/src/main/asciidoc 426 | 427 | 428 | images/** 429 | 430 | 431 | *.sh 432 | 433 | 434 | 435 | 436 | ${main.basedir}/contract/docs/src/main/asciidoc 437 | 438 | 439 | images/** 440 | 441 | 442 | *.sh 443 | 444 | 445 | 446 | 447 | ${main.basedir}/netflix/docs/src/main/asciidoc 448 | 449 | 450 | images/** 451 | 452 | 453 | *.sh 454 | 455 | 456 | 457 | 458 | ${main.basedir}/security/src/main/asciidoc 459 | 460 | 461 | images/** 462 | 463 | 464 | *.sh 465 | 466 | 467 | 468 | 469 | ${main.basedir}/stream/spring-cloud-stream-docs/core/spring-cloud-stream-core-docs/src/main/asciidoc 470 | 471 | 472 | images/** 473 | 474 | 475 | *.sh 476 | 477 | 478 | 479 | 480 | ${main.basedir}/stream/spring-cloud-stream-docs/rabbit/spring-cloud-stream-binder-rabbit-docs/src/main/asciidoc 481 | 482 | 483 | images/** 484 | 485 | 486 | *.sh 487 | 488 | 489 | 490 | 491 | ${main.basedir}/stream/spring-cloud-stream-docs/kafka/spring-cloud-stream-binder-kafka/src/main/asciidoc 492 | 493 | 494 | images/** 495 | 496 | 497 | *.sh 498 | 499 | 500 | 501 | 502 | ${main.basedir}/sleuth/docs/src/main/asciidoc 503 | 504 | 505 | images/** 506 | 507 | 508 | *.sh 509 | 510 | 511 | 512 | 513 | ${main.basedir}/task/docs/src/main/asciidoc 514 | 515 | 516 | images/** 517 | 518 | 519 | *.sh 520 | 521 | 522 | 523 | 524 | ${main.basedir}/vault/docs/src/main/asciidoc 525 | 526 | 527 | images/** 528 | 529 | 530 | *.sh 531 | 532 | 533 | 534 | 535 | ${main.basedir}/zookeeper/docs/src/main/asciidoc 536 | 537 | 538 | images/** 539 | 540 | 541 | *.sh 542 | 543 | 544 | 545 | target/refdocs 546 | 547 | 548 | 549 | 550 | 551 | 552 | exec-maven-plugin 553 | org.codehaus.mojo 554 | ${exec-maven-plugin.version} 555 | 556 | 557 | set-symbolic-link 558 | generate-resources 559 | 560 | exec 561 | 562 | 563 | ${project.basedir}/src/main/asciidoc/symbolic_links.sh 564 | 565 | ${project.basedir} ${release-train-major} 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | org.asciidoctor 574 | asciidoctor-maven-plugin 575 | 576 | 577 | org.apache.maven.plugins 578 | maven-antrun-plugin 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | spring-snapshots 587 | Spring Snapshots 588 | https://repo.spring.io/libs-snapshot-local 589 | 590 | true 591 | 592 | 593 | false 594 | 595 | 596 | 597 | spring-milestones 598 | Spring Milestones 599 | https://repo.spring.io/libs-milestone-local 600 | 601 | false 602 | 603 | 604 | 605 | spring-releases 606 | Spring Releases 607 | https://repo.spring.io/release 608 | 609 | false 610 | 611 | 612 | 613 | 614 | 615 | spring-snapshots 616 | Spring Snapshots 617 | https://repo.spring.io/libs-snapshot-local 618 | 619 | true 620 | 621 | 622 | false 623 | 624 | 625 | 626 | spring-milestones 627 | Spring Milestones 628 | https://repo.spring.io/libs-milestone-local 629 | 630 | false 631 | 632 | 633 | 634 | spring-releases 635 | Spring Releases 636 | https://repo.spring.io/libs-release-local 637 | 638 | false 639 | 640 | 641 | 642 | 643 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/.gitignore: -------------------------------------------------------------------------------- 1 | versions.txt 2 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/README.adoc: -------------------------------------------------------------------------------- 1 | The https://github.com/spring-cloud-samples[spring-cloud-samples] can be 2 | run as a demo locally by just cloning the individual projects and 3 | running them. This project can be used to manage updating and deploying 4 | the sample apps to cloudfoundry. 5 | 6 | [[running-locally]] 7 | Running Locally 8 | ~~~~~~~~~~~~~~~ 9 | 10 | Pre-requisites: Maven (3) and Java (1.7). To run the Customers UI you 11 | also need the Spring Boot CLI. Clone the repository and initialize 12 | submodules: 13 | 14 | .... 15 | $ git clone https://github.com/spring-cloud-samples/scripts 16 | $ cd scripts 17 | $ ./build.sh 18 | .... 19 | 20 | (You can add `-DskipTests' if you like, or just use `./mvnw' directly, 21 | once the submodules are initialized. If you are starting from scratch, 22 | the ``build'' module needs to be installed first, followed by the 23 | ``starters''.) 24 | 25 | You also nee Mongodb and RabbitMQ and Redis. If you don’t have those, 26 | and you do have Docker, you can run them in Docker (via 27 | http://docs.docker.com/compose/[docker-compose]): 28 | 29 | .... 30 | $ docker-compose up 31 | ... 32 | 33 | 34 | 35 | .... 36 | 37 | the containers for the server processes write their data locally in 38 | `./data_*`. Those files will be owned by root, so watch out when it 39 | comes to remove them. 40 | 41 | *NOTE*: Docker version 1.5 and Compose version 1.1.0 are confirmed to 42 | work. The latest versions have not been tested and may have problems. 43 | 44 | [[docker-on-a-mac]] 45 | Docker on a mac 46 | ^^^^^^^^^^^^^^^ 47 | 48 | Docker on a mac requires boot2docker. Because docker is running in a 49 | virtual machine, The ip addresses of mongo, rabbit and redis are not 50 | 127.0.0.1. You can use virtualbox port forwarding to address this issue 51 | with the following commands (from 52 | https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md[here]): 53 | 54 | .... 55 | # vm must be powered off 56 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port27017,tcp,,27017,,27017" 57 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port6379,tcp,,6379,,6379" 58 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port15672,tcp,,15672,,15672" 59 | VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port5672,tcp,,5672,,5672" 60 | .... 61 | 62 | [[docker-alternative-on-a-mac]] 63 | Docker alternative on a mac 64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 65 | 66 | If you prefer not to use docker-compose you can install mongo, rabbit 67 | and redis: 68 | 69 | .... 70 | brew install mongodb rabbitmq redis 71 | .... 72 | 73 | To run the apps (each in a different terminal) 74 | 75 | .... 76 | $ rabbitmq-server 77 | $ mongod --config /usr/local/etc/mongod.conf 78 | $ redis-server /usr/local/etc/redis.conf 79 | .... 80 | 81 | Run the apps: 82 | 83 | .... 84 | $ ./run.sh 85 | .... 86 | 87 | You can kill the processes using `./kill.sh`, and both scripts know how 88 | to operate on individual apps or subsets, e.g. (the default): 89 | 90 | .... 91 | $ ./run.sh configserver eureka customers stores 92 | .... 93 | 94 | To run the UI with the maps, get the Spring Boot CLI, and install the 95 | platform CLI plugin, e.g. with GVM: 96 | 97 | .... 98 | $ gvm install springboot 1.2.0.RC1 99 | $ gvm use springboot 1.2.0.RC1 100 | .... 101 | 102 | and finally install the Spring Cloud plugin: 103 | 104 | .... 105 | $ spring install org.springframework.cloud:spring-cloud-cli:1.0.0.BUILD-SNAPSHOT 106 | .... 107 | 108 | Then run the app 109 | 110 | .... 111 | $ (cd customers-stores/customers-ui; spring run app.groovy) 112 | .... 113 | 114 | [[running-on-cloud-foundry]] 115 | Running on Cloud Foundry 116 | ~~~~~~~~~~~~~~~~~~~~~~~~ 117 | 118 | Pre-requisites: 119 | 120 | * Maven (3) 121 | * Java (1.8) 122 | * the `cf` CLI 123 | * Cloud Foundry with Java buildpack version 2.5 or greater (for Java 1.8 124 | support) 125 | 126 | Clone the repository and initialize submodules: 127 | 128 | .... 129 | $ git clone https://github.com/spring-cloud-samples/scripts 130 | $ cd scripts 131 | $ ./build.sh 132 | $ ./services_deploy.sh 133 | $ ./demo_deploy.sh 134 | .... 135 | 136 | The result should be a bunch of apps running in the default space for 137 | your default org, with names prefixed by your local userid, e.g. 138 | 139 | .... 140 | $ cf apps 141 | ... 142 | dsyerconfigserver started 1/1 512M 1G dsyerconfigserver.cfapps.io 143 | dsyereureka started 1/1 512M 1G dsyereureka.cfapps.io 144 | dsyercustomers started 1/1 512M 1G dsyercustomers.cfapps.io 145 | dsyerstores started 1/1 512M 1G dsyerstores.cfappps.io 146 | ... 147 | .... 148 | 149 | The `configserver` and `eureka` apps will have been registered as user 150 | provided services, and bound to the other apps: 151 | 152 | .... 153 | $ cf services 154 | ... 155 | name service plan bound apps 156 | dsyerconfigserver user-provided dsyercustomers, dsyereureka, dsyerstores 157 | dsyereureka user-provided dsyerconfigserver, dsyercustomers, dsyerstores 158 | ... 159 | .... 160 | 161 | You can check that it is all working by pinging the `eureka` app 162 | endpoints and seeing the other apps registered. E.g. visit 163 | http://dsyereureka.cfapps.io/eureka/apps in a browser. Other useful 164 | links for diagnosis and investigating what’s going on: 165 | 166 | * http://dsyerconfigserver.cfapps.io/customers/cloud 167 | * http://dsyercustomers.cfapps.io/env 168 | * http://dsyerstores.cfapps.io/env 169 | 170 | The stores app comes pre-populated with a Mongo database full of 171 | Starbucks locations. The customers app is empty to start (and uses an 172 | in-memory database) so you have to POST some data into it, e.g. 173 | 174 | .... 175 | $ curl -i -H "Content-Type: application/json" http://dsyercustomers.cfapps.io/customers -d @customers-stores/rest-microservices-customers/src/test/resources/customers.json 176 | .... 177 | 178 | Then when you visit the customers app at 179 | http://dsyercustomers.cfapps.io/customers you should see a customer 180 | (Ollie) and a link to nearby stores. If the stores app did not register 181 | with eureka, or if you stop the the stores app intentionally 182 | (`cf stop ...`), then the stores link will be missing in the customers 183 | app (simple example of a circuit breaker). 184 | 185 | Sometimes it is also useful to undeploy the services (and unbind them 186 | from apps etc.), and redeploy them: 187 | 188 | .... 189 | $ ./services_undeploy.sh 190 | $ ./services_deploy.sh 191 | $ ./demo_deploy.sh 192 | .... 193 | 194 | It should all work on https://run.pivotal.io[Pivotal Web Services], by 195 | default, or on any Cloudfoundry instance (e.g. PCF or a local single VM 196 | instance) if you set the `DOMAIN` environment variable to the DNS domain 197 | that the service is running in. 198 | 199 | To run on https://github.com/cloudfoundry/bosh-lite[bosh-lite] 200 | 201 | Deploy mongodb using 202 | https://github.com/cloudfoundry-community/cf-services-contrib-release 203 | 204 | .... 205 | export DOMAIN=10.244.0.34.xip.io 206 | export PLATFORM_HOME=/Users/sgibb/workspace/spring/spring-cloud-samples #where all spring-cloud-samples are checked out 207 | export MONGO_URI=mongodb://192.168.50.1/stores #mongo running on host #TODO install mongo as a service 208 | .... 209 | 210 | [[build-documentation]] 211 | Build documentation 212 | ~~~~~~~~~~~~~~~~~~~ 213 | 214 | You can easily create the documentation for a particular release train 215 | using the `release_train.sh` script. You can run it in an interactive 216 | mode - then you’ll get prompted for all entries, or you can provide the 217 | values of the name of the release train together with the names and 218 | versions of modules. You can run `./release_train -h` for more 219 | information. -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_attributes.adoc: -------------------------------------------------------------------------------- 1 | :doctype: book 2 | :idprefix: 3 | :idseparator: - 4 | :toc: left 5 | :toclevels: 4 6 | :tabsize: 4 7 | :numbered: 8 | :sectanchors: 9 | :sectnums: 10 | :icons: font 11 | :hide-uri-scheme: 12 | :docinfo: shared,private 13 | 14 | :project-full-name: Spring Cloud 15 | :project-name: spring-cloud -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-2020-1-attributes.adoc: -------------------------------------------------------------------------------- 1 | :spring-boot-version: 2.3.0.M4 2 | :spring-cloud-build-version: 3.0.0.M1 3 | :spring-cloud-commons-version: 3.0.0.M1 4 | :spring-cloud-function-version: 3.1.0.M1 5 | :spring-cloud-stream-version: 3.1.0.M1 6 | :spring-cloud-bus-version: 3.0.0.M1 7 | :spring-cloud-task-version: 2.2.3.RELEASE 8 | :spring-cloud-config-version: 3.0.0.M1 9 | :spring-cloud-netflix-version: 3.0.0.M1 10 | :spring-cloud-cloudfoundry-version: 3.0.0.M1 11 | :spring-cloud-kubernetes-version: 2.0.0.M1 12 | :spring-cloud-openfeign-version: 3.0.0.M1 13 | :spring-cloud-consul-version: 3.0.0.M1 14 | :spring-cloud-gateway-version: 3.0.0.M1 15 | :spring-cloud-security-version: 3.0.0.M1 16 | :spring-cloud-sleuth-version: 3.0.0.M1 17 | :spring-cloud-zookeeper-version: 3.0.0.M1 18 | :spring-cloud-contract-version: 3.0.0.M1 19 | :spring-cloud-vault-version: 3.0.0.M1 20 | :spring-cloud-circuitbreaker-version: 2.0.0.M1 21 | :spring-cloud-cli-version: 3.0.0.M1 22 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-2020-1-links.adoc: -------------------------------------------------------------------------------- 1 | https://cloud.spring.io/spring-cloud-static/spring-cloud-build/3.0.0.M1/reference/html/[spring-cloud-build] :: spring-cloud-build Reference Documentation, version 3.0.0.M1 2 | https://cloud.spring.io/spring-cloud-static/spring-cloud-commons/3.0.0.M1/reference/html/[spring-cloud-commons] :: spring-cloud-commons Reference Documentation, version 3.0.0.M1 3 | https://cloud.spring.io/spring-cloud-static/spring-cloud-function/3.1.0.M1/reference/html/[spring-cloud-function] :: spring-cloud-function Reference Documentation, version 3.1.0.M1 4 | https://cloud.spring.io/spring-cloud-static/spring-cloud-stream/3.1.0.M1/reference/html/[spring-cloud-stream] :: spring-cloud-stream Reference Documentation, version 3.1.0.M1 5 | https://cloud.spring.io/spring-cloud-static/spring-cloud-bus/3.0.0.M1/reference/html/[spring-cloud-bus] :: spring-cloud-bus Reference Documentation, version 3.0.0.M1 6 | https://docs.spring.io/spring-cloud-task/docs/2.2.1.RELEASE/reference/[spring-cloud-task] :: spring-cloud-task Reference Documentation, version 2.2.1.RELEASE 7 | https://cloud.spring.io/spring-cloud-static/spring-cloud-config/3.0.0.M1/reference/html/[spring-cloud-config] :: spring-cloud-config Reference Documentation, version 3.0.0.M1 8 | https://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/3.0.0.M1/reference/html/[spring-cloud-netflix] :: spring-cloud-netflix Reference Documentation, version 3.0.0.M1 9 | https://cloud.spring.io/spring-cloud-static/spring-cloud-cloudfoundry/3.0.0.M1/reference/html/[spring-cloud-cloudfoundry] :: spring-cloud-cloudfoundry Reference Documentation, version 3.0.0.M1 10 | https://cloud.spring.io/spring-cloud-static/spring-cloud-kubernetes/2.0.0.M1/reference/html/[spring-cloud-kubernetes] :: spring-cloud-kubernetes Reference Documentation, version 2.0.0.M1 11 | https://cloud.spring.io/spring-cloud-static/spring-cloud-openfeign/3.0.0.M1/reference/html/[spring-cloud-openfeign] :: spring-cloud-openfeign Reference Documentation, version 3.0.0.M1 12 | https://cloud.spring.io/spring-cloud-static/spring-cloud-consul/3.0.0.M1/reference/html/[spring-cloud-consul] :: spring-cloud-consul Reference Documentation, version 3.0.0.M1 13 | https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/3.0.0.M1/reference/html/[spring-cloud-gateway] :: spring-cloud-gateway Reference Documentation, version 3.0.0.M1 14 | https://cloud.spring.io/spring-cloud-static/spring-cloud-security/3.0.0.M1/reference/html/[spring-cloud-security] :: spring-cloud-security Reference Documentation, version 3.0.0.M1 15 | https://cloud.spring.io/spring-cloud-static/spring-cloud-sleuth/3.0.0.M1/reference/html/[spring-cloud-sleuth] :: spring-cloud-sleuth Reference Documentation, version 3.0.0.M1 16 | https://cloud.spring.io/spring-cloud-static/spring-cloud-zookeeper/3.0.0.M1/reference/html/[spring-cloud-zookeeper] :: spring-cloud-zookeeper Reference Documentation, version 3.0.0.M1 17 | https://cloud.spring.io/spring-cloud-static/spring-cloud-contract/3.0.0.M1/reference/html/[spring-cloud-contract] :: spring-cloud-contract Reference Documentation, version 3.0.0.M1 18 | https://cloud.spring.io/spring-cloud-static/spring-cloud-vault/3.0.0.M1/reference/html/[spring-cloud-vault] :: spring-cloud-vault Reference Documentation, version 3.0.0.M1 19 | https://cloud.spring.io/spring-cloud-static/spring-cloud-circuitbreaker/2.0.0.M1/reference/html/[spring-cloud-circuitbreaker] :: spring-cloud-circuitbreaker Reference Documentation, version 2.0.0.M1 20 | https://cloud.spring.io/spring-cloud-static/spring-cloud-cli/3.0.0.M1/reference/html/[spring-cloud-cli] :: spring-cloud-cli Reference Documentation, version 3.0.0.M1 21 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-2020-1-pdf.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | 3 | include::_attributes.adoc[] 4 | include::_spring-cloud-2020-1-attributes.adoc[] 5 | 6 | :basedir: {project-root} 7 | :stream_basedir: {basedir} 8 | :project-full-name: Spring Cloud 9 | :project-name: spring-cloud 10 | 11 | Spring Cloud provides tools for developers to quickly build some of 12 | the common patterns in distributed systems (e.g. configuration 13 | management, service discovery, circuit breakers, intelligent routing, 14 | micro-proxy, control bus). Coordination of 15 | distributed systems leads to boiler plate patterns, and using Spring 16 | Cloud developers can quickly stand up services and applications that 17 | implement those patterns. They will work well in any distributed 18 | environment, including the developer's own laptop, bare metal data 19 | centres, and managed platforms such as Cloud Foundry. 20 | 21 | Release Train Version: *{spring-cloud-version}* 22 | 23 | Supported Boot Version: *{spring-boot-version}* 24 | 25 | == Features 26 | 27 | Spring Cloud focuses on providing good out of box experience for typical use cases 28 | and extensibility mechanism to cover others. 29 | 30 | * Distributed/versioned configuration 31 | * Service registration and discovery 32 | * Routing 33 | * Service-to-service calls 34 | * Load balancing 35 | * Circuit Breakers 36 | * Distributed messaging 37 | 38 | [[cloud-documentation-versions]] 39 | == Release Train Versions 40 | 41 | .Release Train Project Versions 42 | |=== 43 | |Project Name| Project Version 44 | 45 | include::_spring-cloud-2020-1-versions.adoc[] 46 | |=== 47 | 48 | :project-root: {basedir}/commons 49 | :project-version: {spring-cloud-commons-version} 50 | include::{basedir}/commons/docs/src/main/asciidoc/spring-cloud-commons.adoc[leveloffset=+1] 51 | 52 | :project-root: {basedir}/config 53 | :project-version: {spring-cloud-config-version} 54 | include::{basedir}/config/docs/src/main/asciidoc/spring-cloud-config.adoc[leveloffset=+1] 55 | 56 | :project-root: {basedir}/netflix 57 | :project-version: {spring-cloud-netflix-version} 58 | include::{basedir}/netflix/docs/src/main/asciidoc/spring-cloud-netflix.adoc[leveloffset=+1] 59 | 60 | :project-root: {basedir}/openfeign 61 | :project-version: {spring-cloud-openfeign-version} 62 | include::{basedir}/openfeign/docs/src/main/asciidoc/spring-cloud-openfeign.adoc[leveloffset=+1] 63 | 64 | :project-root: {basedir}/bus 65 | :project-version: {spring-cloud-bus-version} 66 | include::{basedir}/bus/docs/src/main/asciidoc/spring-cloud-bus.adoc[leveloffset=+1] 67 | 68 | :project-root: {basedir}/sleuth 69 | :project-version: {spring-cloud-sleuth-version} 70 | include::{basedir}/sleuth/docs/src/main/asciidoc/spring-cloud-sleuth.adoc[leveloffset=+1] 71 | 72 | :project-root: {basedir}/consul 73 | :project-version: {spring-cloud-consul-version} 74 | include::{basedir}/consul/docs/src/main/asciidoc/spring-cloud-consul.adoc[leveloffset=+1] 75 | 76 | :project-root: {basedir}/zookeeper 77 | :project-version: {spring-cloud-zookeeper-version} 78 | include::{basedir}/zookeeper/docs/src/main/asciidoc/spring-cloud-zookeeper.adoc[leveloffset=+1] 79 | 80 | :project-root: {basedir}/cli 81 | :project-version: {spring-cloud-cli-version} 82 | include::{basedir}/cli/docs/src/main/asciidoc/spring-cloud-cli.adoc[leveloffset=+1] 83 | 84 | :project-root: {basedir}/security 85 | :project-version: {spring-cloud-security-version} 86 | include::{basedir}/security/docs/src/main/asciidoc/spring-cloud-security.adoc[leveloffset=+1] 87 | 88 | :project-root: {basedir}/cloudfoundry 89 | :project-version: {spring-cloud-cloudfoundry-version} 90 | include::{basedir}/cloudfoundry/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc[leveloffset=+1] 91 | 92 | :project-root: {basedir}/contract 93 | :project-version: {spring-cloud-contract-version} 94 | include::{basedir}/contract/docs/src/main/asciidoc/_index_pdf.adoc[leveloffset=+1] 95 | 96 | :project-root: {basedir}/vault 97 | :project-version: {spring-cloud-vault-version} 98 | include::{basedir}/vault/docs/src/main/asciidoc/spring-cloud-vault.adoc[leveloffset=+1] 99 | 100 | :project-root: {basedir}/gateway 101 | :project-version: {spring-cloud-gateway-version} 102 | include::{basedir}/gateway/docs/src/main/asciidoc/spring-cloud-gateway.adoc[leveloffset=+1] 103 | 104 | :project-root: {basedir}/function 105 | :project-version: {spring-cloud-function-version} 106 | include::{basedir}/function/docs/src/main/asciidoc/spring-cloud-function.adoc[leveloffset=+1] 107 | 108 | :project-root: {basedir}/kubernetes 109 | :project-version: {spring-cloud-kubernetes-version} 110 | include::{basedir}/kubernetes/docs/src/main/asciidoc/spring-cloud-kubernetes.adoc[leveloffset=+1] 111 | 112 | :project-root: {basedir}/gcp 113 | :project-version: {spring-cloud-gcp-version} 114 | include::{basedir}/gcp/docs/src/main/asciidoc/spring-cloud-gcp.adoc[leveloffset=+1] 115 | 116 | :project-root: {basedir}/circuitbreaker 117 | :project-version: {spring-cloud-circuitbreaker-version} 118 | include::{basedir}/circuitbreaker/docs/src/main/asciidoc/spring-cloud-circuitbreaker.adoc[leveloffset=+1] 119 | 120 | == Spring Cloud Stream 121 | :stream-docs-basedir: {stream_basedir}/stream/spring-cloud-stream-docs 122 | :project-root: {basedir}/stream 123 | :project-version: {spring-cloud-stream-version} 124 | include::{basedir}/stream/spring-cloud-stream-docs/src/main/asciidoc/spring-cloud-stream-aggregate.adoc[leveloffset=+1] 125 | 126 | = Appendix: Compendium of Configuration Properties 127 | 128 | include::_spring-cloud-2020-1-configprops.adoc[leveloffset=+1] 129 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-2020-1-single.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | 3 | include::_attributes.adoc[] 4 | include::_spring-cloud-2020-1-attributes.adoc[] 5 | 6 | :basedir: {project-root} 7 | :stream_basedir: {basedir} 8 | :project-full-name: Spring Cloud 9 | :project-name: spring-cloud 10 | 11 | Spring Cloud provides tools for developers to quickly build some of 12 | the common patterns in distributed systems (e.g. configuration 13 | management, service discovery, circuit breakers, intelligent routing, 14 | micro-proxy, control bus). Coordination of 15 | distributed systems leads to boiler plate patterns, and using Spring 16 | Cloud developers can quickly stand up services and applications that 17 | implement those patterns. They will work well in any distributed 18 | environment, including the developer's own laptop, bare metal data 19 | centres, and managed platforms such as Cloud Foundry. 20 | 21 | Release Train Version: *{spring-cloud-version}* 22 | 23 | Supported Boot Version: *{spring-boot-version}* 24 | 25 | == Features 26 | 27 | Spring Cloud focuses on providing good out of box experience for typical use cases 28 | and extensibility mechanism to cover others. 29 | 30 | * Distributed/versioned configuration 31 | * Service registration and discovery 32 | * Routing 33 | * Service-to-service calls 34 | * Load balancing 35 | * Circuit Breakers 36 | * Distributed messaging 37 | 38 | [[cloud-documentation-versions]] 39 | == Release Train Versions 40 | 41 | .Release Train Project Versions 42 | |=== 43 | |Project Name| Project Version 44 | 45 | include::_spring-cloud-2020-1-versions.adoc[] 46 | |=== 47 | 48 | :project-root: {basedir}/commons 49 | :project-version: {spring-cloud-commons-version} 50 | include::{basedir}/commons/docs/src/main/asciidoc/spring-cloud-commons.adoc[leveloffset=+1] 51 | 52 | :project-root: {basedir}/config 53 | :project-version: {spring-cloud-config-version} 54 | include::{basedir}/config/docs/src/main/asciidoc/spring-cloud-config.adoc[leveloffset=+1] 55 | 56 | :project-root: {basedir}/netflix 57 | :project-version: {spring-cloud-netflix-version} 58 | include::{basedir}/netflix/docs/src/main/asciidoc/spring-cloud-netflix.adoc[leveloffset=+1] 59 | 60 | :project-root: {basedir}/openfeign 61 | :project-version: {spring-cloud-openfeign-version} 62 | include::{basedir}/openfeign/docs/src/main/asciidoc/spring-cloud-openfeign.adoc[leveloffset=+1] 63 | 64 | :project-root: {basedir}/bus 65 | :project-version: {spring-cloud-bus-version} 66 | include::{basedir}/bus/docs/src/main/asciidoc/spring-cloud-bus.adoc[leveloffset=+1] 67 | 68 | :project-root: {basedir}/sleuth 69 | :project-version: {spring-cloud-sleuth-version} 70 | include::{basedir}/sleuth/docs/src/main/asciidoc/spring-cloud-sleuth.adoc[leveloffset=+1] 71 | 72 | :project-root: {basedir}/consul 73 | :project-version: {spring-cloud-consul-version} 74 | include::{basedir}/consul/docs/src/main/asciidoc/spring-cloud-consul.adoc[leveloffset=+1] 75 | 76 | :project-root: {basedir}/zookeeper 77 | :project-version: {spring-cloud-zookeeper-version} 78 | include::{basedir}/zookeeper/docs/src/main/asciidoc/spring-cloud-zookeeper.adoc[leveloffset=+1] 79 | 80 | :project-root: {basedir}/cli 81 | :project-version: {spring-cloud-cli-version} 82 | include::{basedir}/cli/docs/src/main/asciidoc/spring-cloud-cli.adoc[leveloffset=+1] 83 | 84 | :project-root: {basedir}/security 85 | :project-version: {spring-cloud-security-version} 86 | include::{basedir}/security/docs/src/main/asciidoc/spring-cloud-security.adoc[leveloffset=+1] 87 | 88 | :project-root: {basedir}/cloudfoundry 89 | :project-version: {spring-cloud-cloudfoundry-version} 90 | include::{basedir}/cloudfoundry/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc[leveloffset=+1] 91 | 92 | :project-root: {basedir}/contract 93 | :project-version: {spring-cloud-contract-version} 94 | include::{basedir}/contract/docs/src/main/asciidoc/_index_single.adoc[leveloffset=+1] 95 | 96 | :project-root: {basedir}/vault 97 | :project-version: {spring-cloud-vault-version} 98 | include::{basedir}/vault/docs/src/main/asciidoc/spring-cloud-vault.adoc[leveloffset=+1] 99 | 100 | :project-root: {basedir}/gateway 101 | :project-version: {spring-cloud-gateway-version} 102 | include::{basedir}/gateway/docs/src/main/asciidoc/spring-cloud-gateway.adoc[leveloffset=+1] 103 | 104 | :project-root: {basedir}/function 105 | :project-version: {spring-cloud-function-version} 106 | include::{basedir}/function/docs/src/main/asciidoc/spring-cloud-function.adoc[leveloffset=+1] 107 | 108 | :project-root: {basedir}/kubernetes 109 | :project-version: {spring-cloud-kubernetes-version} 110 | include::{basedir}/kubernetes/docs/src/main/asciidoc/spring-cloud-kubernetes.adoc[leveloffset=+1] 111 | 112 | :project-root: {basedir}/gcp 113 | :project-version: {spring-cloud-gcp-version} 114 | include::{basedir}/gcp/docs/src/main/asciidoc/spring-cloud-gcp.adoc[leveloffset=+1] 115 | 116 | :project-root: {basedir}/circuitbreaker 117 | :project-version: {spring-cloud-circuitbreaker-version} 118 | include::{basedir}/circuitbreaker/docs/src/main/asciidoc/spring-cloud-circuitbreaker.adoc[leveloffset=+1] 119 | 120 | == Spring Cloud Stream 121 | :stream-docs-basedir: {stream_basedir}/stream/spring-cloud-stream-docs 122 | :project-root: {basedir}/stream 123 | :project-version: {spring-cloud-stream-version} 124 | include::{basedir}/stream/spring-cloud-stream-docs/src/main/asciidoc/spring-cloud-stream-aggregate.adoc[leveloffset=+1] 125 | 126 | = Appendix: Compendium of Configuration Properties 127 | 128 | include::_spring-cloud-2020-1-configprops.adoc[leveloffset=+1] 129 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-2020-1-versions.adoc: -------------------------------------------------------------------------------- 1 | |spring-cloud-build|3.0.0.M1 2 | |spring-cloud-commons|3.0.0.M1 3 | |spring-cloud-function|3.1.0.M1 4 | |spring-cloud-stream|3.1.0.M1 5 | |spring-cloud-bus|3.0.0.M1 6 | |spring-cloud-task|2.2.3.RELEASE 7 | |spring-cloud-config|3.0.0.M1 8 | |spring-cloud-netflix|3.0.0.M1 9 | |spring-cloud-cloudfoundry|3.0.0.M1 10 | |spring-cloud-kubernetes|2.0.0.M1 11 | |spring-cloud-openfeign|3.0.0.M1 12 | |spring-cloud-consul|3.0.0.M1 13 | |spring-cloud-gateway|3.0.0.M1 14 | |spring-cloud-security|3.0.0.M1 15 | |spring-cloud-sleuth|3.0.0.M1 16 | |spring-cloud-zookeeper|3.0.0.M1 17 | |spring-cloud-contract|3.0.0.M1 18 | |spring-cloud-vault|3.0.0.M1 19 | |spring-cloud-circuitbreaker|2.0.0.M1 20 | |spring-cloud-cli|3.0.0.M1 21 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-2020-1.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | 3 | include::_attributes.adoc[] 4 | include::_spring-cloud-2020-1-attributes.adoc[] 5 | 6 | :basedir: {project-root} 7 | :stream_basedir: {basedir} 8 | 9 | Spring Cloud provides tools for developers to quickly build some of 10 | the common patterns in distributed systems (e.g. configuration 11 | management, service discovery, circuit breakers, intelligent routing, 12 | micro-proxy, control bus). Coordination of 13 | distributed systems leads to boiler plate patterns, and using Spring 14 | Cloud developers can quickly stand up services and applications that 15 | implement those patterns. They will work well in any distributed 16 | environment, including the developer's own laptop, bare metal data 17 | centres, and managed platforms such as Cloud Foundry. 18 | 19 | Release Train Version: *{spring-cloud-version}* 20 | 21 | Supported Boot Version: *{spring-boot-version}* 22 | 23 | == Features 24 | 25 | Spring Cloud focuses on providing good out of box experience for typical use cases 26 | and extensibility mechanism to cover others. 27 | 28 | * Distributed/versioned configuration 29 | * Service registration and discovery 30 | * Routing 31 | * Service-to-service calls 32 | * Load balancing 33 | * Circuit Breakers 34 | * Distributed messaging 35 | 36 | The reference documentation consists of the following sections: 37 | 38 | [horizontal] 39 | <> :: Legal information. 40 | <> :: About the Documentation, Getting Help, First Steps, and more. 41 | include::_spring-cloud-2020-1-links.adoc[] 42 | 43 | = Appendix: Compendium of Configuration Properties 44 | 45 | link:spring-cloud-2020-1-configprops.html[Spring Cloud 2020-1 configuration properties] 46 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-edgware.adoc: -------------------------------------------------------------------------------- 1 | include::_spring-cloud-finchley.adoc[] -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-finchley.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | include::_attributes.adoc[] 3 | :stream_basedir: ../../../../.. 4 | :basedir: ../../../.. 5 | 6 | Spring Cloud provides tools for developers to quickly build some of 7 | the common patterns in distributed systems (e.g. configuration 8 | management, service discovery, circuit breakers, intelligent routing, 9 | micro-proxy, control bus). Coordination of 10 | distributed systems leads to boiler plate patterns, and using Spring 11 | Cloud developers can quickly stand up services and applications that 12 | implement those patterns. They will work well in any distributed 13 | environment, including the developer's own laptop, bare metal data 14 | centres, and managed platforms such as Cloud Foundry. 15 | 16 | Version: {spring-cloud-version} 17 | 18 | == Features 19 | 20 | Spring Cloud focuses on providing good out of box experience for typical use cases 21 | and extensibility mechanism to cover others. 22 | 23 | * Distributed/versioned configuration 24 | * Service registration and discovery 25 | * Routing 26 | * Service-to-service calls 27 | * Load balancing 28 | * Circuit Breakers 29 | * Distributed messaging 30 | 31 | include::{basedir}/commons/docs/src/main/asciidoc/spring-cloud-commons.adoc[] 32 | 33 | include::{basedir}/config/docs/src/main/asciidoc/spring-cloud-config.adoc[] 34 | 35 | include::{basedir}/netflix/docs/src/main/asciidoc/spring-cloud-netflix.adoc[] 36 | 37 | include::{basedir}/openfeign/docs/src/main/asciidoc/spring-cloud-openfeign.adoc[] 38 | 39 | = Spring Cloud Stream 40 | :stream-docs-basedir: {stream_basedir}/stream/spring-cloud-stream-docs 41 | include::{basedir}/stream/spring-cloud-stream-docs/src/main/asciidoc/spring-cloud-stream-aggregate.adoc[] 42 | 43 | include::{basedir}/bus/docs/src/main/asciidoc/spring-cloud-bus.adoc[] 44 | 45 | include::{basedir}/sleuth/docs/src/main/asciidoc/spring-cloud-sleuth.adoc[] 46 | 47 | include::{basedir}/consul/docs/src/main/asciidoc/spring-cloud-consul.adoc[] 48 | 49 | include::{basedir}/zookeeper/docs/src/main/asciidoc/spring-cloud-zookeeper.adoc[] 50 | 51 | //include::{basedir}/cli/docs/src/main/asciidoc/spring-cloud-cli.adoc[] 52 | 53 | include::{basedir}/security/docs/src/main/asciidoc/spring-cloud-security.adoc[] 54 | 55 | include::{basedir}/cloudfoundry/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc[] 56 | 57 | include::{basedir}/contract/docs/src/main/asciidoc/spring-cloud-contract.adoc[] 58 | 59 | include::{basedir}/vault/docs/src/main/asciidoc/spring-cloud-vault.adoc[] 60 | 61 | include::{basedir}/gateway/docs/src/main/asciidoc/spring-cloud-gateway.adoc[] 62 | 63 | include::{basedir}/function/docs/src/main/asciidoc/spring-cloud-function.adoc[] 64 | 65 | = Appendix: Compendium of Configuration Properties 66 | 67 | include::_spring-cloud-finchley_configprops.adoc[] 68 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-greenwich.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | include::_attributes.adoc[] 3 | :stream_basedir: ../../../../.. 4 | :basedir: ../../../.. 5 | 6 | Spring Cloud provides tools for developers to quickly build some of 7 | the common patterns in distributed systems (e.g. configuration 8 | management, service discovery, circuit breakers, intelligent routing, 9 | micro-proxy, control bus). Coordination of 10 | distributed systems leads to boiler plate patterns, and using Spring 11 | Cloud developers can quickly stand up services and applications that 12 | implement those patterns. They will work well in any distributed 13 | environment, including the developer's own laptop, bare metal data 14 | centres, and managed platforms such as Cloud Foundry. 15 | 16 | Version: {spring-cloud-version} 17 | 18 | == Features 19 | 20 | Spring Cloud focuses on providing good out of box experience for typical use cases 21 | and extensibility mechanism to cover others. 22 | 23 | * Distributed/versioned configuration 24 | * Service registration and discovery 25 | * Routing 26 | * Service-to-service calls 27 | * Load balancing 28 | * Circuit Breakers 29 | * Distributed messaging 30 | 31 | include::{basedir}/commons/docs/src/main/asciidoc/spring-cloud-commons.adoc[] 32 | 33 | include::{basedir}/config/docs/src/main/asciidoc/spring-cloud-config.adoc[] 34 | 35 | include::{basedir}/netflix/docs/src/main/asciidoc/spring-cloud-netflix.adoc[] 36 | 37 | include::{basedir}/openfeign/docs/src/main/asciidoc/spring-cloud-openfeign.adoc[] 38 | 39 | = Spring Cloud Stream 40 | :stream-docs-basedir: {stream_basedir}/stream/spring-cloud-stream-docs 41 | include::{basedir}/stream/spring-cloud-stream-docs/src/main/asciidoc/spring-cloud-stream-aggregate.adoc[] 42 | 43 | include::{basedir}/bus/docs/src/main/asciidoc/spring-cloud-bus.adoc[] 44 | 45 | include::{basedir}/sleuth/docs/src/main/asciidoc/spring-cloud-sleuth.adoc[] 46 | 47 | include::{basedir}/consul/docs/src/main/asciidoc/spring-cloud-consul.adoc[] 48 | 49 | include::{basedir}/zookeeper/docs/src/main/asciidoc/spring-cloud-zookeeper.adoc[] 50 | 51 | //include::{basedir}/cli/docs/src/main/asciidoc/spring-cloud-cli.adoc[] 52 | 53 | include::{basedir}/security/docs/src/main/asciidoc/spring-cloud-security.adoc[] 54 | 55 | include::{basedir}/cloudfoundry/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc[] 56 | 57 | include::{basedir}/contract/docs/src/main/asciidoc/spring-cloud-contract.adoc[] 58 | 59 | include::{basedir}/vault/docs/src/main/asciidoc/spring-cloud-vault.adoc[] 60 | 61 | include::{basedir}/gateway/docs/src/main/asciidoc/spring-cloud-gateway.adoc[] 62 | 63 | include::{basedir}/function/docs/src/main/asciidoc/spring-cloud-function.adoc[] 64 | 65 | include::{basedir}/kubernetes/docs/src/main/asciidoc/spring-cloud-kubernetes.adoc[] 66 | 67 | include::{basedir}/gcp/docs/src/main/asciidoc/spring-cloud-gcp.adoc[] 68 | 69 | = Appendix: Compendium of Configuration Properties 70 | 71 | include::_spring-cloud-greenwich_configprops.adoc[] 72 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-hoxton-attributes.adoc: -------------------------------------------------------------------------------- 1 | :spring-boot-version: 2.2.1.RELEASE 2 | :spring-cloud-build-version: 2.2.0.RC2 3 | :spring-cloud-commons-version: 2.2.0.RC2 4 | :spring-cloud-function-version: 3.0.0.RC2 5 | :spring-cloud-stream-version: Horsham.RC2 6 | :spring-cloud-aws-version: 2.2.0.RC2 7 | :spring-cloud-bus-version: 2.2.0.RC2 8 | :spring-cloud-task-version: 2.2.0.RC1 9 | :spring-cloud-config-version: 2.2.0.RC2 10 | :spring-cloud-netflix-version: 2.2.0.RC2 11 | :spring-cloud-cloudfoundry-version: 2.2.0.RC2 12 | :spring-cloud-kubernetes-version: 1.1.0.RC2 13 | :spring-cloud-openfeign-version: 2.2.0.RC2 14 | :spring-cloud-consul-version: 2.2.0.RC2 15 | :spring-cloud-gateway-version: 2.2.0.RC2 16 | :spring-cloud-security-version: 2.2.0.RC2 17 | :spring-cloud-sleuth-version: 2.2.0.RC2 18 | :spring-cloud-zookeeper-version: 2.2.0.RC2 19 | :spring-cloud-contract-version: 2.2.0.RC2 20 | :spring-cloud-gcp-version: 1.2.0.RC2 21 | :spring-cloud-vault-version: 2.2.0.RC2 22 | :spring-cloud-circuitbreaker-version: 1.0.0.RC2 23 | :spring-cloud-cli-version: 2.2.0.RC2 24 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-hoxton-links.adoc: -------------------------------------------------------------------------------- 1 | https://cloud.spring.io/spring-cloud-static/spring-cloud-build/2.2.0.RELEASE/reference/html/[spring-cloud-build] :: spring-cloud-build Reference Documentation, version 2.2.0.RELEASE 2 | https://cloud.spring.io/spring-cloud-static/spring-cloud-commons/2.2.0.RELEASE/reference/html/[spring-cloud-commons] :: spring-cloud-commons Reference Documentation, version 2.2.0.RELEASE 3 | https://cloud.spring.io/spring-cloud-static/spring-cloud-function/3.0.0.RELEASE/reference/html/[spring-cloud-function] :: spring-cloud-function Reference Documentation, version 3.0.0.RELEASE 4 | https://cloud.spring.io/spring-cloud-static/spring-cloud-stream/3.0.0.RELEASE/reference/html/[spring-cloud-stream] :: spring-cloud-stream Reference Documentation, version 3.0.0.RELEASE 5 | https://cloud.spring.io/spring-cloud-static/spring-cloud-aws/2.2.0.RELEASE/reference/html/[spring-cloud-aws] :: spring-cloud-aws Reference Documentation, version 2.2.0.RELEASE 6 | https://cloud.spring.io/spring-cloud-static/spring-cloud-bus/2.2.0.RELEASE/reference/html/[spring-cloud-bus] :: spring-cloud-bus Reference Documentation, version 2.2.0.RELEASE 7 | https://docs.spring.io/spring-cloud-task/docs/2.2.1.RELEASE/reference/[spring-cloud-task] :: spring-cloud-task Reference Documentation, version 2.2.1.RELEASE 8 | https://cloud.spring.io/spring-cloud-static/spring-cloud-config/2.2.0.RELEASE/reference/html/[spring-cloud-config] :: spring-cloud-config Reference Documentation, version 2.2.0.RELEASE 9 | https://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/2.2.0.RELEASE/reference/html/[spring-cloud-netflix] :: spring-cloud-netflix Reference Documentation, version 2.2.0.RELEASE 10 | https://cloud.spring.io/spring-cloud-static/spring-cloud-cloudfoundry/2.2.0.RELEASE/reference/html/[spring-cloud-cloudfoundry] :: spring-cloud-cloudfoundry Reference Documentation, version 2.2.0.RELEASE 11 | https://cloud.spring.io/spring-cloud-static/spring-cloud-kubernetes/1.1.0.RELEASE/reference/html/[spring-cloud-kubernetes] :: spring-cloud-kubernetes Reference Documentation, version 1.1.0.RELEASE 12 | https://cloud.spring.io/spring-cloud-static/spring-cloud-openfeign/2.2.0.RELEASE/reference/html/[spring-cloud-openfeign] :: spring-cloud-openfeign Reference Documentation, version 2.2.0.RELEASE 13 | https://cloud.spring.io/spring-cloud-static/spring-cloud-consul/2.2.0.RELEASE/reference/html/[spring-cloud-consul] :: spring-cloud-consul Reference Documentation, version 2.2.0.RELEASE 14 | https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.2.0.RELEASE/reference/html/[spring-cloud-gateway] :: spring-cloud-gateway Reference Documentation, version 2.2.0.RELEASE 15 | https://cloud.spring.io/spring-cloud-static/spring-cloud-security/2.2.0.RELEASE/reference/html/[spring-cloud-security] :: spring-cloud-security Reference Documentation, version 2.2.0.RELEASE 16 | https://cloud.spring.io/spring-cloud-static/spring-cloud-sleuth/2.2.0.RELEASE/reference/html/[spring-cloud-sleuth] :: spring-cloud-sleuth Reference Documentation, version 2.2.0.RELEASE 17 | https://cloud.spring.io/spring-cloud-static/spring-cloud-zookeeper/2.2.0.RELEASE/reference/html/[spring-cloud-zookeeper] :: spring-cloud-zookeeper Reference Documentation, version 2.2.0.RELEASE 18 | https://cloud.spring.io/spring-cloud-static/spring-cloud-contract/2.2.0.RELEASE/reference/html/[spring-cloud-contract] :: spring-cloud-contract Reference Documentation, version 2.2.0.RELEASE 19 | https://cloud.spring.io/spring-cloud-static/spring-cloud-gcp/1.2.0.RELEASE/reference/html/[spring-cloud-gcp] :: spring-cloud-gcp Reference Documentation, version 1.2.0.RELEASE 20 | https://cloud.spring.io/spring-cloud-static/spring-cloud-vault/2.2.0.RELEASE/reference/html/[spring-cloud-vault] :: spring-cloud-vault Reference Documentation, version 2.2.0.RELEASE 21 | https://cloud.spring.io/spring-cloud-static/spring-cloud-circuitbreaker/1.0.0.RELEASE/reference/html/[spring-cloud-circuitbreaker] :: spring-cloud-circuitbreaker Reference Documentation, version 1.0.0.RELEASE 22 | https://cloud.spring.io/spring-cloud-static/spring-cloud-cli/2.2.0.RELEASE/reference/html/[spring-cloud-cli] :: spring-cloud-cli Reference Documentation, version 2.2.0.RELEASE 23 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-hoxton-pdf.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | 3 | include::_attributes.adoc[] 4 | include::_spring-cloud-hoxton-attributes.adoc[] 5 | 6 | :basedir: {project-root} 7 | :stream_basedir: {basedir} 8 | :project-full-name: Spring Cloud 9 | :project-name: spring-cloud 10 | 11 | Spring Cloud provides tools for developers to quickly build some of 12 | the common patterns in distributed systems (e.g. configuration 13 | management, service discovery, circuit breakers, intelligent routing, 14 | micro-proxy, control bus). Coordination of 15 | distributed systems leads to boiler plate patterns, and using Spring 16 | Cloud developers can quickly stand up services and applications that 17 | implement those patterns. They will work well in any distributed 18 | environment, including the developer's own laptop, bare metal data 19 | centres, and managed platforms such as Cloud Foundry. 20 | 21 | Release Train Version: *{spring-cloud-version}* 22 | 23 | Supported Boot Version: *{spring-boot-version}* 24 | 25 | == Features 26 | 27 | Spring Cloud focuses on providing good out of box experience for typical use cases 28 | and extensibility mechanism to cover others. 29 | 30 | * Distributed/versioned configuration 31 | * Service registration and discovery 32 | * Routing 33 | * Service-to-service calls 34 | * Load balancing 35 | * Circuit Breakers 36 | * Distributed messaging 37 | 38 | [[cloud-documentation-versions]] 39 | == Release Train Versions 40 | 41 | .Release Train Project Versions 42 | |=== 43 | |Project Name| Project Version 44 | 45 | include::_spring-cloud-hoxton-versions.adoc[] 46 | |=== 47 | 48 | :project-root: {basedir}/commons 49 | :project-version: {spring-cloud-commons-version} 50 | include::{basedir}/commons/docs/src/main/asciidoc/spring-cloud-commons.adoc[leveloffset=+1] 51 | 52 | :project-root: {basedir}/config 53 | :project-version: {spring-cloud-config-version} 54 | include::{basedir}/config/docs/src/main/asciidoc/spring-cloud-config.adoc[leveloffset=+1] 55 | 56 | :project-root: {basedir}/netflix 57 | :project-version: {spring-cloud-netflix-version} 58 | include::{basedir}/netflix/docs/src/main/asciidoc/spring-cloud-netflix.adoc[leveloffset=+1] 59 | 60 | :project-root: {basedir}/openfeign 61 | :project-version: {spring-cloud-openfeign-version} 62 | include::{basedir}/openfeign/docs/src/main/asciidoc/spring-cloud-openfeign.adoc[leveloffset=+1] 63 | 64 | :project-root: {basedir}/bus 65 | :project-version: {spring-cloud-bus-version} 66 | include::{basedir}/bus/docs/src/main/asciidoc/spring-cloud-bus.adoc[leveloffset=+1] 67 | 68 | :project-root: {basedir}/sleuth 69 | :project-version: {spring-cloud-sleuth-version} 70 | include::{basedir}/sleuth/docs/src/main/asciidoc/spring-cloud-sleuth.adoc[leveloffset=+1] 71 | 72 | :project-root: {basedir}/consul 73 | :project-version: {spring-cloud-consul-version} 74 | include::{basedir}/consul/docs/src/main/asciidoc/spring-cloud-consul.adoc[leveloffset=+1] 75 | 76 | :project-root: {basedir}/zookeeper 77 | :project-version: {spring-cloud-zookeeper-version} 78 | include::{basedir}/zookeeper/docs/src/main/asciidoc/spring-cloud-zookeeper.adoc[leveloffset=+1] 79 | 80 | :project-root: {basedir}/cli 81 | :project-version: {spring-cloud-cli-version} 82 | include::{basedir}/cli/docs/src/main/asciidoc/spring-cloud-cli.adoc[leveloffset=+1] 83 | 84 | :project-root: {basedir}/security 85 | :project-version: {spring-cloud-security-version} 86 | include::{basedir}/security/docs/src/main/asciidoc/spring-cloud-security.adoc[leveloffset=+1] 87 | 88 | :project-root: {basedir}/cloudfoundry 89 | :project-version: {spring-cloud-cloudfoundry-version} 90 | include::{basedir}/cloudfoundry/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc[leveloffset=+1] 91 | 92 | :project-root: {basedir}/contract 93 | :project-version: {spring-cloud-contract-version} 94 | include::{basedir}/contract/docs/src/main/asciidoc/_index_pdf.adoc[leveloffset=+1] 95 | 96 | :project-root: {basedir}/vault 97 | :project-version: {spring-cloud-vault-version} 98 | include::{basedir}/vault/docs/src/main/asciidoc/spring-cloud-vault.adoc[leveloffset=+1] 99 | 100 | :project-root: {basedir}/gateway 101 | :project-version: {spring-cloud-gateway-version} 102 | include::{basedir}/gateway/docs/src/main/asciidoc/spring-cloud-gateway.adoc[leveloffset=+1] 103 | 104 | :project-root: {basedir}/function 105 | :project-version: {spring-cloud-function-version} 106 | include::{basedir}/function/docs/src/main/asciidoc/spring-cloud-function.adoc[leveloffset=+1] 107 | 108 | :project-root: {basedir}/kubernetes 109 | :project-version: {spring-cloud-kubernetes-version} 110 | include::{basedir}/kubernetes/docs/src/main/asciidoc/spring-cloud-kubernetes.adoc[leveloffset=+1] 111 | 112 | :project-root: {basedir}/gcp 113 | :project-version: {spring-cloud-gcp-version} 114 | include::{basedir}/gcp/docs/src/main/asciidoc/spring-cloud-gcp.adoc[leveloffset=+1] 115 | 116 | :project-root: {basedir}/circuitbreaker 117 | :project-version: {spring-cloud-circuitbreaker-version} 118 | include::{basedir}/circuitbreaker/docs/src/main/asciidoc/spring-cloud-circuitbreaker.adoc[leveloffset=+1] 119 | 120 | == Spring Cloud Stream 121 | :stream-docs-basedir: {stream_basedir}/stream/spring-cloud-stream-docs 122 | :project-root: {basedir}/stream 123 | :project-version: {spring-cloud-stream-version} 124 | include::{basedir}/stream/spring-cloud-stream-docs/src/main/asciidoc/spring-cloud-stream-aggregate.adoc[leveloffset=+1] 125 | 126 | = Appendix: Compendium of Configuration Properties 127 | 128 | include::_spring-cloud-hoxton-configprops.adoc[leveloffset=+1] 129 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-hoxton-single.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | 3 | include::_attributes.adoc[] 4 | include::_spring-cloud-hoxton-attributes.adoc[] 5 | 6 | :basedir: {project-root} 7 | :stream_basedir: {basedir} 8 | :project-full-name: Spring Cloud 9 | :project-name: spring-cloud 10 | 11 | Spring Cloud provides tools for developers to quickly build some of 12 | the common patterns in distributed systems (e.g. configuration 13 | management, service discovery, circuit breakers, intelligent routing, 14 | micro-proxy, control bus). Coordination of 15 | distributed systems leads to boiler plate patterns, and using Spring 16 | Cloud developers can quickly stand up services and applications that 17 | implement those patterns. They will work well in any distributed 18 | environment, including the developer's own laptop, bare metal data 19 | centres, and managed platforms such as Cloud Foundry. 20 | 21 | Release Train Version: *{spring-cloud-version}* 22 | 23 | Supported Boot Version: *{spring-boot-version}* 24 | 25 | == Features 26 | 27 | Spring Cloud focuses on providing good out of box experience for typical use cases 28 | and extensibility mechanism to cover others. 29 | 30 | * Distributed/versioned configuration 31 | * Service registration and discovery 32 | * Routing 33 | * Service-to-service calls 34 | * Load balancing 35 | * Circuit Breakers 36 | * Distributed messaging 37 | 38 | [[cloud-documentation-versions]] 39 | == Release Train Versions 40 | 41 | .Release Train Project Versions 42 | |=== 43 | |Project Name| Project Version 44 | 45 | include::_spring-cloud-hoxton-versions.adoc[] 46 | |=== 47 | 48 | :project-root: {basedir}/commons 49 | :project-version: {spring-cloud-commons-version} 50 | include::{basedir}/commons/docs/src/main/asciidoc/spring-cloud-commons.adoc[leveloffset=+1] 51 | 52 | :project-root: {basedir}/config 53 | :project-version: {spring-cloud-config-version} 54 | include::{basedir}/config/docs/src/main/asciidoc/spring-cloud-config.adoc[leveloffset=+1] 55 | 56 | :project-root: {basedir}/netflix 57 | :project-version: {spring-cloud-netflix-version} 58 | include::{basedir}/netflix/docs/src/main/asciidoc/spring-cloud-netflix.adoc[leveloffset=+1] 59 | 60 | :project-root: {basedir}/openfeign 61 | :project-version: {spring-cloud-openfeign-version} 62 | include::{basedir}/openfeign/docs/src/main/asciidoc/spring-cloud-openfeign.adoc[leveloffset=+1] 63 | 64 | :project-root: {basedir}/bus 65 | :project-version: {spring-cloud-bus-version} 66 | include::{basedir}/bus/docs/src/main/asciidoc/spring-cloud-bus.adoc[leveloffset=+1] 67 | 68 | :project-root: {basedir}/sleuth 69 | :project-version: {spring-cloud-sleuth-version} 70 | include::{basedir}/sleuth/docs/src/main/asciidoc/spring-cloud-sleuth.adoc[leveloffset=+1] 71 | 72 | :project-root: {basedir}/consul 73 | :project-version: {spring-cloud-consul-version} 74 | include::{basedir}/consul/docs/src/main/asciidoc/spring-cloud-consul.adoc[leveloffset=+1] 75 | 76 | :project-root: {basedir}/zookeeper 77 | :project-version: {spring-cloud-zookeeper-version} 78 | include::{basedir}/zookeeper/docs/src/main/asciidoc/spring-cloud-zookeeper.adoc[leveloffset=+1] 79 | 80 | :project-root: {basedir}/cli 81 | :project-version: {spring-cloud-cli-version} 82 | include::{basedir}/cli/docs/src/main/asciidoc/spring-cloud-cli.adoc[leveloffset=+1] 83 | 84 | :project-root: {basedir}/security 85 | :project-version: {spring-cloud-security-version} 86 | include::{basedir}/security/docs/src/main/asciidoc/spring-cloud-security.adoc[leveloffset=+1] 87 | 88 | :project-root: {basedir}/cloudfoundry 89 | :project-version: {spring-cloud-cloudfoundry-version} 90 | include::{basedir}/cloudfoundry/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc[leveloffset=+1] 91 | 92 | :project-root: {basedir}/contract 93 | :project-version: {spring-cloud-contract-version} 94 | include::{basedir}/contract/docs/src/main/asciidoc/_index_single.adoc[leveloffset=+1] 95 | 96 | :project-root: {basedir}/vault 97 | :project-version: {spring-cloud-vault-version} 98 | include::{basedir}/vault/docs/src/main/asciidoc/spring-cloud-vault.adoc[leveloffset=+1] 99 | 100 | :project-root: {basedir}/gateway 101 | :project-version: {spring-cloud-gateway-version} 102 | include::{basedir}/gateway/docs/src/main/asciidoc/spring-cloud-gateway.adoc[leveloffset=+1] 103 | 104 | :project-root: {basedir}/function 105 | :project-version: {spring-cloud-function-version} 106 | include::{basedir}/function/docs/src/main/asciidoc/spring-cloud-function.adoc[leveloffset=+1] 107 | 108 | :project-root: {basedir}/kubernetes 109 | :project-version: {spring-cloud-kubernetes-version} 110 | include::{basedir}/kubernetes/docs/src/main/asciidoc/spring-cloud-kubernetes.adoc[leveloffset=+1] 111 | 112 | :project-root: {basedir}/gcp 113 | :project-version: {spring-cloud-gcp-version} 114 | include::{basedir}/gcp/docs/src/main/asciidoc/spring-cloud-gcp.adoc[leveloffset=+1] 115 | 116 | :project-root: {basedir}/circuitbreaker 117 | :project-version: {spring-cloud-circuitbreaker-version} 118 | include::{basedir}/circuitbreaker/docs/src/main/asciidoc/spring-cloud-circuitbreaker.adoc[leveloffset=+1] 119 | 120 | == Spring Cloud Stream 121 | :stream-docs-basedir: {stream_basedir}/stream/spring-cloud-stream-docs 122 | :project-root: {basedir}/stream 123 | :project-version: {spring-cloud-stream-version} 124 | include::{basedir}/stream/spring-cloud-stream-docs/src/main/asciidoc/spring-cloud-stream-aggregate.adoc[leveloffset=+1] 125 | 126 | = Appendix: Compendium of Configuration Properties 127 | 128 | include::_spring-cloud-hoxton-configprops.adoc[leveloffset=+1] 129 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-hoxton-versions.adoc: -------------------------------------------------------------------------------- 1 | |spring-cloud-build|2.2.0.RELEASE 2 | |spring-cloud-commons|2.2.0.RELEASE 3 | |spring-cloud-function|3.0.0.RELEASE 4 | |spring-cloud-stream|Horsham.RELEASE 5 | |spring-cloud-aws|2.2.0.RELEASE 6 | |spring-cloud-bus|2.2.0.RELEASE 7 | |spring-cloud-task|2.2.1.RELEASE 8 | |spring-cloud-config|2.2.0.RELEASE 9 | |spring-cloud-netflix|2.2.0.RELEASE 10 | |spring-cloud-cloudfoundry|2.2.0.RELEASE 11 | |spring-cloud-kubernetes|1.1.0.RELEASE 12 | |spring-cloud-openfeign|2.2.0.RELEASE 13 | |spring-cloud-consul|2.2.0.RELEASE 14 | |spring-cloud-gateway|2.2.0.RELEASE 15 | |spring-cloud-security|2.2.0.RELEASE 16 | |spring-cloud-sleuth|2.2.0.RELEASE 17 | |spring-cloud-zookeeper|2.2.0.RELEASE 18 | |spring-cloud-contract|2.2.0.RELEASE 19 | |spring-cloud-gcp|1.2.0.RELEASE 20 | |spring-cloud-vault|2.2.0.RELEASE 21 | |spring-cloud-circuitbreaker|1.0.0.RELEASE 22 | |spring-cloud-cli|2.2.0.RELEASE 23 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_spring-cloud-hoxton.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud 2 | 3 | include::_attributes.adoc[] 4 | include::_spring-cloud-hoxton-attributes.adoc[] 5 | 6 | :basedir: {project-root} 7 | :stream_basedir: {basedir} 8 | 9 | Spring Cloud provides tools for developers to quickly build some of 10 | the common patterns in distributed systems (e.g. configuration 11 | management, service discovery, circuit breakers, intelligent routing, 12 | micro-proxy, control bus). Coordination of 13 | distributed systems leads to boiler plate patterns, and using Spring 14 | Cloud developers can quickly stand up services and applications that 15 | implement those patterns. They will work well in any distributed 16 | environment, including the developer's own laptop, bare metal data 17 | centres, and managed platforms such as Cloud Foundry. 18 | 19 | Release Train Version: *{spring-cloud-version}* 20 | 21 | Supported Boot Version: *{spring-boot-version}* 22 | 23 | == Features 24 | 25 | Spring Cloud focuses on providing good out of box experience for typical use cases 26 | and extensibility mechanism to cover others. 27 | 28 | * Distributed/versioned configuration 29 | * Service registration and discovery 30 | * Routing 31 | * Service-to-service calls 32 | * Load balancing 33 | * Circuit Breakers 34 | * Distributed messaging 35 | 36 | The reference documentation consists of the following sections: 37 | 38 | [horizontal] 39 | <> :: Legal information. 40 | <> :: About the Documentation, Getting Help, First Steps, and more. 41 | include::_spring-cloud-hoxton-links.adoc[] 42 | 43 | = Appendix: Compendium of Configuration Properties 44 | 45 | link:spring-cloud-hoxton-configprops.html[Spring Cloud Hoxton configuration properties] 46 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/documentation-overview.adoc: -------------------------------------------------------------------------------- 1 | [[documentation]] 2 | = Spring Cloud Documentation 3 | include::_attributes.adoc[] 4 | 5 | :docs-url: https://cloud.spring.io/spring-cloud-static/{spring-cloud-version} 6 | 7 | This section provides a brief overview of Spring Cloud reference documentation. It serves 8 | as a map for the rest of the document. 9 | 10 | 11 | 12 | [[contract-documentation-about]] 13 | == About the Documentation 14 | 15 | The {project-full-name} reference guide is available as 16 | 17 | * {docs-url}/reference/html[Multi-page HTML] 18 | * {docs-url}/reference/htmlsingle[Single-page HTML] 19 | * {docs-url}/reference/pdf/{project-name}.pdf[PDF] 20 | 21 | Copies of this document may be made for your own use and for distribution to others, 22 | provided that you do not charge any fee for such copies and further provided that each 23 | copy contains this Copyright Notice, whether distributed in print or electronically. 24 | 25 | 26 | 27 | [[documentation-getting-help]] 28 | == Getting Help 29 | If you have trouble with {project-full-name}, we would like to help. 30 | 31 | * Learn the {project-full-name} basics. If you are 32 | starting out with {project-full-name}, try one of the https://spring.io/guides[guides]. 33 | * Ask a question. We monitor https://stackoverflow.com[stackoverflow.com] for questions 34 | tagged with https://stackoverflow.com/tags/spring-cloud[`spring-cloud`]. 35 | * Chat with us at http://https://gitter.im/spring-cloud/spring-cloud[{project-full-name} Gitter] 36 | 37 | NOTE: All of {project-full-name} is open source, including the documentation. If you find 38 | problems with the docs or if you want to improve them, please get involved. -------------------------------------------------------------------------------- /docs/src/main/asciidoc/ghpages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | set -e 4 | 5 | # Set default props like MAVEN_PATH, ROOT_FOLDER etc. 6 | function set_default_props() { 7 | # The script should be executed from the root folder 8 | ROOT_FOLDER=`pwd` 9 | echo "Current folder is ${ROOT_FOLDER}" 10 | 11 | if [[ ! -e "${ROOT_FOLDER}/.git" ]]; then 12 | echo "You're not in the root folder of the project!" 13 | exit 1 14 | fi 15 | 16 | # Prop that will let commit the changes 17 | COMMIT_CHANGES="no" 18 | MAVEN_PATH=${MAVEN_PATH:-} 19 | echo "Path to Maven is [${MAVEN_PATH}]" 20 | REPO_NAME=${PWD##*/} 21 | echo "Repo name is [${REPO_NAME}]" 22 | SPRING_CLOUD_STATIC_REPO=${SPRING_CLOUD_STATIC_REPO:-git@github.com:spring-cloud/spring-cloud-static.git} 23 | echo "Spring Cloud Static repo is [${SPRING_CLOUD_STATIC_REPO}" 24 | } 25 | 26 | # Check if gh-pages exists and docs have been built 27 | function check_if_anything_to_sync() { 28 | git remote set-url --push origin `git config remote.origin.url | sed -e 's/^git:/https:/'` 29 | 30 | if ! (git remote set-branches --add origin gh-pages && git fetch -q) && [[ "${RELEASE_TRAIN}" != "yes" ]] ; then 31 | echo "No gh-pages, so not syncing" 32 | exit 0 33 | fi 34 | 35 | if ! [ -d docs/target/generated-docs ] && ! [ "${BUILD}" == "yes" ]; then 36 | echo "No gh-pages sources in docs/target/generated-docs, so not syncing" 37 | exit 0 38 | fi 39 | } 40 | 41 | function retrieve_current_branch() { 42 | # Code getting the name of the current branch. For master we want to publish as we did until now 43 | # http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch 44 | # If there is a branch already passed will reuse it - otherwise will try to find it 45 | CURRENT_BRANCH=${BRANCH} 46 | if [[ -z "${CURRENT_BRANCH}" ]] ; then 47 | CURRENT_BRANCH=$(git symbolic-ref -q HEAD) 48 | CURRENT_BRANCH=${CURRENT_BRANCH##refs/heads/} 49 | CURRENT_BRANCH=${CURRENT_BRANCH:-HEAD} 50 | fi 51 | echo "Current branch is [${CURRENT_BRANCH}]" 52 | git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script" 53 | } 54 | 55 | # Switches to the provided value of the release version. We always prefix it with `v` 56 | function switch_to_tag() { 57 | if [[ "${RELEASE_TRAIN}" != "yes" ]] ; then 58 | git checkout v${VERSION} 59 | fi 60 | } 61 | 62 | # Build the docs if switch is on 63 | function build_docs_if_applicable() { 64 | if [[ "${BUILD}" == "yes" ]] ; then 65 | ./mvnw clean install -P docs -pl docs -DskipTests 66 | fi 67 | } 68 | 69 | # Get the name of the `docs.main` property 70 | # Get whitelisted branches - assumes that a `docs` module is available under `docs` profile 71 | function retrieve_doc_properties() { 72 | MAIN_ADOC_VALUE=$("${MAVEN_PATH}"mvn -q \ 73 | -Dexec.executable="echo" \ 74 | -Dexec.args='${docs.main}' \ 75 | org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \ 76 | -P docs \ 77 | -pl docs) 78 | echo "Extracted 'main.adoc' from Maven build [${MAIN_ADOC_VALUE}]" 79 | 80 | 81 | WHITELIST_PROPERTY=${WHITELIST_PROPERTY:-"docs.whitelisted.branches"} 82 | WHITELISTED_BRANCHES_VALUE=$("${MAVEN_PATH}"mvn -q \ 83 | -Dexec.executable="echo" \ 84 | -Dexec.args="\${${WHITELIST_PROPERTY}}" \ 85 | org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \ 86 | -P docs \ 87 | -pl docs) 88 | echo "Extracted '${WHITELIST_PROPERTY}' from Maven build [${WHITELISTED_BRANCHES_VALUE}]" 89 | } 90 | 91 | # Stash any outstanding changes 92 | function stash_changes() { 93 | git diff-index --quiet HEAD && dirty=$? || (echo "Failed to check if the current repo is dirty. Assuming that it is." && dirty="1") 94 | if [ "$dirty" != "0" ]; then git stash; fi 95 | } 96 | 97 | # Switch to gh-pages branch to sync it with current branch 98 | function add_docs_from_target() { 99 | local DESTINATION_REPO_FOLDER 100 | if [[ -z "${DESTINATION}" && -z "${CLONE}" ]] ; then 101 | DESTINATION_REPO_FOLDER=${ROOT_FOLDER} 102 | elif [[ "${CLONE}" == "yes" ]]; then 103 | mkdir -p ${ROOT_FOLDER}/target 104 | local clonedStatic=${ROOT_FOLDER}/target/spring-cloud-static 105 | if [[ ! -e "${clonedStatic}/.git" ]]; then 106 | echo "Cloning Spring Cloud Static to target" 107 | git clone ${SPRING_CLOUD_STATIC_REPO} ${clonedStatic} && cd ${clonedStatic} && git checkout gh-pages 108 | else 109 | echo "Spring Cloud Static already cloned - will pull changes" 110 | cd ${clonedStatic} && git checkout gh-pages && git pull origin gh-pages 111 | fi 112 | if [[ -z "${RELEASE_TRAIN}" ]] ; then 113 | DESTINATION_REPO_FOLDER=${clonedStatic}/${REPO_NAME} 114 | else 115 | DESTINATION_REPO_FOLDER=${clonedStatic} 116 | fi 117 | mkdir -p ${DESTINATION_REPO_FOLDER} 118 | else 119 | if [[ ! -e "${DESTINATION}/.git" ]]; then 120 | echo "[${DESTINATION}] is not a git repository" 121 | exit 1 122 | fi 123 | if [[ -z "${RELEASE_TRAIN}" ]] ; then 124 | DESTINATION_REPO_FOLDER=${DESTINATION}/${REPO_NAME} 125 | else 126 | DESTINATION_REPO_FOLDER=${DESTINATION} 127 | fi 128 | mkdir -p ${DESTINATION_REPO_FOLDER} 129 | echo "Destination was provided [${DESTINATION}]" 130 | fi 131 | cd ${DESTINATION_REPO_FOLDER} 132 | git checkout gh-pages 133 | git pull origin gh-pages 134 | 135 | # Add git branches 136 | ################################################################### 137 | if [[ -z "${VERSION}" && -z "${RELEASE_TRAIN}" ]] ; then 138 | copy_docs_for_current_version 139 | else 140 | copy_docs_for_provided_version 141 | fi 142 | commit_changes_if_applicable 143 | } 144 | 145 | 146 | # Copies the docs by using the retrieved properties from Maven build 147 | function copy_docs_for_current_version() { 148 | if [[ "${CURRENT_BRANCH}" == "master" ]] ; then 149 | echo -e "Current branch is master - will copy the current docs only to the root folder" 150 | for f in docs/target/generated-docs/*; do 151 | file=${f#docs/target/generated-docs/*} 152 | if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then 153 | # Not ignored... 154 | cp -rf $f ${ROOT_FOLDER}/ 155 | git add -A ${ROOT_FOLDER}/$file 156 | fi 157 | done 158 | COMMIT_CHANGES="yes" 159 | else 160 | echo -e "Current branch is [${CURRENT_BRANCH}]" 161 | # http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin 162 | if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then 163 | mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH} 164 | echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder" 165 | for f in docs/target/generated-docs/*; do 166 | file=${f#docs/target/generated-docs/*} 167 | if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then 168 | # Not ignored... 169 | # We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html 170 | if [[ "${file}" == "${MAIN_ADOC_VALUE}.html" ]] ; then 171 | # We don't want to copy the spring-cloud-sleuth.html 172 | # we want it to be converted to index.html 173 | cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html 174 | git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html 175 | else 176 | cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH} 177 | git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file 178 | fi 179 | fi 180 | done 181 | COMMIT_CHANGES="yes" 182 | else 183 | echo -e "Branch [${CURRENT_BRANCH}] is not on the white list! Check out the Maven [${WHITELIST_PROPERTY}] property in 184 | [docs] module available under [docs] profile. Won't commit any changes to gh-pages for this branch." 185 | fi 186 | fi 187 | } 188 | 189 | # Copies the docs by using the explicitly provided version 190 | function copy_docs_for_provided_version() { 191 | local FOLDER=${DESTINATION_REPO_FOLDER}/${VERSION} 192 | mkdir -p ${FOLDER} 193 | echo -e "Current tag is [v${VERSION}] Will copy the current docs to the [${FOLDER}] folder" 194 | for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do 195 | file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*} 196 | copy_docs_for_branch ${file} ${FOLDER} 197 | done 198 | COMMIT_CHANGES="yes" 199 | CURRENT_BRANCH="v${VERSION}" 200 | } 201 | 202 | # Copies the docs from target to the provided destination 203 | # Params: 204 | # $1 - file from target 205 | # $2 - destination to which copy the files 206 | function copy_docs_for_branch() { 207 | local file=$1 208 | local destination=$2 209 | if ! git ls-files -i -o --exclude-standard --directory | grep -q ^${file}$; then 210 | # Not ignored... 211 | # We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html 212 | if [[ ("${file}" == "${MAIN_ADOC_VALUE}.html") || ("${file}" == "${REPO_NAME}.html") ]] ; then 213 | # We don't want to copy the spring-cloud-sleuth.html 214 | # we want it to be converted to index.html 215 | cp -rf $f ${destination}/index.html 216 | git add -A ${destination}/index.html 217 | else 218 | cp -rf $f ${destination} 219 | git add -A ${destination}/$file 220 | fi 221 | fi 222 | } 223 | 224 | function commit_changes_if_applicable() { 225 | if [[ "${COMMIT_CHANGES}" == "yes" ]] ; then 226 | COMMIT_SUCCESSFUL="no" 227 | git commit -a -m "Sync docs from ${CURRENT_BRANCH} to gh-pages" && COMMIT_SUCCESSFUL="yes" || echo "Failed to commit changes" 228 | 229 | # Uncomment the following push if you want to auto push to 230 | # the gh-pages branch whenever you commit to master locally. 231 | # This is a little extreme. Use with care! 232 | ################################################################### 233 | if [[ "${COMMIT_SUCCESSFUL}" == "yes" ]] ; then 234 | git push origin gh-pages 235 | fi 236 | fi 237 | } 238 | 239 | # Switch back to the previous branch and exit block 240 | function checkout_previous_branch() { 241 | # If -version was provided we need to come back to root project 242 | cd ${ROOT_FOLDER} 243 | git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script" 244 | if [ "$dirty" != "0" ]; then git stash pop; fi 245 | exit 0 246 | } 247 | 248 | # Assert if properties have been properly passed 249 | function assert_properties() { 250 | echo "VERSION [${VERSION}], RELEASE_TRAIN [${RELEASE_TRAIN}], DESTINATION [${DESTINATION}], CLONE [${CLONE}]" 251 | if [[ "${VERSION}" != "" && (-z "${DESTINATION}" && -z "${CLONE}") ]] ; then echo "Version was set but destination / clone was not!"; exit 1;fi 252 | if [[ ("${DESTINATION}" != "" && "${CLONE}" != "") && -z "${VERSION}" ]] ; then echo "Destination / clone was set but version was not!"; exit 1;fi 253 | if [[ "${DESTINATION}" != "" && "${CLONE}" == "yes" ]] ; then echo "Destination and clone was set. Pick one!"; exit 1;fi 254 | if [[ "${RELEASE_TRAIN}" != "" && -z "${VERSION}" ]] ; then echo "Release train was set but no version was passed!"; exit 1;fi 255 | } 256 | 257 | # Prints the usage 258 | function print_usage() { 259 | cat </` 271 | - if the destination switch is passed (-d) then the script will check if the provided dir is a git repo and then will 272 | switch to gh-pages of that repo and copy the generated docs to `docs//` 273 | - if the release train switch is passed (-r) then the script will check if the provided dir is a git repo and then will 274 | switch to gh-pages of that repo and copy the generated docs to `docs/` 275 | 276 | USAGE: 277 | 278 | You can use the following options: 279 | 280 | -v|--version - the script will apply the whole procedure for a particular library version 281 | -r|--releasetrain - instead of nesting the docs under the project_name/version folder the docs will end up in version 282 | -d|--destination - the root of destination folder where the docs should be copied. You have to use the full path. 283 | E.g. point to spring-cloud-static folder. Can't be used with (-c) 284 | -b|--build - will run the standard build process after checking out the branch 285 | -c|--clone - will automatically clone the spring-cloud-static repo instead of providing the destination. 286 | Obviously can't be used with (-d) 287 | 288 | EOF 289 | } 290 | 291 | 292 | # ========================================== 293 | # ____ ____ _____ _____ _____ _______ 294 | # / ____|/ ____| __ \|_ _| __ \__ __| 295 | # | (___ | | | |__) | | | | |__) | | | 296 | # \___ \| | | _ / | | | ___/ | | 297 | # ____) | |____| | \ \ _| |_| | | | 298 | # |_____/ \_____|_| \_\_____|_| |_| 299 | # 300 | # ========================================== 301 | 302 | while [[ $# > 0 ]] 303 | do 304 | key="$1" 305 | case ${key} in 306 | -v|--version) 307 | VERSION="$2" 308 | shift # past argument 309 | ;; 310 | -r|--releasetrain) 311 | RELEASE_TRAIN="yes" 312 | ;; 313 | -d|--destination) 314 | DESTINATION="$2" 315 | shift # past argument 316 | ;; 317 | -b|--build) 318 | BUILD="yes" 319 | ;; 320 | -c|--clone) 321 | CLONE="yes" 322 | ;; 323 | -h|--help) 324 | print_usage 325 | exit 0 326 | ;; 327 | *) 328 | echo "Invalid option: [$1]" 329 | print_usage 330 | exit 1 331 | ;; 332 | esac 333 | shift # past argument or value 334 | done 335 | 336 | assert_properties 337 | set_default_props 338 | check_if_anything_to_sync 339 | if [[ -z "${VERSION}" ]] ; then 340 | retrieve_current_branch 341 | else 342 | switch_to_tag 343 | fi 344 | build_docs_if_applicable 345 | retrieve_doc_properties 346 | stash_changes 347 | add_docs_from_target 348 | checkout_previous_branch 349 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/index.adoc: -------------------------------------------------------------------------------- 1 | /home/marcin/repo/spring-cloud-scripts/docs/src/main/asciidoc/spring-cloud.adoc -------------------------------------------------------------------------------- /docs/src/main/asciidoc/index.htmlsingleadoc: -------------------------------------------------------------------------------- 1 | spring-cloud.htmlsingleadoc -------------------------------------------------------------------------------- /docs/src/main/asciidoc/legal.adoc: -------------------------------------------------------------------------------- 1 | [legal] 2 | = Legal 3 | 4 | {spring-cloud-version} 5 | 6 | Copyright © 2012-2019 7 | 8 | Copies of this document may be made for your own use and for distribution to 9 | others, provided that you do not charge any fee for such copies and further 10 | provided that each copy contains this Copyright Notice, whether distributed in 11 | print or electronically. -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-cloud-2020-1-configprops.adoc: -------------------------------------------------------------------------------- 1 | include::_spring-cloud-2020-1-configprops.adoc[] -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-cloud-hoxton-configprops.adoc: -------------------------------------------------------------------------------- 1 | include::_spring-cloud-hoxton-configprops.adoc[] -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-cloud.adoc: -------------------------------------------------------------------------------- 1 | /home/marcin/repo/spring-cloud-scripts/docs/src/main/asciidoc/_spring-cloud-hoxton.adoc -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-cloud.htmlsingleadoc: -------------------------------------------------------------------------------- 1 | /home/marcin/repo/spring-cloud-scripts/docs/src/main/asciidoc/_spring-cloud-hoxton-single.adoc -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-cloud.pdfadoc: -------------------------------------------------------------------------------- 1 | /home/marcin/repo/spring-cloud-scripts/docs/src/main/asciidoc/_spring-cloud-hoxton-pdf.adoc -------------------------------------------------------------------------------- /docs/src/main/asciidoc/symbolic_links.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | set -e 4 | 5 | projectRoot="${1}" 6 | releaseTrainMajor="${2}" 7 | 8 | echo "Making symbolic link for the main docs" 9 | ln -fs "${projectRoot}"/src/main/asciidoc/_spring-cloud-"${releaseTrainMajor}".adoc "${projectRoot}"/src/main/asciidoc/spring-cloud.adoc 10 | ln -fs "${projectRoot}"/src/main/asciidoc/spring-cloud.adoc "${projectRoot}"/src/main/asciidoc/index.adoc 11 | 12 | if [ -f "${projectRoot}"/src/main/asciidoc/_spring-cloud-"${releaseTrainMajor}"-single.adoc ]; then 13 | echo "Making symbolic link for the single page docs" 14 | ln -fs "${projectRoot}"/src/main/asciidoc/_spring-cloud-"${releaseTrainMajor}"-single.adoc "${projectRoot}"/src/main/asciidoc/spring-cloud.htmlsingleadoc 15 | fi 16 | 17 | if [ -f "${projectRoot}"/src/main/asciidoc/_spring-cloud-"${releaseTrainMajor}"-pdf.adoc ]; then 18 | echo "Making symbolic link for the pdf docs" 19 | ln -fs "${projectRoot}"/src/main/asciidoc/_spring-cloud-"${releaseTrainMajor}"-pdf.adoc "${projectRoot}"/src/main/asciidoc/spring-cloud.pdfadoc 20 | fi 21 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/themes.adoc: -------------------------------------------------------------------------------- 1 | = Spring Cloud Post MVP 2 | 3 | This document pulls together some ideas and sets relative priorities for Spring Cloud beyond the MVP stage (which is available as version 1.0). 4 | 5 | == MVP Recap 6 | 7 | * Config server with git backend 8 | * Config client featuring refresh and encryption/decryption as well as the bootstrap phase in Spring application lifecycle 9 | * Common abstractions for load balancer, service discovery and circuit breaker 10 | * Security integrations: declarative SSO and proxy authentication strategies 11 | * Eureka for service discovery: client and server (with UI) 12 | * Eureka sidecar for non-JVM clients 13 | * Automatic reverse proxy using Zuul 14 | * Spring configuration model for Zuul filters 15 | * Spring configuration model for Ribbon load balancer 16 | * Feign declarative web service clients (with Ribbon integration) 17 | * RestTemplate integration with Ribbon 18 | * Hystrix for circuit breaker: client and dashboard (UI) 19 | * Turbine for circuit breaker aggregation, pull over HTTP and push over AMQP 20 | * AWS integration: relational databases, messaging and EC2 metadata 21 | * AMQP bus for a defined set of operational events like config changes 22 | * Groovy CLI with support for most of the above 23 | 24 | == Stateful Patterns and Spring Cloud Cluster 25 | 26 | * Cron server 27 | * API hooks 28 | * Event sequencing 29 | * One-time tokens 30 | * Global lock service (possibly a building block for other patterns) 31 | * Global generic state machine 32 | 33 | == Switch Patterns 34 | 35 | * Feature switches 36 | * A/B testing 37 | 38 | == Messaging and Asynchronous Patterns 39 | 40 | === Messaging for Business Applications 41 | 42 | Microservices lend themselves to messaging and other asynchronous patterns, but so far Spring Cloud has mainly been concerned with HTTP as a transport. AMQP and Websockets are lightweight and awesomely easy to set up with Spring and Spring Boot, so those would be the obvious building blocks for anything concrete. Building some sample systems, and publishing some documentation or articles would be a good start to see where it might lead. 43 | 44 | === Building on the Bus 45 | 46 | The role of Spring Cloud Bus can be expanded in various ways. 47 | 48 | * Some messages might need to be audited or brokered in some way, e.g. to ensure delivery to all members of a cluster, not just the ones that are available at the time the message is sent. 49 | 50 | * Telemetry and monitoring. Being able to trace business messages through a distributed system is a powerful enabler, and might require the same level of abstraction as the Bus, or even be able to share infrastructure and configuration. Publishing metrics: OpenTSDB (see https://github.com/Ticketmaster), redis, zookeeper, netflix atlas or http://influxdb.com. 51 | 52 | * Messages can already be addressed to all the instances of a service, but no use is made of that feature in Spring Cloud itself (users are left to use it if they feel they need to). 53 | 54 | * Publishing more events, and publishing automatically (instead of waiting to be poked on an Actuator `Endpoint`). 55 | 56 | * Alternative implementations: Consul, Redis, kafka, AWS (SQS + SNS), Gemfire 57 | 58 | === Reactive Patterns 59 | 60 | Integrating more with http://projectreactor.org[Project Reactor], e.g. publishing Hystrix metrics from a circuit breaker in a Reactor stream. 61 | 62 | == Miscellaneous 63 | 64 | === Alternative Stacks 65 | 66 | * Consul: provide an alternative implementation of the discovery abstraction in Spring Cloud Commons. Consul uses a distributed datastore and cluster manager, so it has an emphasis on consistency (so availability is only an option, while is the main focus of Eureka). 67 | 68 | * Maybe other discovery and service registry solutions (Gemfire, redis, etcd, Zookeeper, Spring Cloud Cluster, airbnb/synapse). 69 | 70 | * The new generation of Netflix OSS, and its focus on RxNetty creates some challenges, but also a lot nicer programming models and easier integration. These changes will probably end up requiring a new major version of Spring Cloud Netflix. 71 | 72 | === Integration Testing 73 | 74 | * Have a full env that is spun up to run full tests against (Eureka, Config Server, Turbine, Hystrix Dashboard and clients of various kinds). 75 | 76 | === Developer Workflow 77 | 78 | * Developer deploys a component locally and it joins a remote distributed system (to save from having to deploy the whole system for an integration test of one of its components). 79 | * Tooling for containers. 80 | 81 | === Demonstrate Cloud Native 82 | 83 | * Multi-Zone and Multi-Region demos on CF and AWS using a Mutli-Region DB like Cassandra. 84 | 85 | === More Security Options 86 | 87 | Securing business services as well as the platform (Spring Cloud features) itself is bound to be an area of expansion. So far we only make it easy to add HTTP basic security to the Config Server and Eureka. More options, even if it's only documentation, are needed. 88 | 89 | === Multi-tenancy 90 | 91 | From a discusion with @joshlong about Hystrix, Config Server and Discovery in a multi-tennant system: see https://github.com/spring-cloud/spring-cloud-commons/issues/20[spring-cloud-commons #20] 92 | -------------------------------------------------------------------------------- /for_each.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If you have exceptions while using associative arrays from Bash 4.0 in OSX. 4 | # instead of #!/bin/bash you have to have #!/usr/local/bin/bash 5 | 6 | set -e 7 | 8 | ROOT_FOLDER=$(pwd) 9 | RELEASE_TRAIN_PROJECTS=${RELEASE_TRAIN_PROJECTS:-build commons function stream bus task config netflix cloudfoundry kubernetes openfeign consul gateway security sleuth zookeeper contract vault circuitbreaker cli} 10 | GIT_BIN="${GIT_BIN:-git}" 11 | 12 | echo "Current folder is [${ROOT_FOLDER}]" 13 | ARTIFACTS=( ${RELEASE_TRAIN_PROJECTS} ) 14 | 15 | for i in "${ARTIFACTS[@]}"; do 16 | pushd "${i}" 17 | echo "Updating master branch for [${i}]" 18 | git reset --hard || echo "Failed to reset" 19 | git checkout master || echo "Failed to checkout master" 20 | git pull --rebase 21 | echo "You can do sth by changing this line" 22 | popd 23 | done -------------------------------------------------------------------------------- /kill.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | function kill_app() { 6 | NAME=$1 7 | PREFIX= 8 | APP=${1}Application 9 | [ "$1" == "customersui" ] && APP=app.groovy || APP="spring-boot:run" 10 | PID=`jps -mlv | grep -i ${APP} | sed -e 's/^\([0-9]*\).*/\1/'` 11 | [ "$PID" == "" ] || kill $PID 12 | } 13 | 14 | apps=$* 15 | if [ -z $1 ]; then 16 | apps='configserver eureka customers stores customersui' 17 | fi 18 | for f in $apps; do 19 | kill_app $f 20 | done 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven2 Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 300 | 301 | exec "$JAVACMD" \ 302 | $MAVEN_OPTS \ 303 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 304 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 305 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 306 | -------------------------------------------------------------------------------- /mvnw.bat: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven2 Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' 39 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 40 | 41 | @REM set %HOME% to equivalent of $HOME 42 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 43 | 44 | @REM Execute a user defined script before this one 45 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 46 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 47 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 48 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 49 | :skipRcPre 50 | 51 | @setlocal 52 | 53 | set ERROR_CODE=0 54 | 55 | @REM To isolate internal variables from possible post scripts, we use another setlocal 56 | @setlocal 57 | 58 | @REM ==== START VALIDATION ==== 59 | if not "%JAVA_HOME%" == "" goto OkJHome 60 | 61 | echo. 62 | echo Error: JAVA_HOME not found in your environment. >&2 63 | echo Please set the JAVA_HOME variable in your environment to match the >&2 64 | echo location of your Java installation. >&2 65 | echo. 66 | goto error 67 | 68 | :OkJHome 69 | if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome 70 | 71 | echo. 72 | echo Error: JAVA_HOME is set to an invalid directory. >&2 73 | echo JAVA_HOME = "%JAVA_HOME%" >&2 74 | echo Please set the JAVA_HOME variable in your environment to match the >&2 75 | echo location of your Java installation. >&2 76 | echo. 77 | goto error 78 | 79 | :chkMHome 80 | if not "%M2_HOME%"=="" goto valMHome 81 | 82 | SET "M2_HOME=%~dp0.." 83 | if not "%M2_HOME%"=="" goto valMHome 84 | 85 | echo. 86 | echo Error: M2_HOME not found in your environment. >&2 87 | echo Please set the M2_HOME variable in your environment to match the >&2 88 | echo location of the Maven installation. >&2 89 | echo. 90 | goto error 91 | 92 | :valMHome 93 | 94 | :stripMHome 95 | if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd 96 | set "M2_HOME=%M2_HOME:~0,-1%" 97 | goto stripMHome 98 | 99 | :checkMCmd 100 | if exist "%M2_HOME%\bin\mvn.cmd" goto init 101 | 102 | echo. 103 | echo Error: M2_HOME is set to an invalid directory. >&2 104 | echo M2_HOME = "%M2_HOME%" >&2 105 | echo Please set the M2_HOME variable in your environment to match the >&2 106 | echo location of the Maven installation >&2 107 | echo. 108 | goto error 109 | @REM ==== END VALIDATION ==== 110 | 111 | :init 112 | 113 | set MAVEN_CMD_LINE_ARGS=%* 114 | 115 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 116 | @REM Fallback to current working directory if not found. 117 | 118 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 119 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 120 | 121 | set EXEC_DIR=%CD% 122 | set WDIR=%EXEC_DIR% 123 | :findBaseDir 124 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 125 | cd .. 126 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 127 | set WDIR=%CD% 128 | goto findBaseDir 129 | 130 | :baseDirFound 131 | set MAVEN_PROJECTBASEDIR=%WDIR% 132 | cd "%EXEC_DIR%" 133 | goto endDetectBaseDir 134 | 135 | :baseDirNotFound 136 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 137 | cd "%EXEC_DIR%" 138 | 139 | :endDetectBaseDir 140 | 141 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 142 | 143 | @setlocal EnableExtensions EnableDelayedExpansion 144 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 145 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 146 | 147 | :endReadAdditionalConfig 148 | 149 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 150 | 151 | for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i" 152 | 153 | set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar"" 154 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 155 | 156 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS% 157 | if ERRORLEVEL 1 goto error 158 | goto end 159 | 160 | :error 161 | set ERROR_CODE=1 162 | 163 | :end 164 | @endlocal & set ERROR_CODE=%ERROR_CODE% 165 | 166 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 167 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 168 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 169 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 170 | :skipRcPost 171 | 172 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 173 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 174 | 175 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 176 | 177 | exit /B %ERROR_CODE% 178 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven2 Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | echo Found %WRAPPER_JAR% 133 | ) else ( 134 | if not "%MVNW_REPOURL%" == "" ( 135 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar" 136 | ) 137 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 138 | echo Downloading from: %DOWNLOAD_URL% 139 | 140 | powershell -Command "&{"^ 141 | "$webclient = new-object System.Net.WebClient;"^ 142 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 143 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 144 | "}"^ 145 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 146 | "}" 147 | echo Finished downloading %WRAPPER_JAR% 148 | ) 149 | @REM End of extension 150 | 151 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 152 | if ERRORLEVEL 1 goto error 153 | goto end 154 | 155 | :error 156 | set ERROR_CODE=1 157 | 158 | :end 159 | @endlocal & set ERROR_CODE=%ERROR_CODE% 160 | 161 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 162 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 163 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 164 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 165 | :skipRcPost 166 | 167 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 168 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 169 | 170 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 171 | 172 | exit /B %ERROR_CODE% 173 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.2.0.BUILD-SNAPSHOT 10 | 11 | 12 | org.springframework.cloud 13 | spring-cloud-samples 14 | 2020-1.BUILD-SNAPSHOT 15 | pom 16 | Spring Cloud Samples Scripts 17 | 18 | 19 | 20 | build 21 | 22 | true 23 | 24 | 25 | build 26 | 27 | 28 | 29 | docs 30 | 31 | true 32 | 33 | 34 | docs 35 | 36 | 37 | 38 | base 39 | 40 | true 41 | 42 | 43 | commons 44 | bus 45 | config 46 | consul 47 | contract 48 | cloudfoundry 49 | netflix 50 | security 51 | sleuth 52 | 53 | zookeeper 54 | 55 | 56 | 57 | starters 58 | 59 | true 60 | 61 | 62 | starters 63 | cli 64 | 65 | 66 | 67 | apps 68 | 69 | true 70 | 71 | 72 | tests 73 | configserver 74 | eureka 75 | hystrix-dashboard 76 | turbine 77 | customers-stores 78 | authserver 79 | sso 80 | 81 | 82 | 83 | 84 | 85 | 1.7 86 | Greenwich.BUILD-SNAPSHOT 87 | ${spring-cloud.version} 88 | 89 | 90 | 91 | 92 | 93 | 94 | maven-deploy-plugin 95 | 96 | true 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | spring-libs-snapshot 105 | https://repo.spring.io/libs-snapshot 106 | 107 | true 108 | 109 | 110 | 111 | 112 | 113 | 114 | spring-libs-release 115 | https://repo.spring.io/libs-release 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /release_train.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If you have exceptions while using associative arrays from Bash 4.0 in OSX. 4 | # instead of #!/bin/bash you have to have #!/usr/local/bin/bash 5 | 6 | set -e 7 | 8 | declare -A PROJECTS 9 | declare -A PROJECTS_ORDER 10 | 11 | ROOT_FOLDER=$(pwd) 12 | SPRING_CLOUD_RELEASE_REPO=${SPRING_CLOUD_RELEASE_REPO:-git@github.com:spring-cloud/spring-cloud-release.git} 13 | SPRING_CLOUD_RELEASE_REPO_HTTPS=${SPRING_CLOUD_RELEASE_REPO_HTTPS:-https://github.com/spring-cloud/spring-cloud-release.git} 14 | MAVEN_PATH=${MAVEN_PATH:-} 15 | # order matters! 16 | RELEASE_TRAIN_PROJECTS=${RELEASE_TRAIN_PROJECTS:-build commons function stream bus task config netflix cloudfoundry kubernetes openfeign consul gateway security sleuth zookeeper contract vault circuitbreaker cli} 17 | INSTALL_TOO=${INSTALL_TOO:-false} 18 | GIT_BIN="${GIT_BIN:-git}" 19 | export GITHUB_REPO_USERNAME_ENV="${GITHUB_REPO_USERNAME_ENV:-GITHUB_REPO_USERNAME}" 20 | export GITHUB_REPO_PASSWORD_ENV="${GITHUB_REPO_PASSWORD_ENV:-GITHUB_REPO_PASSWORD}" 21 | REPO_USER="${!GITHUB_REPO_USERNAME_ENV}" 22 | REPO_PASS="${!GITHUB_REPO_PASSWORD_ENV}" 23 | PREFIX_WITH_TOKEN="" 24 | export BOOT_VERSION="${BOOT_VERSION:-}" 25 | 26 | echo "Current folder is [${ROOT_FOLDER}]" 27 | 28 | # Adds the oauth token if present to the remote url of Spring Cloud Release repo 29 | function add_oauth_token_to_remote_url() { 30 | remote="${SPRING_CLOUD_RELEASE_REPO//git:/https:}" 31 | echo "Current releaser repo [${remote}]" 32 | if [[ "${RELEASER_GIT_OAUTH_TOKEN}" != "" && ${remote} == *"@"* ]]; then 33 | echo "OAuth token found. Will use the HTTPS Spring Cloud Release repo with the token" 34 | remote="${SPRING_CLOUD_RELEASE_REPO_HTTPS}" 35 | withToken="${remote/https:\/\//https://${RELEASER_GIT_OAUTH_TOKEN}@}" 36 | PREFIX_WITH_TOKEN="https://${RELEASER_GIT_OAUTH_TOKEN}@" 37 | SPRING_CLOUD_RELEASE_REPO="${withToken}" 38 | elif [[ "${RELEASER_GIT_OAUTH_TOKEN}" != "" && ${remote} != *"@"* ]]; then 39 | echo "OAuth token found. Will reuse it to clone the code" 40 | withToken="${remote/https:\/\//https://${RELEASER_GIT_OAUTH_TOKEN}@}" 41 | PREFIX_WITH_TOKEN="https://${RELEASER_GIT_OAUTH_TOKEN}@" 42 | SPRING_CLOUD_RELEASE_REPO="${withToken}" 43 | else 44 | echo "No OAuth token found" 45 | PREFIX_WITH_TOKEN="" 46 | fi 47 | } 48 | 49 | # Adds the oauth token if present to the remote url 50 | function add_oauth_token_to_current_remote_url() { 51 | local remote 52 | remote="$( "${GIT_BIN}" config remote.origin.url | sed -e 's/^git:/https:/' )" 53 | echo "Current remote [${remote}]" 54 | if [[ ${remote} != *".git" ]]; then 55 | echo "Remote doesn't end with [.git]" 56 | remote="${remote}.git" 57 | echo "Remote with [.git] suffix: [${remote}]" 58 | fi 59 | if [[ "${REPO_USER}" != "" && ${remote} != *"@"* ]]; then 60 | withUserAndPass=${remote/https:\/\//https://${REPO_USER}:${REPO_PASS}@} 61 | echo "Username and password found. Will reuse it to push the code to [${withUserAndPass}]" 62 | "${GIT_BIN}" remote set-url --push origin "${withUserAndPass}" 63 | elif [[ "${RELEASER_GIT_OAUTH_TOKEN}" != "" && ${remote} != *"@"* ]]; then 64 | withToken=${remote/https:\/\//https://${RELEASER_GIT_OAUTH_TOKEN}@} 65 | echo "OAuth token found but no @ char present in the origin url. Will reuse it to push the code to [${withToken}]" 66 | "${GIT_BIN}" remote set-url --push origin "${withToken}" 67 | elif [[ "${RELEASER_GIT_OAUTH_TOKEN}" != "" ]]; then 68 | withToken=${remote//git@github.com:/https://${RELEASER_GIT_OAUTH_TOKEN}@github.com/} 69 | echo "OAuth token found with @ char present in the origin url. Will reuse it to push the code to [${withToken}]" 70 | "${GIT_BIN}" remote set-url --push origin "${withToken}" 71 | else 72 | echo "No OAuth token found. Will push to [${remote}]" 73 | "${GIT_BIN}" remote set-url --push origin "${remote}" 74 | fi 75 | } 76 | 77 | export -f add_oauth_token_to_current_remote_url 78 | 79 | echo "Current folder is [${ROOT_FOLDER}]" 80 | 81 | add_oauth_token_to_remote_url 82 | 83 | if [ -e "${ROOT_FOLDER}/mvnw" ]; then 84 | MAVEN_EXEC="$ROOT_FOLDER/mvnw" 85 | else 86 | MAVEN_EXEC="${MAVEN_PATH}mvn" 87 | fi 88 | 89 | # Retrieves from spring-cloud-dependencies module the version of a 90 | function retrieve_version_from_maven() { 91 | RETRIEVED_VERSION=$("${MAVEN_EXEC}" -q \ 92 | -Dexec.executable="echo" \ 93 | -Dexec.args="\${spring-cloud-${1}.version}" \ 94 | org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \ 95 | -pl spring-cloud-dependencies | sed '$!d' ) 96 | echo "Extracted version for project [$1] from Maven build is [${RETRIEVED_VERSION}]" 97 | } 98 | 99 | function retrieve_boot_version_from_maven() { 100 | RETRIEVED_VERSION=$("${MAVEN_EXEC}" -q \ 101 | -Dexec.executable="echo" \ 102 | -Dexec.args="\${project.parent.version}" \ 103 | org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \ 104 | -pl spring-cloud-starter-parent | sed '$!d' ) 105 | echo "Extracted version for project [$1] from Maven build is [${RETRIEVED_VERSION}]" 106 | } 107 | 108 | # Prints the usage 109 | function print_usage() { 110 | cat < ${BOOT_VERSION}" 298 | echo ":spring-boot-version: ${BOOT_VERSION}" >> "${pathToAttributesTable}" 299 | for (( I=0; I> "${pathToAttributesTable}" 309 | echo "|${fullProjectName}|${projectVersion}" >> "${pathToVersionsTable}" 310 | docsUrl="" 311 | if [[ "${fullProjectName}" == *"task"* ]]; then 312 | docsUrl="https://docs.spring.io/spring-cloud-task/docs/${projectVersion}/reference/" 313 | elif [[ "${fullProjectName}" == *"stream"* ]]; then 314 | # since spring cloud stream's documentation URL has nothing to do with the version, will try 315 | # assume that it has the same version as spring cloud function 316 | projectVersion="${PROJECTS['function']}" 317 | docsUrl="https://cloud.spring.io/spring-cloud-static/${fullProjectName}/${projectVersion}/reference/html/" 318 | else 319 | docsUrl="https://cloud.spring.io/spring-cloud-static/${fullProjectName}/${projectVersion}/reference/html/" 320 | fi 321 | echo "${docsUrl}[${fullProjectName}] :: ${fullProjectName} Reference Documentation, version ${projectVersion}" >> "${pathToLinks}" 322 | fi 323 | echo -e "${projectName} -> ${projectVersion}" 324 | done 325 | echo -e "===========================================" 326 | echo "Built release train attributes under [${pathToAttributesTable}]" 327 | echo "Built release train versions under [${pathToVersionsTable}]" 328 | echo "Built links under [${pathToLinks}]" 329 | echo -e "\nInstall projects with skipping tests? [${INSTALL_TOO}]" 330 | 331 | if [[ "${AUTO}" != "yes" ]] ; then 332 | echo -e "\nPress any key to continue or 'q' to quit" 333 | read -r key 334 | if [[ ${key} = "q" ]] 335 | then 336 | exit 1 337 | fi 338 | else 339 | echo -e "\nAuto switch was turned on - continuing with modules updating" 340 | fi 341 | 342 | cd "${ROOT_FOLDER}" 343 | 344 | if [[ "${PREFIX_WITH_TOKEN}" != "" ]]; then 345 | echo "Updating git submodules to contain changed URLs" 346 | sed -i "s/git@github.com:/https:\/\/${RELEASER_GIT_OAUTH_TOKEN}@github.com\//g" .gitmodules 347 | fi 348 | 349 | echo "Initilizing all submodules" 350 | git submodule init 351 | git submodule update 352 | 353 | echo "For the given modules will enter their directory, pull the changes and check out the tag" 354 | for (( I=0; I&1 | cut --b 21-41 | grep $p && used=$p 16 | if [ "$used" != "" ]; then 17 | echo Port ${used} in use for app $1, please kill the 'process' and try again 18 | exit 1 19 | fi 20 | } 21 | 22 | function run_app() { 23 | 24 | NAME=$1 25 | PREFIX= 26 | [ "$1" == "stores" ] && NAME=store && PREFIX=customers-stores/rest-microservices- 27 | [ "$1" == "customers" ] && PREFIX=customers-stores/rest-microservices- 28 | [ "$1" == "customersui" ] && NAME=customers-stores-ui && PREFIX=customers-stores/ 29 | check_port $NAME 30 | DIR=$PREFIX$NAME 31 | if [ -f $DIR/.settings.xml ]; then 32 | SETTINGS='--settings .settings.xml' 33 | fi 34 | TMPHOME=`pwd` 35 | cmd="mvn $SETTINGS spring-boot:run" 36 | if [ "$1" == "customersui" ]; then 37 | cmd="spring run app.groovy" 38 | fi 39 | (cd $DIR; $cmd > "${TMPHOME}"/target/logs/$1.log &) 40 | echo "Launching $1 (logs in target/logs/$1.log)" 41 | 42 | } 43 | 44 | apps=$* 45 | if [ -z $1 ]; then 46 | apps='configserver eureka customers stores customersui' 47 | fi 48 | for f in $apps; do 49 | run_app $f 50 | done 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /services_deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DOMAIN=${DOMAIN:-run.pivotal.io} 6 | TARGET=api.${DOMAIN} 7 | APPLICATION_DOMAIN=${APPLICATION_DOMAIN:-"$DOMAIN"} 8 | if [ "$DOMAIN" == "run.pivotal.io" ]; then 9 | APPLICATION_DOMAIN=cfapps.io 10 | fi 11 | 12 | cf api | grep ${TARGET} || cf api ${TARGET} --skip-ssl-validation 13 | cf apps | grep OK || cf login 14 | 15 | TMPHOME=$(cd `dirname "$0"` && pwd) 16 | if [ "$PREFIX" == "NONE" ]; then 17 | echo setting PREFIX to empty 18 | PREFIX= 19 | echo PREFIX = $PREFIX 20 | elif [ "$PREFIX" == "" ]; then 21 | PREFIX=$USER 22 | fi 23 | 24 | PLATFORM_HOME=${PLATFORM_HOME:-$TMPHOME} 25 | echo Home: $PLATFORM_HOME 26 | 27 | CONFIG_HOME=${CONFIG_HOME:-$PLATFORM_HOME/configserver} 28 | 29 | EUREKA_HOME=${EUREKA_HOME:-$PLATFORM_HOME/eureka} 30 | 31 | function find_jar() { 32 | if [ -d $1 ]; then 33 | ls $1/*.jar | egrep -v 'javadoc|sources' 34 | else 35 | echo $1/app.jar 36 | fi 37 | } 38 | 39 | function deploy() { 40 | 41 | APP=$PREFIX$1 42 | APP_HOME=$2 43 | 44 | JARPATH=$(find_jar "$APP_HOME/target") 45 | cf push $APP -m 512m -p "$JARPATH" --no-start 46 | cf env $APP | grep SPRING_PROFILES_ACTIVE || cf set-env $APP SPRING_PROFILES_ACTIVE cloud 47 | cf env $APP | grep ENCRYPT_KEY || cf set-env $APP ENCRYPT_KEY deadbeef 48 | if [ "$PREFIX" != "" ]; then 49 | cf env $APP | grep PREFIX || cf set-env $APP PREFIX $PREFIX 50 | fi 51 | if [ "$1" == "configserver" ]; then 52 | cf env $APP | grep APPLICATION_DOMAIN || cf set-env $APP APPLICATION_DOMAIN $APPLICATION_DOMAIN 53 | cf env $APP | grep KEYSTORE_PASSWORD || cf set-env $APP KEYSTORE_PASSWORD foobar 54 | else 55 | cf services | grep ^${PREFIX}configserver && cf bind-service $APP ${PREFIX}configserver 56 | fi 57 | 58 | cf restart $APP 59 | # TODO push this to server 60 | cf services | grep ^$APP || cf create-user-provided-service $APP -p '{"uri":"http://user:password@'$APP.$APPLICATION_DOMAIN'"}' 61 | 62 | } 63 | 64 | apps=$* 65 | if [ -z $1 ]; then 66 | apps='rabbitmq mongodb configserver eureka' 67 | fi 68 | 69 | for f in $apps; do 70 | h=. 71 | if [ $f == "configserver" ]; then 72 | h=$CONFIG_HOME 73 | elif [ $f == "eureka" ]; then 74 | h=$EUREKA_HOME 75 | elif [ $f == "rabbitmq" ]; then 76 | if ! [ "$RABBIT_URI" == "" ]; then 77 | cf services | grep ^${PREFIX}rabbitmq || cf create-user-provided-service ${PREFIX}rabbitmq -p '{"uri":"'$RABBIT_URI'"}' 78 | continue 79 | elif cf marketplace | grep cloudamqp; then 80 | cf services | grep ^${PREFIX}rabbitmq || cf create-service cloudamqp tiger ${PREFIX}rabbitmq 81 | continue 82 | elif cf marketplace | grep p-rabbitmq; then 83 | cf services | grep ^${PREFIX}rabbitmq || cf create-service p-rabbitmq standard ${PREFIX}rabbitmq 84 | continue 85 | else 86 | echo "no rabbitmq service available." 87 | exit 1 88 | fi 89 | elif [ $f == "mongodb" ]; then 90 | if ! [ "$MONGO_URI" == "" ]; then 91 | cf services | grep ^${PREFIX}mongodb || cf create-user-provided-service ${PREFIX}mongodb -p '{"uri":"'$MONGO_URI'"}' 92 | continue 93 | elif cf marketplace | grep p-mongodb; then 94 | cf services | grep ^${PREFIX}mongodb || cf create-service p-mongodb development ${PREFIX}mongodb 95 | continue 96 | elif cf marketplace | grep mongolab; then 97 | cf services | grep ^${PREFIX}mongodb || cf create-service mongolab sandbox ${PREFIX}mongodb 98 | continue 99 | # for https://github.com/cloudfoundry-community/cf-services-contrib-release dev services 100 | elif cf marketplace | grep mongodb; then 101 | cf services | grep ^${PREFIX}mongodb || cf create-service mongodb default ${PREFIX}mongodb 102 | continue 103 | else 104 | echo "MONGO_URI not set and no mongolab or mongodb service available. Please set up MONGO_URI to point to globally accessible mongo instance." 105 | exit 1 106 | fi 107 | fi 108 | deploy $f $h 109 | done 110 | 111 | -------------------------------------------------------------------------------- /services_undeploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set -x 4 | 5 | DOMAIN=${DOMAIN:-run.pivotal.io} 6 | TARGET=api.${DOMAIN} 7 | APPLICATION_DOMAIN=${APPLICATION_DOMAIN:-"$DOMAIN"} 8 | if [ "$DOMAIN" == "run.pivotal.io" ]; then 9 | APPLICATION_DOMAIN=cfapps.io 10 | fi 11 | if [ "$PREFIX" == "NONE" ]; then 12 | PREFIX= 13 | elif [ "$PREFIX" == "" ]; then 14 | PREFIX=$USER 15 | fi 16 | 17 | cf api | grep ${TARGET} || cf api ${TARGET} --skip-ssl-validation 18 | cf apps | grep OK || cf login 19 | 20 | function delete_broker() { 21 | line=`cf services | grep ^$1 | sed -e 's/ \+/:/g' -e 's/,:/,/g'` 22 | field=4 23 | echo $line | grep 'user-provided' && field=3 # no plan 24 | for f in `echo $line | cut -d ':' -f 1,$field`; do 25 | APPS=${f#*:} 26 | if [ "$APPS" != "$f" ]; then 27 | SERVICE=${f%:*} 28 | for APP in `echo $APPS | sed -e 's/,/ /g'`; do 29 | cf unbind-service $APP $SERVICE 30 | done 31 | fi 32 | done 33 | cf delete-service -f $1 34 | cf apps | grep ^$1 && cf delete -f $1 35 | } 36 | 37 | apps=$* 38 | if [ -z $1 ]; then 39 | apps='eureka configserver mongodb rabbitmq' 40 | fi 41 | 42 | for f in $apps; do 43 | delete_broker $PREFIX$f 44 | done 45 | 46 | 47 | 48 | --------------------------------------------------------------------------------