use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class ConsulClientService method getProfiles.
@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
List<Profile> result = new ArrayList<>();
for (Map.Entry<Type, ServiceSettings> entry : endpoints.getAllServiceSettings().entrySet()) {
ServiceSettings settings = entry.getValue();
Type type = entry.getKey();
if (!settings.getSidecar() && settings.getEnabled()) {
String serviceName = type.getCanonicalName();
String profileName = consulClientService(serviceName);
String profilePath = Paths.get(CLIENT_OUTPUT_PATH, serviceName + ".json").toString();
ProfileFactory factory = consulServiceProfileFactoryBuilder.build(type, settings);
result.add(factory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints));
}
}
String profileName = clientProfileName;
String profilePath = Paths.get(CLIENT_OUTPUT_PATH, profileName.split("/")[1]).toString();
result.add(consulClientProfileFactory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints));
return result;
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class MetricRegistryProfileFactoryBuilder method build.
public ProfileFactory build(ServiceSettings settings) {
return new ProfileFactory() {
@Override
protected ArtifactService getArtifactService() {
return artifactService;
}
@Override
protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
URI uri;
try {
String baseUrl;
if (settings.getBasicAuthEnabled() != null && settings.getBasicAuthEnabled()) {
baseUrl = settings.getAuthBaseUrl();
} else {
baseUrl = settings.getBaseUrl();
}
uri = new URIBuilder(baseUrl).setHost("localhost").setPath("/spectator/metrics").build();
} catch (URISyntaxException e) {
throw new HalException(Problem.Severity.FATAL, "Unable to build service URL: " + e.getMessage());
}
profile.appendContents("metrics_url: " + uri.toString());
}
@Override
protected Profile getBaseProfile(String name, String version, String outputFile) {
return new Profile(name, version, outputFile, "");
}
@Override
public SpinnakerArtifact getArtifact() {
return SpinnakerArtifact.SPINNAKER_MONITORING_DAEMON;
}
@Override
protected String commentPrefix() {
return "## ";
}
};
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class FiatService method getProfiles.
@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
String filename = "fiat.yml";
String path = Paths.get(getConfigOutputPath(), filename).toString();
Profile profile = fiatProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
profiles.add(profile);
return profiles;
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class GateService method getProfiles.
@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
String filename = "gate.yml";
String path = Paths.get(getConfigOutputPath(), filename).toString();
GateProfileFactory gateProfileFactory = getGateProfileFactory(deploymentConfiguration.getName());
Profile profile = gateProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
profiles.add(profile);
return profiles;
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class OrcaBootstrapService method getProfiles.
@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
String filename = "orca-bootstrap.yml";
String path = Paths.get(getConfigOutputPath(), filename).toString();
Profile profile = orcaBootstrapProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
profiles.add(profile);
return profiles;
}
Aggregations