Websphere 7 clustered deployment - deployment

We have a J2EE application as EAR file which is deployed in WAS 7, for making the application availability as high it needs to be deployed in 3 clusters. We have a Quartz Scheduler class whose job is to upload data from one database to another daily at 2:00 am.
Now, the problem is if the ear will be deployed in 3 different nodes for load balancing and high availability, all the 3 ear file will trigger the upload at the same time. How we can handle this. Is it possible to do some configuration in WAS 7 environment. Any help/suggestion would be appreciated.
Thanks

You have two possibilities:
The Quartz database backend where all your nodes would connect to the same database that Quartz uses for synchronizing the task running. This can be configured to prevent the task from running on several nodes simultaneously.
EJB 3.x timer. See for instance this example. This however works for ensuring that only member from each of the clusters fire the timer.

Related

Spring cloud data flow deployment

I wanna deploy the Spring-cloud-data-flow on several hosts.
I will deploy the server of Spring-cloud-data-flow on one host-A, and deploy the agents on the other hosts(These hosts are in charge of executing the tasks).
Except the host-A, all the other hosts run the same tasks.
Shall I modify on the basis of the Spring Cloud Data Flow Local Server or on the Spring Cloud Data Flow Apache Yarn Server or other better choice?
Do you mean how the apps are deployed on several hosts? If so, the apps are deployed using the underlying deployer implementation. For instance, if it is local deployer then, each app is deployed by spawning a new process. You can scale out the number apps deployment using the count property during the stream deploy. I am not sure what do you mean by the agents here.

How to load balance jobs using spring batch when different nodes has different times?

We have so many batch jobs to handle.
Now problem is we have 7 different nodes which has same application deployed(We use JBoss AS 7.1.1. as a application server) and We use Spring batch using quartz scheduler to schedule jobs.And it works just fine.
But 1 of our nodes is diff time then others (e.g. Suppose we have 3 nodes A,B,C so when there's a 12:00:00 in C there's a 11:58:00 in A and B) and all these nodes are been maintained by client.
So when any trigger fires(we use cron trigger) job run on single node only.
Now specific time(take 12:00) we need to fire more than one job, then all of them runs on a single node as all of them were timed out earlier the other nodes(As 12:00 o'clock happened in C before A and B).
I was wondering do we have any such mechanism where we take reference of any centralized time to time out all batch processes(like do not time out batch process when there's 12 O'clock on C but run batch job when there's a 12 O'clock in DB)..?
Thanks in advance :).
Spring Batch provides facilities to launch jobs via messages in the spring-batch-integration module. I'd recommend managing the scheduling from a central point and having it send messages to the servers to be picked up based on the server's availability to run the job. This would also address the issue of time synchronization as the scheduling piece would be handled in a central point.
Ask your client to synchronize servers using NTP. All of your servers should have same time PERIOD. You will have bunch of other problems if you allow your servers stay out of synch with each other.

deploynig different ear files in different clusters of same weblogic server domain

Hi I am new to this forum as well as weblogic server.My requirement is that I have an application that runs on a cluster having an admin server and three managed server MS1,MS2,MS3.Currently my application has two parts(or logic), both of which are in a single ear file.The part1 always occupies one server, say MS1 and rest in other two MS2 & MS3 .I want to divide my code in two different ear part1 and part2 with par1_ear deployed in MS1 and part2_ear deployed in MS2 and MS3 all running under same admin server
ear1 deployed in ----->MS1
ear2 deployed in ----->MS2 &MS3
All running under same managed server.
Can this be done if not other suggestion also welcome but i can have only one admin server and 3 clusters
Yes, when you deploy your .ear files you can target specific machines in a cluster. Your deployments don't have to go to all machines in a cluster.
Also, if you really only want one server in the cluster to handle some specific event you might want to look into Singleton Services.
Have you had experience deploying applications in Weblogic before?

Deployment in IBM Websphere 7 cluster with nodes with High availability

