// using goamz grab a region region := ec2.New(aws.Auth{ AccessKey: "XXXXXXX", SecretKey: "XXXXXXX", }, Instance_Region) // get a list of public dns names by the server’s class servers := pd.GetPublicDNS(region, Instance_ClassName) // build a pool of servers and specify the concurrency pool := pd.NewPool(Instance_User, Instance_PubKey, servers, DefaultConcurrency) // build the target binary pd.BuildGoBinary("$GOPATH/src/github.com/prevoty/testapp", "testapp", "linux", "amd64") // ensure all ports are open pool.WaitForPort(22) // push the new binary pd.Must(pool.Rsync("-az", "$GOPATH/src/github.com/prevoty/testapp/testapp", "/var/testapp/testapp")) pd.Must(pool.Sudo("restart testapp")