From 7e2ce3ffc27acac1abe9dc7e5a88e4e2fd087473 Mon Sep 17 00:00:00 2001 From: cong meng Date: Thu, 29 Apr 2021 16:25:09 +1200 Subject: [PATCH] feat(edge) EE-596 Update the version of agent to 2.4.0 in agent deploy command on the adding edge screen (#5021) Co-authored-by: Simon Meng --- .../views/endpoints/edit/endpointController.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/portainer/views/endpoints/edit/endpointController.js b/app/portainer/views/endpoints/edit/endpointController.js index d1f121cd7..cb66d330b 100644 --- a/app/portainer/views/endpoints/edit/endpointController.js +++ b/app/portainer/views/endpoints/edit/endpointController.js @@ -62,7 +62,7 @@ angular $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey + - ' -e CAP_HOST_MANAGEMENT=1 --name portainer_edge_agent portainer/agent' + ' -e CAP_HOST_MANAGEMENT=1 --name portainer_edge_agent portainer/agent:2.4.0' ); } else if ($scope.state.deploymentTab === 2 && $scope.state.platformType === 'windows') { clipboard.copyText( @@ -70,7 +70,7 @@ angular $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey + - ' -e CAP_HOST_MANAGEMENT=1 --name portainer_edge_agent portainer/agent' + ' -e CAP_HOST_MANAGEMENT=1 --name portainer_edge_agent portainer/agent:2.4.0' ); } else if ($scope.state.deploymentTab === 1 && $scope.state.platformType === 'linux') { clipboard.copyText( @@ -78,7 +78,7 @@ angular $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey + - " -e CAP_HOST_MANAGEMENT=1 --mode global --constraint 'node.platform.os == linux' --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes --mount type=bind,src=//,dst=/host --mount type=volume,src=portainer_agent_data,dst=/data portainer/agent" + " -e CAP_HOST_MANAGEMENT=1 --mode global --constraint 'node.platform.os == linux' --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes --mount type=bind,src=//,dst=/host --mount type=volume,src=portainer_agent_data,dst=/data portainer/agent:2.4.0" ); } else if ($scope.state.deploymentTab === 1 && $scope.state.platformType === 'windows') { clipboard.copyText( @@ -86,7 +86,7 @@ angular $scope.randomEdgeID + ' -e EDGE_KEY=' + $scope.endpoint.EdgeKey + - ' -e CAP_HOST_MANAGEMENT=1 --mode global --constraint node.platform.os==windows --mount type=npipe,src=\\\\.\\pipe\\docker_engine,dst=\\\\.\\pipe\\docker_engine --mount type=bind,src=C:\\ProgramData\\docker\\volumes,dst=C:\\ProgramData\\docker\\volumes --mount type=volume,src=portainer_agent_data,dst=C:\\data portainer/agent' + ' -e CAP_HOST_MANAGEMENT=1 --mode global --constraint node.platform.os==windows --mount type=npipe,src=\\\\.\\pipe\\docker_engine,dst=\\\\.\\pipe\\docker_engine --mount type=bind,src=C:\\ProgramData\\docker\\volumes,dst=C:\\ProgramData\\docker\\volumes --mount type=volume,src=portainer_agent_data,dst=C:\\data portainer/agent:2.4.0' ); } else { clipboard.copyText('curl https://downloads.portainer.io/portainer-edge-agent-setup.sh | bash -s -- ' + $scope.randomEdgeID + ' ' + $scope.endpoint.EdgeKey); @@ -258,7 +258,7 @@ angular -e EDGE_KEY=${edgeKey} \\ -e CAP_HOST_MANAGEMENT=1 \\ --name portainer_edge_agent \\ - portainer/agent`; + portainer/agent:2.4.0`; } function buildWindowsStandaloneCommand(edgeId, edgeKey) { @@ -272,7 +272,7 @@ angular -e EDGE_KEY=${edgeKey} \\ -e CAP_HOST_MANAGEMENT=1 \\ --name portainer_edge_agent \\ - portainer/agent`; + portainer/agent:2.4.0`; } function buildLinuxSwarmCommand(edgeId, edgeKey) { @@ -294,7 +294,7 @@ docker service create \\ --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes \\ --mount type=bind,src=//,dst=/host \\ --mount type=volume,src=portainer_agent_data,dst=/data \\ - portainer/agent`; + portainer/agent:2.4.0`; } function buildWindowsSwarmCommand(edgeId, edgeKey) { @@ -314,7 +314,7 @@ docker service create \\ --mount type=npipe,src=\\\\.\\pipe\\docker_engine,dst=\\\\.\\pipe\\docker_engine \\ --mount type=bind,src=C:\\ProgramData\\docker\\volumes,dst=C:\\ProgramData\\docker\\volumes \\ --mount type=volume,src=portainer_agent_data,dst=C:\\data \\ - portainer/agent`; + portainer/agent:2.4.0`; } initView();