use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class DeckDockerProfileFactory method setProfile.
@Override
protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
super.setProfile(profile, deploymentConfiguration, endpoints);
ServiceSettings deckSettings = endpoints.getServices().getDeck();
ServiceSettings gateSettings = endpoints.getServices().getGate();
ApacheSsl apacheSsl = deploymentConfiguration.getSecurity().getUiSecurity().getSsl();
if (apacheSsl.isEnabled()) {
Map<String, String> env = profile.getEnv();
env.put("DECK_HOST", deckSettings.getHost());
env.put("DECK_PORT", deckSettings.getPort() + "");
env.put("API_HOST", gateSettings.getBaseUrl());
env.put("AUTH_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthn().isEnabled()));
env.put("DECK_CERT", apacheSsl.getSslCertificateFile());
env.put("DECK_KEY", apacheSsl.getSslCertificateKeyFile());
env.put("PASSPHRASE", apacheSsl.getSslCertificatePassphrase());
}
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class ClouddriverService method getProfiles.
@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
String filename = "clouddriver.yml";
String path = Paths.get(getConfigOutputPath(), filename).toString();
Profile profile = getClouddriverProfileFactory().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 ConsulClientProfileFactory method getBindings.
@Override
protected Map<String, Object> getBindings(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
Map<String, Object> bindings = new HashMap<>();
ServiceSettings consul = endpoints.getServices().getConsulClient();
bindings.put("scheme", consul.getScheme());
bindings.put("port", consul.getPort() + "");
return bindings;
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class SpinnakerServiceProvider method buildRuntimeSettings.
public SpinnakerRuntimeSettings buildRuntimeSettings(DeploymentConfiguration deploymentConfiguration) {
SpinnakerRuntimeSettings endpoints = new SpinnakerRuntimeSettings();
for (SpinnakerService.Type type : SpinnakerService.Type.values()) {
SpinnakerService service = getSpinnakerService(type);
if (service != null) {
log.info("Building service settings entry for " + service.getServiceName());
ServiceSettings settings = service.getDefaultServiceSettings(deploymentConfiguration);
settings.mergePreferThis(service.buildServiceSettings(deploymentConfiguration));
endpoints.setServiceSettings(type, settings);
}
}
return endpoints;
}
use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.
the class DistributedService method buildDeployServerGroupPipeline.
default Map<String, Object> buildDeployServerGroupPipeline(AccountDeploymentDetails<A> details, SpinnakerRuntimeSettings runtimeSettings, List<ConfigSource> configSources, Integer maxRemaining, boolean scaleDown) {
String accountName = details.getAccount().getName();
String region = runtimeSettings.getServiceSettings(getService()).getLocation();
Map<String, Object> deployDescription = getServerGroupDescription(details, runtimeSettings, configSources);
deployDescription.put("name", "deploy");
Map<String, String> source = new HashMap<>();
RunningServiceDetails runningServiceDetails = getRunningServiceDetails(details, runtimeSettings);
if (runningServiceDetails.getLatestEnabledVersion() == null) {
throw new HalException(Problem.Severity.FATAL, "No prior server group to clone for " + getServiceName());
}
source.put("account", accountName);
source.put("credentials", accountName);
source.put("serverGroupName", getVersionedName(runningServiceDetails.getLatestEnabledVersion()));
source.put("region", region);
source.put("namespace", region);
deployDescription.put("source", source);
deployDescription.put("interestingHealthProviders", getHealthProviders());
deployDescription.put("type", AtomicOperations.CLONE_SERVER_GROUP);
deployDescription.put("cloudProvider", getProviderType().getId());
deployDescription.put("refId", "deployredblack");
deployDescription.put("region", getRegion(runtimeSettings.getServiceSettings(getService())));
deployDescription.put("strategy", "redblack");
if (maxRemaining != null) {
deployDescription.put("maxRemainingAsgs", maxRemaining + "");
}
deployDescription.put("scaleDown", scaleDown + "");
if (scaleDown) {
deployDescription.put("allowShrinkDownActive", "true");
}
List<Map<String, Object>> stages = new ArrayList<>();
stages.add(deployDescription);
Map<String, Object> pipeline = new HashMap<>();
pipeline.put("stages", stages);
pipeline.put("application", "spin");
pipeline.put("name", "Deploy/Upgrade " + getServiceName());
pipeline.put("description", "Auto-generated by Halyard");
return pipeline;
}
Aggregations