Add caching for remote execution

This speeds up copying of the binary for slow connections. It also
finally adds a universal directory prefix for mgmt!
This commit is contained in:
James Shubin
2016-08-06 07:26:00 -04:00
parent 7032eea045
commit ad1e48aa2d
2 changed files with 116 additions and 26 deletions

View File

@@ -18,6 +18,7 @@
package main
import (
"fmt"
etcdtypes "github.com/coreos/etcd/pkg/types"
"github.com/coreos/pkg/capnslog"
"github.com/urfave/cli"
@@ -33,6 +34,7 @@ import (
var (
program string
version string
prefix = fmt.Sprintf("/var/lib/%s/", program)
)
const (
@@ -268,6 +270,8 @@ func run(c *cli.Context) error {
cConns,
c.Bool("allow-interactive"),
c.String("ssh-priv-id-rsa"),
!c.Bool("no-caching"),
prefix,
)
// TODO: is there any benefit to running the remotes above in the loop?
@@ -451,6 +455,10 @@ func main() {
Usage: "number of maximum concurrent remote ssh connections to run, 0 for unlimited",
EnvVar: "MGMT_CCONNS",
},
cli.BoolFlag{
Name: "no-caching",
Usage: "don't allow remote caching of remote execution binary",
},
},
},
}