func init() { sv := root.PersistentFlags().StringVar bv := root.PersistentFlags().BoolVar // general options sv(&kolaPlatform, "platform", "qemu", "VM platform: qemu, gce, aws") root.PersistentFlags().IntVar(&kola.TestParallelism, "parallel", 1, "number of tests to run in parallel") sv(&kola.QEMUOptions.DiskImage, "qemu-image", sdk.BuildRoot()+"/images/amd64-usr/latest/coreos_production_image.bin", "path to CoreOS disk image") // gce specific options sv(&kola.GCEOptions.Image, "gce-image", "latest", "GCE image") sv(&kola.GCEOptions.Project, "gce-project", "coreos-gce-testing", "GCE project name") sv(&kola.GCEOptions.Zone, "gce-zone", "us-central1-a", "GCE zone name") sv(&kola.GCEOptions.MachineType, "gce-machinetype", "n1-standard-1", "GCE machine type") sv(&kola.GCEOptions.DiskType, "gce-disktype", "pd-ssd", "GCE disk type") sv(&kola.GCEOptions.BaseName, "gce-basename", "kola", "GCE instance name prefix") sv(&kola.GCEOptions.Network, "gce-network", "default", "GCE network") bv(&kola.GCEOptions.ServiceAuth, "gce-service-auth", false, "for non-interactive auth when running within GCE") // aws specific options // CoreOS-alpha-845.0.0 on us-west-1 sv(&kola.AWSOptions.AMI, "aws-ami", "ami-55438011", "AWS AMI ID") sv(&kola.AWSOptions.KeyName, "aws-key", "", "AWS SSH key name") sv(&kola.AWSOptions.InstanceType, "aws-type", "t1.micro", "AWS instance type") sv(&kola.AWSOptions.SecurityGroup, "aws-sg", "kola", "AWS security group name") }
func init() { build := sdk.BuildRoot() cmdUpload.Flags().StringVar(&uploadBucket, "bucket", "gs://users.developer.core-os.net", "gs://bucket/prefix/ prefix defaults to $USER") cmdUpload.Flags().StringVar(&uploadProject, "project", "coreos-gce-testing", "Google Compute project ID") cmdUpload.Flags().StringVar(&uploadImageName, "name", "", "name for uploaded image, defaults to COREOS_VERSION") cmdUpload.Flags().StringVar(&uploadBoard, "board", "amd64-usr", "board used for naming with default prefix only") cmdUpload.Flags().StringVar(&uploadFile, "file", build+"/images/amd64-usr/latest/coreos_production_gce.tar.gz", "path_to_coreos_image (build with: ./image_to_vm.sh --format=gce ...)") root.AddCommand(cmdUpload) }
func init() { build := sdk.BuildRoot() cmdGCEUpload.Flags().BoolVar(&gceUploadForce, "force", false, "set true to overwrite existing image with same name") cmdGCEUpload.Flags().IntVar(&gceUploadRetries, "set-retries", 0, "set how many times to retry on failure") cmdGCEUpload.Flags().StringVar(&gceUploadBucket, "bucket", "gs://users.developer.core-os.net", "gs://bucket/prefix/ prefix defaults to $USER") cmdGCEUpload.Flags().StringVar(&gceUploadImageName, "name", "", "name for uploaded image, defaults to COREOS_VERSION") cmdGCEUpload.Flags().StringVar(&gceUploadBoard, "board", "amd64-usr", "board used for naming with default prefix only") cmdGCEUpload.Flags().StringVar(&gceUploadFile, "file", build+"/images/amd64-usr/latest/coreos_production_gce.tar.gz", "path_to_coreos_image (build with: ./image_to_vm.sh --format=gce ...)") root.AddCommand(cmdGCEUpload) }
func init() { build := sdk.BuildRoot() cmdUpload.Flags().StringVar(&uploadBucket, "bucket", "gs://users.developer.core-os.net", "gs://bucket/prefix/ prefix defaults to $USER") cmdUpload.Flags().StringVar(&uploadImageName, "name", "", "name for uploaded image, defaults to COREOS_VERSION") cmdUpload.Flags().StringVar(&uploadBoard, "board", "amd64-usr", "board used for naming with default prefix only") cmdUpload.Flags().StringVar(&uploadFile, "file", build+"/images/amd64-usr/latest/coreos_production_gce.tar.gz", "path_to_coreos_image (build with: ./image_to_vm.sh --format=gce ...)") cmdUpload.Flags().BoolVar(&uploadServiceAuth, "service-auth", false, "use non-interactive auth when running within GCE") cmdUpload.Flags().BoolVar(&uploadForce, "force", false, "overwrite existing GS and GCE images without prompt") root.AddCommand(cmdUpload) }
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package kola import ( "flag" "github.com/coreos/mantle/platform" "github.com/coreos/mantle/sdk" ) var ( QemuImage = flag.String("qemu.image", sdk.BuildRoot()+"/images/amd64-usr/latest/coreos_production_image.bin", "Base disk image for QEMU based tests.") gceImage = flag.String("gce.image", "latest", "GCE image") gceProject = flag.String("gce.project", "coreos-gce-testing", "GCE project") gceZone = flag.String("gce.zone", "us-central1-a", "GCE zone") gceMachineType = flag.String("gce.machine", "n1-standard-1", "GCE machine type") gceDisk = flag.String("gce.disk", "pd-ssd", "GCE disk type") gceBaseName = flag.String("gce.basename", "kola", "GCE instance names will be generated from this") gceNetwork = flag.String("gce.network", "default", "GCE network") ) func GCEOpts() *platform.GCEOpts { return &platform.GCEOpts{ Image: *gceImage, Project: *gceProject,