Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a puppet module for installing euca2ools.

- Created the puppet folder in the recipes repo.
- Added the euca2ools folder to the puppet section. Below it is the configuration
files for the module.
- Module works with Ubuntu 10.04 and Ubuntu 12.04. Tested using the UC images provided
by Ubuntu.
- Module works with CentOS 5 and 6. CentOS 5 was tested with the Eucalyptus Starter
Image for CentOS. CentOS 6 has the exact same install procedures so it should *work*
without issue but I still need to test this out.
  • Loading branch information...
commit d7ba37d8f886949cf67a5b10fbcdb240cd9b0464 1 parent fccfd60
@ahamilton55 ahamilton55 authored
View
5 puppet/euca2ools/README
@@ -0,0 +1,5 @@
+Puppet module for installing euca2ools with Puppet.
+
+Easiest way to run it is by dropping it in /etc/puppet/modules on the node and
+running "puppet apply -e "include euca2ools". These should also be able to be
+placed on a puppet master and add "include euca2ools" to a node's configuation.
View
30 puppet/euca2ools/files/RPM-GPG-KEY-eucalyptus-release
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+mQINBE4yDpIBEADNEtgH4rY7UvCJ5M/i3z1hNaIPyWaDx2CpiCDR+P13eDDBSQ7m
+9n8lOKYQtFG3v37XgtNeZSiKvcelNflYsAlGohcPnGcYE3QU58oq7nBhKer2ozdQ
+3GDm/KxsvwUF2sqiRHG+HVcK3QGeZHaOGhIj2n/4d0dmbphvDf7EzYhsz+ylZGRo
+0S1jL1VXi1hDqjTNYvdv3BS2lmpRKnfuyTF2vBP11m/i2y0JvrZkWgQB1CcMU1U5
+tQSuxV6q0e2rTU3w4NPrDJwC9+Y2ajWGGZozqyN+tPJ6DZTbql/5msFJXdS2tvKq
+nWvyo5M2Ke92tn6JnNWl6a/NudtQOitlgky0DkgFhTGArGwPImdhKGTOsQOw2vln
+SbhOOd0+Fg8woEM8S27ViVH75ULe5WsxqzN9EdlgFh0JfFT6HgN95U5o+yjOsAr3
+xaX/r1uyevooe3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W/Tatq3oS25T9wtJYREYjn4MbEUI0FBxGn5k
+2T2jSGSw43cM9hVBqQ==
+=Xs3z
+-----END PGP PUBLIC KEY BLOCK-----
View
27 puppet/euca2ools/files/c1240596-eucalyptus-release-key.pub
@@ -0,0 +1,27 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: SKS 1.1.0
+
+mQINBE4yDpIBEADNEtgH4rY7UvCJ5M/i3z1hNaIPyWaDx2CpiCDR+P13eDDBSQ7m9n8lOKYQ
+tFG3v37XgtNeZSiKvcelNflYsAlGohcPnGcYE3QU58oq7nBhKer2ozdQ3GDm/KxsvwUF2sqi
+RHG+HVcK3QGeZHaOGhIj2n/4d0dmbphvDf7EzYhsz+ylZGRo0S1jL1VXi1hDqjTNYvdv3BS2
+lmpRKnfuyTF2vBP11m/i2y0JvrZkWgQB1CcMU1U5tQSuxV6q0e2rTU3w4NPrDJwC9+Y2ajWG
+GZozqyN+tPJ6DZTbql/5msFJXdS2tvKqnWvyo5M2Ke92tn6JnNWl6a/NudtQOitlgky0DkgF
+hTGArGwPImdhKGTOsQOw2vlnSbhOOd0+Fg8woEM8S27ViVH75ULe5WsxqzN9EdlgFh0JfFT6
+HgN95U5o+yjOsAr3xaX/r1uyevooe3ow+MiFEMYlASgkxfjklveaPE4b00n/cZSq03i0Fz5+
+Nwgq1UwjwqSEJMOGtBO2sXroB7Qzcm1dlQJL2au+by5yFvmIR3v2tDyu84T4SVSMfU61B0+b
+Z2+ufwUrGHkvQSEmfI3NswzJKP4lEh52VaLQx9NZ0qYlap2i3QkW+xCx37VTAViUTbggQzck
+25fiIveVpyi/0khDHio3ZeX06i4XoAdtsaYckfROzpwZnu0MawARAQABtEBFdWNhbHlwdHVz
+IFN5c3RlbXMsIEluYy4gKHJlbGVhc2Uga2V5KSA8c2VjdXJpdHlAZXVjYWx5cHR1cy5jb20+
+iQI4BBMBAgAiBQJOMhAnAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRC+Jk0JwSQF
+luz9D/sHoShHF6MCc+c+VI8yYHXAkv7hnOahm/H76Pnt1VTGI2J4Sl+A/e3KpGjxa3Ii8xN5
+MhQNQ9jSJFDdLuaD4BmbjZF3WOObFvgTTw42mfXrUo/F4sthVwEvU4o1cvfVyM91kzg5X6u8
+K91gcVmsJvPOn3UhZ7SQOfv0BzbBb6XR3Wi5fvMlE0Tfbc2SEJ1l0Au9QjvuH2tVfCaHkPsW
+n6s8ONfQl+jclkfZNjfaAPStMj8ZylizA0Wgib+RffNAe8BlbGrZwum8Sk005jhGKkQmYz7L
+nMg8dPIvQFxKeQddE4o11Jy9LUMXuJBsu2TMFWf1zEzrVi+BzBj61HeM3CbTYO9ifbOhYdia
+RtHHuWnH2Nh7+u2rDkU1lfNotFM1yEoldhYnHklN2ZB4OiY3yCG1a4qNKYTshqoyQPOa8PYA
+ObydKJweNgNRhO74s6AZHMR4TR/Mp+cgXMXZIbnuxut0UwkCGditoANmgURXaZ2GA3Vy+5Ig
+NCwJjOikjeGZLqijCj5T92Viju70UW8nipp5eIXpi23Z9QLc/+V1HhkiONLLAaGPCuAtvPLO
+CkALKjKOBJ4uMdPRl/Vqo2S7URUbjml1tZQspPYhQh95SwUg0imvo7k2UO4sW/Tatq3oS25T
+9wtJYREYjn4MbEUI0FBxGn5k2T2jSGSw43cM9hVBqQ==
+=Xs3z
+-----END PGP PUBLIC KEY BLOCK-----
View
4 puppet/euca2ools/files/euca2ools.repo
@@ -0,0 +1,4 @@
+[euca2ools]
+name=Euca2ools
+baseurl=http://downloads.eucalyptus.com/software/euca2ools/2.1/rhel/$releasever/$basearch
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-eucalyptus-release
View
37 puppet/euca2ools/manifests/init.pp
@@ -0,0 +1,37 @@
+
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2009-2012, Eucalyptus Systems, Inc.
+# All rights reserved.
+#
+# Redistribution and use of this software in source and binary forms, with or
+# without modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above
+# copyright notice, this list of conditions and the
+# following disclaimer.
+#
+# Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the
+# following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# author: Andrew Hamilton (ahamilton@eucalyptus.com)
+#
+
+class euca2ools {
+ include euca2ools::repo, euca2ools::install
+}
View
49 puppet/euca2ools/manifests/install.pp
@@ -0,0 +1,49 @@
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2009-2012, Eucalyptus Systems, Inc.
+# All rights reserved.
+#
+# Redistribution and use of this software in source and binary forms, with or
+# without modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above
+# copyright notice, this list of conditions and the
+# following disclaimer.
+#
+# Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the
+# following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# author: Andrew Hamilton (ahamilton@eucalyptus.com)
+#
+
+class euca2ools::install {
+ if $operatingsystem == "Ubuntu" {
+ $package_version = "2.1.0-0${lsbdistcodename}.1"
+ } elsif $operatingsystem == "CentOS" {
+ if ($operatingsystemrelease >= 5) and ($operatingsystemrelease < 6) {
+ $package_version = "2.1.0-0.22.el5"
+ } elsif ($operatingsystemrelease >= 6) and ($operatingsystemrelease < 7) {
+ $package_version = "2.1.0-0.22.el6"
+ }
+ }
+
+ package { "euca2ools":
+ ensure => $package_version,
+ require => Class["euca2ools::repo"],
+ }
+}
View
82 puppet/euca2ools/manifests/repo.pp
@@ -0,0 +1,82 @@
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2009-2012, Eucalyptus Systems, Inc.
+# All rights reserved.
+#
+# Redistribution and use of this software in source and binary forms, with or
+# without modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above
+# copyright notice, this list of conditions and the
+# following disclaimer.
+#
+# Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the
+# following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# author: Andrew Hamilton (ahamilton@eucalyptus.com)
+#
+
+class euca2ools::repo {
+ if $operatingsystem == "Ubuntu" {
+ file { "/etc/apt/sources.list.d/euca2ools.list":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0600,
+ content => template("euca2ools/euca2ools.list.erb"),
+ }
+
+ file { "/root/c1240596-eucalyptus-release-key.pub":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0600,
+ source => "puppet:///modules/euca2ools/c1240596-eucalyptus-release-key.pub",
+ require => File["/etc/apt/sources.list.d/euca2ools.list"],
+ }
+
+ exec { "add-repo-key":
+ command => "/usr/bin/apt-key add /root/c1240596-eucalyptus-release-key.pub",
+ require => File["/root/c1240596-eucalyptus-release-key.pub"],
+ }
+
+ # Run apt-get update when anything beneath /etc/apt/ changes
+ # Found @ https://blog.kumina.nl/2010/11/puppet-tipstricks-running-apt-get-update-only-when-needed/
+ exec { "apt-get update":
+ command => "/usr/bin/apt-get update",
+ onlyif => "/bin/sh -c '[ ! -f /var/cache/apt/pkgcache.bin ] || /usr/bin/find /etc/apt/* -cnewer /var/cache/apt/pkgcache.bin | /bin/grep . > /dev/null'",
+ require => Exec["add-repo-key"],
+ }
+ } elsif $operatingsystem == "CentOS" or $operatingsystem == "RedHat" {
+ file { "/etc/yum.repos.d/euca2ools.repo":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ source => "puppet:///modules/euca2ools/euca2ools.repo",
+ }
+
+ file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-eucalyptus-release":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0600,
+ source => "puppet:///modules/euca2ools/RPM-GPG-KEY-eucalyptus-release",
+ }
+ }
+}
View
1  puppet/euca2ools/templates/euca2ools.list.erb
@@ -0,0 +1 @@
+deb http://downloads.eucalyptus.com/software/euca2ools/2.1/ubuntu <%= @lsbdistcodename %> main
Please sign in to comment.
Something went wrong with that request. Please try again.