For the best local developer experience on Kubernetes and OpenShift fabric8 recommends minikube and minishift
This is the fastest way to get going with Fabric8 and Kubernetes on your laptop.
Download and install Vagrant
Now clone the fabric8 installer git repository repository and type these commands:
$ git clone https://github.com/fabric8io/fabric8-installer.git
$ cd fabric8-installer/vagrant/kubernetes
Depending on your host operating system you need to install an additional vagrant plugin:
vagrant plugin install landrush
for Linux and OS X
vagrant plugin install vagrant-hostmanager
for WindowsNow startup the Vagrant VM.
vagrant up
Note the vagrant image is by default configured with 2 CPU cores and
4 gigs of memory. It is recommended to not exceed about half of your
machine’s resources. In case you have plenty of resources on your
machine you can increase the settings by editing the
Vagrantfile
. The settings are defined in the bottom of the file:
v.cpus = 2
To update the RAM you can use an environment variable. For example to run the cd-pipeline
application we recommend about 8Gb of RAM:
export FABRIC8_VM_MEMORY=8192
Then follow the on screen instructions.
172.28.128.80
or at vagrant.k8s
admin
and admin
To create new Apps select the Team Dashboard
which is usually called default
but will be named whatever the default namespace was in your Kubernetes cluster
When you are in the Runtime
perspective of a Team or Namespace in the
fabric8 console click on the
Run...
button.
This will list all of the installed OpenShift Templates on your installation.
Run
button
(the green play button).To install other applications via the command line you can use the gofabric8
binary which is inside the Vagrant image. e.g. to install the full Fabric8 Microservices Platform Management support then try this command instead:
gofabric8 deploy -y --domain=vagrant.f8 --app=management
To install any new
OpenShift Templates
or other Kubernetes resources just drag and drop the JSON file onto
the Run...
page!
Run...
pageYou can also install other OpenShift Templates or Kubernetes resources via the oc command line tool:
kubectl create -f jsonOr YamlFileOrUrl
admin/admin
or gogsadmin/RedHat$1
. Try these especially for secrets to get the pipeline to work with GOGS.In order to communicate with the Vagrant VM from you localhost it is recommended to install the kubectl client tool. This is explained in an extra document.
This is also useful using the fabric8 maven tooling or reusing the docker daemon inside vagrant; so that all images built are accessible inside the OpenShift environment.
Alternatively you can log into the Vagrant VM also via vagrant
ssh
. The kubectl tool is installed in the VM too.
Note: in case you already ran the above and want to update to the latest vagrant image, Kubernetes and Fabric8 release you need to destroy and recreate the vagrant image. You can do that using:
vagrant destroy -f
git pull
vagrant up
Check out the troubleshooting guide for more help.