Diego Algorta Casamayou
2008-Jan-31 18:40 UTC
Procedure for installing non-packaged software
Hi there, Is there a best practice for installing custom compiled software on the nodes? I''ll need to install a customly compiled postgresql. Currently it''s deployed on other 2 servers with the classic configure; make; make install procedure. -- Diego Algorta Casamayou http://www.oboxodo.com - http://diego.algorta.net
On 1/31/2008 12:40 PM, Diego Algorta Casamayou wrote:> Is there a best practice for installing custom compiled software on > the nodes? > > I''ll need to install a customly compiled postgresql. Currently it''s > deployed on other 2 servers with the classic configure; make; make > install procedure.I won''t call it a best practice, but what I do is at least *a* practice. 1. I use GNU stow [1] to install packages in /usr/local/stow/package-version, e.g. ganglia-3.0.4, openmpi-1.0.1, hello-2.3, etc. and let it handle symlinking everything into /usr/local/bin, /usr/local/lib, etc. 2. I keep a central rsync-able repository of all my stowed packages for all supported architectures (in my case, i686 and x86_64) somewhere. I use the puppetmaster server, but make it whatever server is convenient. 3. I have a stowedpackage definition for puppet that rsyncs the package''s stow folder for the client''s architecture, un-stows other versions of the package, and deploys out the selected version. I posted this to the list several days ago with no responses, but I''ve had to make a couple of bugfixes since then: define stowedpackage ( $basepackage, $version, $rsyncserver=''puppet'', $rsyncmodule=''metastow'', $stowdestdir=''/usr/local/stow'' ) { file { "stow-initiator_${basepackage}-${version}": source => "puppet:///files/stow-initiator_${basepackage}-${version}", path => "/etc/puppet/stow-initiator_${basepackage}-${version}", } exec { download: command => "/usr/bin/rsync -a --delete ${rsyncserver}::${rsyncmodule}/${hardwaremodel}/${basepackage}-${version} ${stowdestdir}", refreshonly => true, subscribe => File["stow-initiator_${basepackage}-${version}"], alias => "download_${basepackage}-${version}" } exec { unstow-others: command => "cd ${stowdestdir} && stow --delete ${basepackage}-*", refreshonly => true, subscribe => Exec["download_${basepackage}-${version}"], alias => "unstow-others_${basepackage}-${version}" } exec { stow: command => "cd ${stowdestdir} ; stow ${basepackage}-${version}", refreshonly => true, subscribe => Exec["unstow-others_${basepackage}-${version}"] } } 4. I put an entry in a manifest something like: # Create OpenMPI installation and configuration. class openmpi { stowedpackage { "openmpi-1.0.1": basepackage=>"openmpi", version=>"1.0.1"; } } 5. To notify managed nodes that there''s a new version of the stowed package available, I modify a trigger file in /etc/puppet/files: date > stow-initiator_openmpi-1.0.1 It''s a bit of setup, but it appears to work for multiple stowed packages per system (which my first version didn''t): /usr/local/bin# ls -l total 0 lrwxrwxrwx 1 root staff 40 2008-01-31 11:16 ganglia-config -> ../stow/ganglia-3.0.4/bin/ganglia-config lrwxrwxrwx 1 root staff 33 2008-01-31 11:16 gmetric -> ../stow/ganglia-3.0.4/bin/gmetric lrwxrwxrwx 1 root staff 31 2008-01-31 11:16 gstat -> ../stow/ganglia-3.0.4/bin/gstat lrwxrwxrwx 1 root staff 32 2008-01-31 11:16 mpic++ -> ../stow/openmpi-1.0.1/bin/mpic++ lrwxrwxrwx 1 root staff 31 2008-01-31 11:16 mpicc -> ../stow/openmpi-1.0.1/bin/mpicc ... [1] http://www.gnu.org/software/stow/ -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University
On 31/01/2008, Diego Algorta Casamayou <diego.algorta@gmail.com> wrote:> Hi there, > > Is there a best practice for installing custom compiled software on the nodes? > > I''ll need to install a customly compiled postgresql. Currently it''s > deployed on other 2 servers with the classic configure; make; make > install procedure.Best thing to do is probably to build a custom package using your operating system''s native package format. I also wrote a class that performs a "./configure, make install" some time ago that you might find helpful if you really want to do things that way. http://reductivelabs.com/trac/puppet/wiki/OpenNTPDRecipe
On Jan 31, 2008 11:40 AM, Diego Algorta Casamayou <diego.algorta@gmail.com> wrote:> Is there a best practice for installing custom compiled software on the nodes? > > I''ll need to install a customly compiled postgresql. Currently it''s > deployed on other 2 servers with the classic configure; make; make > install procedure.Best practice would definitely be to create a package for your platform and deploy it using the platform''s preferred tool (yum/rpm, apt/dpkg, etc). We''re using CentOS and create our own RPMs for certain packages. We have a internal Yum repository for our custom compiled packages, as well as all the CentOS repos and a couple other public repos (like David Lutterkort''s, for puppet itself).