fabric8 comes with various JBoss Forge add ons to help improve your developer experience.
First install Forge (requires Forge 3.0 or better) and run it:
you can install the Forge add ons via:
addon-install --coordinate io.fabric8.forge:camel,2.2.153 addon-install --coordinate io.fabric8.forge:camel-commands,2.2.153 addon-install --coordinate io.fabric8.forge:devops,2.2.153 addon-install --coordinate io.fabric8.forge:kubernetes,2.2.153
Notice the version number (current 2.2.153) is the fabric8-forge release. You can find the latest release number on github.
You should be able to see the new commands that are installed via:
camel<TAB> devops<TAB> kubernetes<TAB>
You have to be a little patient; first time you try tab complete it can take a few seconds to figure out what's available.
The Camel Forge addon enables developers to edit Maven based source code projects with Camel. For example to add or edit endpoints.
To setup a Maven project for Apache Camel then use the command:
To add a new Camel endpoint using a wizard to select the options then type:
The Camel forge addon provides a command to validate the Camel endpoints in the source code (both Java and XML). We provide a Camel Maven Plugin that is able to run this command from Maven command line, and report invalidate Camel endpoints. You can enable this plugin in your Maven projects as part of the build process, to catch invalid uris before you run the application.
The Camel Commands Forge addon enables developers to manage/interact with running Camel applications, using the Apache Camel commands.
The running Camel application must have Jolokia included which is what is being used by the addon to communicate with the running Camel applications.
To connect to a running Camel application type:
After connection, then the management commands should be available such as to list all the Camel Context's in the JVM type:
The DevOps commands help you to
To setup a Maven project for fabric8 and Docker then use the command:
If you are inside a project then use the command:
to open the edit devops command which is a wizard that lets you configure the Docker and Fabric8 build metadata along with setting up the Jenkins workflow CD pipeline and linking the project to a team chat room and issue tracker.
Before you run forge make sure your KUBERNETES_MASTER environment variable points to where OpenShift V3 is running.
kubectl client are more powerful than the kubernetes forge addon, and its recommended to use these clients.
If you are in a build which has generated a kubernetes JSON file target/classes/kubernetes.json you can apply this via...
kubernetes-apply --file target/classes/kubernetes.json