Automation script

Hello All ,

I came across a tricky solution to devolop . Here is a part of the requirement automation .

I have different set of server say : Web ( has 4 servers under it ) , App ( has 4 servers under it ) , DB ( has 2 servers under it )
Above each i have different load balancers , Say : Web comes under IntErVIP , App and DB comes under IntrAVIP.

we have certain commands from Unix to take server in and out from respective load balancers when requiured and an email has to come to my email address. Can you please help me with a script for this with case condition probably . Please let me know if any additional info required.

for example . Take app server 1 , appserver2 out from intrAVIP

so by running the script i should get a message as below

"Taking app server 1 , appserver2 out from intrAVIP as requested" 
--<<executing commands >>
"request has been completed and sending an email to <email> as well "

adding few more info to be clear , i am looking for the commands for the section "--<<executing commands >>" , please let me know if i need to add any more info to be clear.

What you need:

  1. Positional arguments - to handle arguments passed from command line
  2. if-condition - if you want to do something conditionally; then use the if-block; fi
  3. Commands to take in/out from load balance servers (which you already have).
  4. Working email client/email server on your linux server. Most servers at work will have this. Contact your IT team if it's not available. To test if you have a working email, try the following: (mailx, mutt... are couple of commonly used mail processing systems)
echo "test email body" | mailx -s "test email subject" your_email_address@domain.com

These will help you kick start. Let us know what you come up with.

As a starting point, did you consider the links given at the bottom of this page?

I did search already before posting the question . I could not find my requirement , if you understand its little tricky .

---------- Post updated at 02:30 PM ---------- Previous update was at 02:28 PM ----------

Hello -

Thanks for the start . But i know i have a working email address , but if you can help me with the actual requirement of mine that would be great . I know i have to use the case method to develop , but need some help over here .

if you feel what i mentioned is not clear , i will explain more in detail.

Thanks in advance to all .

I have a very short timeline to finish this , appreciate your quick help .

You have two load balancers ( IntErVIP and IntrAVIP ) that I have never heard of. Searching for IntErVIP finds a local business in (from the telephone country code) South Africa. Searching for IntrAVIP finds a local business in Paredes, Portugal. Neither of them find anything about a load balancer.

I have no idea what commands you need to issue to these load balancers to find out what servers are assigned to that load balancer, what command you need to issue to these load balancers to assign a server to that load balancer, nor what command you need to issue to revoke a server's assignment to a load balancer. Nor do I know if revoking an assignment happens immediately upon request or if you ask these load balancers to revoke an assignment and they send you a message at some unspecified time in the future when the server has completed the tasks it was processing when you asked for it to be deallocated.

If you are saying you want us to write two load balancing programs for you with no specification of what they are supposed to do nor how they are different, you are expecting way way way too much from unpaid volunteers.