Skip to content

Commit

Permalink
Rewritten sourceinstall to fork out so Ruby memory usage doesn't get …
Browse files Browse the repository at this point in the history
…out of control.
  • Loading branch information
rcrowley committed Oct 4, 2009
1 parent f75c3b8 commit 441d549
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define pipinstall($version, $bin) {
exec { "install-pip-0.4-$version":
require => Exec["extract-pip-0.4"],
exec { "pipinstall-exec-$version":
require => Exec["pipinstall-extract"],
cwd => "/root/pip-0.4",
command => "/opt/Python-$version/bin/$bin setup.py install",
creates => "/opt/Python-$version/bin/pip",
Expand All @@ -21,19 +21,19 @@
source => "puppet://$servername/python/pip-0.4.tar.gz",
ensure => present,
}
exec { "extract-pip-0.4":
exec { "pipinstall-extract":
require => File["/root/pip-0.4.tar.gz"],
cwd => "/root",
command => "tar xf /root/pip-0.4.tar.gz",
creates => "/root/pip-0.4",
#unless => "UNLESS WHAT???",
}
# If anything happened in order, each pipinstall would go here
exec { "remove-pip-0.4":
exec { "pipinstall-remove":
require => [
Pipinstall["pip-0.4-3.1"],
Pipinstall["pip-0.4-2.6.2"],
Pipinstall["pip-0.4-2.5.4"]
Pipinstall["pipinstall-3.1"],
Pipinstall["pipinstall-2.6.2"],
Pipinstall["pipinstall-2.5.4"]
],
command => "rm -rf /root/pip-0.4*",
}
Expand All @@ -48,14 +48,11 @@
class python::python_3_1 {
$version = "3.1"
sourceinstall { "Python-$version":
before => File["/opt/Python-$version/bin/python"],
package => "Python",
version => "$version",
tarball => "puppet://$servername/python/Python-$version.tar.bz2",
tarball => "http://python.org/ftp/python/$version/Python-$version.tar.bz2",
prefix => "/opt/Python-$version",
flags => "",
bin => "python3",
}
pipinstall { "pip-0.4-$version":
pipinstall { "pipinstall-$version":
version => "$version",
bin => "python3",
}
Expand All @@ -68,13 +65,11 @@
class python::python_2_6_2 {
$version = "2.6.2"
sourceinstall { "Python-$version":
package => "Python",
version => "$version",
tarball => "puppet://$servername/python/Python-$version.tar.bz2",
tarball => "http://python.org/ftp/python/$version/Python-$version.tar.bz2",
prefix => "/opt/Python-$version",
flags => "",
bin => "python",
}
pipinstall { "pip-0.4-$version":
pipinstall { "pipinstall-$version":
version => "$version",
bin => "python",
}
Expand All @@ -83,13 +78,11 @@
class python::python_2_5_4 {
$version = "2.5.4"
sourceinstall { "Python-$version":
package => "Python",
version => "$version",
tarball => "puppet://$servername/python/Python-$version.tar.bz2",
tarball => "http://python.org/ftp/python/$version/Python-$version.tar.bz2",
prefix => "/opt/Python-$version",
flags => "",
bin => "python",
}
pipinstall { "pip-0.4-$version":
pipinstall { "pipinstall-$version":
version => "$version",
bin => "python",
}
Expand Down

0 comments on commit 441d549

Please sign in to comment.