Environment :
Java EE webApp
JDK: 1.6,
AS: Websphere app server 7,
OS:redhatzLinux
I am not a websphere admin and I am asked to develop a way or a script to solve the issue below:
I have a cluster with three nodes NodeA NodeB and NodeC. My application runs on these clusters. I want to deploy my application on these nodes such that i dont need to bring all of them down at once. These days the deployments is done this way : we come at night to stop all the servers all at once from console. Then we install the application on the main node which is on the same machine as the deployment manager and then we synchronize and bring all the servers back up one by one.
What I am asked to do is that we upgrade the application or install the new ear file by not bringing everything down as this is causing downtime to the application. Is there a way to acheive this. WAS 7 is a very mature product i am sure there must be a way to do it.
I looked at the documentation/tutorial we can do something like "Update" where we select the application (from Apllications> websphere enterprise application)and select update and then select radio button "Replace Entire Application" and radio button"local file system" and point to the new ear file. But in that case the doc says that it will bring down all the servers as well when updating. its the same as before. no online deployment.
I am a java programmer so I thought of using what tools I have to solve this
Tell me if this is can be an issue :
1) We bring down NODEA
2) We remove the NODEA from the cluster (by pressing remove node button or using the removeNode.sh)
3) Install the new Ear on the NODEA (can we do this in the same admin console? or through shell script or jython or may be like a standalone server)
3) We then start it up back again and then add it to cluster.
NOW we have NODEA with new applicaition while NODE B and NODEC are with old application versions.
Then we bring down NODEB
remove NODEB from cluster
install applciation on NODEB
start it up again
Add it back to cluster
NOW we have two nodes with new application and NODEC with old
we try the same process for NODEC.
Will this work. Has any one tried this. what issues can you think of that can happen.
I will so appreciate any feedback from here. I am sure there are experienced ppl on this forum. I dont think this is a rare issue,i believe this is something any organization would want with High Availability requirements.
Thanks for any help in advance.
Syed...
This is a possible duplicate of How can i do zero down time deployment on cluster environment?. Here is essentially my answer from that question:
After updating the application, you can utilize the "Rollout Update" feature. Rather than saving and synchronizing the nodes after updating, you can use this feature which automatically performs the following tasks to enable the changes to propagate to all deployment targets while maintaining high availability (assuming you have a horizontal cluster, such that cluster members exist on multiple nodes, which it sounds like you do):
Save session changes to the master configuration
For each node in the cluster (one at a time, to enable continuous availability):
Stop the cluster members on the node
Synchronize the node
Start the application servers (which automatically starts the application)
Alternatively, you can follow the following procedure.
Stop all nodeagents except Node A.
Comment out or disable the Node A from Load Balancer or Plugin (So the traffic will not come to the node)
Deploy the application.
Changes will be synchronized only on Node A as its nodeagent is up.
Uncomment/enable the Node A from plugin / load balancer.
Comment/disable Node B from plugin/load balancer to stop incomming traffic on the node.
Start the nodeagent of Node B so it will synchronize the file changes on the Node. The ear application will stop and start after synchronization.
Uncomment/enable the Node B from plugin / load balancer.
Repeat steps 6,7,8 for all the remaining nodes.
Regards,
Laique Ahmed

How to deploy about a java application to about 100 EC2 instance?

Here is my case:
I have about 100 EC2 instances and everyone runs a java application (Java SE application, not Java EE application), I want to deploy my complied jar files and library to all the instances and then make the application run on everyone's application. Because the application is changing from time to time, every time I have to spend two hours to do this job.
Do you know if there's a management tool or software that can help me to do this work automatically, and what is your practice to deploy this application?
Do you have an auto deployment workflow for development on AWS?
Kwatee (http://www.kwatee.net), our free and lightweight deployment tool, supports EC2 instances as well as elastic load balancing. There's a short screencast of a small EC2 deployment here.
Since you're using java you can utilize AWS Elastic Beanstalk.
Development Lifecycle:
http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Java.sdlc.html
Managing the Environment:
http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/using-features.managing.html
There are many more article links on the same page, probably will need to read all of them but these are the two that I feel are most related too your question. I haven't used this product so i can't give any first hand experience but it seems to be designed to help you with your exact problem.
Boxfuse does exactly what you want.
For your Java SE application you literally only have to execute:
boxfuse create my-javase-app -apptype=load-balanced
boxfuse scale my-javase-app -capacity=100:t2.micro
boxfuse run my-javase-app-1.0.jar -env=prod
This will
Create a new application and configure it to use an ELB
Scale it to 100 t2.micro instances
Create AMI
Create an ELB
Create a security group
Create an auto-scaling group
Launch your instance(s)
Any subsequent update will be done as a zero downtime blue/green deployment.
You can use AutoScaling Launch Configuration and AutoScaling Group to launch 100 EC2 instances. But hold on, Need to request EC2 instance limit with EC2 instance type to AWS Support. Typically, It will take 1 business day to complete the request.
First you suppose to create AutoScaling Launch Configuration in AWS Console. AutoScaling Launch Configuration includes type, storage, security group and you can add scripts to run at launch of EC2 Instance.
Next is AutoScaling Group. You have to choose which launch configuration is suitable for your autoscaling group. In AutoScaling Group configuration, you must mention min and max count (i.e) it will launch EC2 instances based on min count and launches upto max count. CloudWatch monitoring can be used for AutoScaling group. CloudWatch will work based on EC2 instance CPU Utilization and alarm settings.
Elastic Load Balancing will help to distribute traffic among EC2 Instances. If you want to use ELB, you have to create before AutoScaling Group. In AutoScaling Group you may include ELB to handle and distribute traffic.