Browse Source

Update plugin to solve problem relative to TestVM image when we get multiple controllers

Change-Id: I9549b9391ccb1f0d49fced0e881646b732473e57
Lnic 3 years ago
parent
commit
82f2f4b5fa

+ 4
- 1
README.md View File

@@ -61,7 +61,7 @@ Glance-nfs plugin installation
61 61
 
62 62
 7.  Verify that the plugin is installed correctly:
63 63
    ``fuel plugins --list``
64
-   
64
+
65 65
 8. Plugin is ready to use and can be enabled on the Settings tab of the Fuel web UI.
66 66
 
67 67
 User Guide
@@ -113,4 +113,7 @@ Release Notes
113 113
 
114 114
 * Update plugin to Fuel 7.0 release
115 115
 
116
+**3.0.1**
117
+
118
+* Update to solve problem with TestVM image on multi controller deployment
116 119
 

+ 4
- 0
deployment_scripts/puppet/delete.pp View File

@@ -0,0 +1,4 @@
1
+  # have to find a better way to do this, if we can execute plugin before upload_cirros task we don't need this anymore
2
+  exec{ "image-delete":
3
+  command       => "/bin/bash -c 'source /root/openrc && /usr/bin/glance image-delete TestVM'",
4
+  }

+ 10
- 19
deployment_scripts/puppet/modules/glance_nfs/manifests/init.pp View File

@@ -3,13 +3,7 @@ $nfs_volume_for_glance,
3 3
 $nfs_mount_point_glance,
