def ensure_requirements(self):
"""Make sure kubectl and minikube are available."""
uname = run_result("uname").lower()
for path, url in zip([MINIKUBE, KUBECTL], [
"https://storage.googleapis.com/minikube/releases/"
"v0.15.0/minikube-{}-amd64",
"https://storage.googleapis.com/kubernetes-release/"
"release/v1.5.1/bin/{}/amd64/kubectl"
]):
if path.exists() and not os.access(str(path), os.X_OK):
# Apparently failed halfway through previous download
os.remove(str(path))
if not path.exists():
self.echo("Downloading {}...".format(path.name))
check_call([
"curl", "--create-dirs", "--silent", "--output", str(path),
url.format(uname)
])
path.chmod(0o755)
评论列表
文章目录