With Docker I need only provide DOCKER_HOST and appropriate credentials in order for the fabric8 plugin to be able to build my container image. As long as a Docker Registry is available - there is no need to install Docker-related infrastructure on the actual host which does the image build (e.g. my Bamboo agent).
With OpenShift I cannot seem to find a way to do this. It seems instead that I must run the maven goals on a host on which OpenShift has been installed, which must necessarily be a RedHat Linux host.
This seems far more complicated than it should be. Am I missing something here?
Is there a way to reference a remote OpenShift environment from the fabric8-maven-plugin when in openshift mode?
Thanks, Robin.
I'm from Fabric8 team. You don't need to run goals from host on which OpenShift has been install. Plugin reads your
~/.kube/config
for information related to your OpenShift cluster and uses your API token in order to interact with OpenShift REST API.Fabric8 Maven Plugin has been migrated to Eclipse JKube. Although Fabric8 Maven Plugin also works just fine with remote OpenShift Clusters. It's the same Fabric8 Maven Plugin but with a different name and targeted OpenShift Plugin. I would give this answer with Eclipse JKube's OpenShift Maven Plugin. You can have it in your
pom.xml
like this:Here is a demo using a simple Random generator application: https://github.com/rohanKanojia/eclipse-jkube-demo-project
For more information, you can checkout Eclipse JKube Quickstarts