This PR introduces caching of localkube images. It makes a best effort
to cache the essential images localkube needs as minikube starts up.
Currently, the list of cached images is hardcoded, but future work might
entail
1. Cached images as a property of the cluster bootstrapper - to allow
localkube and kubeadm to cache their respective images.
2. Addons contain image information. Then, we can selectively cache and
preload only the addon images that are enabled.
Introduce the --bootstraper or -b flag that toggles the cluster
bootstrapper. The default bootstrapper (and only bootstrapper at this
time) is localkube.
The bootstrapper interface contains all the functions needed to
bootstrap a kubernetes cluster. It ingests a KubernetesConfig, which
contains all the configuration for the cluster, as well as a
CommandRunner, which is the interface upon which it will run commands
and transfer files to possibly remotely set up the cluster.
This moves the localkube functions out of cluster.go into their own
package at k8s.io/minikube/pkg/minikube/bootstrapper/localkube.
Theres currently no good way to run the integration tests for the none
driver locally. Now that we've added the e2e target, we can depend on
that. Running the e2e test binary locally requires the testdata folder
to be in a different path, since it is relative to where the code is
being ran. I added a testdata-dir flag to the integration tests so we
can set it appropriately for when we want to run the e2e binary by
itself.
I also made the e2e test binary a PHONY target, so we rebuild it each
time. I had trouble collecting the dependencies on the integration
test packages
I find myself referencing this documentation every time I make kernel
configuration changes. I've added a simple rule to open the kernel
configuration menu, and then save your changes to the right directory.
Hyperkit was mounting swap disks, which we can't detach with the
hdiutil util like we're using. Its sufficient to just hdiutil detach
/dev/disk1
```
/dev/disk1 FDisk_partition_scheme
/dev/disk1s1 Linux
/dev/disk1s2 Linux_Swap
```
Overwrite the default configuration and enable
PrintMotd
PermitTunnel yes
MaxSessions 1000
So that we can run multiplex more ssh connections and do things in
parallel.
Two implementations, SSHRunner and ExecRunner allow commands to be run
either through SSH or os.Exec respectively. This allows the cluster
bootstrappers to be unaware of how they are actually executing the
commands they need. Copy and Remove functions provide a nice
convenience function for running commands that copy and remove files
respectively.