Deploy a package on many systems


 
Thread Tools Search this Thread
Operating Systems Linux Deploy a package on many systems
# 1  
Old 02-23-2010
Deploy a package on many systems

I had a question on my interview today.
so how would you automate install/upgrade to a package to 200 servers.
and obviously not by going to each system physically.

Answer: NFS share , using perl script and rpm utility. But i have not done such kind of install/upgrade so my knowledge is limited.

but i want to know how would i do that on Redhat Enterprise or CentOS.

Thanks
# 2  
Old 02-26-2010
Using TCL/Expect is another possible answer, at least for me. Here's an example of usage - I have CVS checked-out every day, so I want to distribute certain files to a list of servers, I would use something as simple as :
Code:
#!/usr/bin/expect

set timeout 60

if { $argc != 1 } {
    puts "Usage $argv0 file"
    exit 1
}

set file [lindex $argv 0]
set user root
set pass password
set remote_path "/opt/install"

foreach host { host1 host2 host3 } {

eval spawn scp -oUserKnownHostsFile=/dev/null  $::file $::user@$::host:$::remote_path
expect *assword:

send "$::pass\r"
expect eof

}

The script is very simple, and it relies on certain hard-coded parameters, including the security risk of exposing the password in plain text, but those could be parametrized. This is just a sample logic.

Last edited by sysgate; 02-26-2010 at 06:23 AM.. Reason: More info
# 3  
Old 02-26-2010
There are already configured tools to do this such as Satellite server for RHEL or Spacewalk for CentOS. You can set up a YUM server and puppet or cfengine.
# 4  
Old 02-26-2010
Using an NFS share mounted to all the hosts means they can get the RPM file without resorting to SCP.

I have written a script that installs changes using an NFS mounted directory containing the packages/patches and flag directory with a sub directory per package/patch which each machines checks hourly (using cron) and if they do not see a flag file of their own hostname in any of the flag directories they then install that package/patch and create a flag file on successful completion.

There are various products like AltirisNS (Windows hosted) in addition to satellite server, etc. that can do this but that was not what the interview question was asking for...
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where is the best location to deploy an application on Tomcat over Linux?

Hi, I'm trying to figure out the best location to deploy an application on Tomcat over Linux server. The application structure is as follows: 1. WAR - the app itself. 2. conf - configuration files that are part of the product, not to be changed in deployment 3. local_conf - overriding... (0 Replies)
Discussion started by: moshebs
0 Replies

2. Web Development

Software to deploy website ?

Hi, I'm planning to deploy a website in my LAN. I already have apache installed in my PC, but I dont want to write codes for web page rather is there any software that allows me to design webpage, add contents, add users, upload docs etc.. rapidly. Free softwares are most welcome (both in... (9 Replies)
Discussion started by: Arun_Linux
9 Replies

3. Emergency UNIX and Linux Support

Problem when trying to remove a package using rpm command - error: package is not installed

Hello, i have installed a package by using the command sudo rpm -i filepackage.rpm package filepackage is already installed when i try to remove it, i get an error saying "is not installed": sudo rpm -e filepackage.rpm error: package filepackage is not installed How can... (4 Replies)
Discussion started by: g_p
4 Replies

4. UNIX for Dummies Questions & Answers

Can't install rpm package with --prefix in new path.Error: package is not relocatable

Hello, i have downloaded an rpm package "hadoop-0.20.205.0-1.amd64.rpm" in /usr/local/ directory. I'm trying to install the rpm package in a new path/location (/usr/local/hadoop-0.20.205), but i can't. I did: 1st try: Didn't work sudo rpm -i --prefix=/usr/local/hadoop-0.20.205... (1 Reply)
Discussion started by: g_p
1 Replies

5. What is on Your Mind?

From Systems Admin to Systems Eng.

I have been wondering how do Systems Administrators do the jump into Systems Engineering? Is it only a matter of time and experience or could I actually help myself get there? Opinions? Books I could read? Thanks a lot for your help! (0 Replies)
Discussion started by: svalenciatech
0 Replies

6. UNIX for Advanced & Expert Users

How to find dependancies of .dstream package (Solaris) & .rpm package( linux)

Friends, Please let meknow, How we can find the dependancies of .dstream package & .rpm package before installation ? For AIX, We can use the inutoc . command to create the .toc file for the bff package, What about Solaris & Linux ? (0 Replies)
Discussion started by: yb4779
0 Replies

7. Linux

how to restore original package after uninstalling the upgraded package using rpm

have following package installed rpm -qa |grep ADMIN It will give the following package installed: ADMIN-4.0.0.1 Now I will upgrade the ADMIN package using the following command. rpm --upgrade ADMIN-4.1.0.1 It will upgrade the ADMIN packagge to ADMIN-4.1.0.1 Now I want that... (0 Replies)
Discussion started by: amitpansuria
0 Replies
Login or Register to Ask a Question