use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
the class DefaultMonitorDataPublisher method init.
@Override
public void init() {
try {
List<String> addresses = new ArrayList<>();
SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(MonitorConstant.SYSTEM_KEY_DASHBOARD_SERVICE);
if (info != null && info.getAccessURL() != null) {
addresses.addAll(info.getAccessURL());
}
addressManager = new AddressManager(addresses, EventManager.getEventBus());
deployMonitorClient();
} catch (Exception e) {
LOGGER.warn("Deploy monitor data publisher failed will not send monitor data.");
}
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project incubator-servicecomb-java-chassis by apache.
the class TestServiceCenterDefaultDeploymentProvider method testConfigurationEnvTwo.
@Test
public void testConfigurationEnvTwo() {
System.setProperty("servicecomb.service.registry.address", "http://127.0.0.1:30100,http://127.0.0.2:30100");
ServiceCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ServiceCenterDefaultDeploymentProvider.SYSTEM_KEY_SERVICE_CENTER);
Assert.assertEquals(info.getAccessURL().size(), 2);
Assert.assertEquals(info.getAccessURL().get(0), "http://127.0.0.1:30100");
Assert.assertEquals(info.getAccessURL().get(1), "http://127.0.0.2:30100");
System.getProperties().remove("servicecomb.service.registry.address");
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.
the class TestServiceCenterDefaultDeploymentProvider method testConfigurationEnv.
@Test
public void testConfigurationEnv() {
System.setProperty("servicecomb.service.registry.address", "https://localhost:30100");
ServiceCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ServiceCenterDefaultDeploymentProvider.SYSTEM_KEY_SERVICE_CENTER);
Assert.assertEquals(info.getAccessURL().get(0), "https://localhost:30100");
System.getProperties().remove("servicecomb.service.registry.address");
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.
the class TestConfigCenterDefaultDeploymentProvider method testConfigurationEnvTwo.
@Test
public void testConfigurationEnvTwo() {
System.setProperty("servicecomb.config.client.serverUri", "https://localhost:9988,https://localhost:9987");
ConfigCenterDefaultDeploymentProvider.setConfiguration(ConfigUtil.createLocalConfig());
SystemBootstrapInfo info = Deployment.getSystemBootStrapInfo(ConfigCenterDefaultDeploymentProvider.SYSTEM_KEY_CONFIG_CENTER);
Assert.assertEquals(info.getAccessURL().size(), 2);
Assert.assertEquals(info.getAccessURL().get(0), "https://localhost:9988");
Assert.assertEquals(info.getAccessURL().get(1), "https://localhost:9987");
System.getProperties().remove("servicecomb.config.client.serverUri");
}
use of org.apache.servicecomb.deployment.SystemBootstrapInfo in project java-chassis by ServiceComb.
the class KieCenterDefaultDeploymentProvider method getSystemBootStrapInfo.
@Override
public SystemBootstrapInfo getSystemBootStrapInfo(String systemKey) {
if (!systemKey.equals(SYSTEM_KEY_KIE_CENTER)) {
return null;
}
List<String> kieAddresses = ConfigUtil.parseArrayValue(configuration.getString("servicecomb.kie.serverUri"));
if (kieAddresses.isEmpty()) {
return null;
}
SystemBootstrapInfo kie = new SystemBootstrapInfo();
kie.setAccessURL(kieAddresses);
return kie;
}
Aggregations