Scripting in one server to apply other servers?

Hey everyone,

I have got 100 different servers(all linux and same version).One of them admin server can reach to others and their structures are same.For example I want to change OS dates and weblogic(java dates) for the timezone project.But I do not want to deal with each one separately.I want to write one script on admin server and this script will change the timezone after that it will check the results and print results to sheet for my last check in admin server.How can I do this, do you have any example for this kind automation?

Ty for your answers
Regards

Dear daggerphobia_ ,

I have a few to questions pose in response first:-

  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (C, shell, perl, awk, etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)

Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.

We're all here to learn and getting the relevant information will help us all.

Robin

I would add:

Have you searched the forum?

Hi,

for 100 servers I strongly recommend some real deployment tool like ansible, saltstack, chef, cfengine, ...

This should provide some useful words for further searching.

Regards

Dear Robin,

Im using Linux 2.6.32, I expect some output type like, "scripting completed, there is no error in the systems" or if it will crash, I have to see fail message in my script output like "cant find the java path, grep method failed" or "getting error in this line" etc etc. I prefer shell, C or java languages.My main purpose get rid of unnecessary works.

This will be my first automation project.Normally Im coding with object oriented langs on IDE's.But I never tried in linux or derivatives OS.(tried a little scripting for some configuration in linux)I dont know how to try or where should I start?Should I use automation tools or not? I have got many questions about that and sorry for my lang Im not native :slight_smile:

Dear vbe, I searched it but I couldnt find exactly informations :frowning:

Dear stomp, I still searching which one more effectiable for devops.Do u have any suggest?

Hi dagger,

I'm not sure what you especially have in mind by using devops with your provisioning. The classical devops-tool for deploying apps from an rcs is jenkings(I have not used that so for). Our developers use dokku for deploying ruby on rails applications to docker containers.

I am working with opscode chef. There is some rcs included which keeps track of different versions of the configuration elements. I suppose the other automation tools are the like.

May be you'll need different software packages/services for your aim.

Regards

Dear stomp

I could'nt start my project yet.Because Im still confusing how to start it.I decided to learn ansible bec lots of people suggest it.I want to tell simple example.I want to work on only one admin server\(reaching other servers\) and my goal influence same job to other servers.

For example:

ps -ef|grep java (have to take every specific servers java path value)
java path/javac sample.java
java path/java sample
date

Automating has to apply these lines in every servers.I don't want to login all 100 servers and do it, plus if I can add check status for this deploy it will be amazing.How can I do this please help :slight_smile: sorry lang again

Hi dagger,

I myself know nothing about the usage of ansible. I suggest
you get some documentation or a good book for the setup
of ansible to start.

Regards
stomp

1 Like

Dear stomp

I know I asked too many question to you sorry for that :slight_smile: but if you know how to do that with another way you can share me

Regards

Hi.

I use pdsh for some remote operations. It is simple compared to ansible, saltstack, chef, cfengine .

A brief comparison of a few solutions is at:
Three Methods of Executing Commands on Many Nodes in Parallel via SSH on Linux - SysTutorials

Parallel SSH execution and a single shell to control them all | Linux.com | The source for Linux information

scripting - Automatically run commands over SSH on many servers - Unix & Linux Stack Exchange

and examples 6 and 7 at GNU Parallel >> ADMIN Magazine

Good luck ... cheers, drl

1 Like

ty drl, I will try it asap :wink: