Minikube Easy is a collection of bash scripts and templates that simplify the installation of minikube and local development infrastructure.
Minikube is a great initiative for running Kubernetes on your local workstation for developing locally. While kubernetes and minikube are under constant development this project aims to ensure a stable development environment using minikube.
Minikube Easy combines excellent technologies for you so that you can start developing as quickly as possible so that you don't have to spend your time researching how to wire things together, it has been done for you.
- Installation of minikube, hyperkit, kubectl and development tools via one-liner shell commands.
- Jenkins installation pre-configured with plugins required for builds and deployments using Spring Cloud Pipelines.
- Simple installation of Artifactory to support most artifact repository requirements.
- One-liner installation of all development tools required for local development and deployment into minikube.
- Host volume mounted in minikube and various pods so that pod may access changes on host in real time.
The scripts provided are confirmed to work on macOS High Sierra Version 10.13.5.
Follow these steps to use any portion of Minikube Easy:
Clone the https://github.com/kevinstl/minikube-easy.git project.
git clone https://github.com/kevinstl/minikube-easy.git
Change to minikube-easy/scripts directory.
cd minikube-easy/scripts
All install scripts have a corresponding uninstall script.
The local-development-install.sh script installs Minikube, hyperkit, kubectl and Cockpit. If you choose to install everything using this script there is no need to execute the installation scripts described below this instruction. However you have the option to install individual tools if you prefer as described below this instruction.
./local-development-install.sh
Once the installation has completed you should be able to navigate to the following:
Dashboard at http://minikube-easy:30000
Cockpit at http://minikube-easy:30009 username: kube password: changeme
The install.sh script will strictly install what is required to run only minikube.
Execute install.sh - This installs everything needed to run minikube on your machine. It installs kubectl, hyperkit and minikube.
./install.sh
Start minikube with the start.sh script.
./start.sh
Stop minikube with the stop.sh script.
./stop.sh
The uninstall.sh script will uninstall minikube and it's dependencies.
Execute uninstall.sh - This uninstalls everything needed to run minikube on your machine. It uninstalls kubectl, hyperkit and minikube.
./ininstall.sh
Install Cockpit. (Cockpit appears not to be compatible with minikube v025.2 and above. Support for cockpit will resume when cockpit is compatible with newer versions of minikube.)
Cockpit provides a rich graphical interface to kubernetes including a topology view of resources and direct shell access to containers running in kubernetes.
Execute cockpit-install.sh - This will install Cockpit.
./cockpit-install.sh
Once installed you will need to use the start-with-cockpit.sh script to start minikube. The start-with-cockpit.sh script starts minikube with basic authentication support so that you may log into Cockpit.
./start-with-cockpit.sh
is a CI/CD solution for applications on Kubernetes. If you have ever built a CI/CD pipeline for kubernetes manually, you will truely appreciate what Jenkins X does for you.
Execute jenkins-x-install.sh - This will install Jenkins X.
./jx-exe-install.sh
./jx-install.sh
If you prefer to run a stand alone Jenkins instance rather than Jenkins X then follow these instructions.
Execute jenkins-install.sh - This will install Jenkins.
./jenkins-install.sh ~/tmp/credentials.xml
Add required credentials to credentials.xml.
Artifactory is a universal repository manager. In particular it is capable of serving Docker Registry and Nexus.
Execute artifactory-install.sh - This will install Artifactory.
./artifactory-install.sh
The registry-install.sh installs a docker registry. It is most likely not necessary to run a docker registry locally as minikube is able to pick up docker images that you build locally if you are building your docker images using the docker daemon within minikube by executing the eval $(minikube docker-env)
command.
./registry-install.sh
Add insecure registry address to docker:
You may reuse the minikube docker daemon from your workstation shell. The benefit to doing this is that you can execute a docker build and the image you build is immediately available to your minikube instance rather than having to deploy to and pull from a docker registry.
Additionally minikube is resource intensive so you can reduce load on your workstation by not having to run a separate daemon instance to run docker commands.
Execute minidocker-install.sh to make the minidocker command available from any shell location.
./minidocker-install.sh
Install Stand Alone Jenkins and Artifactory so that you can use spring cloud pipelines. This example will create a Spring Cloud Pipeline in Jenkins that you will be able to execute.
Navigate to your Artifactory instance. Login with username: admin password: password. From top right drop down choose Quick Setup. Create Maven Repository. The example spring cloud pipeline will deploy artifacts to this Maven repository in Artifactory.
Use the install-config-jenkins-pipeline-k8s-seed.sh script to create your spring cloud pipelines jenkins jobs seed. Replace your-project-name with your project name.
cd spring-cloud-pipeline
./install-config-jenkins-pipeline-k8s-seed.sh your-project-name
In Jenkins execute the jenkins-pipeline-k8s-seed job. After that job is complete execute the minikube-easy-pipeline job.
"~/tmp/credentials.xml" is a recommended location of the credentials.xml file with your credentials for github and dockerhub provided. You can use conf/credentials.xml for an example. It is recommended that you DO NOT modify and use the example credentials.xml in this repo as you might accidentally commit that file to github with your personal credentials included.
In order for the spring cloud pipeline to run properly you will have to provide your own credentials in "your-git-username", "your-git-password", "your-dockerhub-username" and "your-dockerhub-password".
- Remove extraneous entries from /private/var/db/dhcpd_leases.
- rm ~/.minikube/machines/minikube/hyperkit.pid
- remove failed pods: kubectl --namespace jx get pods --field-selector 'status.phase=Failed' -o name | xargs kubectl --namespace jx delete
https://slack.engineering/keep-webpack-fast-a-field-guide-for-better-build-performance-f56a5995e8f1