Allow configuration of NFS backend for Nova
Allow NFS configuration of storage backend for Nova. This way the instances files will be stored on a shared NFS storage. Implements: bp tripleo-nova-nfs Depends-On: Id15aec6324814a871e87f19f24999b0e3b8a8f05 Change-Id: Ie4fe217bd119b638f42c682d21572547f02f17b2
This commit is contained in:
parent
784a41a86f
commit
6b6ae966ba
@ -204,6 +204,7 @@ outputs:
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
- {get_attr: [NovaComputeBase, role_data, host_prep_tasks]}
|
||||
- - name: create persistent directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
@ -54,6 +54,16 @@ parameter_defaults:
|
||||
# GlanceNfsOptions: 'intr,context=system_u:object_r:glance_var_lib_t:s0'
|
||||
|
||||
|
||||
#### NOVA NFS SETTINGS ####
|
||||
# NovaNfsEnabled: false
|
||||
## NFS share for nova instance file storage, e.g. '192.168.122.1:/export/nova'
|
||||
## (If using IPv6, use both double and single-quotes,
|
||||
## e.g. "'[fdd0::1]:/export/nova'")
|
||||
# NovaNfsShare: ''
|
||||
## Mount options for the NFS instance file storage mount point
|
||||
# NovaNfsOptions: 'context=system_u:object_r:nova_var_lib_t:s0'
|
||||
|
||||
|
||||
#### CEPH SETTINGS ####
|
||||
|
||||
## When deploying Ceph Nodes through the oscplugin CLI, the following
|
||||
|
30
environments/storage/nova-nfs.yaml
Normal file
30
environments/storage/nova-nfs.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
# *******************************************************************
|
||||
# This file was created automatically by the sample environment
|
||||
# generator. Developers should use `tox -e genconfig` to update it.
|
||||
# Users are recommended to make changes to a copy of the file instead
|
||||
# of the original, if any customizations are needed.
|
||||
# *******************************************************************
|
||||
# title: Enable Nova NFS Backend
|
||||
# description: |
|
||||
# Configure and include this environment to enable the use of an NFS
|
||||
# share as the backend for Nova.
|
||||
parameter_defaults:
|
||||
# NFS mount options for nova storage (when NovaNfsEnabled is true)
|
||||
# Type: string
|
||||
NovaNfsOptions: context=system_u:object_r:nova_var_lib_t:s0
|
||||
|
||||
# NFS share to mount for nova storage (when NovaNfsEnabled is true)
|
||||
# Type: string
|
||||
NovaNfsShare: ''
|
||||
|
||||
# ******************************************************
|
||||
# Static parameters - these are values that must be
|
||||
# included in the environment but should not be changed.
|
||||
# ******************************************************
|
||||
# Whether to enable or not the NFS backend for Nova
|
||||
# Type: boolean
|
||||
NovaNfsEnabled: True
|
||||
|
||||
# *********************
|
||||
# End static parameters
|
||||
# *********************
|
@ -56,6 +56,18 @@ parameters:
|
||||
default: false
|
||||
description: Whether to enable or not the NFS backend for Cinder
|
||||
type: boolean
|
||||
NovaNfsEnabled:
|
||||
default: false
|
||||
description: Whether to enable or not the NFS backend for Nova
|
||||
type: boolean
|
||||
NovaNfsShare:
|
||||
default: ''
|
||||
description: NFS share to mount for nova storage (when NovaNfsEnabled is true)
|
||||
type: string
|
||||
NovaNfsOptions:
|
||||
default: 'context=system_u:object_r:nova_var_lib_t:s0'
|
||||
description: NFS mount options for nova storage (when NovaNfsEnabled is true)
|
||||
type: string
|
||||
CinderEnableRbdBackend:
|
||||
default: false
|
||||
description: Whether to enable or not the Rbd backend for Cinder
|
||||
@ -201,6 +213,7 @@ outputs:
|
||||
- - 'client'
|
||||
- {get_param: CephClientUserName}
|
||||
tripleo::profile::base::nova::compute::cinder_nfs_backend: {get_param: CinderEnableNfsBackend}
|
||||
tripleo::profile::base::nova::compute::nova_nfs_enabled: {get_param: NovaNfsEnabled}
|
||||
rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
|
||||
nova::compute::rbd::libvirt_rbd_secret_key: {get_param: CephClientKey}
|
||||
nova::compute::rbd::libvirt_rbd_secret_uuid: {get_param: CephClusterFSID}
|
||||
@ -249,6 +262,14 @@ outputs:
|
||||
tripleo.collectd.plugins.nova_compute:
|
||||
- virt
|
||||
collectd::plugin::virt::connection: 'qemu:///system'
|
||||
host_prep_tasks:
|
||||
- name: Mount Nova NFS Share
|
||||
vars:
|
||||
nfs_backend_enable: {get_param: NovaNfsEnabled}
|
||||
nfs_share: {get_param: NovaNfsShare}
|
||||
nfs_options: {get_param: NovaNfsOptions}
|
||||
mount: name=/var/lib/nova/instances src="{{nfs_share}}" fstype=nfs4 opts="_netdev,bg,{{nfs_options}},vers=4,nfsvers=4" state=mounted
|
||||
when: nfs_backend_enable|bool
|
||||
upgrade_tasks:
|
||||
- name: Stop nova-compute service
|
||||
when: step|int == 1
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Allow NFS configuration of storage backend for Nova. This way
|
||||
the instance files will be stored on a shared NFS storage.
|
@ -71,6 +71,22 @@ environments:
|
||||
description: |
|
||||
Configure and include this environment to enable the use of an NFS
|
||||
share as the backend for Glance.
|
||||
-
|
||||
name: storage/nova-nfs
|
||||
title: Enable Nova NFS Backend
|
||||
files:
|
||||
puppet/services/nova-compute.yaml:
|
||||
parameters:
|
||||
- NovaNfsEnabled
|
||||
- NovaNfsShare
|
||||
- NovaNfsOptions
|
||||
sample_values:
|
||||
NovaNfsEnabled: True
|
||||
static:
|
||||
- NovaNfsEnabled
|
||||
description: |
|
||||
Configure and include this environment to enable the use of an NFS
|
||||
share as the backend for Nova.
|
||||
-
|
||||
name: storage/external-ceph
|
||||
title: Deploy Using an External Ceph Cluster
|
||||
|
Loading…
Reference in New Issue
Block a user