From: Mohammed Morsi <mmorsi(a)redhat.com>
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
README | 26 ++--
Rakefile | 8 +-
bin/aeolus-cleanup | 4 +
bin/aeolus-configure | 4 +
bin/aeolus-services | 4 +
bin/deltacloud-cleanup | 4 -
bin/deltacloud-configure | 4 -
bin/deltacloud-services | 4 -
contrib/aeolus-configure.spec | 79 ++++++++++++
contrib/deltacloud-configure.spec | 76 -----------
recipes/aeolus_recipe/aeolus_recipe.pp | 40 ++++++
recipes/aeolus_recipe/aeolus_stop_services.pp | 32 +++++
recipes/aeolus_recipe/aeolus_uninstall.pp | 32 +++++
recipes/aeolus_recipe/files/condor_config.local | 26 ++++
recipes/aeolus_recipe/files/deltacloud-core | 76 +++++++++++
recipes/aeolus_recipe/files/imagefactory.yml | 12 ++
recipes/aeolus_recipe/files/iwhd-conf.js | 7 +
recipes/aeolus_recipe/files/iwhd.init | 76 +++++++++++
recipes/aeolus_recipe/files/pg_hba.conf | 2 +
recipes/aeolus_recipe/files/qpidd.conf | 25 ++++
.../files/root-boxgrinder-plugins-local | 3 +
recipes/aeolus_recipe/manifests/aeolus.pp | 33 +++++
recipes/aeolus_recipe/manifests/aggregator.pp | 128 +++++++++++++++++++
recipes/aeolus_recipe/manifests/core.pp | 35 +++++
recipes/aeolus_recipe/manifests/image-factory.pp | 131 ++++++++++++++++++++
recipes/aeolus_recipe/manifests/iwhd.pp | 67 ++++++++++
recipes/aeolus_recipe/manifests/rails.pp | 24 ++++
recipes/aeolus_recipe/manifests/selinux.pp | 11 ++
recipes/deltacloud_recipe/deltacloud_recipe.pp | 40 ------
.../deltacloud_recipe/deltacloud_stop_services.pp | 32 -----
recipes/deltacloud_recipe/deltacloud_uninstall.pp | 32 -----
.../deltacloud_recipe/files/condor_config.local | 2 +-
recipes/deltacloud_recipe/files/deltacloud-core | 76 -----------
recipes/deltacloud_recipe/files/imagefactory.yml | 12 --
recipes/deltacloud_recipe/files/iwhd-conf.js | 7 -
recipes/deltacloud_recipe/files/iwhd.init | 76 -----------
recipes/deltacloud_recipe/files/pg_hba.conf | 2 -
recipes/deltacloud_recipe/files/qpidd.conf | 25 ----
.../files/root-boxgrinder-plugins-local | 3 -
recipes/deltacloud_recipe/manifests/aggregator.pp | 128 -------------------
recipes/deltacloud_recipe/manifests/core.pp | 35 -----
recipes/deltacloud_recipe/manifests/deltacloud.pp | 33 -----
.../deltacloud_recipe/manifests/image-factory.pp | 131 --------------------
recipes/deltacloud_recipe/manifests/iwhd.pp | 67 ----------
recipes/deltacloud_recipe/manifests/rails.pp | 24 ----
recipes/deltacloud_recipe/manifests/selinux.pp | 11 --
46 files changed, 870 insertions(+), 839 deletions(-)
create mode 100644 bin/aeolus-cleanup
create mode 100644 bin/aeolus-configure
create mode 100644 bin/aeolus-services
delete mode 100755 bin/deltacloud-cleanup
delete mode 100755 bin/deltacloud-configure
delete mode 100755 bin/deltacloud-services
create mode 100644 contrib/aeolus-configure.spec
delete mode 100644 contrib/deltacloud-configure.spec
create mode 100644 recipes/aeolus_recipe/aeolus_recipe.pp
create mode 100644 recipes/aeolus_recipe/aeolus_stop_services.pp
create mode 100644 recipes/aeolus_recipe/aeolus_uninstall.pp
create mode 100644 recipes/aeolus_recipe/files/condor_config.local
create mode 100644 recipes/aeolus_recipe/files/deltacloud-core
create mode 100644 recipes/aeolus_recipe/files/imagefactory.yml
create mode 100644 recipes/aeolus_recipe/files/iwhd-conf.js
create mode 100644 recipes/aeolus_recipe/files/iwhd.init
create mode 100644 recipes/aeolus_recipe/files/pg_hba.conf
create mode 100644 recipes/aeolus_recipe/files/qpidd.conf
create mode 100644 recipes/aeolus_recipe/files/root-boxgrinder-plugins-local
create mode 100644 recipes/aeolus_recipe/manifests/aeolus.pp
create mode 100644 recipes/aeolus_recipe/manifests/aggregator.pp
create mode 100644 recipes/aeolus_recipe/manifests/core.pp
create mode 100644 recipes/aeolus_recipe/manifests/image-factory.pp
create mode 100644 recipes/aeolus_recipe/manifests/iwhd.pp
create mode 100644 recipes/aeolus_recipe/manifests/rails.pp
create mode 100644 recipes/aeolus_recipe/manifests/selinux.pp
delete mode 100644 recipes/deltacloud_recipe/deltacloud_recipe.pp
delete mode 100644 recipes/deltacloud_recipe/deltacloud_stop_services.pp
delete mode 100644 recipes/deltacloud_recipe/deltacloud_uninstall.pp
delete mode 100644 recipes/deltacloud_recipe/files/deltacloud-core
delete mode 100644 recipes/deltacloud_recipe/files/imagefactory.yml
delete mode 100644 recipes/deltacloud_recipe/files/iwhd-conf.js
delete mode 100755 recipes/deltacloud_recipe/files/iwhd.init
delete mode 100644 recipes/deltacloud_recipe/files/pg_hba.conf
delete mode 100644 recipes/deltacloud_recipe/files/qpidd.conf
delete mode 100644 recipes/deltacloud_recipe/files/root-boxgrinder-plugins-local
delete mode 100644 recipes/deltacloud_recipe/manifests/aggregator.pp
delete mode 100644 recipes/deltacloud_recipe/manifests/core.pp
delete mode 100644 recipes/deltacloud_recipe/manifests/deltacloud.pp
delete mode 100644 recipes/deltacloud_recipe/manifests/image-factory.pp
delete mode 100644 recipes/deltacloud_recipe/manifests/iwhd.pp
delete mode 100644 recipes/deltacloud_recipe/manifests/rails.pp
delete mode 100644 recipes/deltacloud_recipe/manifests/selinux.pp
diff --git a/README b/README
index 229d453..3ae5921 100644
--- a/README
+++ b/README
@@ -1,29 +1,31 @@
-The Deltacloud Recipe
+The Aeolus Recipe
-You can find more documentation at the Deltacloud web site at
-http://deltacloud.org/
+You can find more documentation at the Aeolus web site at
+http://aeolusproject.org/
Prerequisites
-------------
-The deltacloud recipe is a puppet module which can be used
-to install and configure deltacloud components. To make use
+The aeolus recipe is a puppet module which can be used
+to install and configure aeolus components. To make use
of this recipe, drop it into your puppet module path or
-alternatively build and install the recipe rpm.
+alternatively build and install the aeolus-configure rpm
+which contains the recipe and some wrapper scripts to configure
+the aeolus components.
-Building and Installing the Deltacloud Recipe
+Building and Installing the Aeolus Recipe
---------------------------------
$ rake rpms
The rpm will be placed into the build dir, install it via yum
$ sudo yum install --nogpgcheck \
- build/rpmbuild/RPMS/noarch/deltacloud_recipe-0.0.3-1.fc13.noarch.rpm
+ build/rpmbuild/RPMS/noarch/aeolus-configure-2.0.0-2.fc13.noarch.rpm
-Install deltacloud via the recipe via
-$ sudo /usr/sbin/dc-install
+Install aeolus via the recipe via
+$ sudo /usr/sbin/aeolus-configure
-Uninstall deltacloud via
-$ sudo /usr/sbin/dc-uninstall
+Uninstall aeolus via
+$ sudo /usr/sbin/aeolus-cleanup
diff --git a/Rakefile b/Rakefile
index f203717..dbdc9ca 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
-# Deltacloud Recipe Rakefile
+# Aeolus Configure/Recipe Rakefile
require 'rake/clean'
require 'rake/rpmtask'
@@ -9,9 +9,9 @@ RPMBUILD_DIR = "#{CURRENT_DIR}/build/rpmbuild"
YUM_REPO = "#{CURRENT_DIR}/repo"
CLEAN.include('pkg', 'build', 'repo')
-CLOBBER.include('deltacloud')
-PKG_NAME = "deltacloud-configure"
-RPM_SPEC = "contrib/deltacloud-configure.spec"
+CLOBBER.include('aeolus')
+PKG_NAME = "aeolus-configure"
+RPM_SPEC = "contrib/aeolus-configure.spec"
# Build the rpm
rpm_task =
diff --git a/bin/aeolus-cleanup b/bin/aeolus-cleanup
new file mode 100644
index 0000000..96cd540
--- /dev/null
+++ b/bin/aeolus-cleanup
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+puppet /usr/share/aeolus-configure/aeolus_uninstall.pp \
+ --modulepath=/usr/share/aeolus-configure/modules/
diff --git a/bin/aeolus-configure b/bin/aeolus-configure
new file mode 100644
index 0000000..8ff880f
--- /dev/null
+++ b/bin/aeolus-configure
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+puppet /usr/share/aeolus-configure/aeolus_recipe.pp \
+ --modulepath=/usr/share/aeolus-configure/modules/
diff --git a/bin/aeolus-services b/bin/aeolus-services
new file mode 100644
index 0000000..72cd2bb
--- /dev/null
+++ b/bin/aeolus-services
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+puppet /usr/share/aeolus-configure/aeolus_stop_services.pp \
+ --modulepath=/usr/share/aeolus-configure/modules/
diff --git a/bin/deltacloud-cleanup b/bin/deltacloud-cleanup
deleted file mode 100755
index a359fce..0000000
--- a/bin/deltacloud-cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-puppet /usr/share/deltacloud-configure/deltacloud_uninstall.pp \
- --modulepath=/usr/share/deltacloud-configure/modules/
diff --git a/bin/deltacloud-configure b/bin/deltacloud-configure
deleted file mode 100755
index c034d4c..0000000
--- a/bin/deltacloud-configure
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-puppet /usr/share/deltacloud-configure/deltacloud_recipe.pp \
- --modulepath=/usr/share/deltacloud-configure/modules/
diff --git a/bin/deltacloud-services b/bin/deltacloud-services
deleted file mode 100755
index 5c888e3..0000000
--- a/bin/deltacloud-services
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-puppet /usr/share/deltacloud-configure/deltacloud_stop_services.pp \
- --modulepath=/usr/share/deltacloud-configure/modules/
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec
new file mode 100644
index 0000000..25d5486
--- /dev/null
+++ b/contrib/aeolus-configure.spec
@@ -0,0 +1,79 @@
+%define dchome /usr/share/aeolus-configure
+%define pbuild %{_builddir}/%{name}-%{version}
+
+Summary: Aeolus Configure Puppet Recipe
+Name: aeolus-configure
+Version: 2.0.0
+Release: 1%{?dist}
+
+Group: Applications/Internet
+License: GPLv2+
+URL:
http://aeolusproject.org
+Source0: %{name}-%{version}.tgz
+BuildRoot: %{_tmppath}/%{name}-%{version}
+BuildArch: noarch
+Requires: puppet
+
+# To send a request to iwhd rest interface to
+# create buckets, eventually replace w/ an
+# iwhd client
+Requires: curl
+
+%description
+Aeolus Configure Puppet Recipe
+
+%prep
+%setup -q
+
+%build
+
+%install
+rm -rf %{buildroot}
+%{__mkdir} -p %{buildroot}/%{dchome}/modules/aeolus_recipe %{buildroot}/%{_sbindir}
+%{__cp} -R %{pbuild}/recipes/aeolus_recipe/aeolus_recipe.pp %{buildroot}/%{dchome}
+%{__cp} -R %{pbuild}/recipes/aeolus_recipe/aeolus_uninstall.pp %{buildroot}/%{dchome}
+%{__cp} -R %{pbuild}/recipes/aeolus_recipe/*/
%{buildroot}/%{dchome}/modules/aeolus_recipe
+%{__cp} -R %{pbuild}/recipes/firewall/ %{buildroot}/%{dchome}/modules/firewall
+%{__cp} -R %{pbuild}/recipes/ntp/ %{buildroot}/%{dchome}/modules/ntp
+%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{dchome}/modules/postgres
+%{__cp} -R %{pbuild}/bin/aeolus-configure %{buildroot}/%{_sbindir}/
+%{__cp} -R %{pbuild}/bin/aeolus-cleanup %{buildroot}/%{_sbindir}/
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%attr(0755, root, root) %{_sbindir}/aeolus-configure
+%attr(0755, root, root) %{_sbindir}/aeolus-cleanup
+%{dchome}
+
+%changelog
+* Wed Jan 19 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-2
+- renamed deltacloud-configure to aeolus-configure
+
+* Mon Jan 10 2011 Mike Orazi <morazi(a)redhat.com> 2.0.0-1
+- Make this a drop in replacement for the old deltacloud-configure scripts
+
+* Wed Dec 22 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.4-1
+- Revamp deltacloud recipe to make it more puppetized,
+ use general purpose firewall, postgres, ntp modules,
+ and to fix many various things
+
+* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.3-1
+- Renamed package from deltacloud appliance
+- to deltacloud recipe
+
+* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-3
+- Include curl-devel for typhoeus gem
+
+* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-2
+- Updated to pull in latest git changes
+
+* Fri Sep 17 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-1
+- Updated packages pulled in to latest versions
+- Various fixes
+- Added initial image warehouse bits
+
+* Thu Sep 02 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.1-1
+- Initial package
diff --git a/contrib/deltacloud-configure.spec b/contrib/deltacloud-configure.spec
deleted file mode 100644
index 04ff82d..0000000
--- a/contrib/deltacloud-configure.spec
+++ /dev/null
@@ -1,76 +0,0 @@
-%define dchome /usr/share/deltacloud-configure
-%define pbuild %{_builddir}/%{name}-%{version}
-
-Summary: DeltaCloud Configure Puppet Recipe
-Name: deltacloud-configure
-Version: 2.0.0
-Release: 1%{?dist}
-
-Group: Applications/Internet
-License: GPLv2+
-URL:
http://deltacloud.org
-Source0: %{name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}
-BuildArch: noarch
-Requires: puppet
-
-# To send a request to iwhd rest interface to
-# create buckets, eventually replace w/ an
-# iwhd client
-Requires: curl
-
-%description
-Deltacloud Configure Puppet Recipe
-
-%prep
-%setup -q
-
-%build
-
-%install
-rm -rf %{buildroot}
-%{__mkdir} -p %{buildroot}/%{dchome}/modules/deltacloud_recipe %{buildroot}/%{_sbindir}
-%{__cp} -R %{pbuild}/recipes/deltacloud_recipe/deltacloud_recipe.pp
%{buildroot}/%{dchome}
-%{__cp} -R %{pbuild}/recipes/deltacloud_recipe/deltacloud_uninstall.pp
%{buildroot}/%{dchome}
-%{__cp} -R %{pbuild}/recipes/deltacloud_recipe/*/
%{buildroot}/%{dchome}/modules/deltacloud_recipe
-%{__cp} -R %{pbuild}/recipes/firewall/ %{buildroot}/%{dchome}/modules/firewall
-%{__cp} -R %{pbuild}/recipes/ntp/ %{buildroot}/%{dchome}/modules/ntp
-%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{dchome}/modules/postgres
-%{__cp} -R %{pbuild}/bin/deltacloud-configure %{buildroot}/%{_sbindir}/
-%{__cp} -R %{pbuild}/bin/deltacloud-cleanup %{buildroot}/%{_sbindir}/
-
-%clean
-rm -rf %{buildroot}
-
-%files
-%defattr(-,root,root,-)
-%attr(0755, root, root) %{_sbindir}/deltacloud-configure
-%attr(0755, root, root) %{_sbindir}/deltacloud-cleanup
-%{dchome}
-
-%changelog
-* Mon Jan 10 2011 Mike Orazi <morazi(a)redhat.com> 2.0.0-1
-- Make this a drop in replacement for the old deltacloud-configure scripts
-
-* Wed Dec 22 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.4-1
-- Revamp deltacloud recipe to make it more puppetized,
- use general purpose firewall, postgres, ntp modules,
- and to fix many various things
-
-* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.3-1
-- Renamed package from deltacloud appliance
-- to deltacloud recipe
-
-* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-3
-- Include curl-devel for typhoeus gem
-
-* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-2
-- Updated to pull in latest git changes
-
-* Fri Sep 17 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-1
-- Updated packages pulled in to latest versions
-- Various fixes
-- Added initial image warehouse bits
-
-* Thu Sep 02 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.1-1
-- Initial package
diff --git a/recipes/aeolus_recipe/aeolus_recipe.pp
b/recipes/aeolus_recipe/aeolus_recipe.pp
new file mode 100644
index 0000000..a97b250
--- /dev/null
+++ b/recipes/aeolus_recipe/aeolus_recipe.pp
@@ -0,0 +1,40 @@
+#--
+# Copyright (C) 2010 Red Hat Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Author: Mohammed Morsi <mmorsi(a)redhat.com>
+#--
+
+#
+# aeolus installation recipe
+#
+
+# Modules used by the recipe
+import "aeolus_recipe/aeolus"
+
+# include the various aeolus components
+include aeolus::aggregator
+include aeolus::core
+include aeolus::image-factory
+include aeolus::iwhd
+
+aeolus::create_bucket{"aeolus":}
+
+aeolus::site_admin{"admin":
+ email => 'dcuser(a)aeolusproject.org',
+ password => 'password',
+ first_name => 'aeolus',
+ last_name => 'user'}
diff --git a/recipes/aeolus_recipe/aeolus_stop_services.pp
b/recipes/aeolus_recipe/aeolus_stop_services.pp
new file mode 100644
index 0000000..b98c11e
--- /dev/null
+++ b/recipes/aeolus_recipe/aeolus_stop_services.pp
@@ -0,0 +1,32 @@
+#--
+# Copyright (C) 2010 Red Hat Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Author: Mohammed Morsi <mmorsi(a)redhat.com>
+#--
+
+#
+# aeolus uninstallation recipe
+#
+
+# Modules used by the recipe
+import "aeolus_recipe/aeolus"
+
+$services = ["aggregator", "core", 'iwhd',
'image-factory']
+
+# stop aeolus services
+dc::service{$services:
+ ensure => 'stopped', enable => false}
diff --git a/recipes/aeolus_recipe/aeolus_uninstall.pp
b/recipes/aeolus_recipe/aeolus_uninstall.pp
new file mode 100644
index 0000000..4ab0bc7
--- /dev/null
+++ b/recipes/aeolus_recipe/aeolus_uninstall.pp
@@ -0,0 +1,32 @@
+#--
+# Copyright (C) 2010 Red Hat Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Author: Mohammed Morsi <mmorsi(a)redhat.com>
+#--
+
+#
+# aeolus uninstallation recipe
+#
+
+# Modules used by the recipe
+import "aeolus_recipe/aeolus"
+
+# disable the various aeolus components
+include aeolus::aggregator::disabled
+include aeolus::core::disabled
+include aeolus::iwhd::disabled
+include aeolus::image-factory::disabled
diff --git a/recipes/aeolus_recipe/files/condor_config.local
b/recipes/aeolus_recipe/files/condor_config.local
new file mode 100644
index 0000000..d9d50c5
--- /dev/null
+++ b/recipes/aeolus_recipe/files/condor_config.local
@@ -0,0 +1,26 @@
+CONDOR_HOST = $(FULL_HOSTNAME)
+ALLOW_WRITE = *
+
+DAEMON_LIST = MASTER, SCHEDD, COLLECTOR, NEGOTIATOR, STARTD
+
+MAX_GRIDMANAGER_LOG = 500000000
+GRIDMANAGER_JOB_PROBE_INTERVAL = 30
+
+GRIDMANAGER_DEBUG = D_FULLDEBUG
+NEGOTIATOR_DEBUG = D_FULLDEBUG
+COLLECTOR_DEBUG = D_FULLDEBUG
+
+DCLOUD_GAHP = $(SBIN)/dcloud_gahp
+
+CLASSAD_LIFETIME = 0
+
+# for re-advertising classads (i.e. condor_refreshd)
+CONDOR_DEVELOPERS_COLLECTOR = localhost:7890
+COLLECTOR_UPDATE_INTERVAL = 900
+
+# for the event log parsing (i.e. dbomatic)
+EVENT_LOG=$(LOG)/EventLog
+EVENT_LOG_USE_XML=True
+EVENT_LOG_JOB_AD_INFORMATION_ATTRS=Owner,GlobalJobId,Cmd,JobStartDate,JobCurrentStartDate,JobFinishedHookDone
+
+CLASSAD_USER_LIBS =
/usr/share/deltacloud-aggregator/classad_plugin/deltacloud_classad_plugin.so
diff --git a/recipes/aeolus_recipe/files/deltacloud-core
b/recipes/aeolus_recipe/files/deltacloud-core
new file mode 100644
index 0000000..3eb0afa
--- /dev/null
+++ b/recipes/aeolus_recipe/files/deltacloud-core
@@ -0,0 +1,76 @@
+#!/bin/bash
+#
+#
+# deltacloud-core startup script for deltacloud-core server
+#
+# chkconfig: - 97 03
+# description: deltacloud-core is primary server process for the \
+# Deltacloud Core component.
+#
+
+[ -r /etc/sysconfig/deltacloud-core ] && . /etc/sysconfig/deltacloud-core
+
+ENV="${ENV:-production}"
+DRIVER="${DRIVER:-ec2}"
+PORT="${PORT:-3002}"
+LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-core }"
+LOGFILE="${LOGFILE:-/var/log/deltacloud-core/$DRIVER.log}"
+
+PROG=/usr/bin/deltacloudd
+
+. /etc/init.d/functions
+
+start() {
+ echo -n "Starting deltacloud-core: "
+
+ $PROG -i $DRIVER -e $ENV -p $PORT >> $LOGFILE 2>&1 &
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+}
+
+stop() {
+ echo -n "Shutting down deltacloud-core: "
+ RETVAL=$?
+ killall deltacloudd
+ if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ reload)
+ ;;
+ force-reload)
+ restart
+ ;;
+ status)
+ status $PROG
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: deltacloud-core {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+exit $RETVAL
diff --git a/recipes/aeolus_recipe/files/imagefactory.yml
b/recipes/aeolus_recipe/files/imagefactory.yml
new file mode 100644
index 0000000..7f3abe7
--- /dev/null
+++ b/recipes/aeolus_recipe/files/imagefactory.yml
@@ -0,0 +1,12 @@
+bg_command: /usr/bin/boxgrinder-build
+bg_working_dir: /boxgrinder/appliances
+bg_local_delivery: /boxgrinder/packaged_builds
+warehouse_active: true # if false Factory will not attempt any warehouse actions at all
+warehouse_host: localhost
+warehouse_port: 9090
+warehouse_bucket: templates
+# Which entity should actually bundle and upload the EC2 AMI
+ami_delivery: boxgrinder # Valid values are boxgrinder or warehouse
+ami_s3_bucket: deltacloud # S3 bucket to use when uploading bundle
+# Note that directory must exist
+mock_dir: /var/tmp/clalance-mock # Directory to use when building mock target
diff --git a/recipes/aeolus_recipe/files/iwhd-conf.js
b/recipes/aeolus_recipe/files/iwhd-conf.js
new file mode 100644
index 0000000..44516e0
--- /dev/null
+++ b/recipes/aeolus_recipe/files/iwhd-conf.js
@@ -0,0 +1,7 @@
+[
+ {
+ "name": "primary",
+ "type": "fs",
+ "path": "."
+ }
+]
diff --git a/recipes/aeolus_recipe/files/iwhd.init
b/recipes/aeolus_recipe/files/iwhd.init
new file mode 100644
index 0000000..4695d73
--- /dev/null
+++ b/recipes/aeolus_recipe/files/iwhd.init
@@ -0,0 +1,76 @@
+#!/bin/bash
+#
+#
+# iwhd startup script for iwhd server
+#
+# chkconfig: - 40 60
+# description: iwhd is primary server process for the \
+# IWHD component.
+#
+
+[ -r /etc/sysconfig/iwhd ] && . /etc/sysconfig/iwhd
+
+LOCKFILE="${LOCKFILE:-/var/lock/subsys/iwhd}"
+
+PROG=/usr/bin/iwhd
+CONF=/etc/iwhd/conf.js
+
+. /etc/init.d/functions
+
+start() {
+ echo -n "Starting iwhd: "
+ # FIXME: we sleep 2 here to make sure that mongod has really come up.
+ # Yes, it's a hack
+ sleep 2
+
+ $PROG -c $CONF >& /var/log/iwhd.log &
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+}
+
+stop() {
+ echo -n "Shutting down iwhd: "
+ RETVAL=$?
+ killall $PROG
+ if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ reload)
+ ;;
+ force-reload)
+ restart
+ ;;
+ status)
+ status $PROG
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: iwhd {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+exit $RETVAL
diff --git a/recipes/aeolus_recipe/files/pg_hba.conf
b/recipes/aeolus_recipe/files/pg_hba.conf
new file mode 100644
index 0000000..70d83bb
--- /dev/null
+++ b/recipes/aeolus_recipe/files/pg_hba.conf
@@ -0,0 +1,2 @@
+local all all trust
+host all all 127.0.0.1 255.255.255.255 trust
diff --git a/recipes/aeolus_recipe/files/qpidd.conf
b/recipes/aeolus_recipe/files/qpidd.conf
new file mode 100644
index 0000000..da050c0
--- /dev/null
+++ b/recipes/aeolus_recipe/files/qpidd.conf
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Configuration file for qpidd. Entries are of the form:
+# name=value
+#
+# (Note: no spaces on either side of '='). Using default settings:
+# "qpidd --help" or "man qpidd" for more details.
+cluster-mechanism=ANONYMOUS
+auth=no
diff --git a/recipes/aeolus_recipe/files/root-boxgrinder-plugins-local
b/recipes/aeolus_recipe/files/root-boxgrinder-plugins-local
new file mode 100644
index 0000000..32ada19
--- /dev/null
+++ b/recipes/aeolus_recipe/files/root-boxgrinder-plugins-local
@@ -0,0 +1,3 @@
+path: /boxgrinder/packaged_builds
+overwrite: false
+package: false
diff --git a/recipes/aeolus_recipe/manifests/aeolus.pp
b/recipes/aeolus_recipe/manifests/aeolus.pp
new file mode 100644
index 0000000..d0f1e60
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/aeolus.pp
@@ -0,0 +1,33 @@
+# Aeolus puppet definitions
+
+import "firewall"
+
+import "postgres"
+import "rails"
+import "selinux"
+import "ntp"
+
+import "aggregator"
+import "core"
+import "iwhd"
+import "image-factory"
+
+# Base aeolus class
+class aeolus {
+ # Setup repos which to pull aeolus components
+ yumrepo{"${name}_arch":
+ name => "${name}_arch",
+ descr => "${name}_arch",
+ baseurl =>
'http://repos.fedorapeople.org/repos/aeolus/packages/fedora-$releasever/$basearch',
+ enabled => 1, gpgcheck => 0}
+ yumrepo{"${name}_noarch":
+ name => "${name}_noarch",
+ descr => "${name}_noarch",
+ baseurl =>
'http://repos.fedorapeople.org/repos/aeolus/packages/fedora-$releasever/noarch',
+ enabled => 1, gpgcheck => 0}
+ yumrepo{"${name}_pulp":
+ name => "${name}_pulp",
+ descr => "${name}_pulp",
+ baseurl =>
'http://repos.fedorapeople.org/repos/pulp/pulp/fedora-13/$basearch/',
+ enabled => 1, gpgcheck => 0}
+}
diff --git a/recipes/aeolus_recipe/manifests/aggregator.pp
b/recipes/aeolus_recipe/manifests/aggregator.pp
new file mode 100644
index 0000000..8e8769f
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/aggregator.pp
@@ -0,0 +1,128 @@
+# Aeolus aggregator puppet definitions
+
+class aeolus::aggregator inherits aeolus {
+ ### Install the aeolus components
+ # specific versions of these two packages are needed and we need to pull the third
in
+ package { 'rubygem-deltacloud-client':
+ provider => 'yum', ensure => 'installed', require
=> Yumrepo['aeolus_arch', 'aeolus_noarch'] }
+
+ package {['deltacloud-aggregator',
+ 'deltacloud-aggregator-daemons',
+ 'deltacloud-aggregator-doc']:
+ provider => 'yum', ensure => 'installed',
+ require => Package['rubygem-deltacloud-client',
+ 'rubygem-deltacloud-image-builder-agent',
+ 'iwhd']}
+
+ ### Setup selinux for aeolus
+ selinux::mode{"permissive":}
+
+ ### Setup firewall for aeolus
+ firewall::rule{"http": destination_port => '80'}
+
+ ### Start the aeolus services
+ file {"/var/lib/condor/condor_config.local":
+ source => "puppet:///modules/aeolus_recipe/condor_config.local",
+ require => Package['deltacloud-aggregator-daemons'] }
+ service { ['condor', 'httpd']:
+ ensure => 'running',
+ enable => true,
+ require => File['/var/lib/condor/condor_config.local'] }
+ service { ['deltacloud-aggregator',
+ 'deltacloud-condor_refreshd',
+ 'deltacloud-dbomatic']:
+ ensure => 'running',
+ enable => true,
+ hasstatus => true,
+ require => [Package['deltacloud-aggregator-daemons'],
+ Rails::Migrate::Db[migrate_aeolus_database],
+ Service[condor]] }
+
+ ### Initialize and start the aeolus database
+ # Right now we configure and start postgres, at some point I want
+ # to make the db that gets setup configurable
+ include postgres::server
+ file { "/var/lib/pgsql/data/pg_hba.conf":
+ source => "puppet:///modules/aeolus_recipe/pg_hba.conf",
+ require => Exec["pginitdb"] }
+ postgres::user{"dcloud":
+ password => "v23zj59an",
+ roles => "CREATEDB",
+ require => Service["postgresql"]}
+
+
+ # Create aeolus database
+ rails::create::db{"create_aeolus_database":
+ cwd => "/usr/share/deltacloud-aggregator",
+ rails_env => "production",
+ require => [Postgres::User[dcloud],
Package['deltacloud-aggregator']]}
+ rails::migrate::db{"migrate_aeolus_database":
+ cwd => "/usr/share/deltacloud-aggregator",
+ rails_env => "production",
+ require => Rails::Create::Db[create_aeolus_database]}
+}
+
+class aeolus::aggregator::disabled {
+ ### Uninstall the aeolus components
+ package {['deltacloud-aggregator-daemons',
+ 'deltacloud-aggregator-doc']:
+ provider => 'yum', ensure => 'absent',
+ require => Service['deltacloud-aggregator',
+ 'deltacloud-condor_refreshd',
+ 'deltacloud-dbomatic',
+ 'imagefactoryd',
+ 'deltacloud-image_builder_service']}
+
+ package {'deltacloud-aggregator':
+ provider => 'yum', ensure => 'absent',
+ require => [Package['deltacloud-aggregator-daemons',
+ 'deltacloud-aggregator-doc'],
+ Rails::Drop::Db["drop_aeolus_database"]] }
+
+ package { 'rubygem-deltacloud-client':
+ provider => 'yum', ensure => 'absent',
+ require => Package['deltacloud-aggregator']}
+
+ ### Stop the deltacloud services
+ service { ['condor', 'httpd']:
+ ensure => 'stopped',
+ enable => false,
+ require => Service['deltacloud-aggregator',
+ 'deltacloud-condor_refreshd',
+ 'deltacloud-dbomatic'] }
+ service { ['deltacloud-aggregator',
+ 'deltacloud-condor_refreshd',
+ 'deltacloud-dbomatic']:
+ ensure => 'stopped',
+ enable => false,
+ hasstatus => true }
+
+ ### Destroy the aeolus database
+ rails::drop::db{"drop_aeolus_database":
+ cwd => "/usr/share/deltacloud-aggregator",
+ rails_env => "production",
+ require => Service["deltacloud-aggregator",
+ "deltacloud-condor_refreshd",
+ "deltacloud-dbomatic",
+ "deltacloud-image_builder_service"]}
+ postgres::user{"dcloud":
+ ensure => 'dropped',
+ require => Rails::Drop::Db["drop_aeolus_database"]}
+}
+
+# Create a new site admin aggregator web user
+define aeolus::site_admin($email="", $password="",
$first_name="", $last_name=""){
+ exec{"create_site_admin_user":
+ cwd => '/usr/share/deltacloud-aggregator',
+ environment => "RAILS_ENV=production",
+ command => "/usr/bin/rake dc:create_user[${name}] email=${email}
password=${password} first_name=${first_name} last_name=${last_name}",
+ unless => "/usr/bin/test `psql dcloud dcloud -P tuples_only -c
\"select count(*) from users where login = '${name}';\"` =
\"1\"",
+ require => Rails::Migrate::Db["migrate_aeolus_database"]}
+ exec{"grant_site_admin_privs":
+ cwd => '/usr/share/deltacloud-aggregator',
+ environment => "RAILS_ENV=production",
+ command => "/usr/bin/rake dc:site_admin[${name}]",
+ unless => "/usr/bin/test `psql dcloud dcloud -P tuples_only -c
\"select count(*) FROM roles INNER JOIN permissions ON (roles.id =
permissions.role_id) INNER JOIN users ON (permissions.user_id = users.id) where roles.name
= 'Administrator' AND users.login = '${name}';\"` =
\"1\"",
+ require => Exec[create_site_admin_user]}
+}
+
diff --git a/recipes/aeolus_recipe/manifests/core.pp
b/recipes/aeolus_recipe/manifests/core.pp
new file mode 100644
index 0000000..62fb784
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/core.pp
@@ -0,0 +1,35 @@
+# Aeolus core puppet definitions
+
+class aeolus::core inherits aeolus {
+ ### Install the aeolus components
+ package { 'rubygem-deltacloud-core':
+ provider => 'yum', ensure => 'installed', require
=> Yumrepo['aeolus_arch', 'aeolus_noarch']}
+ file { "/var/log/deltacloud-core": ensure => 'directory' }
+
+ ### we need to sync time to communicate w/ cloud providers
+ include ntp::client
+
+ ### Start the aeolus services
+ file {"/etc/init.d/deltacloud-core":
+ source => "puppet:///modules/aeolus_recipe/deltacloud-core",
+ mode => 755 }
+ service { 'deltacloud-core':
+ ensure => 'running',
+ enable => true,
+ require => [Package['rubygem-deltacloud-core'],
+ File['/etc/init.d/deltacloud-core']] }
+}
+
+class aeolus::core::disabled {
+ ### Uninstall the aeolus components
+ package { 'rubygem-deltacloud-core':
+ provider => 'yum', ensure => 'absent',
+ require => Service['deltacloud-core']}
+
+ ### Stop the aeolus services
+ service { 'deltacloud-core':
+ ensure => 'stopped',
+ enable => false,
+ hasstatus => true}
+}
+
diff --git a/recipes/aeolus_recipe/manifests/image-factory.pp
b/recipes/aeolus_recipe/manifests/image-factory.pp
new file mode 100644
index 0000000..d3706a0
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/image-factory.pp
@@ -0,0 +1,131 @@
+# Aeolus image factory puppet definitions
+
+class aeolus::image-factory inherits aeolus {
+ # TODO: Fix me, find a better way to do this...
+ # We need to also install this rpm from amazon
+ package{"ec2-ami-tools":
+ provider => "rpm",
+ source =>
"http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.noarch.rpm",
+ ensure => 'installed' }
+
+ package { 'rubygem-deltacloud-image-builder-agent':
+ provider => 'yum', ensure => 'installed',
+ require => [Package['ec2-ami-tools'],
Yumrepo['aeolus_arch', 'aeolus_noarch']]}
+
+
+ ### Configure boxgrinder, this should go into the boxgrinder rpms eventually
+ file { "/boxgrinder": ensure => "directory"}
+ file { "/boxgrinder/appliances":
+ ensure => "directory",
+ require => File["/boxgrinder"]}
+ file { "/boxgrinder/packaged_builders":
+ ensure => "directory",
+ require => File["/boxgrinder"]}
+ file { "/root/.boxgrinder": ensure => "directory"}
+ file { "/root/.boxgrinder/plugins":
+ ensure => "directory",
+ require => File["/root/.boxgrinder"]}
+ file { "/root/.boxgrinder/plugins/local":
+ source =>
"puppet:///modules/aeolus_recipe/root-boxgrinder-plugins-local",
+ mode => 644,
+ require => File["/root/.boxgrinder/plugins"]}
+ notify { 'boxgrinder_configured':
+ message => 'boxgrinder successfully configured',
+ require => File['/root/.boxgrinder/plugins/local',
+ '/boxgrinder/packaged_builders',
+ '/boxgrinder/appliances'] }
+
+ ### Configure pulp to fetch from Fedora
+ # TODO uncomment when factory/warehouse uses pulp
+ #exec{"pulp_fedora_config":
+ # command => "/usr/bin/pulp-admin -u admin -p admin repo create
--id=fedora-repo --feed
yum:http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/...
+ #}
+
+ ### Start the aeolus services
+ file { "/etc/qpidd.conf":
+ source => "puppet:///modules/aeolus_recipe/qpidd.conf",
+ mode => 644 }
+ service {'qpidd':
+ ensure => 'running',
+ enable => true,
+ require => [File['/etc/qpidd.conf'],
+ Package['deltacloud-aggregator-daemons']]}
+ file { "/etc/imagefactory.yml":
+ source =>
"puppet:///modules/aeolus_recipe/imagefactory.yml",
+ mode => 644 }
+ $requires = [Package['rubygem-deltacloud-image-builder-agent'],
+ Package['deltacloud-aggregator-daemons'],
+ File['/etc/imagefactory.yml'],
+ Service[qpidd],
+ Rails::Migrate::Db[migrate_aeolus_database],
+ Notify['boxgrinder_configured']]
+ service { 'imagefactoryd':
+ ensure => 'running',
+ enable => true,
+ require => $requires}
+ service { 'deltacloud-image_builder_service':
+ ensure => 'running',
+ enable => true,
+ hasstatus => true,
+ require => $requires}
+}
+
+class aeolus::image-factory::disabled {
+ ### Stop the aeolus services
+ service {'qpidd':
+ ensure => 'stopped',
+ enable => false,
+ require => Service['imagefactoryd',
'deltacloud-image_builder_service']}
+
+ service { 'imagefactoryd':
+ ensure => 'stopped',
+ enable => false}
+
+ service { 'deltacloud-image_builder_service':
+ ensure => 'stopped',
+ hasstatus => true,
+ enable => false}
+
+
+ ### Uninstall the aeolus components
+ package { 'rubygem-deltacloud-image-builder-agent':
+ provider => 'yum', ensure => 'absent',
+ require => Package['deltacloud-aggregator']}
+
+ # FIXME these lingering dependencies, pulled in for
+ # rubygem-deltacloud-image-builder-agent, need to be removed as
+ # ec2-ami-tools and appliance-tools depend on them and using
+ # 'absent' in the context of the 'yum' provider dispatches
+ # to 'rpm -e' instead of 'yum erase'
+ package { ['rubygem-boxgrinder-build-ec2-platform-plugin',
+ 'rubygem-boxgrinder-build-centos-os-plugin',
+ 'rubygem-boxgrinder-build-fedora-os-plugin']:
+ provider => "yum", ensure => 'absent',
+ require => Package['rubygem-deltacloud-image-builder-agent']}
+ package { 'rubygem-boxgrinder-build-rhel-os-plugin':
+ provider => "yum", ensure => 'absent',
+ require =>
Package['rubygem-boxgrinder-build-centos-os-plugin']}
+ package { 'rubygem-boxgrinder-build-rpm-based-os-plugin':
+ provider => "yum", ensure => 'absent',
+ require => Package['rubygem-boxgrinder-build-rhel-os-plugin',
+ 'rubygem-boxgrinder-build-fedora-os-plugin']}
+
+ package { 'ec2-ami-tools':
+ provider => "yum", ensure => 'absent',
+ require =>
Package['rubygem-boxgrinder-build-ec2-platform-plugin']}
+ package { 'appliance-tools':
+ provider => 'yum', ensure => 'absent',
+ require =>
Package['rubygem-boxgrinder-build-rpm-based-os-plugin']}
+ package { 'livecd-tools':
+ provider => 'yum', ensure => 'absent',
+ require => Package['appliance-tools']}
+ package { 'python-imgcreate':
+ provider => 'yum', ensure => 'absent',
+ require => Package['appliance-tools',
'livecd-tools']}
+
+
+ ### Destroy and cleanup aeolus artifacts
+ exec{"remove_aeolus_templates": command => "/bin/rm -rf
/templates"}
+ exec{"remove_boxgrinder_dir": command => "/bin/rm -rf
/boxgrinder"}
+}
+
diff --git a/recipes/aeolus_recipe/manifests/iwhd.pp
b/recipes/aeolus_recipe/manifests/iwhd.pp
new file mode 100644
index 0000000..1c9ab59
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/iwhd.pp
@@ -0,0 +1,67 @@
+# aeolus iwhd puppet definitions
+
+class aeolus::iwhd inherits aeolus {
+ ### Install the aeolus components
+ package { 'iwhd':
+ provider => 'yum', ensure => 'installed',
+ require => Yumrepo['aeolus_arch', 'aeolus_noarch']
+ }
+
+ ### Start the aeolus services
+ file { "/data": ensure => 'directory' }
+ file { "/data/db": ensure => 'directory' }
+ file { "/etc/iwhd": ensure => 'directory'}
+ file { "/etc/iwhd/conf.js":
+ source => "puppet:///modules/aeolus_recipe/iwhd-conf.js",
+ mode => 755, require => File['/etc/iwhd'] }
+
+ #TODO The service wrapper should probably be in the rpm itself
+ file { "/etc/rc.d/init.d/iwhd":
+ source => "puppet:///modules/aeolus_recipe/iwhd.init",
+ mode => 755 }
+
+ service { 'mongod':
+ ensure => 'running',
+ enable => true,
+ require => [Package['iwhd'], File["/data/db"]]}
+ service { 'iwhd':
+ ensure => 'running',
+ enable => true,
+ hasstatus => true,
+ require => [File['/etc/rc.d/init.d/iwhd', '/etc/iwhd/conf.js'],
+ Package['iwhd'],
+ Service[mongod]]}
+
+ # XXX ugly hack but iwhd might take some time to come up
+ exec{"iwhd_startup_pause":
+ command => "/bin/sleep 2",
+ unless => '/usr/bin/curl
http://localhost:9090';,
+ require => Service[iwhd]}
+}
+
+class aeolus::iwhd::disabled {
+ ### Stop the aeolus services
+ service { 'mongod':
+ ensure => 'stopped',
+ enable => false,
+ require => Service[iwhd]}
+ service { 'iwhd':
+ ensure => 'stopped',
+ enable => false,
+ hasstatus => true}
+
+
+ ### Uninstall the aeolus components
+ package { 'iwhd':
+ provider => 'yum', ensure => 'absent',
+ require => [Package['deltacloud-aggregator'],
Service['iwhd']]}
+}
+
+# Create a named bucket in iwhd
+define aeolus::create_bucket(){
+ package{'curl': ensure => 'installed'}
+ exec{"create-bucket-${name}":
+ command => "/usr/bin/curl -X PUT
http://localhost:9090/templates",
+ require => [Exec['iwhd_startup_pause'], Package[curl]] }
+}
+
diff --git a/recipes/aeolus_recipe/manifests/rails.pp
b/recipes/aeolus_recipe/manifests/rails.pp
new file mode 100644
index 0000000..438a209
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/rails.pp
@@ -0,0 +1,24 @@
+# Some convenience routines for rails
+
+define rails::create::db($cwd="", $rails_env=""){
+ exec{"create_rails_database":
+ cwd => $cwd,
+ environment => "RAILS_ENV=${rails_env}",
+ command => "/usr/bin/rake db:create:all"}
+
+}
+
+define rails::migrate::db($cwd="", $rails_env=""){
+ exec{"migrate_rails_database":
+ cwd => $cwd,
+ environment => "RAILS_ENV=${rails_env}",
+ command => "/usr/bin/rake db:migrate"}
+}
+
+define rails::drop::db($cwd="", $rails_env=""){
+ exec{"drop_rails_database":
+ cwd => $cwd,
+ onlyif => "/usr/bin/test -f ${cwd}/Rakefile",
+ environment => "RAILS_ENV=${rails_env}",
+ command => "/usr/bin/rake db:drop:all"}
+}
diff --git a/recipes/aeolus_recipe/manifests/selinux.pp
b/recipes/aeolus_recipe/manifests/selinux.pp
new file mode 100644
index 0000000..05a3174
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/selinux.pp
@@ -0,0 +1,11 @@
+# Some convenience routines for selinux
+
+define selinux::mode(){
+ $mode = $name ? {
+ 'permissive' => '0',
+ 'enforcing' => '1'
+ }
+ exec{"set_selinux_${name}":
+ command => "/usr/sbin/setenforce ${mode}"
+ }
+}
diff --git a/recipes/deltacloud_recipe/deltacloud_recipe.pp
b/recipes/deltacloud_recipe/deltacloud_recipe.pp
deleted file mode 100644
index c2df651..0000000
--- a/recipes/deltacloud_recipe/deltacloud_recipe.pp
+++ /dev/null
@@ -1,40 +0,0 @@
-#--
-# Copyright (C) 2010 Red Hat Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Mohammed Morsi <mmorsi(a)redhat.com>
-#--
-
-#
-# deltacloud installation recipe
-#
-
-# Modules used by the recipe
-import "deltacloud_recipe/deltacloud"
-
-# include the various deltacloud components
-include deltacloud::aggregator
-include deltacloud::core
-include deltacloud::image-factory
-include deltacloud::iwhd
-
-deltacloud::create_bucket{"deltacloud":}
-
-deltacloud::site_admin{"admin":
- email => 'dcuser(a)deltacloud.org',
- password => 'password',
- first_name => 'deltacloud',
- last_name => 'user'}
diff --git a/recipes/deltacloud_recipe/deltacloud_stop_services.pp
b/recipes/deltacloud_recipe/deltacloud_stop_services.pp
deleted file mode 100644
index 71cb1bf..0000000
--- a/recipes/deltacloud_recipe/deltacloud_stop_services.pp
+++ /dev/null
@@ -1,32 +0,0 @@
-#--
-# Copyright (C) 2010 Red Hat Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Mohammed Morsi <mmorsi(a)redhat.com>
-#--
-
-#
-# deltacloud uninstallation recipe
-#
-
-# Modules used by the recipe
-import "deltacloud_recipe/deltacloud"
-
-$services = ["aggregator", "core", 'iwhd',
'image-factory']
-
-# stop deltacloud services
-dc::service{$services:
- ensure => 'stopped', enable => false}
diff --git a/recipes/deltacloud_recipe/deltacloud_uninstall.pp
b/recipes/deltacloud_recipe/deltacloud_uninstall.pp
deleted file mode 100644
index 013f669..0000000
--- a/recipes/deltacloud_recipe/deltacloud_uninstall.pp
+++ /dev/null
@@ -1,32 +0,0 @@
-#--
-# Copyright (C) 2010 Red Hat Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Mohammed Morsi <mmorsi(a)redhat.com>
-#--
-
-#
-# deltacloud uninstallation recipe
-#
-
-# Modules used by the recipe
-import "deltacloud_recipe/deltacloud"
-
-# disable the various deltacloud components
-include deltacloud::aggregator::disabled
-include deltacloud::core::disabled
-include deltacloud::iwhd::disabled
-include deltacloud::image-factory::disabled
diff --git a/recipes/deltacloud_recipe/files/condor_config.local
b/recipes/deltacloud_recipe/files/condor_config.local
index 9c15b0c..b774645 100644
--- a/recipes/deltacloud_recipe/files/condor_config.local
+++ b/recipes/deltacloud_recipe/files/condor_config.local
@@ -22,5 +22,5 @@ EVENT_LOG=$(LOG)/EventLog
EVENT_LOG_USE_XML=True
EVENT_LOG_JOB_AD_INFORMATION_ATTRS=Owner,GlobalJobId,Cmd,JobStartDate,JobCurrentStartDate,JobFinishedHookDone,DeltacloudProviderId,DeltacloudPublicNetworkAddresses,DeltacloudPrivateNetworkAddresses,DeltacloudAvailableActions,JobStatus
-CLASSAD_USER_LIBS =
/usr/share/deltacloud-aggregator/classad_plugin/deltacloud_classad_plugin.so
+CLASSAD_USER_LIBS =
/usr/share/aeolus-conductor/classad_plugin/conductor_classad_plugin.so
diff --git a/recipes/deltacloud_recipe/files/deltacloud-core
b/recipes/deltacloud_recipe/files/deltacloud-core
deleted file mode 100644
index 3eb0afa..0000000
--- a/recipes/deltacloud_recipe/files/deltacloud-core
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-#
-#
-# deltacloud-core startup script for deltacloud-core server
-#
-# chkconfig: - 97 03
-# description: deltacloud-core is primary server process for the \
-# Deltacloud Core component.
-#
-
-[ -r /etc/sysconfig/deltacloud-core ] && . /etc/sysconfig/deltacloud-core
-
-ENV="${ENV:-production}"
-DRIVER="${DRIVER:-ec2}"
-PORT="${PORT:-3002}"
-LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-core }"
-LOGFILE="${LOGFILE:-/var/log/deltacloud-core/$DRIVER.log}"
-
-PROG=/usr/bin/deltacloudd
-
-. /etc/init.d/functions
-
-start() {
- echo -n "Starting deltacloud-core: "
-
- $PROG -i $DRIVER -e $ENV -p $PORT >> $LOGFILE 2>&1 &
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-
-stop() {
- echo -n "Shutting down deltacloud-core: "
- RETVAL=$?
- killall deltacloudd
- if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- reload)
- ;;
- force-reload)
- restart
- ;;
- status)
- status $PROG
- RETVAL=$?
- ;;
- *)
- echo "Usage: deltacloud-core {start|stop|restart|status}"
- exit 1
- ;;
-esac
-
-exit $RETVAL
diff --git a/recipes/deltacloud_recipe/files/imagefactory.yml
b/recipes/deltacloud_recipe/files/imagefactory.yml
deleted file mode 100644
index 7f3abe7..0000000
--- a/recipes/deltacloud_recipe/files/imagefactory.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-bg_command: /usr/bin/boxgrinder-build
-bg_working_dir: /boxgrinder/appliances
-bg_local_delivery: /boxgrinder/packaged_builds
-warehouse_active: true # if false Factory will not attempt any warehouse actions at all
-warehouse_host: localhost
-warehouse_port: 9090
-warehouse_bucket: templates
-# Which entity should actually bundle and upload the EC2 AMI
-ami_delivery: boxgrinder # Valid values are boxgrinder or warehouse
-ami_s3_bucket: deltacloud # S3 bucket to use when uploading bundle
-# Note that directory must exist
-mock_dir: /var/tmp/clalance-mock # Directory to use when building mock target
diff --git a/recipes/deltacloud_recipe/files/iwhd-conf.js
b/recipes/deltacloud_recipe/files/iwhd-conf.js
deleted file mode 100644
index 44516e0..0000000
--- a/recipes/deltacloud_recipe/files/iwhd-conf.js
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- {
- "name": "primary",
- "type": "fs",
- "path": "."
- }
-]
diff --git a/recipes/deltacloud_recipe/files/iwhd.init
b/recipes/deltacloud_recipe/files/iwhd.init
deleted file mode 100755
index 4695d73..0000000
--- a/recipes/deltacloud_recipe/files/iwhd.init
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-#
-#
-# iwhd startup script for iwhd server
-#
-# chkconfig: - 40 60
-# description: iwhd is primary server process for the \
-# IWHD component.
-#
-
-[ -r /etc/sysconfig/iwhd ] && . /etc/sysconfig/iwhd
-
-LOCKFILE="${LOCKFILE:-/var/lock/subsys/iwhd}"
-
-PROG=/usr/bin/iwhd
-CONF=/etc/iwhd/conf.js
-
-. /etc/init.d/functions
-
-start() {
- echo -n "Starting iwhd: "
- # FIXME: we sleep 2 here to make sure that mongod has really come up.
- # Yes, it's a hack
- sleep 2
-
- $PROG -c $CONF >& /var/log/iwhd.log &
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-
-stop() {
- echo -n "Shutting down iwhd: "
- RETVAL=$?
- killall $PROG
- if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- reload)
- ;;
- force-reload)
- restart
- ;;
- status)
- status $PROG
- RETVAL=$?
- ;;
- *)
- echo "Usage: iwhd {start|stop|restart|status}"
- exit 1
- ;;
-esac
-
-exit $RETVAL
diff --git a/recipes/deltacloud_recipe/files/pg_hba.conf
b/recipes/deltacloud_recipe/files/pg_hba.conf
deleted file mode 100644
index 70d83bb..0000000
--- a/recipes/deltacloud_recipe/files/pg_hba.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-local all all trust
-host all all 127.0.0.1 255.255.255.255 trust
diff --git a/recipes/deltacloud_recipe/files/qpidd.conf
b/recipes/deltacloud_recipe/files/qpidd.conf
deleted file mode 100644
index da050c0..0000000
--- a/recipes/deltacloud_recipe/files/qpidd.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#
http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# Configuration file for qpidd. Entries are of the form:
-# name=value
-#
-# (Note: no spaces on either side of '='). Using default settings:
-# "qpidd --help" or "man qpidd" for more details.
-cluster-mechanism=ANONYMOUS
-auth=no
diff --git a/recipes/deltacloud_recipe/files/root-boxgrinder-plugins-local
b/recipes/deltacloud_recipe/files/root-boxgrinder-plugins-local
deleted file mode 100644
index 32ada19..0000000
--- a/recipes/deltacloud_recipe/files/root-boxgrinder-plugins-local
+++ /dev/null
@@ -1,3 +0,0 @@
-path: /boxgrinder/packaged_builds
-overwrite: false
-package: false
diff --git a/recipes/deltacloud_recipe/manifests/aggregator.pp
b/recipes/deltacloud_recipe/manifests/aggregator.pp
deleted file mode 100644
index 1a4c6cb..0000000
--- a/recipes/deltacloud_recipe/manifests/aggregator.pp
+++ /dev/null
@@ -1,128 +0,0 @@
-# Deltacloud aggregator puppet definitions
-
-class deltacloud::aggregator inherits deltacloud {
- ### Install the deltacloud components
- # specific versions of these two packages are needed and we need to pull the third
in
- package { 'rubygem-deltacloud-client':
- provider => 'yum', ensure => 'installed', require
=> Yumrepo['deltacloud_arch', 'deltacloud_noarch'] }
-
- package {['deltacloud-aggregator',
- 'deltacloud-aggregator-daemons',
- 'deltacloud-aggregator-doc']:
- provider => 'yum', ensure => 'installed',
- require => Package['rubygem-deltacloud-client',
- 'rubygem-deltacloud-image-builder-agent',
- 'iwhd']}
-
- ### Setup selinux for deltacloud
- selinux::mode{"permissive":}
-
- ### Setup firewall for deltacloud
- firewall::rule{"http": destination_port => '80'}
-
- ### Start the deltacloud services
- file {"/var/lib/condor/condor_config.local":
- source =>
"puppet:///modules/deltacloud_recipe/condor_config.local",
- require => Package['deltacloud-aggregator-daemons'] }
- service { ['condor', 'httpd']:
- ensure => 'running',
- enable => true,
- require => File['/var/lib/condor/condor_config.local'] }
- service { ['deltacloud-aggregator',
- 'deltacloud-condor_refreshd',
- 'deltacloud-dbomatic']:
- ensure => 'running',
- enable => true,
- hasstatus => true,
- require => [Package['deltacloud-aggregator-daemons'],
- Rails::Migrate::Db[migrate_deltacloud_database],
- Service[condor]] }
-
- ### Initialize and start the deltacloud database
- # Right now we configure and start postgres, at some point I want
- # to make the db that gets setup configurable
- include postgres::server
- file { "/var/lib/pgsql/data/pg_hba.conf":
- source => "puppet:///modules/deltacloud_recipe/pg_hba.conf",
- require => Exec["pginitdb"] }
- postgres::user{"dcloud":
- password => "v23zj59an",
- roles => "CREATEDB",
- require => Service["postgresql"]}
-
-
- # Create deltacloud database
- rails::create::db{"create_deltacloud_database":
- cwd => "/usr/share/deltacloud-aggregator",
- rails_env => "production",
- require => [Postgres::User[dcloud],
Package['deltacloud-aggregator']]}
- rails::migrate::db{"migrate_deltacloud_database":
- cwd => "/usr/share/deltacloud-aggregator",
- rails_env => "production",
- require => Rails::Create::Db[create_deltacloud_database]}
-}
-
-class deltacloud::aggregator::disabled {
- ### Uninstall the deltacloud components
- package {['deltacloud-aggregator-daemons',
- 'deltacloud-aggregator-doc']:
- provider => 'yum', ensure => 'absent',
- require => Service['deltacloud-aggregator',
- 'deltacloud-condor_refreshd',
- 'deltacloud-dbomatic',
- 'imagefactoryd',
- 'deltacloud-image_builder_service']}
-
- package {'deltacloud-aggregator':
- provider => 'yum', ensure => 'absent',
- require => [Package['deltacloud-aggregator-daemons',
- 'deltacloud-aggregator-doc'],
- Rails::Drop::Db["drop_deltacloud_database"]] }
-
- package { 'rubygem-deltacloud-client':
- provider => 'yum', ensure => 'absent',
- require => Package['deltacloud-aggregator']}
-
- ### Stop the deltacloud services
- service { ['condor', 'httpd']:
- ensure => 'stopped',
- enable => false,
- require => Service['deltacloud-aggregator',
- 'deltacloud-condor_refreshd',
- 'deltacloud-dbomatic'] }
- service { ['deltacloud-aggregator',
- 'deltacloud-condor_refreshd',
- 'deltacloud-dbomatic']:
- ensure => 'stopped',
- enable => false,
- hasstatus => true }
-
- ### Destroy the deltacloud database
- rails::drop::db{"drop_deltacloud_database":
- cwd => "/usr/share/deltacloud-aggregator",
- rails_env => "production",
- require => Service["deltacloud-aggregator",
- "deltacloud-condor_refreshd",
- "deltacloud-dbomatic",
- "deltacloud-image_builder_service"]}
- postgres::user{"dcloud":
- ensure => 'dropped',
- require => Rails::Drop::Db["drop_deltacloud_database"]}
-}
-
-# Create a new site admin aggregator web user
-define deltacloud::site_admin($email="", $password="",
$first_name="", $last_name=""){
- exec{"create_site_admin_user":
- cwd => '/usr/share/deltacloud-aggregator',
- environment => "RAILS_ENV=production",
- command => "/usr/bin/rake dc:create_user[${name}] email=${email}
password=${password} first_name=${first_name} last_name=${last_name}",
- unless => "/usr/bin/test `psql dcloud dcloud -P tuples_only -c
\"select count(*) from users where login = '${name}';\"` =
\"1\"",
- require => Rails::Migrate::Db["migrate_deltacloud_database"]}
- exec{"grant_site_admin_privs":
- cwd => '/usr/share/deltacloud-aggregator',
- environment => "RAILS_ENV=production",
- command => "/usr/bin/rake dc:site_admin[${name}]",
- unless => "/usr/bin/test `psql dcloud dcloud -P tuples_only -c
\"select count(*) FROM roles INNER JOIN permissions ON (roles.id =
permissions.role_id) INNER JOIN users ON (permissions.user_id = users.id) where roles.name
= 'Administrator' AND users.login = '${name}';\"` =
\"1\"",
- require => Exec[create_site_admin_user]}
-}
-
diff --git a/recipes/deltacloud_recipe/manifests/core.pp
b/recipes/deltacloud_recipe/manifests/core.pp
deleted file mode 100644
index 443268d..0000000
--- a/recipes/deltacloud_recipe/manifests/core.pp
+++ /dev/null
@@ -1,35 +0,0 @@
-# Deltacloud core puppet definitions
-
-class deltacloud::core inherits deltacloud {
- ### Install the deltacloud components
- package { 'rubygem-deltacloud-core':
- provider => 'yum', ensure => 'installed', require
=> Yumrepo['deltacloud_arch', 'deltacloud_noarch']}
- file { "/var/log/deltacloud-core": ensure => 'directory' }
-
- ### we need to sync time to communicate w/ cloud providers
- include ntp::client
-
- ### Start the deltacloud services
- file {"/etc/init.d/deltacloud-core":
- source => "puppet:///modules/deltacloud_recipe/deltacloud-core",
- mode => 755 }
- service { 'deltacloud-core':
- ensure => 'running',
- enable => true,
- require => [Package['rubygem-deltacloud-core'],
- File['/etc/init.d/deltacloud-core']] }
-}
-
-class deltacloud::core::disabled {
- ### Uninstall the deltacloud components
- package { 'rubygem-deltacloud-core':
- provider => 'yum', ensure => 'absent',
- require => Service['deltacloud-core']}
-
- ### Stop the deltacloud services
- service { 'deltacloud-core':
- ensure => 'stopped',
- enable => false,
- hasstatus => true}
-}
-
diff --git a/recipes/deltacloud_recipe/manifests/deltacloud.pp
b/recipes/deltacloud_recipe/manifests/deltacloud.pp
deleted file mode 100644
index 1362f62..0000000
--- a/recipes/deltacloud_recipe/manifests/deltacloud.pp
+++ /dev/null
@@ -1,33 +0,0 @@
-# Deltacloud puppet definitions
-
-import "firewall"
-
-import "postgres"
-import "rails"
-import "selinux"
-import "ntp"
-
-import "aggregator"
-import "core"
-import "iwhd"
-import "image-factory"
-
-# Base deltacloud class
-class deltacloud {
- # Setup repos which to pull deltacloud components
- yumrepo{"${name}_arch":
- name => "${name}_arch",
- descr => "${name}_arch",
- baseurl =>
'http://repos.fedorapeople.org/repos/aeolus/packages/fedora-$releasever/$basearch',
- enabled => 1, gpgcheck => 0}
- yumrepo{"${name}_noarch":
- name => "${name}_noarch",
- descr => "${name}_noarch",
- baseurl =>
'http://repos.fedorapeople.org/repos/aeolus/packages/fedora-$releasever/noarch',
- enabled => 1, gpgcheck => 0}
- yumrepo{"${name}_pulp":
- name => "${name}_pulp",
- descr => "${name}_pulp",
- baseurl =>
'http://repos.fedorapeople.org/repos/pulp/pulp/fedora-13/$basearch/',
- enabled => 1, gpgcheck => 0}
-}
diff --git a/recipes/deltacloud_recipe/manifests/image-factory.pp
b/recipes/deltacloud_recipe/manifests/image-factory.pp
deleted file mode 100644
index 036c0e7..0000000
--- a/recipes/deltacloud_recipe/manifests/image-factory.pp
+++ /dev/null
@@ -1,131 +0,0 @@
-# Deltacloud image factory puppet definitions
-
-class deltacloud::image-factory inherits deltacloud {
- # TODO: Fix me, find a better way to do this...
- # We need to also install this rpm from amazon
- package{"ec2-ami-tools":
- provider => "rpm",
- source =>
"http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.noarch.rpm",
- ensure => 'installed' }
-
- package { 'rubygem-deltacloud-image-builder-agent':
- provider => 'yum', ensure => 'installed',
- require => [Package['ec2-ami-tools'],
Yumrepo['deltacloud_arch', 'deltacloud_noarch']]}
-
-
- ### Configure boxgrinder, this should go into the boxgrinder rpms eventually
- file { "/boxgrinder": ensure => "directory"}
- file { "/boxgrinder/appliances":
- ensure => "directory",
- require => File["/boxgrinder"]}
- file { "/boxgrinder/packaged_builders":
- ensure => "directory",
- require => File["/boxgrinder"]}
- file { "/root/.boxgrinder": ensure => "directory"}
- file { "/root/.boxgrinder/plugins":
- ensure => "directory",
- require => File["/root/.boxgrinder"]}
- file { "/root/.boxgrinder/plugins/local":
- source =>
"puppet:///modules/deltacloud_recipe/root-boxgrinder-plugins-local",
- mode => 644,
- require => File["/root/.boxgrinder/plugins"]}
- notify { 'boxgrinder_configured':
- message => 'boxgrinder successfully configured',
- require => File['/root/.boxgrinder/plugins/local',
- '/boxgrinder/packaged_builders',
- '/boxgrinder/appliances'] }
-
- ### Configure pulp to fetch from Fedora
- # TODO uncomment when factory/warehouse uses pulp
- #exec{"pulp_fedora_config":
- # command => "/usr/bin/pulp-admin -u admin -p admin repo create
--id=fedora-repo --feed
yum:http://download.fedora.redhat.com/pub/fedora/linux/updates/13/x86_64/...
- #}
-
- ### Start the deltacloud services
- file { "/etc/qpidd.conf":
- source => "puppet:///modules/deltacloud_recipe/qpidd.conf",
- mode => 644 }
- service {'qpidd':
- ensure => 'running',
- enable => true,
- require => [File['/etc/qpidd.conf'],
- Package['deltacloud-aggregator-daemons']]}
- file { "/etc/imagefactory.yml":
- source =>
"puppet:///modules/deltacloud_recipe/imagefactory.yml",
- mode => 644 }
- $requires = [Package['rubygem-deltacloud-image-builder-agent'],
- Package['deltacloud-aggregator-daemons'],
- File['/etc/imagefactory.yml'],
- Service[qpidd],
- Rails::Migrate::Db[migrate_deltacloud_database],
- Notify['boxgrinder_configured']]
- service { 'imagefactoryd':
- ensure => 'running',
- enable => true,
- require => $requires}
- service { 'deltacloud-image_builder_service':
- ensure => 'running',
- enable => true,
- hasstatus => true,
- require => $requires}
-}
-
-class deltacloud::image-factory::disabled {
- ### Stop the deltacloud services
- service {'qpidd':
- ensure => 'stopped',
- enable => false,
- require => Service['imagefactoryd',
'deltacloud-image_builder_service']}
-
- service { 'imagefactoryd':
- ensure => 'stopped',
- enable => false}
-
- service { 'deltacloud-image_builder_service':
- ensure => 'stopped',
- hasstatus => true,
- enable => false}
-
-
- ### Uninstall the deltacloud components
- package { 'rubygem-deltacloud-image-builder-agent':
- provider => 'yum', ensure => 'absent',
- require => Package['deltacloud-aggregator']}
-
- # FIXME these lingering dependencies, pulled in for
- # rubygem-deltacloud-image-builder-agent, need to be removed as
- # ec2-ami-tools and appliance-tools depend on them and using
- # 'absent' in the context of the 'yum' provider dispatches
- # to 'rpm -e' instead of 'yum erase'
- package { ['rubygem-boxgrinder-build-ec2-platform-plugin',
- 'rubygem-boxgrinder-build-centos-os-plugin',
- 'rubygem-boxgrinder-build-fedora-os-plugin']:
- provider => "yum", ensure => 'absent',
- require => Package['rubygem-deltacloud-image-builder-agent']}
- package { 'rubygem-boxgrinder-build-rhel-os-plugin':
- provider => "yum", ensure => 'absent',
- require =>
Package['rubygem-boxgrinder-build-centos-os-plugin']}
- package { 'rubygem-boxgrinder-build-rpm-based-os-plugin':
- provider => "yum", ensure => 'absent',
- require => Package['rubygem-boxgrinder-build-rhel-os-plugin',
- 'rubygem-boxgrinder-build-fedora-os-plugin']}
-
- package { 'ec2-ami-tools':
- provider => "yum", ensure => 'absent',
- require =>
Package['rubygem-boxgrinder-build-ec2-platform-plugin']}
- package { 'appliance-tools':
- provider => 'yum', ensure => 'absent',
- require =>
Package['rubygem-boxgrinder-build-rpm-based-os-plugin']}
- package { 'livecd-tools':
- provider => 'yum', ensure => 'absent',
- require => Package['appliance-tools']}
- package { 'python-imgcreate':
- provider => 'yum', ensure => 'absent',
- require => Package['appliance-tools',
'livecd-tools']}
-
-
- ### Destroy and cleanup deltacloud artifacts
- exec{"remove_deltacloud_templates": command => "/bin/rm -rf
/templates"}
- exec{"remove_boxgrinder_dir": command => "/bin/rm -rf
/boxgrinder"}
-}
-
diff --git a/recipes/deltacloud_recipe/manifests/iwhd.pp
b/recipes/deltacloud_recipe/manifests/iwhd.pp
deleted file mode 100644
index ed5bd7a..0000000
--- a/recipes/deltacloud_recipe/manifests/iwhd.pp
+++ /dev/null
@@ -1,67 +0,0 @@
-# Deltacloud iwhd puppet definitions
-
-class deltacloud::iwhd inherits deltacloud {
- ### Install the deltacloud components
- package { 'iwhd':
- provider => 'yum', ensure => 'installed',
- require => Yumrepo['deltacloud_arch',
'deltacloud_noarch']
- }
-
- ### Start the deltacloud services
- file { "/data": ensure => 'directory' }
- file { "/data/db": ensure => 'directory' }
- file { "/etc/iwhd": ensure => 'directory'}
- file { "/etc/iwhd/conf.js":
- source => "puppet:///modules/deltacloud_recipe/iwhd-conf.js",
- mode => 755, require => File['/etc/iwhd'] }
-
- #TODO The service wrapper should probably be in the rpm itself
- file { "/etc/rc.d/init.d/iwhd":
- source => "puppet:///modules/deltacloud_recipe/iwhd.init",
- mode => 755 }
-
- service { 'mongod':
- ensure => 'running',
- enable => true,
- require => [Package['iwhd'], File["/data/db"]]}
- service { 'iwhd':
- ensure => 'running',
- enable => true,
- hasstatus => true,
- require => [File['/etc/rc.d/init.d/iwhd', '/etc/iwhd/conf.js'],
- Package['iwhd'],
- Service[mongod]]}
-
- # XXX ugly hack but iwhd might take some time to come up
- exec{"iwhd_startup_pause":
- command => "/bin/sleep 2",
- unless => '/usr/bin/curl
http://localhost:9090';,
- require => Service[iwhd]}
-}
-
-class deltacloud::iwhd::disabled {
- ### Stop the deltacloud services
- service { 'mongod':
- ensure => 'stopped',
- enable => false,
- require => Service[iwhd]}
- service { 'iwhd':
- ensure => 'stopped',
- enable => false,
- hasstatus => true}
-
-
- ### Uninstall the deltacloud components
- package { 'iwhd':
- provider => 'yum', ensure => 'absent',
- require => [Package['deltacloud-aggregator'],
Service['iwhd']]}
-}
-
-# Create a named bucket in iwhd
-define deltacloud::create_bucket(){
- package{'curl': ensure => 'installed'}
- exec{"create-bucket-${name}":
- command => "/usr/bin/curl -X PUT
http://localhost:9090/templates",
- require => [Exec['iwhd_startup_pause'], Package[curl]] }
-}
-
diff --git a/recipes/deltacloud_recipe/manifests/rails.pp
b/recipes/deltacloud_recipe/manifests/rails.pp
deleted file mode 100644
index 438a209..0000000
--- a/recipes/deltacloud_recipe/manifests/rails.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-# Some convenience routines for rails
-
-define rails::create::db($cwd="", $rails_env=""){
- exec{"create_rails_database":
- cwd => $cwd,
- environment => "RAILS_ENV=${rails_env}",
- command => "/usr/bin/rake db:create:all"}
-
-}
-
-define rails::migrate::db($cwd="", $rails_env=""){
- exec{"migrate_rails_database":
- cwd => $cwd,
- environment => "RAILS_ENV=${rails_env}",
- command => "/usr/bin/rake db:migrate"}
-}
-
-define rails::drop::db($cwd="", $rails_env=""){
- exec{"drop_rails_database":
- cwd => $cwd,
- onlyif => "/usr/bin/test -f ${cwd}/Rakefile",
- environment => "RAILS_ENV=${rails_env}",
- command => "/usr/bin/rake db:drop:all"}
-}
diff --git a/recipes/deltacloud_recipe/manifests/selinux.pp
b/recipes/deltacloud_recipe/manifests/selinux.pp
deleted file mode 100644
index 05a3174..0000000
--- a/recipes/deltacloud_recipe/manifests/selinux.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-# Some convenience routines for selinux
-
-define selinux::mode(){
- $mode = $name ? {
- 'permissive' => '0',
- 'enforcing' => '1'
- }
- exec{"set_selinux_${name}":
- command => "/usr/sbin/setenforce ${mode}"
- }
-}
--
1.7.3.5