Fabric8 apps have been packaged to make them easy to install on Kubernetes or OpenShift.
If you are already running the fabric8 console you can use it to install all the other Fabric8 apps and quickstarts. If you are not yet running the fabric8 console then try install it via the CLI below.
When you open the fabric8 console select the Apps
tab then click on the Run...
button (top right green butotn).
This will list all of the installed OpenShift Templates on your installation.
Run
button (the green play button).Apps
tab! Run...
page You can also install other OpenShift Templates or Kubernetes resources via the oc command line tool:
oc create -f jsonOrYamlFileOrUrl
These instructions assume that you have either
e.g. if you are using the fabric8 vagrant image then use
export KUBERNETES_DOMAIN=vagrant.f8
Download and unzip the fabric8 templates 2.2.3 distribution.
e.g.
curl -o fabric8.zip http://repo1.maven.org/maven2/io/fabric8/apps/distro/2.2.3/distro-2.2.3-templates.zip
unzip fabric8.zip
cd main
Once you have found the kubernetes.json
file for the app you wish to install type the following using the oc
command from OpenShift:
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f kubernetes.json | oc create -f -
For example to install the fabric8 console then type:
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f base-2.2.3.json | oc create -f -
Or to install from the central repository then choose the commands below to suit the application you wish to install:
Provides the base fabric8 console at the vagrant.f8
domain:
export KUBERNETES_DOMAIN=vagrant.f8
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/base/2.2.3/base-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
Provides centralised Logging and Metrics
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/management/2.2.3/management-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
Provides just the centralised Logging
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/logging/2.2.3/logging-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
Provides just the centralised Metrics
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/metrics/2.2.3/metrics-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
Provides the fabric8 console and the Integration Platform As A Service
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/ipaas/2.2.3/ipaas-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
Provides a Continuous Integration and Continuous Delivery system.
The coreContinuous Delivery installation for building including Gogs for git hosting, Jenkins for building and Nexus as a repository manager.
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/cdelivery-core/2.2.3/cdelivery-core-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
The complete Continuous Delivery installation including CD Core plus the social apps like chat such as Hubot.
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/cdelivery/2.2.3/cdelivery-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
Provides all of the above!
oc process -v DOMAIN=$KUBERNETES_DOMAIN -f \
http://central.maven.org/maven2/io/fabric8/apps/kitchen-sink/2.2.3/kitchen-sink-2.2.3-kubernetes.json \
| oc create -f -
Then setup the OpenShift Routes
If you install via the command line then you will need to create the OpenShift Routes for any services you created. Note that this is done automatically if you create applications via the fabric8 console.
To do this use the mvn fabric8:create-routes goal.
Note that this command can be run in any folder; it doesn't need to be run from inside a maven project.
Before you start make sure you have setup your local machine have logged in and setup the environment variables etc.
If you have defined the $KUBERNETES_DOMAIN environment variable then you can use the following command:
mvn io.fabric8:fabric8-maven-plugin:2.2.3:create-routes
Otherwise you can be specific and specify the domain you wish to use:
mvn io.fabric8:fabric8-maven-plugin:2.2.3:create-routes -Dfabric8.domain=my.acme.com
You could then setup a wildcard DNS rule on *.$KUBERNETES_DOMAIN
to point to the IP address of your OpenShift master or haproxy installation. Or you could add custom entries to your /etc/hosts
file for each service.
e.g. if your IP address for the OpenShift master/router is 172.28.128.4
(which it is for the fabric8 vagrant image) then add this to your /etc/hosts
to expose the routes as host names:
172.28.128.4 vagrant.f8 fabric8.vagrant.f8 fabric8-master.vagrant.f8 docker-registry.vagrant.f8 gogs-http.vagrant.f8 gogs-ssh.vagrant.f8 nexus.vagrant.f8 jenkins.vagrant.f8 kibana.vagrant.f8
You should now be able to access the console at http://fabric8.vagrant.f8/