Add initial support for Volumes to AWS

This commit is contained in:
Justin Santa Barbara
2015-03-06 06:26:39 -08:00
parent d2b6920a32
commit edf0292d4a
19 changed files with 1440 additions and 63 deletions

View File

@@ -17,10 +17,13 @@ limitations under the License.
package main
import (
"fmt"
"os"
goruntime "runtime"
"strings"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd"
"github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/test/e2e"
"github.com/golang/glog"
@@ -47,6 +50,7 @@ func init() {
flag.StringVar(&context.Host, "host", "", "The host, or apiserver, to connect to")
flag.StringVar(&context.RepoRoot, "repo_root", "./", "Root directory of kubernetes repository, for finding test files. Default assumes working directory is repository root")
flag.StringVar(&context.Provider, "provider", "", "The name of the Kubernetes provider (gce, gke, local, vagrant, etc.)")
flag.StringVar(&gceConfig.MasterName, "kube_master", "", "Name of the kubernetes master. Only required if provider is gce or gke")
flag.StringVar(&gceConfig.ProjectID, "gce_project", "", "The GCE project being used, if applicable")
flag.StringVar(&gceConfig.Zone, "gce_zone", "", "GCE zone being used, if applicable")
@@ -63,5 +67,23 @@ func main() {
glog.Error("Invalid --times (negative or no testing requested)!")
os.Exit(1)
}
cloudConfig := &e2e.CloudConfig{
ProjectID: *gceProject,
Zone: *gceZone,
MasterName: *masterName,
}
if *provider == "aws" {
awsConfig := "[Global]\n"
awsConfig += fmt.Sprintf("Region=%s\n", *gceZone)
var err error
cloudConfig.Provider, err = cloudprovider.GetCloudProvider(*provider, strings.NewReader(awsConfig))
if err != nil {
glog.Error("Error building AWS provider: %v", err)
os.Exit(1)
}
}
e2e.RunE2ETests(context, *orderseed, *times, *reportDir, testList)
}