Add 'rabbit' thin launcher profile to all apps and --deployer=thin
This commit is contained in:
@@ -178,6 +178,7 @@ public class Deployer {
|
||||
appDefProps.putAll(other.getEnabled());
|
||||
}
|
||||
}
|
||||
appDefProps.putAll(deployable.getApplicationProperties());
|
||||
Map<String, String> map = extractProperties("/" + deployable.getName() + ".yml");
|
||||
for (String key : map.keySet()) {
|
||||
appDefProps.put(key, map.get(key));
|
||||
@@ -198,7 +199,8 @@ public class Deployer {
|
||||
logger.debug("Deployment Properties: {}", deploymentProperties);
|
||||
String id = deployer.deploy(request);
|
||||
AppStatus appStatus = getAppStatus(deployer, id);
|
||||
// TODO: stream stdout/stderr like docker-compose (with colors and prefix)
|
||||
// TODO: stream stdout/stderr like docker-compose (with colors and prefix) - the
|
||||
// colors work with the "thin" deployer, but there is no prefix in the logs yet
|
||||
|
||||
if (deployable.isWaitUntilStarted()) {
|
||||
try {
|
||||
|
||||
@@ -25,6 +25,7 @@ import javax.annotation.PostConstruct;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
@@ -149,12 +150,19 @@ public class DeployerProperties {
|
||||
*/
|
||||
private Map<String, String> enabled = new LinkedHashMap<>();
|
||||
/**
|
||||
* A map of "deployment" properties passed to the deployer (not the app) when this
|
||||
* app is launched. You can use <code>spring.cloud.deployer.local.javaOpts</code>
|
||||
* here to pass JVM args to a local deployer.
|
||||
* A map of "deployment" properties passed to the deployer (not the app) when an
|
||||
* app is launched. E.g. you can use
|
||||
* <code>spring.cloud.deployer.local.javaOpts</code> here to pass JVM args to a
|
||||
* local deployer.
|
||||
*/
|
||||
private Map<String, String> properties = new LinkedHashMap<>();
|
||||
|
||||
/**
|
||||
* A map of properties passed to the app (not the deployer) when an app is
|
||||
* launched.
|
||||
*/
|
||||
private Map<String, String> applicationProperties;
|
||||
|
||||
public String getCoordinates() {
|
||||
return this.coordinates;
|
||||
}
|
||||
@@ -228,6 +236,14 @@ public class DeployerProperties {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public Map<String, String> getApplicationProperties() {
|
||||
return applicationProperties;
|
||||
}
|
||||
|
||||
public void setApplicationProperties(Map<String, String> applicationProperties) {
|
||||
this.applicationProperties = applicationProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuffer sb = new StringBuffer("Deployable{");
|
||||
|
||||
@@ -24,12 +24,16 @@ spring:
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
dataflow:
|
||||
coordinates: ${dt.pre}dataflow:${dt.ver}
|
||||
port: 9393
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
eureka:
|
||||
coordinates: ${dt.pre}eureka:${dt.ver}
|
||||
port: 8761
|
||||
@@ -39,6 +43,8 @@ spring:
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
h2:
|
||||
coordinates: ${dt.pre}h2:${dt.ver}
|
||||
port: 9095
|
||||
@@ -50,12 +56,16 @@ spring:
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
hystrixdashboard:
|
||||
coordinates: ${dt.pre}hystrixdashboard:${dt.ver}
|
||||
port: 7979
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
kafka:
|
||||
coordinates: ${dt.pre}kafka:${dt.ver}
|
||||
port: 9091
|
||||
@@ -66,6 +76,8 @@ spring:
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
zipkin:
|
||||
coordinates: ${dt.pre}zipkin:${dt.ver}
|
||||
port: 9411
|
||||
@@ -73,4 +85,43 @@ spring:
|
||||
properties:
|
||||
spring.cloud.deployer.memory: ${dt.mem}
|
||||
spring.cloud.deployer.local.javaOpts: ${dt.opts}
|
||||
application-properties:
|
||||
management.security.enabled: false
|
||||
deploy: ${launcher.deploy:configserver,eureka}
|
||||
|
||||
---
|
||||
spring:
|
||||
profiles: rabbit
|
||||
cloud:
|
||||
launcher:
|
||||
deployables:
|
||||
configserver:
|
||||
properties:
|
||||
spring.cloud.deployer.thin.profile: rabbit
|
||||
application-properties:
|
||||
spring.cloud.bus.enabled: true
|
||||
eureka:
|
||||
properties:
|
||||
spring.cloud.deployer.thin.profile: rabbit
|
||||
application-properties:
|
||||
spring.cloud.bus.enabled: true
|
||||
h2:
|
||||
properties:
|
||||
spring.cloud.deployer.thin.profile: rabbit
|
||||
application-properties:
|
||||
spring.cloud.bus.enabled: true
|
||||
dataflow:
|
||||
properties:
|
||||
spring.cloud.deployer.thin.profile: rabbit
|
||||
application-properties:
|
||||
spring.cloud.bus.enabled: true
|
||||
hystrixdashboard:
|
||||
properties:
|
||||
spring.cloud.deployer.thin.profile: rabbit
|
||||
application-properties:
|
||||
spring.cloud.bus.enabled: true
|
||||
zipkin:
|
||||
properties:
|
||||
spring.cloud.deployer.thin.profile: rabbit
|
||||
application-properties:
|
||||
spring.cloud.bus.enabled: true
|
||||
Reference in New Issue
Block a user