Minikube install guide
Last updated
Last updated
Minikube is a lite installation for (K8s). This is a great option for standalone (eg Pre-sales workstation) or low usage environments.
The goal of this guide is to allow you to run our own custom implementation of Buzzy on a local system (eg laptop).
The summary of what we’ll be doing:
Get prerequisites defined/installed ie Docker and Minikube
Setup Buzzy running on your Minikube environment
Install NGINX to optionally allow external access to your local Buzzy server - for example, allowing a mobile phone to connect to the local Buzzy server
Ensure you have a computer with enough disk space - eg 10GB space, obviously, size of files on the server like Map Tiles Caches etc should be taken into account.
You will need to be able to setup 2 DNS entries:
External IP - Where ever you see buzzydev1.buzzy.buzz
in the settings/documentation. This will be the IP address of the server/aka your dev machine that is accessible by users on the network. For example if this is a 192.168.x.y
address of your machine and your device/phone is on the same WIFI in the same subnet.
Internal IP represented by buzzydev1.buzzy.buzz
in the settings/documentation. You’ll get this for the buzzy-service
once you have completed the K8s/Minikube setup below.
Setup an account on docker.com and contact the Buzzy team with the username, so you can get secure access to the docker images
Install Docker - recommend install - please follow the instructions for your specific operating system
Install - see the for instructions on installing Minikube for you operating system
Run minikube start
- this will start your local Minikube environment. You should be able to verify your Minikube has started by running a command like kubectl get po -A
and get a list of processes running. minikube status
will give you the status.
Get the K8s dashboard running: ()minikube dashboard
- this will open your minikube dashboard in your local browser and you should be
Optional - if you intend to access the server from another device, then you need to have a way to define a domain name for the service. There are lots of ways to do this eg editing individual hosts files on each device. On mobile devices, this can be harder. Setting up an external DNS that points to the internal IP addresses is one simple solution. Other solutions include setting it up as part of your local WIFI network.
Create a custom namespace (eg buzzy
or whatever you’d like to call your service): kubectl create namespace buzzy
; on success you should see namespace/buzzy created
. We’ll use this namespace to help separate the Buzzy related services on the K8s system. If you refresh your Minikube dashboard URL (setup above) you should new see the name space listed in the dashboard console.
Create a docker-registry
secret with your username/password so can access the docker images mentioned above. Replace the buzzy
namespace with your name space you defined: kubectl create secret docker-registry dockerhub --docker-server=docker.io --docker-username=<username> --docker-password=<password> --docker-email=<email> --namespace=buzzy
Once created you should get the success message secret/dockerhub created
. In you K8s Dashboard screen you can now select the namespace and on the Overview
page you should see your secret that has been created.
Now we’re going to enable an ingress, which controls access to the relevant service. In Terminal, execute: minikube addons enable ingress
. You should see the success message ingress was successfully enabled
and if you execute the command minikube addons list
you should see it’s enabled:
Edit your buzzy.yaml
file to reflect your settings.
ROOT_URL
External url to your server/machine
eg. `https://buzzydev1.somedomain.com`
MONGO_URL
URL to mongo service. In this example it's already setup in Minikube, however this could be changed to point to another Mongo DB instance on the cloud or elsewhere.
METEOR_SETTINGS
This must be a string that interprets to valid JSON object.Meteor.settings
valiables that are not under public
are visible to the server only. Anything under Meteor.settings.public
will be visible to the client: browser, phone, tablet etc. Be careful not provide any secret confidential settings under public
See below for specific settings. Please go through each of the settings and fill out as best as possible.
Meteor.settings.jwtSecret
Set this to a long eg 30+ character random string. IT will be used for encoding JWT secrets on the server
Now we need to run the relevant YAML files that will setup the relevant services. Inside your buzzy-docs\minikube
directory/folder you’ll see a lot of yaml files. You can run these one by one or as a batch by running apply_all.sh
. If you get a permission denied error when trying to rule ./apply_all.sh
then in Terminal do a chmod u+x apply_all.sh
and try and run again. If run successfully you should see something like:
You should be able to see the deployments starting successfully in your Minikube dashboard. Note, it may take some time to download and start some of your services. For troubleshooting, see below.
In the terminal type minikube service buzzy-service --url -n buzzy
this will give you something like http://192.168.64.9:31836
and if you plug that into a browser you should see the login page… YAY!!!
That means Buzzy is up and running on the internal Minikube environment.
Now run NGINX ex - eg on mac sudo nginx
and if you need to stop it sudo nginx -s stop
buzzy service
has not started:Find the pod or service that’s failing in the Dashboard. In the Terminal type kubectl logs <ID of the pod/service buzzy-app-59d9d786dc-kbsdx>
This should show you some logs, that will help you debug the specific issue. It’s probably going to be an issue in the buzzy.yaml
file.
Stop the specific service, for example to stop the buzzy service kubectl delete -f ./8_buzzy.yaml
, you should see the service disappear from the K8s dashboard. Then fix the YAML and just reload/apply that specific YAML, for example: kubectl apply -f ./8_buzzy.yaml
and check the Dashboard to see if there service has started successfully.
Login in to the mongodb
pod with something like kubectl exec -it mongodb-758868b55b-5mj2k -n buzzy bash
That should give you a shell into the Mongo pod. Now type mongo
, which should open a mongo shell. Type help
for mongo shell commands eg show dbs
and you should see a buzzy
db. You can then use buzzy
and perform queries and updated from the console.
Clone/download the repo - so you can get copies of all the relevant files to install and run Buzzy on your Minikube. Once the repo is cloned/downloaded (upzipped) to your local machine is running, in Terminal
go into your buzzy-docs
repo/directory and change into the minikube/samples
directory/folder.
Now we need to make your local Buzzy server available to the outside world, so that other computers/devices can access it. This is an optional step, as you can already access you server from you machine. If you don’t need external access you can stop here. Firstly we’re going to create a - open a new terminal tab and type minikube tunnel
. You should now be able to access your server in the browser from its Cluster IP
which can be found under Services
in the K8s Dashboard.
The next step is passing external network traffic to the Minikube ingress and services. For this we’ll use NGINX. Note there will be other ways to do this, but this is one that works. Please which will give access to your computer and the Minikube services to the outside world. Next we’ll need to edit the NGINX conf file to pass traffic to the server. Find your default NGINX file and make it look like , replacing buzzydev1.buzzy.buzz
with your external DNS entry that points to you machines IP and buzzydemo.buzzy.buzz
with your internal DNS entry for your ingress.