@Override public RemoteAction connectCommand(DistributedServiceProvider<T> serviceProvider, AccountDeploymentDetails<T> deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { RemoteAction result = new RemoteAction(); String connectCommands = String.join(" &\n", serviceTypes.stream() .map(t -> serviceProvider.getDeployableService(t) .connectCommand(deploymentDetails, runtimeSettings)) .collect(Collectors.toList())); result.setScript("#!/bin/bash\n" + connectCommands); result.setScriptDescription( "The generated script will open connections to the API & UI servers using ssh tunnels"); result.setAutoRun(false); return result; }
@Override public RemoteAction connectCommand(DistributedServiceProvider<T> serviceProvider, AccountDeploymentDetails<T> deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { RemoteAction result = new RemoteAction(); String connectCommands = String.join(" &\n", serviceTypes.stream() .map(t -> serviceProvider.getDeployableService(t) .connectCommand(deploymentDetails, runtimeSettings)) .collect(Collectors.toList())); result.setScript("#!/bin/bash\n" + connectCommands); result.setScriptDescription( "The generated script will open connections to the API & UI servers using ssh tunnels"); result.setAutoRun(false); return result; }
@Override public RemoteAction connectCommand(KubectlServiceProvider serviceProvider, AccountDeploymentDetails<KubernetesAccount> deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { RemoteAction result = new RemoteAction(); String connectCommands = String.join(" &\n", serviceTypes.stream() .map(t -> serviceProvider.getService(t) .connectCommand(deploymentDetails, runtimeSettings)) .collect(Collectors.toList())); result.setScript("#!/bin/bash\n" + connectCommands); result.setScriptDescription( "The generated script will open connections to the API & UI servers using ssh tunnels"); result.setAutoRun(false); return result; }
@Override public RemoteAction connectCommand(KubectlServiceProvider serviceProvider, AccountDeploymentDetails<KubernetesAccount> deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { RemoteAction result = new RemoteAction(); String connectCommands = String.join(" &\n", serviceTypes.stream() .map(t -> serviceProvider.getService(t) .connectCommand(deploymentDetails, runtimeSettings)) .collect(Collectors.toList())); result.setScript("#!/bin/bash\n" + connectCommands); result.setScriptDescription( "The generated script will open connections to the API & UI servers using ssh tunnels"); result.setAutoRun(false); return result; }
@Override public RemoteAction clean(DeploymentDetails details, SpinnakerRuntimeSettings runtimeSettings) { String uninstallArtifacts = String.join("\n", getServices() .stream() .filter(s -> s != null && runtimeSettings.getServiceSettings(s).getEnabled()) .map(s -> ((LocalDebianService) s).uninstallArtifactCommand()) .collect(Collectors.toList())); Map<String, Object> bindings = new HashMap<>(); TemplatedResource resource = new StringReplaceJarResource("/debian/uninstall.sh"); bindings.put("uninstall-artifacts", uninstallArtifacts); return new RemoteAction().setScript(resource.setBindings(bindings).toString()) .setAutoRun(true) .setScriptDescription("This script apt-get purges all spinnaker components & deletes their config"); } }
@Override public RemoteAction clean(DeploymentDetails details, SpinnakerRuntimeSettings runtimeSettings) { String uninstallArtifacts = String.join("\n", getServices() .stream() .filter(s -> s != null && runtimeSettings.getServiceSettings(s).getEnabled()) .map(s -> ((LocalDebianService) s).uninstallArtifactCommand()) .collect(Collectors.toList())); Map<String, Object> bindings = new HashMap<>(); TemplatedResource resource = new StringReplaceJarResource("/debian/uninstall.sh"); bindings.put("uninstall-artifacts", uninstallArtifacts); return new RemoteAction().setScript(resource.setBindings(bindings).toString()) .setAutoRun(true) .setScriptDescription("This script apt-get purges all spinnaker components & deletes their config"); } }
public RemoteAction install() { RemoteAction result = new RemoteAction(); String script = "#!/bin/bash\n" + "curl -LO https://storage.googleapis.com/spinnaker-artifacts/spin/$(curl -s https://storage.googleapis.com/spinnaker-artifacts/spin/latest)/linux/amd64/spin\n" + "chmod +x spin\n" + "sudo mv spin /usr/local/bin/spin"; result.setScript(script); result.setScriptDescription("The generated script will install the latest version of spin CLI"); result.setAutoRun(true); result.commitScript(halconfigDirectoryStructure.getSpinInstallScriptPath()); return result; } }
public RemoteAction install() { RemoteAction result = new RemoteAction(); String script = "#!/bin/bash\n" + "curl -LO https://storage.googleapis.com/spinnaker-artifacts/spin/$(curl -s https://storage.googleapis.com/spinnaker-artifacts/spin/latest)/linux/amd64/spin\n" + "chmod +x spin\n" + "sudo mv spin /usr/local/bin/spin"; result.setScript(script); result.setScriptDescription("The generated script will install the latest version of spin CLI"); result.setAutoRun(true); result.commitScript(halconfigDirectoryStructure.getSpinInstallScriptPath()); return result; } }