-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a script to deploy minikube on a VM. #459
Conversation
* This is the first step in adding E2E testing on minikube. * We add a function call to test_deploy that will deploy minikube on a VM. * Also provide a function to teardown the VM. * The script copies the relevant kubeconfig information and certificates to a directory. * In a follow on PR we will incorporate this new command into our E2E workflow in order to create an E2E test that runs on minikube. * Related to kubeflow#6
/assign @lluunn |
testing/test_deploy.py
Outdated
install_script = os.path.join(os.path.dirname(__file__), "install_minikube.sh") | ||
|
||
if not os.path.exists(install_script): | ||
logging.error("C %s", install_script) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incomplete message?
vm_util.execute_script(args.project, args.zone, args.vm_name, install_script) | ||
vm_util.execute(args.project, args.zone, args.vm_name, ["sudo minikube start --vm-driver=none --disk-size=40g"]) | ||
|
||
# Copy the .kube and .minikube files to test_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why for loop for one item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
testing/test_deploy.py
Outdated
if not os.path.exists(minikube_dir): | ||
os.makedirs(minikube_dir) | ||
|
||
for target in ["~/.minikube/*.crt", "~/.minikube/client.key"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe move .kube here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -289,6 +298,122 @@ def ks_deploy(app_dir, component, params, env=None, account=None): | |||
apply_command.append("--as=" + account) | |||
util.run(apply_command, cwd=app_dir) | |||
|
|||
def modify_minikube_config(config_path, certs_dir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the purpose of doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make the config work inside the pod and not the VM where minikube is running.
Added a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@lluunn PTAL. |
@@ -289,6 +298,122 @@ def ks_deploy(app_dir, component, params, env=None, account=None): | |||
apply_command.append("--as=" + account) | |||
util.run(apply_command, cwd=app_dir) | |||
|
|||
def modify_minikube_config(config_path, certs_dir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
/lgtm |
@lluunn Can you re LGTM? |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lluunn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
to a directory.
workflow in order to create an E2E test that runs on minikube.
This change is