---
 bin/dc-install                                    |    2 +-
 bin/dc-services                                   |    2 +-
 bin/dc-uninstall                                  |    2 +-
 contrib/deltacloud_recipe.spec                    |    5 ---
 recipes/deltacloud_recipe/manifests/deltacloud.pp |   19 +++++-----
 recipes/deltacloud_recipe/manifests/postgres.pp   |   38 ---------------------
 recipes/deltacloud_recipe/manifests/time.pp       |    8 ----
 7 files changed, 12 insertions(+), 64 deletions(-)
 delete mode 100644 recipes/deltacloud_recipe/manifests/postgres.pp
 delete mode 100644 recipes/deltacloud_recipe/manifests/time.pp

diff --git a/bin/dc-install b/bin/dc-install
index efa1f5a..8583232 100755
--- a/bin/dc-install
+++ b/bin/dc-install
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 puppet /usr/share/deltacloud-recipe/deltacloud_recipe.pp \
-       
--modulepath=/usr/share/deltacloud-recipe/modules/:/usr/share/ace/modules/
+       --modulepath=/usr/share/deltacloud-recipe/modules/
diff --git a/bin/dc-services b/bin/dc-services
index 415ba7b..0612c33 100755
--- a/bin/dc-services
+++ b/bin/dc-services
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 puppet /usr/share/deltacloud-recipe/deltacloud_stop_services.pp \
-       
--modulepath=/usr/share/deltacloud-recipe/modules/:/usr/share/ace/modules/
+       --modulepath=/usr/share/deltacloud-recipe/modules/
diff --git a/bin/dc-uninstall b/bin/dc-uninstall
index 7cf4c69..02a99de 100755
--- a/bin/dc-uninstall
+++ b/bin/dc-uninstall
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 puppet /usr/share/deltacloud-recipe/deltacloud_uninstall.pp \
-       
--modulepath=/usr/share/deltacloud-recipe/modules/:/usr/share/ace/modules/
+       --modulepath=/usr/share/deltacloud-recipe/modules/
diff --git a/contrib/deltacloud_recipe.spec b/contrib/deltacloud_recipe.spec
index 882013a..a598101 100644
--- a/contrib/deltacloud_recipe.spec
+++ b/contrib/deltacloud_recipe.spec
@@ -14,11 +14,6 @@ BuildRoot:  %{_tmppath}/%{name}-%{version}
 BuildArch:  noarch
 Requires:   ruby
 
-# We only leverage the firewall module from this,
-# not worth the overhead of pulling this in, so
-# we should implmenet our own
-Requires:   ace
-
 # To send a request to iwhd rest interface to
 # create buckets, eventually replace w/ an
 # iwhd client
diff --git a/recipes/deltacloud_recipe/manifests/deltacloud.pp 
b/recipes/deltacloud_recipe/manifests/deltacloud.pp
index 0924075..39563ec 100644
--- a/recipes/deltacloud_recipe/manifests/deltacloud.pp
+++ b/recipes/deltacloud_recipe/manifests/deltacloud.pp
@@ -1,11 +1,10 @@
 # Deltacloud puppet definitions
 
 import "firewall"
-
 import "postgres"
 import "rails"
 import "selinux"
