How Karaf and Fabric containers are related? - jbossfuse

I have installed jboss-fuse-karaf-6.3.0 and created a project in developer studio.
I'm not able to figure out certain concepts around it.
In Apache Fuse how Karaf and Fabric containers are related ? What I understood is Karaf provides runtime environment for the project to run. Fabric is for managing deployments. Is that correct ?
I have started Karaf container by running FuseInstall/bin/start.bat . How to start the fabric container ?
Is http://localhost:8181/hawtio is fabric console ?
Is there a way to directly deploy a project to Karaf container using maven ? or we need to deploy the project to fabric ?
Thanks !

Fuse is an ESB product by Redhat. And yes, you understood it correctly that Karaf provides an OSGI runtime whereas Fabric is for managing multi-container deployments.
You don't start a fabric container. You need a Fabric agent or something similar for that. Not very familiar with it, but you can refer Fuse's documentation here and here regarding this.
Hawtio is basically a visual management console for various containers.
You can definitely deploy your OSGI bundle directly into a Karaf container. There are various commands such as :osgi:install " OR placing the bundle at FuseInstallDir/deploy. The Documentation it explains much better.

A Fabric is just a group of commonly managed Karaf containers. It lets you manage your containers using Profiles instead of just features and bundles.
Once you have started a Karaf container you can CREATE a Fabric. Follow these instructions: https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.2.1/html-single/Fabric_Guide/index.html#Deploy-Fabric-Create . Any other Karaf containers you start will then be JOINED to the existing Fabric.
Once the Fabric has been created, localhost:8181/hawtio will have Fabric specific content
If you are using Fabric, then you can use the fabric8 Maven plugin to deploy your application to a Profile directly. See more details here: https://fabric8.io/gitbook/mavenPlugin.html . Basically you can just run mvn fabric8:deploy and it will update the fabric to use your new code. Be careful here as this will tell Fabric where to find your new code in its list of Maven repos. If you have not deployed your code to a central or shared repo and it is only on your local machine, and the container that is getting the deployment is on a separate machine, it will not work.
Be sure to read up on how profiles work as well, because adding your code to a profile does not add it to a container unless that container is already set up to include the profile you are updating. The fabric guide I linked first explains this well.

Related

Keycloak.X (quarkus based) on CloudFoundry

we want to deploy keycloak.X to cloudfoundry. I found older approaches (How to deploy keycloak to cloudfoundry) with two options:
wrapping it as a Spring application (the corresponding stuff on github seems abandoned, guess this is because keycloak switched to quarkus?)
using the docker image (diego_dockeris disabled in my target environment)
So I am stuck with the Quarkus distribution.
Ideally, I dont want to change too much on the application itself (risk assessment ...) but only wrap it for cloud foundry.
The start script targets a class named QuarkusEntryPoint, but I don't know how to put it into a buildpack.

How to run SCDF using weblogic?

I am trying to use Weblogic instead of Tomcat to bring up SCDF locally. I am unable to find the respective guide on spring.io. Any pointer would help.
Spring Cloud Data Flow builds on the Spring Boot foundation. We ship the uber-jar binary through Maven Central and/or as a container image in DockerHub or Bitnami.
You would start/run the shipped binary stand alone either in the bare-metal VMs or in a container orchestration platforms like Kubernetes.
Weblogic doesn't fit any of the functional and non-functional requirements that we expect (in SCDF) to be useful for a production setting. Simply put, you won't be able to run SCDF in Weblogic.
Please consider experimenting with SCDF using Docker Compose or Kubernetes instead.

Did anyone tried installing Oracle weblogic & Soa on K8s

