You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ch...@apache.org on 2012/07/30 15:06:57 UTC

git commit: Added storage configuration to the devcloud puppet module.

Updated Branches:
  refs/heads/master 11c839ab1 -> 90de18138


Added storage configuration to the devcloud puppet module.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/90de1813
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/90de1813
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/90de1813

Branch: refs/heads/master
Commit: 90de18138df2a677df4f7f1d1e2158e1d35309f0
Parents: 11c839a
Author: chip.childers@gmail.com <ch...@gmail.com>
Authored: Mon Jul 30 09:00:55 2012 -0400
Committer: chip.childers@gmail.com <ch...@gmail.com>
Committed: Mon Jul 30 09:06:45 2012 -0400

----------------------------------------------------------------------
 .../devcloudbox/puppet-devcloud/files/exports      |    1 +
 .../devcloudbox/puppet-devcloud/manifests/init.pp  |   87 +++++++++++++++
 2 files changed, 88 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/90de1813/tools/devcloud/devcloudbox/puppet-devcloud/files/exports
----------------------------------------------------------------------
diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/files/exports b/tools/devcloud/devcloudbox/puppet-devcloud/files/exports
new file mode 100644
index 0000000..55fdcfe
--- /dev/null
+++ b/tools/devcloud/devcloudbox/puppet-devcloud/files/exports
@@ -0,0 +1 @@
+/opt/storage/secondary *(rw,no_subtree_check,no_root_squash,fsid=0)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/90de1813/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp
----------------------------------------------------------------------
diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp b/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp
index b5d75b1..9e1024d 100644
--- a/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp
+++ b/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp
@@ -29,4 +29,91 @@ class puppet-devcloud {
     cwd       => '/',
   }
 
+  package { 'nfs-server':
+    ensure => latest,
+  }
+
+  file { '/opt/storage/secondary':
+    ensure => 'directory',
+    group  => '0',
+    mode   => '755',
+    owner  => '0',
+    type   => 'directory',
+  }
+
+  file { '/opt/storage/secondary/template/tmpl/1/1':
+    ensure => 'directory',
+    group  => '0',
+    mode   => '755',
+    owner  => '0',
+    type   => 'directory',
+  }
+
+  file { '/opt/storage/secondary/template/tmpl/1/5':
+    ensure => 'directory',
+    group  => '0',
+    mode   => '755',
+    owner  => '0',
+    type   => 'directory',
+  }
+
+  file { '/etc/exports':
+    require => Package['nfs-server'],
+    ensure  => 'file',
+    source  => 'puppet:///modules/puppet-devcloud/exports',
+    mode    => '644',
+    owner   => '0',
+    group   => '0',
+  }
+
+  service { 'nfs-kernel-server':
+    requires => Package['nfs-server'],
+    ensure => 'running',
+    enable => 'true',
+  }
+
+  exec { "wget-default-template-1-vhd":
+    command => "/usr/bin/wget --output-document=/opt/storage/secondary/template/tmpl/1/1/dc68eb4c-228c-4a78-84fa-b80ae178fbfd.vhd http://download.cloud.com/templates/devcloud/defaulttemplates/1/dc68eb4c-228c-4a78-84fa-b80ae178fbfd.vhd",
+    creates => "/opt/storage/secondary/template/tmpl/1/1/dc68eb4c-228c-4a78-84fa-b80ae178fbfd.vhd",
+    requires => File['/opt/storage/secondary/template/tmpl/1/1'],
+    cwd     => '/',
+  }
+
+  exec { "wget-default-template-1-props":
+    command => "/usr/bin/wget --output-document=/opt/storage/secondary/template/tmpl/1/1/template.properties http://download.cloud.com/templates/devcloud/defaulttemplates/1/template.properties",
+    creates => "/opt/storage/secondary/template/tmpl/1/1/template.properties",
+    requires => File['/opt/storage/secondary/template/tmpl/1/1'],
+    cwd     => '/',
+  }
+
+  exec { "wget-default-template-5-vhd":
+    command => "/usr/bin/wget --output-document=/opt/storage/secondary/template/tmpl/1/5/ce5b212e-215a-3461-94fb-814a635b2215.vhd http://download.cloud.com/templates/devcloud/defaulttemplates/5/ce5b212e-215a-3461-94fb-814a635b2215.vhd",
+    creates => "/opt/storage/secondary/template/tmpl/1/5/ce5b212e-215a-3461-94fb-814a635b2215.vhd",
+    requires => File['/opt/storage/secondary/template/tmpl/1/5'],
+    cwd     => '/',
+  }
+
+  exec { "wget-default-template-5-props":
+    command => "/usr/bin/wget --output-document=/opt/storage/secondary/template/tmpl/1/5/template.properties http://download.cloud.com/templates/devcloud/defaulttemplates/5/template.properties",
+    creates => "/opt/storage/secondary/template/tmpl/1/5/template.properties",
+    requires => File['/opt/storage/secondary/template/tmpl/1/5'],
+    cwd     => '/',
+  }
+
+  file { '/opt/storage/primary':
+    ensure => 'directory',
+    group  => '0',
+    mode   => '755',
+    owner  => '0',
+    type   => 'directory',
+  }
+
+  exec { "configlocal":
+    requires => File['/opt/storage/primary'],
+    unless  => 'xe sr-list | grep local-storage',
+    command => "hostuuid=`xe host-list |grep uuid|awk '{print $5}'`; xe sr-create host-uuid=$hostuuid name-label=local-storage shared=false type=file device-config:location=/opt/storage/primary",
+    cwd     => '/',
+  }
+
+
 }