mirror of
https://github.com/ubuntu/microk8s.git
synced 2021-05-23 02:23:41 +03:00
Wanted to use the SnapPackage library, but it seems to execute on the host and not the VM
This commit is contained in:
@@ -23,7 +23,6 @@ from typing import Dict
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from . import errors
|
||||
from .repo.snaps import SnapPackage
|
||||
from ._multipass._instance_info import InstanceInfo
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -156,14 +155,11 @@ class Provider(abc.ABC):
|
||||
raise
|
||||
|
||||
def _setup_microk8s(self, specs: Dict) -> None:
|
||||
microk8s_snap = SnapPackage("microk8s/{}".format(specs['channel']))
|
||||
microk8s_snap.install()
|
||||
self.run("snap install microk8s --classic --channel {}".format(specs['channel']).split())
|
||||
if sys.platform == "win32":
|
||||
integrator_snap = SnapPackage("microk8s-integrator-windows")
|
||||
integrator_snap.install()
|
||||
self.run("snap install microk8s-integrator-windows".split())
|
||||
elif sys.platform == "darwin":
|
||||
integrator_snap = SnapPackage("microk8s-integrator-macos")
|
||||
integrator_snap.install()
|
||||
self.run("snap install microk8s-integrator-macos".split())
|
||||
|
||||
def _get_env_command(self) -> Sequence[str]:
|
||||
"""Get command sequence for `env` with configured flags."""
|
||||
|
||||
Reference in New Issue
Block a user