Update plugin to solve problem relative to TestVM image when we get multiple controllers
Change-Id: I9549b9391ccb1f0d49fced0e881646b732473e57
This commit is contained in:
parent
d323ffd76e
commit
82f2f4b5fa
|
@ -61,7 +61,7 @@ Glance-nfs plugin installation
|
|||
|
||||
7. Verify that the plugin is installed correctly:
|
||||
``fuel plugins --list``
|
||||
|
||||
|
||||
8. Plugin is ready to use and can be enabled on the Settings tab of the Fuel web UI.
|
||||
|
||||
User Guide
|
||||
|
@ -113,4 +113,7 @@ Release Notes
|
|||
|
||||
* Update plugin to Fuel 7.0 release
|
||||
|
||||
**3.0.1**
|
||||
|
||||
* Update to solve problem with TestVM image on multi controller deployment
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# have to find a better way to do this, if we can execute plugin before upload_cirros task we don't need this anymore
|
||||
exec{ "image-delete":
|
||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/glance image-delete TestVM'",
|
||||
}
|
|
@ -3,13 +3,7 @@ $nfs_volume_for_glance,
|
|||
$nfs_mount_point_glance,
|
||||
){
|
||||
include glance_nfs::params
|
||||
|
||||
# have to find a better way to do this, if we can execute plugin before upload_cirros task we don't need this anymore
|
||||
exec{ "image-delete":
|
||||
command => "/bin/bash -c 'source /root/openrc && /usr/bin/glance image-delete TestVM | exit 0'",
|
||||
before => Package["$glance_nfs::params::package_name"],
|
||||
}
|
||||
|
||||
|
||||
# Install package and start services
|
||||
package { $glance_nfs::params::package_name:
|
||||
ensure => present,
|
||||
|
@ -17,6 +11,7 @@ $nfs_mount_point_glance,
|
|||
|
||||
package { $glance_nfs::params::required_packages:
|
||||
ensure => present,
|
||||
before => Mount["$nfs_mount_point_glance"],
|
||||
}
|
||||
|
||||
service { $glance_nfs::params::service_name:
|
||||
|
@ -32,21 +27,21 @@ $nfs_mount_point_glance,
|
|||
glance_api_config {
|
||||
'glance_store/default_store': value => 'file';
|
||||
'glance_store/filesystem_store_datadir': value => "${nfs_mount_point_glance}/images";
|
||||
'glance_store/stores': value => 'file';
|
||||
'glance_store/stores': value => 'file';
|
||||
}~> Service["$::glance_nfs::params::service_name"]
|
||||
|
||||
|
||||
glance_cache_config {
|
||||
'DEFAULT/filesystem_store_datadir': value => $nfs_mount_point_glance;
|
||||
}~> Service["$::glance_nfs::params::service_name"]
|
||||
|
||||
# Create Mount Point
|
||||
exec{ "/bin/mkdir -p $nfs_mount_point_glance":
|
||||
unless => "/usr/bin/test -d $nfs_mount_point_glance",
|
||||
before => Mount["$nfs_mount_point_glance"],
|
||||
unless => "/usr/bin/test -d $nfs_mount_point_glance",
|
||||
before => Mount["$nfs_mount_point_glance"],
|
||||
}
|
||||
|
||||
|
||||
# Mount NFS Share
|
||||
|
||||
|
||||
# Mount NFS Share
|
||||
mount { "$nfs_mount_point_glance":
|
||||
atboot => true,
|
||||
ensure => mounted,
|
||||
|
@ -62,7 +57,7 @@ $nfs_mount_point_glance,
|
|||
exec{ "/bin/chmod 775 $nfs_mount_point_glance":
|
||||
require => Mount["$nfs_mount_point_glance"],
|
||||
}
|
||||
|
||||
|
||||
exec{ "/bin/mkdir -p ${$nfs_mount_point_glance}/images":
|
||||
unless => "/usr/bin/test -d ${$nfs_mount_point_glance}/images",
|
||||
require => Mount["$nfs_mount_point_glance"],
|
||||
|
@ -75,8 +70,4 @@ $nfs_mount_point_glance,
|
|||
notify => Service["$::glance_nfs::params::service_name"],
|
||||
}
|
||||
|
||||
exec{ "/usr/bin/ruby /etc/puppet/modules/osnailyfacter/modular/astute/upload_cirros.rb":
|
||||
require => Exec["/bin/chmod 775 ${$nfs_mount_point_glance}/images"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
$fuel_settings = parseyaml(file('/etc/astute.yaml'))
|
||||
class { 'glance_nfs':
|
||||
nfs_volume_for_glance => $fuel_settings['glance_nfs']['nfs_volume_for_glance'],
|
||||
nfs_mount_point_glance => $fuel_settings['glance_nfs']['nfs_mount_point_glance'],
|
||||
nfs_volume_for_glance => $fuel_settings['glance_nfs']['nfs_volume_for_glance'],
|
||||
nfs_mount_point_glance => $fuel_settings['glance_nfs']['nfs_mount_point_glance'],
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
exec{ "/usr/bin/ruby /etc/puppet/modules/osnailyfacter/modular/astute/upload_cirros.rb":
|
||||
}
|
|
@ -1,33 +1,33 @@
|
|||
# Plugin name
|
||||
name: glance_nfs
|
||||
title: Glance NFS plugin
|
||||
# Plugin version
|
||||
version: 3.0.0
|
||||
# Description
|
||||
description: Enables Glance to use NFS volume as storage backend for images
|
||||
# Required fuel version
|
||||
fuel_version: ['7.0']
|
||||
# Specify license of your plugin
|
||||
licenses: ['Apache License Version 2.0']
|
||||
# Specify author or company name
|
||||
authors: ['Orange']
|
||||
# A link to the plugin's page
|
||||
homepage: 'https://github.com/stackforge/fuel-plugin-glance-nfs'
|
||||
# Specify a group which your plugin implements, possible options:
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor
|
||||
groups: ['storage::glance']
|
||||
|
||||
# The plugin is compatible with releases in the list
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: 2015.1.0-7.0
|
||||
mode: ['ha', 'multinode']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
- os: centos
|
||||
version: 2015.1.0-7.0
|
||||
mode: ['ha', 'multinode']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/centos
|
||||
# Version of plugin package
|
||||
package_version: '2.0.0'
|
||||
# Plugin name
|
||||
name: glance_nfs
|
||||
title: Glance NFS plugin
|
||||
# Plugin version
|
||||
version: 3.0.1
|
||||
# Description
|
||||
description: Enables Glance to use NFS volume as storage backend for images
|
||||
# Required fuel version
|
||||
fuel_version: ['7.0']
|
||||
# Specify license of your plugin
|
||||
licenses: ['Apache License Version 2.0']
|
||||
# Specify author or company name
|
||||
authors: ['Orange']
|
||||
# A link to the plugin's page
|
||||
homepage: 'https://github.com/stackforge/fuel-plugin-glance-nfs'
|
||||
# Specify a group which your plugin implements, possible options:
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor
|
||||
groups: ['storage::glance']
|
||||
|
||||
# The plugin is compatible with releases in the list
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: 2015.1.0-7.0
|
||||
mode: ['ha', 'multinode']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
- os: centos
|
||||
version: 2015.1.0-7.0
|
||||
mode: ['ha', 'multinode']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/centos
|
||||
# Version of plugin package
|
||||
package_version: '2.0.0'
|
||||
|
|
31
tasks.yaml
31
tasks.yaml
|
@ -1,9 +1,22 @@
|
|||
# This task is required for controller nodes
|
||||
- role: ['primary-controller', 'controller']
|
||||
stage: post_deployment/700
|
||||
required_for: [upload_cirros]
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/site.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
# This task is required for controller nodes
|
||||
- role: ['primary-controller']
|
||||
stage: post_deployment/700
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/delete.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
- role: ['primary-controller', 'controller']
|
||||
stage: post_deployment/800
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/site.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
- role: ['primary-controller']
|
||||
stage: post_deployment/1000
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/upload.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 360
|
||||
|
|
Loading…
Reference in New Issue