mirror of https://github.com/portainer/portainer
fix(download):update the downloads files directory EE-2473 (#6734)
* update the downloads files directorypull/6620/head
parent
69c34cdf0c
commit
da9ef7dfcf
|
@ -19,7 +19,7 @@ export function EdgeScriptForm({ edgeKey, edgeId }: Props) {
|
|||
envVars: '',
|
||||
edgeIdGenerator: '',
|
||||
os: 'linux',
|
||||
platform: 'swarm',
|
||||
platform: 'k8s',
|
||||
});
|
||||
|
||||
const settingsQuery = useSettings((settings) => settings.AgentSecret);
|
||||
|
|
|
@ -10,6 +10,11 @@ import { EdgeProperties, Platform } from './types';
|
|||
|
||||
const commandsByOs = {
|
||||
linux: [
|
||||
{
|
||||
id: 'k8s',
|
||||
label: 'Kubernetes',
|
||||
command: buildKubernetesCommand,
|
||||
},
|
||||
{
|
||||
id: 'swarm',
|
||||
label: 'Docker Swarm',
|
||||
|
@ -20,11 +25,6 @@ const commandsByOs = {
|
|||
label: 'Docker Standalone',
|
||||
command: buildLinuxStandaloneCommand,
|
||||
},
|
||||
{
|
||||
id: 'k8s',
|
||||
label: 'Kubernetes',
|
||||
command: buildKubernetesCommand,
|
||||
},
|
||||
],
|
||||
win: [
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ export function Scripts({
|
|||
|
||||
useEffect(() => {
|
||||
if (!commandsByOs[os].find((p) => p.id === platform)) {
|
||||
onPlatformChange('standalone');
|
||||
onPlatformChange('swarm');
|
||||
}
|
||||
}, [os, platform, onPlatformChange]);
|
||||
|
||||
|
@ -271,7 +271,7 @@ function buildKubernetesCommand(
|
|||
? `PORTAINER_EDGE_ID=$(${edgeIdScript}) \n\n`
|
||||
: '';
|
||||
|
||||
return `${idEnvVar}curl https://downloads.portainer.io/portainer-ee${agentShortVersion}-edge-agent-setup.sh |
|
||||
return `${idEnvVar}curl https://downloads.portainer.io/ce${agentShortVersion}/portainer-edge-agent-setup.sh |
|
||||
bash -s -- "${
|
||||
!edgeIdScript && edgeId ? edgeId : '$PORTAINER_EDGE_ID'
|
||||
}" "${edgeKey}" "${allowSelfSignedCerts ? '1' : '0'}" "${agentSecret}"`;
|
||||
|
|
|
@ -55,8 +55,8 @@ angular
|
|||
$scope.agentSecret = '';
|
||||
|
||||
$scope.deployCommands = {
|
||||
kubeLoadBalancer: `curl -L https://downloads.portainer.io/portainer-agent-ce${agentShortVersion}-k8s-lb.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml`,
|
||||
kubeNodePort: `curl -L https://downloads.portainer.io/portainer-agent-ce${agentShortVersion}-k8s-nodeport.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml`,
|
||||
kubeLoadBalancer: `curl -L https://downloads.portainer.io/ce${agentShortVersion}/portainer-agent-k8s-lb.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml`,
|
||||
kubeNodePort: `curl -L https://downloads.portainer.io/ce${agentShortVersion}/portainer-agent-k8s-nodeport.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml`,
|
||||
agentLinux: agentLinuxSwarmCommand,
|
||||
agentWindows: agentWindowsSwarmCommand,
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export function getAgentShortVersion(agentVersion) {
|
||||
const numbers = agentVersion.split('.');
|
||||
return numbers[0] + numbers[1];
|
||||
return numbers[0] + '-' + numbers[1];
|
||||
}
|
||||
|
|
|
@ -227,8 +227,8 @@ export default class WizardDockerController {
|
|||
const agentShortVersion = getAgentShortVersion(agentVersion);
|
||||
|
||||
this.command = {
|
||||
linuxCommand: `curl -L https://downloads.portainer.io/agent-stack-ce${agentShortVersion}.yml -o agent-stack.yml && docker stack deploy --compose-file=agent-stack.yml portainer-agent `,
|
||||
winCommand: `curl -L https://downloads.portainer.io/agent-stack-ce${agentShortVersion}-windows.yml -o agent-stack-windows.yml && docker stack deploy --compose-file=agent-stack-windows.yml portainer-agent `,
|
||||
linuxCommand: `curl -L https://downloads.portainer.io/ce${agentShortVersion}/agent-stack.yml -o agent-stack.yml && docker stack deploy --compose-file=agent-stack.yml portainer-agent `,
|
||||
winCommand: `curl -L https://downloads.portainer.io/ce${agentShortVersion}/agent-stack-windows.yml -o agent-stack-windows.yml && docker stack deploy --compose-file=agent-stack-windows.yml portainer-agent `,
|
||||
linuxSocket: `-v "/var/run/docker.sock:/var/run/docker.sock" `,
|
||||
winSocket: `-v \.\pipe\docker_engine:\.\pipe\docker_engine `,
|
||||
};
|
||||
|
|
|
@ -106,8 +106,8 @@ export default class WizardKubernetesController {
|
|||
const agentShortVersion = getAgentShortVersion(agentVersion);
|
||||
|
||||
this.command = {
|
||||
loadBalancer: `curl -L https://downloads.portainer.io/portainer-agent-ce${agentShortVersion}-k8s-lb.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml `,
|
||||
nodePort: `curl -L https://downloads.portainer.io/portainer-agent-ce${agentShortVersion}-k8s-nodeport.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml `,
|
||||
loadBalancer: `curl -L https://downloads.portainer.io/ce${agentShortVersion}/portainer-agent-k8s-lb.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml `,
|
||||
nodePort: `curl -L https://downloads.portainer.io/ce${agentShortVersion}/portainer-agent-k8s-nodeport.yaml -o portainer-agent-k8s.yaml; kubectl apply -f portainer-agent-k8s.yaml `,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue