Search in sources :

Example 11 with SpinnakerRuntimeSettings

use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.

the class SpinnakerMonitoringDaemonService method getProfiles.

@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    List<Profile> results = new ArrayList<>();
    for (Map.Entry<Type, ServiceSettings> entry : endpoints.getAllServiceSettings().entrySet()) {
        ServiceSettings settings = entry.getValue();
        if (settings.getMonitored() && settings.getEnabled()) {
            String serviceName = entry.getKey().getCanonicalName();
            String profileName = serviceRegistryProfileName(serviceName);
            String profilePath = Paths.get(REGISTRY_OUTPUT_PATH, serviceName + ".yml").toString();
            ProfileFactory factory = metricRegistryProfileFactoryBuilder.build(settings);
            results.add(factory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints));
        }
    }
    String profileName = monitoringProfileName();
    String profilePath = Paths.get(CONFIG_OUTPUT_PATH, profileName).toString();
    results.add(spinnakerMonitoringDaemonProfileFactory.getProfile(profileName, profilePath, deploymentConfiguration, endpoints));
    return results;
}
Also used : ProfileFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.ProfileFactory) SpinnakerMonitoringDaemonProfileFactory(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.SpinnakerMonitoringDaemonProfileFactory) Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile)

Example 12 with SpinnakerRuntimeSettings

use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.

the class IgorService method getProfiles.

@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
    String filename = "igor.yml";
    String path = Paths.get(getConfigOutputPath(), filename).toString();
    Profile profile = igorProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
    profiles.add(profile);
    return profiles;
}
Also used : Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile)

Example 13 with SpinnakerRuntimeSettings

use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.

the class EchoService method getProfiles.

@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
    String filename = "echo.yml";
    String path = Paths.get(getConfigOutputPath(), filename).toString();
    Profile profile = echoProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
    profiles.add(profile);
    return profiles;
}
Also used : Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile)

Example 14 with SpinnakerRuntimeSettings

use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.

the class KayentaService method getProfiles.

@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
    String filename = "kayenta.yml";
    String path = Paths.get(getConfigOutputPath(), filename).toString();
    Profile profile = kayentaProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
    profiles.add(profile);
    return profiles;
}
Also used : Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile)

Example 15 with SpinnakerRuntimeSettings

use of com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings in project halyard by spinnaker.

the class ClouddriverBootstrapService method getProfiles.

@Override
public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) {
    List<Profile> profiles = super.getProfiles(deploymentConfiguration, endpoints);
    // Due to a "feature" in how spring merges profiles, list entries (including requiredGroupMembership) are
    // merged rather than overwritten. Including the base profile will prevent fiat-enabled setups from deploying
    // anything since the deploying account will be restricted from performing any operations
    profiles = profiles.stream().filter(p -> !p.getName().equals("clouddriver.yml")).collect(Collectors.toList());
    String filename = "clouddriver-bootstrap.yml";
    String path = Paths.get(getConfigOutputPath(), filename).toString();
    Profile profile = clouddriverBootstrapProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints);
    profiles.add(profile);
    return profiles;
}
Also used : Profile(com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile)

Aggregations

ServiceSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ServiceSettings)28 SpinnakerRuntimeSettings (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.SpinnakerRuntimeSettings)22 HalException (com.netflix.spinnaker.halyard.core.error.v1.HalException)20 RunningServiceDetails (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.RunningServiceDetails)20 ArrayList (java.util.ArrayList)20 Profile (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.profile.Profile)19 HashMap (java.util.HashMap)16 SpinnakerService (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.SpinnakerService)15 Map (java.util.Map)12 List (java.util.List)11 AccountDeploymentDetails (com.netflix.spinnaker.halyard.deploy.deployment.v1.AccountDeploymentDetails)9 Collectors (java.util.stream.Collectors)9 Names (com.netflix.frigga.Names)7 RemoteAction (com.netflix.spinnaker.halyard.core.RemoteAction)7 DistributedService (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.distributed.DistributedService)7 HashSet (java.util.HashSet)7 Problem (com.netflix.spinnaker.halyard.core.problem.v1.Problem)6 ConfigSource (com.netflix.spinnaker.halyard.deploy.spinnaker.v1.service.ConfigSource)6 Collections (java.util.Collections)6 DeploymentConfiguration (com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)5