@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); result.add(deckProfileFactory.getProfile(deskSettingsPath, deckPath, deploymentConfiguration, endpoints)); return result; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); String apache2Path = "/etc/apache2/"; String sitePath = "/etc/apache2/sites-available/"; String filename = "settings.js"; String path = Paths.get(htmlPath, filename).toString(); result.add(deckProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints)); filename = "passphrase"; path = Paths.get(apache2Path, filename).toString(); result.add(apachePassphraseProfileFactory.getProfile("apache2/" + filename, path, deploymentConfiguration, endpoints).setExecutable(true)); filename = "ports.conf"; path = Paths.get(apache2Path, filename).toString(); result.add(apachePortsProfileFactory.getProfile("apache2/" + filename, path, deploymentConfiguration, endpoints)); filename = "spinnaker.conf"; path = Paths.get(sitePath, filename).toString(); result.add(apacheSpinnakerProfileFactory.getProfile("apache2/" + filename, path, deploymentConfiguration, endpoints)); return result; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); String filename = "settings.js"; String path = Paths.get(settingsPath, filename).toString(); result.add(deckDockerProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints)); return result; }
@Override protected List<String> requiredFiles(DeploymentConfiguration deploymentConfiguration) { return backupRequiredFiles(deploymentConfiguration.getSecurity().getUiSecurity(), deploymentConfiguration.getName()); }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); ServiceSettings deckSettings = endpoints.getServiceSettings(Type.DECK); ServiceSettings gateSettings = endpoints.getServiceSettings(Type.GATE); ApacheSsl apacheSsl= deploymentConfiguration.getSecurity().getUiSecurity().getSsl(); Map<String, String> env = profile.getEnv(); if (apacheSsl.isEnabled()) { env.put("DECK_HOST", deckSettings.getHost()); env.put("DECK_PORT", deckSettings.getPort() + ""); env.put("API_HOST", gateSettings.getBaseUrl()); env.put("DECK_CERT", apacheSsl.getSslCertificateFile()); env.put("DECK_KEY", apacheSsl.getSslCertificateKeyFile()); env.put("PASSPHRASE", apacheSsl.getSslCertificatePassphrase()); } env.put("AUTH_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthn().isEnabled())); env.put("FIAT_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthz().isEnabled())); } }
.setRequiredFiles(backupRequiredFiles(uiSecurity, deploymentConfiguration.getName()));
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); String apache2Path = "/etc/apache2/"; String sitePath = "/etc/apache2/sites-available/"; String filename = "settings.js"; String path = Paths.get(htmlPath, filename).toString(); result.add(deckProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints)); filename = "passphrase"; path = Paths.get(apache2Path, filename).toString(); result.add(apachePassphraseProfileFactory.getProfile("apache2/" + filename, path, deploymentConfiguration, endpoints).setExecutable(true)); filename = "ports.conf"; path = Paths.get(apache2Path, filename).toString(); result.add(apachePortsProfileFactory.getProfile("apache2/" + filename, path, deploymentConfiguration, endpoints)); filename = "spinnaker.conf"; path = Paths.get(sitePath, filename).toString(); result.add(apacheSpinnakerProfileFactory.getProfile("apache2/" + filename, path, deploymentConfiguration, endpoints)); return result; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); String path = Paths.get(settingsPath, settingsJs).toString(); result.add(deckDockerProfileFactory.getProfile(settingsJs, path, deploymentConfiguration, endpoints)); return result; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); Profile deckProfile = deckProfileFactory.getProfile(deckSettingsPath, deckPath, deploymentConfiguration, endpoints); String deploymentName = deploymentConfiguration.getName(); Path userProfilePath = halconfigDirectoryStructure.getUserProfilePath(deploymentName); Optional<Profile> settingsLocalProfile = this.customProfile( deploymentConfiguration, endpoints, Paths.get(userProfilePath.toString(), deckSettingsLocalPath), deckSettingsLocalPath); settingsLocalProfile.ifPresent(p -> deckProfile.appendContents(p.getContents())); result.add(deckProfile); return result; }
@Override protected List<String> requiredFiles(DeploymentConfiguration deploymentConfiguration) { return backupRequiredFiles(deploymentConfiguration.getSecurity().getUiSecurity(), deploymentConfiguration.getName()); }
@Override protected void setProfile(Profile profile, DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { super.setProfile(profile, deploymentConfiguration, endpoints); ServiceSettings deckSettings = endpoints.getServiceSettings(Type.DECK); ServiceSettings gateSettings = endpoints.getServiceSettings(Type.GATE); ApacheSsl apacheSsl= deploymentConfiguration.getSecurity().getUiSecurity().getSsl(); Map<String, String> env = profile.getEnv(); if (apacheSsl.isEnabled()) { env.put("DECK_HOST", deckSettings.getHost()); env.put("DECK_PORT", deckSettings.getPort() + ""); env.put("API_HOST", gateSettings.getBaseUrl()); env.put("DECK_CERT", apacheSsl.getSslCertificateFile()); env.put("DECK_KEY", apacheSsl.getSslCertificateKeyFile()); env.put("PASSPHRASE", apacheSsl.getSslCertificatePassphrase()); } env.put("AUTH_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthn().isEnabled())); env.put("FIAT_ENABLED", Boolean.toString(deploymentConfiguration.getSecurity().getAuthz().isEnabled())); } }
.setRequiredFiles(backupRequiredFiles(uiSecurity, deploymentConfiguration.getName()));
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); String filename = "settings.js"; String path = Paths.get(settingsPath, filename).toString(); result.add(deckDockerProfileFactory.getProfile(filename, path, deploymentConfiguration, endpoints)); return result; }
@Override public List<Profile> getProfiles(DeploymentConfiguration deploymentConfiguration, SpinnakerRuntimeSettings endpoints) { List<Profile> result = new ArrayList<>(); String path = Paths.get(settingsPath, settingsJs).toString(); result.add(deckDockerProfileFactory.getProfile(settingsJs, path, deploymentConfiguration, endpoints)); return result; }