Karaf Deployment directory - deployment

Is it possible to set a remote path (may be a FTP location) as Hot Deployment directory in Karaf environment?
I am aware of the org.apache.felix.fileinstall-deploy.cfg file under Karaf_home/etc. But this seems to be useful for changing the deployment directory to local path only.
Actually I have different Karaf installations running on different machines and I need to deploy my bundle to all instances. To avoid this I was planning to keep the deployment in some FTP location which will be treated as deployment directory for all instances.
Any idea?

I strongly suggest against using the deployment directory for productive environments.
For your usecase I'd rather start using Karaf-Cellar and let it do the deployment across your distributed Karaf installations. This works especially good in conjunction with either a maven repository or a specialized Karaf Instance running also Karaf-Cave that will work as OBR server.

Related

How to deploy EAR into the WAS cluster and IBM HTTP server by Monitored Directory Deployment functionality

My goal is to automatically deploy EAR file in WebSphere Application server cluster by Monitored Directory Deployment. So my deployment target is cluster. WAS version is 9.0.0.10. Everything works fine if I drop EAR file in
monitored directory for example '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/'. Application is deployed and started. But I also want to deploy that application into the IBM HTTP server(resides in the same WebSphere cell with cluster) in the same automatically process by Monitored Directory Deployment.
I tried to manually predefine deploymentTargets(cluster and ibm http server) in deployment.xml file, put it in the EAR file, and drop EAR in the '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/', but WAS deploy EAR only in cluster. As a consequence I must manually via WAS console map all modules from EAR to ibm http server, but I do not want to do it manually.
My second idea/attempt was sto create separate monitored directory for the ibm http server '/{monitored_directory_defined_in_WAS}/servers/my_ibm_http_server_name/'.
First I drop EAR into the '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/' and right after that I drop EAR in to the '/{monitored_directory_defined_in_WAS}/servers/my_ibm_http_server_name/'. Result is that the EAR modules are deployed only in to the web server, and that is not my goal.
Is that even possible by WAS Monitored Deployment Directory functionality?
Is it allowed to manually create the deployment.xml file and add it to the EAR file?
First of all installing via monitored director is not recommended in the production environments, as it lacks control.
As you correctly suspected it is not possible to install it to the cluster and web server - check Installing enterprise application files by adding them to a monitored directory.
Because you can use only one server directory, drag and drop to map
applications to combinations of servers is limited. Scenarios
requiring use of more than one server, such as mapping to an
application server and a web server, are not supported by direct drag
and drop of an application file.
However, you still want to use it, you may deploy property file into monitored directory. That property file can fully customize your deployment e.g. configuring also module to map to web server.
Check Installing enterprise application files by adding properties files to a monitored directory for more details
UPDATE
If you have issues, I'd suggest the following approach - install your application 'classically' via admin console and map it to both web server and cluster. Then run wsadmin command to extract propertes:
AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Deployment=MyApplication -options [[SimpleOutputFormat true]]]')
Try to use format from that exported file for your properties
I had time to run it in my environment. I have app with 2 modules inside, one module is just mapped to the cluster, other is mapped to both cluster and web server. Here is relevant part of the property file:
taskName=MapModulesToServers
row1={ module=HelloTestUI #readonly
uri=HelloTestUI.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},cluster=!{clusterName} }
row0={ module=HelloTestWeb #readonly
uri=HelloTestWeb.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},cluster=!{clusterName}+WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }
I didnt try to use that property file to deploy the app via monitored directory, but as you can see the entry is created and mapping is done via + sign that connects cluster and web server.
If you dont see the mapping to your web server, make sure you saved the changes done in the console, and then connected via wsadmin, otherwise wsadmin will have not current data.

WildFly 9.x Deployment Scanner

I have an application running on Clustered Wildfly environment
Server-One on Machineone and Server-one on Machinetwo are used to form a HA cluster. Serverone also act as a domain controller in my cluster environment.
When I go from UI Console management
http://machineOneIp:9990/console/App.html#domain-deployments
And tries to replace or update the deployment war then it start deploying on both the servers.
Is there any way to change the deployment scanner to stop scanning for new changes ?
Any help would be great use.
this is not the deployment scanner, this scanner is available in standalone mode only and pick up *.?ar from the standalone/deployments folder.
In domain mode a deployment can activated for a server-group.
In this case ALL servers of this group will deploy it.
If you want to have two servers with different deployments you need to create two server groups, you might share the same profile.
But if both are in the same cluster I don't understand why you don't want to have the same application deployed.

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.

Difference between jboss 6 and jboss 7 standalone server?

I was using Jboss 6 . I am wondering to see jboss 7 which does not have many folders that jboss 6 had. It will be helpful if someone explains the difference between the jboss 7 stand alone server and the previous versions.
AS7 is different in a lot of respects to its predecessors AS6,5. So it wont be possible to list down all the differences here.
to list supported technology related differences, refer to below table.
Some Major Differences: (Thanks for #Jyore for additions)
Modular (on-demand) class-loading
Addition of domain managed nodes (multiple JVM management)
All configuration is done in Standalone.xml for standalone mode and domain.xml for domain mode.
About the new DIRECTORY Structure
configuration : Configuration files for the standalone server that runs off of this installation. All configuration information for the running server is located here and is the single place for configuration modifications for the standalone server.
data :Persistent information written by the server to survive a restart of the server
deployments: End user deployment content can be placed in this directory for automatic detection and deployment of that content into the server's runtime.
NOTE: The server's management API is recommended for installing deployment content. File system based deployment scanning capabilities remain for developer convenience.
lib/ext : Location for installed library jars referenced by applications using the Extension-List mechanism
log : standalone server log files
tmp : location for temporary files written by the server
Apart from that I really dont want to duplicate information on web
There is a migration guide from AS5,AS6 to AS7. This can help you understand what are the config changes that are generally required to switch to AS7. it also points out what has significantly changed, highly recommend going through it.
Also You can read Getting Started with AS7, to know AS7 better

Deployment of a LightSwitch into Dev / Test / Live environments

How do you handle the deployment of a LightSwitch application into a production environment?
i.e. the LS application has been developed, but it now needs to be installed first into Test, and then into Live.
We don't want to use the "manual" approach, i.e. use the Visual Studio Build / Publish option, rather we want to automate the deployment.
My feeling is that deployment is one of the real weak points of LightSwitch. If you are using the very simple deployment model that is build into the product, and you're doing everything within a Windows domain, the publishing wizard can do everything. But if you're deviating from the model at all LightSwitch will fight you. I'd really like to see an "advanced" deployment option that provided some configurability.
Here's how I solved the problem you're having with LightSwitch applications that are targeting web deployment:
At the beginning of the project, deploy once to each target environment using the publish wizard. This is the easiest way to get the database set up.
As new builds are deployed, use the publish wizard to deploy to a deployment package to a standard location on the local development machine.
The deployment package is just a zip file, so you can open it an drill down to where the actual binary release is. I use a powershell script to copy the binary files out of the the deployment package and in to a local SVN working directory. Note that you must not copy web.config file during this step.
Check the unpacked binary files into SVN and use SVN to manage the deployment.
Manage schema changes with SQL scripts.