-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add gateway setup. * Fix gateway setup. Temporarily comment-out zuul config to run tests. * Add gateway setup for feign calls. Add logic to use gateway for SLEUTH tests and zuul for other tests. * Fix bug in test. * Fix build setup for gateway and sleuth tests. * Add info in readme. Improve test run script setup.
- Loading branch information
1 parent
0b3aa81
commit e9612db
Showing
36 changed files
with
266 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
brewing/src/main/java/io/spring/cloud/samples/brewery/aggregating/Collaborators.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package io.spring.cloud.samples.brewery.aggregating; | ||
|
||
class Collaborators { | ||
public static final String ZUUL = "zuul"; | ||
public static final String PROXY = "proxy"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
spring: | ||
application: | ||
name: brewing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dependencies { | ||
compile 'org.springframework.cloud:spring-cloud-starter-gateway' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
applications: | ||
- name: brewery-proxy | ||
memory: 1024M | ||
instances: 1 | ||
host: brewery-proxy | ||
path: build/libs/gateway-1.0.0.jar | ||
services: | ||
- brewery-rabbitmq | ||
- brewery-discovery | ||
- brewery-config-server | ||
env: | ||
SPRING_PROFILES_ACTIVE: cloud | ||
DEBUG: "true" | ||
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom | ||
SPRING_ZIPKIN_SENDER_TYPE: web | ||
SPRING_ZIPKIN_BASE_URL: http://brewery-zipkin-server.cfapps.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
applications: | ||
- name: docsbrewing-proxy | ||
memory: 1024M | ||
instances: 1 | ||
host: docsbrewing-proxy | ||
path: build/libs/gateway-1.0.0.jar | ||
services: | ||
- docsbrewing-rabbitmq | ||
- docsbrewing-discovery | ||
- docsbrewing-config-server | ||
env: | ||
SPRING_PROFILES_ACTIVE: cloud,cloud-docsbrewing | ||
DEBUG: "true" | ||
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom | ||
SPRING_ZIPKIN_SENDER_TYPE: web | ||
SPRING_ZIPKIN_BASE_URL: http://docsbrewing-zipkin-server.cfapps.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
applications: | ||
- name: brewery-proxy | ||
memory: 1024M | ||
instances: 1 | ||
host: brewery-proxy | ||
path: build/libs/gateway-1.0.0.jar | ||
services: | ||
- brewery-rabbitmq | ||
- brewery-discovery | ||
- brewery-config-server | ||
env: | ||
SPRING_PROFILES_ACTIVE: cloud | ||
DEBUG: "true" | ||
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom | ||
SPRING_ZIPKIN_SENDER_TYPE: web | ||
SPRING_ZIPKIN_BASE_URL: http://brewery-zipkin-server.cfapps.io |
19 changes: 19 additions & 0 deletions
19
gateway/src/main/java/io/spring/cloud/samples/brewery/gateway/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.spring.cloud.samples.brewery.gateway; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* @author Olga Maciaszek-Sharma | ||
*/ | ||
@Configuration | ||
@SpringBootApplication | ||
@EnableDiscoveryClient | ||
public class Application { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(Application.class, args); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
gateway/src/main/resources/application-cloud-docsbrewing.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
spring.rabbitmq.addresses: ${vcap.services.docsbrewing-rabbitmq.credentials.uri} | ||
|
||
eureka: | ||
client: | ||
serviceUrl: | ||
defaultZone: ${vcap.services.docsbrewing-discovery.credentials.uri:http://127.0.0.1:8761}/eureka/ | ||
instance: | ||
hostname: ${APPLICATION_DOMAIN} | ||
nonSecurePort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
spring.rabbitmq.addresses: ${vcap.services.brewery-rabbitmq.credentials.uri} | ||
|
||
eureka: | ||
client: | ||
serviceUrl: | ||
defaultZone: ${vcap.services.brewery-discovery.credentials.uri:http://127.0.0.1:8761}/eureka/ | ||
instance: | ||
hostname: ${APPLICATION_DOMAIN} | ||
nonSecurePort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
spring.cloud.consul.discovery.preferIpAddress: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
eureka: | ||
instance: | ||
preferIpAddress: true | ||
|
||
ribbon: | ||
eureka: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
spring: | ||
cloud: | ||
stream: | ||
kafka: | ||
binder: | ||
zkNodes: localhost | ||
brokers: localhost | ||
# The X- are for Sleuth 1.0.x and 1.1.x compatibility | ||
headers: | ||
- X-B3-TraceId | ||
- X-B3-SpanId | ||
- X-B3-Sampled | ||
- X-B3-ParentSpanId | ||
- X-Span-Name | ||
- X-Process-Id | ||
- spanId | ||
- spanSampled | ||
- spanProcessId | ||
- spanParentSpanId | ||
- spanTraceId | ||
- spanName | ||
- messageSent |
Oops, something went wrong.