Need some suggestions & tips, Please let me know if anyone build the infrastructure on K8s with Oracle Weblogic, DB & SOA (OSB, BIPEL, B2B, BAM).
If anyone build the infrastructure please let me know the benefits & drawbacks. Is it recommended to build it.
Thanks
If you follow best practices; do not install these on Kubernetes. Kubernetes is very good at for micro-services and stateless applications. Of course Kubernetes support stateful applications like cassandra / nodejs ..etc applications you have a chance to deploy applications on Kubernetes using StatefullSets. Kubernetes treats statefull sets different than other resource objects. A StetfullSet Pod is always scheduled on the same machine as long as you do not delete them.Please take a look at the link https://kubernetes.io/docs/tutorials/stateful-application/cassandra/ You can deploy stateful applications on Kubernetes using the link above
https://blogs.oracle.com/weblogicserver/weblogic-on-kubernetes,-try-it
https://blogs.oracle.com/weblogicserver/automatic-scaling-of-weblogic-clusters-on-kubernetes-v2
We ran weblogic applications on docker swarm but not on kubernetes. All the configuration on kubernetes for stateful applications is pretty easy compared to docker swarm.

Managing deployments for nodes running Camel routes

I have an enterprise application that uses Camel routes and need to be able to provision/start/stop nodes running these Camel routes on multiple machines.
I am looking at Apache Karaf and JBoss Switchyard as 2 solutions to help me deploy and manage these routes. I think I understand the value of Apache Karaf since it is a osgi container and I can un/deploy new routes into it. Will JBoss Switchyard also help me for this issue?
JBoss Fuse
JBoss Fuse which includes Fuse Fabric can manage and provision containers in a cluster / cloud / etc.
http://fuse.fusesource.org/fabric/
JBoss Fuse uses Karaf as the container. So what you can do with Karaf you can do as well with JBoss Fuse.
On top of that Fuse Fabric brings to the table, all the cluster provisioning and management. And with a distributed registry for HA et all.
With JBoss Fuse you can deploy and manage your Camel routes in a cluster. And perform rolling upgrades / downgrades across the nodes in the cluster, and much more. And to go along with that you have commands in the Karaf Shell to perform actions, and as well a web console UI based on http://hawt.io/.
Short answer: Yes JBoss Fuse can manage and provision your Camel routes in a cluster.
SwitchYard
In terms of JBoss SwitchYard, then it uses JBoss Application Server / WildFly as its container (at this time of writing SY does not yet support OSGi). So SY leverages the clustering and management support from JBoss Application Server.
Yes with Apache Karaf you'll be able to deploy/undeploy routes by either installing the appropriate bundle or by installing the corresponding blueprint.xml (containing the route) as Karaf supports deploying of various xml files (which are generated to bundles at runtime). This will give you an easy way of deploying / Developing. Also available with karaf is the def:watch command, it'll help you with developing Bundles cause it will watch your file/maven-repo location for updates and will install those immediately in the container.
For distributing your routes throughout a cluster there is also Apache Karaf - Cellar, a subproject for maintaining Cluster ability for the Karaf container.
take a look at Zookeeper and its support for distributed route policies...
also, check out these master election examples
http://www.systemmobile.com/?p=399
http://frommyworkshop.blogspot.com/2013/06/leader-election-of-camel-router-through.html

Deployment scanner/folder in JBoss AS7 domain managed mode

Is there a deployment folder where a war can be placed in the master node so that it gets deployed to all the slave nodes in a domain managed setup in JBoss AS7?
I know that we can use the JBoss CLI to deploy to a server group which places the artifact in the JBOSS_HOME/domain/data//content directory.
However I would like to find out if there is a way that it can be placed in a deployments folder under the domain of the master node (e.g. JBOSS_HOME/domain/deployments) that is similar to the one available in the standalone mode (i.e. JBOSS_HOME/standalone/deployments) so that the deployment scanner picks it up and makes it available to the slave nodes in the domain without the explicit deploy command via CLI.
To summarize the comments above: There is no deployment directory in domain mode.
You can use the CLI
the web console
the maven plugin
or create your own deployment manager.
I wrote a, now old, blog post on how to do this on a standalone server, but it could be slightly changed to use on a domain server. Have a look at how it's done with the jboss-as-maven-plugin for an example.