Skip to content

Commit

Permalink
Merge pull request #953 from denji/parallels
Browse files Browse the repository at this point in the history
machine: add parallels support
  • Loading branch information
tstromberg authored Feb 8, 2019
2 parents 91be19c + a1cd81b commit 6e1b9d0
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var startCmd = &cobra.Command{
Use: "start",
Short: "Starts a local kubernetes cluster",
Long: `Starts a local kubernetes cluster using VM. This command
assumes you have already installed one of the VM drivers: virtualbox/vmwarefusion/kvm/xhyve/hyperv.`,
assumes you have already installed one of the VM drivers: virtualbox/parallels/vmwarefusion/kvm/xhyve/hyperv.`,
Run: runStart,
}

Expand Down
1 change: 1 addition & 0 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func GetMinipath() string {
// used in gendocs.
var SupportedVMDrivers = [...]string{
"virtualbox",
"parallels",
"vmwarefusion",
"kvm",
"xhyve",
Expand Down
17 changes: 17 additions & 0 deletions pkg/minikube/drivers/parallels/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright 2018 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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 parallels
48 changes: 48 additions & 0 deletions pkg/minikube/drivers/parallels/driver.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// +build darwin

/*
Copyright 2018 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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 parallels

import (
parallels "github.com/Parallels/docker-machine-parallels"
"github.com/docker/machine/libmachine/drivers"
cfg "k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/registry"
)

func init() {
registry.Register(registry.DriverDef{
Name: "parallels",
Builtin: true,
ConfigCreator: createParallelsHost,
DriverCreator: func() drivers.Driver {
return parallels.NewDriver("", "")
},
})
}

func createParallelsHost(config cfg.MachineConfig) interface{} {
d := parallels.NewDriver(cfg.GetMachineName(), constants.GetMinipath()).(*parallels.Driver)
d.Boot2DockerURL = config.Downloader.GetISOFileURI(config.MinikubeISO)
d.Memory = config.Memory
d.CPU = config.CPUs
d.DiskSize = config.DiskSize
d.ISO = d.ResolveStorePath("boot2docker.iso")
return d
}

0 comments on commit 6e1b9d0

Please sign in to comment.