feat(edge): update deployment instructions

This commit is contained in:
Anthony Lapenna
2019-06-17 11:37:09 +12:00
parent 69bc599b5b
commit ecf52616e2
2 changed files with 8 additions and 2 deletions
@@ -29,10 +29,15 @@
</uib-tab>
<uib-tab index="1" heading="Swarm">
<code style=display:block;white-space:pre-wrap>
docker network create \
--driver overlay \
--attachable \
portainer_agent_network;
docker service create \
--name portainer_edge_agent \
--network portainer_agent_network \
-e AGENT_CLUSTER_ADDR=tasks.portainer_agent \
-e AGENT_CLUSTER_ADDR=tasks.portainer_edge_agent \
-e EDGE=1 \
-e CAP_HOST_MANAGEMENT=1 \
--mode global \
@@ -40,6 +45,7 @@
--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 \
portainer/pagent:edge
</code>
</uib-tab>
@@ -22,7 +22,7 @@ function ($q, $scope, $state, $transition$, $filter, clipboard, EndpointService,
if ($scope.state.deploymentTab === 0) {
clipboard.copyText('docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes -v /:/host --restart always -e EDGE=1 -e CAP_HOST_MANAGEMENT=1 --name portainer_agent_iot portainer/pagent:edge');
} else {
clipboard.copyText('docker service create --name portainer_edge_agent --network portainer_agent_network -e AGENT_CLUSTER_ADDR=tasks.portainer_agent -e EDGE=1 -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/volume portainer/pagent:edge');
clipboard.copyText('docker network create --driver overlay --attachable portainer_agent_network; docker service create --name portainer_edge_agent --network portainer_agent_network -e AGENT_CLUSTER_ADDR=tasks.portainer_edge_agent -e EDGE=1 -e CAP_HOST_MANAGEMENT=1 --mode global --publish mode=host,target=80,published=80 --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/volume --mount type=bind,src=//,dst=/host portainer/pagent:edge');
}
$('#copyNotificationDeploymentCommand').show().fadeOut(2500);
};