4 4
 ){
5 5
   include glance_nfs::params
6
-  
7
-  # have to find a better way to do this, if we can execute plugin before upload_cirros task we don't need this anymore 
8
-  exec{ "image-delete":
9
-  command		=> "/bin/bash -c 'source /root/openrc && /usr/bin/glance image-delete TestVM | exit 0'",
10
-  before 		=> Package["$glance_nfs::params::package_name"],
11
-  }
12
-  
6
+
13 7
   # Install package and start services
14 8
   package { $glance_nfs::params::package_name:
15 9
     ensure => present,
@@ -17,6 +11,7 @@ $nfs_mount_point_glance,
17 11
 
18 12
   package { $glance_nfs::params::required_packages:
19 13
     ensure => present,
14
+    before => Mount["$nfs_mount_point_glance"],
20 15
   }
21 16
 
22 17
   service { $glance_nfs::params::service_name:
@@ -32,21 +27,21 @@ $nfs_mount_point_glance,
32 27
   glance_api_config {
33 28
     'glance_store/default_store':  value => 'file';
34 29
     'glance_store/filesystem_store_datadir': value => "${nfs_mount_point_glance}/images";
35
-	'glance_store/stores': value => 'file';
30
+    'glance_store/stores': value => 'file';
36 31
   }~> Service["$::glance_nfs::params::service_name"]
37
-  
32
+
38 33
   glance_cache_config {
39 34
     'DEFAULT/filesystem_store_datadir': value => $nfs_mount_point_glance;
40 35
   }~> Service["$::glance_nfs::params::service_name"]
41 36
 
42 37
   # Create Mount Point
43 38
   exec{ "/bin/mkdir -p $nfs_mount_point_glance":
44
-	unless => "/usr/bin/test -d $nfs_mount_point_glance",
45
-	before => Mount["$nfs_mount_point_glance"],
39
+    unless => "/usr/bin/test -d $nfs_mount_point_glance",
40
+    before => Mount["$nfs_mount_point_glance"],
46 41
   }
47
-  
48
-  
49
-  # Mount NFS Share 
42
+
43
+
44
+  # Mount NFS Share
50 45
   mount { "$nfs_mount_point_glance":
51 46
      atboot  => true,
52 47
      ensure  => mounted,
@@ -62,7 +57,7 @@ $nfs_mount_point_glance,
62 57
   exec{ "/bin/chmod 775 $nfs_mount_point_glance":
63 58
   require => Mount["$nfs_mount_point_glance"],
64 59
   }
65
-  
60
+
66 61
   exec{ "/bin/mkdir -p ${$nfs_mount_point_glance}/images":
67 62
   unless => "/usr/bin/test -d ${$nfs_mount_point_glance}/images",
68 63
   require => Mount["$nfs_mount_point_glance"],
@@ -75,8 +70,4 @@ $nfs_mount_point_glance,
75 70
   notify => Service["$::glance_nfs::params::service_name"],
76 71
   }
77 72
 
78
-  exec{ "/usr/bin/ruby /etc/puppet/modules/osnailyfacter/modular/astute/upload_cirros.rb":
79
-  require => Exec["/bin/chmod 775 ${$nfs_mount_point_glance}/images"],
80
-  }
81
-
82 73
 }

+ 2
- 2
deployment_scripts/puppet/site.pp View File

@@ -1,5 +1,5 @@
1 1
 $fuel_settings = parseyaml(file('/etc/astute.yaml'))
2 2
 class { 'glance_nfs':
3
-    nfs_volume_for_glance          		=> $fuel_settings['glance_nfs']['nfs_volume_for_glance'],
4
-    nfs_mount_point_glance          	=> $fuel_settings['glance_nfs']['nfs_mount_point_glance'],
3
+    nfs_volume_for_glance               => $fuel_settings['glance_nfs']['nfs_volume_for_glance'],
4
+    nfs_mount_point_glance              => $fuel_settings['glance_nfs']['nfs_mount_point_glance'],
5 5
 }

+ 2
- 0
deployment_scripts/puppet/upload.pp View File

@@ -0,0 +1,2 @@
1
+  exec{ "/usr/bin/ruby /etc/puppet/modules/osnailyfacter/modular/astute/upload_cirros.rb":
2
+  }

+ 33
- 33
metadata.yaml View File

@@ -1,33 +1,33 @@
1
-# Plugin name
2
-name: glance_nfs
3
-title: Glance NFS plugin
4
-# Plugin version
5
-version: 3.0.0
6
-# Description
7
-description: Enables Glance to use NFS volume as storage backend for images
8
-# Required fuel version
9
-fuel_version: ['7.0']
10
-# Specify license of your plugin
11
-licenses: ['Apache License Version 2.0']
12
-# Specify author or company name
13
-authors: ['Orange']
14
-# A link to the plugin's page
15
-homepage: 'https://github.com/stackforge/fuel-plugin-glance-nfs'
16
-# Specify a group which your plugin implements, possible options:
17
-# network, storage, storage::cinder, storage::glance, hypervisor
18
-groups: ['storage::glance']
19
-
20
-# The plugin is compatible with releases in the list
21
-releases:
22
-  - os: ubuntu
23
-    version: 2015.1.0-7.0
24
-    mode: ['ha', 'multinode']
25
-    deployment_scripts_path: deployment_scripts/
26
-    repository_path: repositories/ubuntu
27
-  - os: centos
28
-    version: 2015.1.0-7.0
29
-    mode: ['ha', 'multinode']
30
-    deployment_scripts_path: deployment_scripts/
31
-    repository_path: repositories/centos
32
-# Version of plugin package
33
-package_version: '2.0.0'
1
+# Plugin name
2
+name: glance_nfs
3
+title: Glance NFS plugin
4
+# Plugin version
5
+version: 3.0.1
6
+# Description
7
+description: Enables Glance to use NFS volume as storage backend for images
8
+# Required fuel version
9
+fuel_version: ['7.0']
10
+# Specify license of your plugin
11
+licenses: ['Apache License Version 2.0']
12
+# Specify author or company name
13
+authors: ['Orange']
14
+# A link to the plugin's page
15
+homepage: 'https://github.com/stackforge/fuel-plugin-glance-nfs'
16
+# Specify a group which your plugin implements, possible options:
17
+# network, storage, storage::cinder, storage::glance, hypervisor
18
+groups: ['storage::glance']
19
+
20
+# The plugin is compatible with releases in the list
21
+releases:
22
+  - os: ubuntu
23
+    version: 2015.1.0-7.0
24
+    mode: ['ha', 'multinode']
25
+    deployment_scripts_path: deployment_scripts/
26
+    repository_path: repositories/ubuntu
27
+  - os: centos
28
+    version: 2015.1.0-7.0
29
+    mode: ['ha', 'multinode']
30
+    deployment_scripts_path: deployment_scripts/
31
+    repository_path: repositories/centos
32
+# Version of plugin package
33
+package_version: '2.0.0'

+ 22
- 9
tasks.yaml View File

@@ -1,9 +1,22 @@
1
-# This task is required for controller nodes
2
-- role: ['primary-controller', 'controller']
3
-  stage: post_deployment/700
4
-  required_for: [upload_cirros]
5
-  type: puppet
6
-  parameters:
7
-    puppet_manifest: puppet/site.pp
8
-    puppet_modules:  "puppet/modules/:/etc/puppet/modules/"
9
-    timeout: 360
1
+# This task is required for controller nodes
2
+- role: ['primary-controller']
3
+  stage: post_deployment/700
4
+  type: puppet
5
+  parameters:
6
+    puppet_manifest: puppet/delete.pp
7
+    puppet_modules:  "puppet/modules/:/etc/puppet/modules/"
8
+    timeout: 360
9
+- role: ['primary-controller', 'controller']
10
+  stage: post_deployment/800
11
+  type: puppet
12
+  parameters:
13
+    puppet_manifest: puppet/site.pp
14
+    puppet_modules:  "puppet/modules/:/etc/puppet/modules/"
15
+    timeout: 360
16
+- role: ['primary-controller']
17
+  stage: post_deployment/1000
18
+  type: puppet
19
+  parameters:
20
+    puppet_manifest: puppet/upload.pp
21
+    puppet_modules:  "puppet/modules/:/etc/puppet/modules/"
22
+    timeout: 360

Loading…
Cancel
Save