-import "time"
+import "ntp"
 
 # Setup repos which to pull deltacloud components
 define dc::repos(){
@@ -147,8 +146,7 @@ define dc::selinux(){
 
 # Setup firewall for deltacloud
 define dc::firewall(){
-  firewall::setup{'deltacloud': status=>"enabled"}
-  firewall_open_port{"httpd":   port => "80", policy => "tcp"}
+  firewall::rule{"http": destination_port => '80'}
 }
 
 # TODO disable selinux until we're sure everything works w/ it enabled
@@ -176,7 +174,7 @@ define dc::service::start(){
     }
 
     'core':  {
-      time::sync{"deltacloud":} # we need to sync time to communicate w/ cloud 
providers
+      include ntp::client # we need to sync time to communicate w/ cloud 
providers
       file {"/etc/init.d/deltacloud-core":
             source => "puppet:///deltacloud_recipe/deltacloud-core",
             mode   => 755 }
@@ -327,13 +325,12 @@ define dc::db(){
   # to make the db that gets setup configurable
   file { "/var/lib/pgsql/data/pg_hba.conf":
            source => "puppet:///deltacloud_recipe/pg_hba.conf",
-           require => Postgres::Initialize[init_db] }
-  postgres::initialize{'init_db':}
-  postgres::start{'start_db': require => 
File["/var/lib/pgsql/data/pg_hba.conf"]}
+           require => Exec["pginitdb"] }
+  include postgres::server
   postgres::user{"dcloud":
                    password => "v23zj59an",
                    roles    => "CREATEDB",
-                   require  => Postgres::Start[start_db]}
+                   require  => Service["postgresql"]}
 
 
   # Create deltacloud database
@@ -356,7 +353,9 @@ define dc::db::destroy(){
                                     "deltacloud-condor_refreshd",
                                     "deltacloud-dbomatic",
                                     "deltacloud-image_builder_service"]}
-  postgres::user::remove{"dcloud": require => 
Rails::Drop::Db["drop_deltacloud_database"]}
+  postgres::user{"dcloud":
+                  ensure => 'dropped',
+                  require => Rails::Drop::Db["drop_deltacloud_database"]}
 }
 
 # Create a new site admin aggregator web user
diff --git a/recipes/deltacloud_recipe/manifests/postgres.pp 
b/recipes/deltacloud_recipe/manifests/postgres.pp
deleted file mode 100644
index 6a639b4..0000000
--- a/recipes/deltacloud_recipe/manifests/postgres.pp
+++ /dev/null
@@ -1,38 +0,0 @@
-# Some convenience routines for postgres
-
-package { ["postgresql", "postgresql-server"]:
-            ensure => "installed", provider => "yum" }
-
-define postgres::initialize(){
-  exec{"initialize_postgres":
-         command => "/sbin/service postgresql initdb",
-         unless => "/usr/bin/test -d /var/lib/pgsql/data/pg_log",
-         require => Package["postgresql-server"]}
-}
-
-define postgres::start{
-  service {"postgresql" :
-         ensure  => running,
-         enable  => true,
-         require => Exec['initialize_postgres']}
-  # XXX ugly hack, postgres takes sometime to startup even though reporting as 
running
-  # need to pause for a bit to ensure it is running before we try to access 
the db
-  exec{"postgresql_startup_pause":
-              command => "/bin/sleep 2",
-              require => Service[postgresql]
-  }
-}
-
-define postgres::user($password="", $roles=""){
-  exec{"create_dcloud_postgres_user":
-         unless  => "/usr/bin/test `psql postgres postgres -P tuples_only -c 
\"select count(*) from pg_user where usename='${name}';\"` = \"1\"",
-         command => "/usr/bin/psql postgres postgres -c \
-                     \"CREATE USER ${name} WITH PASSWORD '${password}' 
${roles}\""}
-}
-
-define postgres::user::remove($password="", $roles=""){
-  exec{"remove_dcloud_postgres_user":
-         onlyif  => "/usr/bin/test `psql postgres postgres -P tuples_only -c 
\"select count(*) from pg_user where usename='${name}';\"` = \"1\"",
-         command => "/usr/bin/psql postgres postgres -c \
-                     \"DROP USER ${name}\""}
-}
diff --git a/recipes/deltacloud_recipe/manifests/time.pp 
b/recipes/deltacloud_recipe/manifests/time.pp
deleted file mode 100644
index c3db854..0000000
--- a/recipes/deltacloud_recipe/manifests/time.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-# Some convenience routines for system time manipulation
-
-# Sync system time via ntp
-define time::sync(){
-  exec{"sync_time":
-    command  => "/usr/sbin/ntpdate pool.ntp.org"
-  }
-}
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to