Skip to content
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

Dashboard: Setup Minikube for local development #1306

Closed
felipesanches opened this issue May 2, 2017 · 10 comments
Closed

Dashboard: Setup Minikube for local development #1306

felipesanches opened this issue May 2, 2017 · 10 comments

Comments

@felipesanches
Copy link
Collaborator

felipesanches commented May 2, 2017

I'm trying to setup Minikube in order to run Kubernetes locally in a VM for the purpose of faster iterations on the development of the FontBakery dashboard.

  • I made sure my BIOS setup utility has Virtualization enabled.
  • I also verified that my CPU has support for virtualization (vmx flag is present on /proc/cpuinfo)
  • I installed kvm/qemu packages and follow all instructions at: https://github.com/kubernetes/minikube/blob/master/DRIVERS.md#kvm-driver
  • I grabbed the minikube-linux-amd64 prebuilt binary and turned on its execute-flags with chmod a+x.

When running this command:

./minikube-linux-amd64 --vm-driver=kvm start

I get this error:

 Starting local Kubernetes cluster...
 Starting VM...
 E0502 17:21:19.831825    3579 start.go:116] Error starting host: Error creating new host: Driver "kvm" not found. Do you have the plugin binary accessible in your PATH?.

 Retrying.
 E0502 17:21:19.832369    3579 start.go:122] Error starting host:  Error creating new host: Driver "kvm" not found. Do you have the plugin binary accessible in your PATH?
+++ exited with 1 +++
@felipesanches felipesanches changed the title Setup Minikube for local development Dashboard: Setup Minikube for local development May 2, 2017
@felipesanches
Copy link
Collaborator Author

Hmm... maybe what's missing is performing the docker-machine-kvm install instructions available here:
https://github.com/dhiltgen/docker-machine-kvm/releases

I'll try that now.

@felipesanches
Copy link
Collaborator Author

Cool! I've got minikube setup on my computer. I'll create a deploy script for an extremely reduced subset of the full collection (with a selection of just 3 or 4 families, which I think is pretty much enough for evaluating most features of the dashboard) and then I'll write a small contributors first steps guide on how to set it up for local development.

@graphicore
Copy link
Collaborator

Awesome, thanks!

@davelab6
Copy link
Contributor

davelab6 commented May 3, 2017 via email

@graphicore
Copy link
Collaborator

I also got minikube running.

felipesanches added a commit to felipesanches/fontbakery that referenced this issue May 3, 2017
@felipesanches felipesanches reopened this May 4, 2017
@felipesanches
Copy link
Collaborator Author

@graphicore & @davelab6

Running minikube locally we should be able to deploy the dashboard, but pushing/pulling images from/to the remote Google Container Registry is too cumbersome. In order to enable an efficient local develpment environment it would be advised to run a local container registry as well. It is not really clear how to acchieve that, by I found this blogpost which seems to deal with this exact develpment scenario, so I'm trying to setup my system the same way:

https://mtpereira.com/local-development-k8s.html

If that makes sense, we may host similar yaml setup files in the fontbakery repo accompained with usage instructions on README.md.

@davelab6
Copy link
Contributor

davelab6 commented May 4, 2017 via email

@graphicore
Copy link
Collaborator

I'm trying to figure these things out as well. It's a good learning experience :-), good to get into Kubernetes and good to get an understanding how Docker and Kubernetes interact.

Here's a similar post: https://thenewstack.io/tutorial-configuring-ultimate-development-environment-kubernetes/

@graphicore
Copy link
Collaborator

Here's a not so obvious one:

Running in the shell:

$ minikube service flaskapp-service

opens for me the local web frontend in the browser.

even though:

$ kubectl get services flaskapp-service

reports EXTERNAL-IP as <pending>

Similarly:

$ minikube dashboard

opens the Kubernetes Dashboard in the browser, very helpful thing.

@graphicore
Copy link
Collaborator

Closing this, continue here: googlefonts/fontbakery-dashboard#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants