NFS client configuration for cinder
This change adds the NFS client configuration in the cinder_volume hosts, necessary when using a netapp backend over NFS.
This commit is contained in:
parent
b7e1483aea
commit
ed15550a14
@ -188,6 +188,10 @@ storage_hosts:
|
||||
netapp_password: "{{ cinder_netapp_password }}"
|
||||
volume_driver: cinder.volume.drivers.netapp.common.NetAppDriver
|
||||
volume_backend_name: NETAPP_iSCSI
|
||||
nfs_client:
|
||||
nfs_shares_config: /etc/cinder/nfs_shares
|
||||
shares:
|
||||
- { ip: "{{ cinder_netapp_hostname }}", share: "/vol/cinder" }
|
||||
|
||||
# User defined Logging Hosts, this should be a required group
|
||||
log_hosts:
|
||||
|
@ -16,14 +16,17 @@
|
||||
- hosts: cinder_volume
|
||||
user: root
|
||||
roles:
|
||||
- container_common
|
||||
- container_extra_setup
|
||||
- cinder_common
|
||||
- cinder_volume
|
||||
- cinder_device_add
|
||||
- cinder_backend_types
|
||||
- nfs_client
|
||||
- init_script
|
||||
vars_files:
|
||||
- vars/config_vars/container_config_cinder_volume.yml
|
||||
- vars/openstack_service_vars/cinder_volume.yml
|
||||
- vars/repo_packages/cinder.yml
|
||||
handlers:
|
||||
- include: handlers/services.yml
|
||||
|
@ -52,6 +52,9 @@ enabled_backends={% for backend in cinder_backends|dictsort %}{{ backend.0 }}{%
|
||||
{% for key, value in backend_section.1.items() %}
|
||||
{{ key }}={{ value }}
|
||||
{% endfor %}
|
||||
{% if nfs_client is defined %}
|
||||
nfs_shares_config={{ nfs_client.nfs_shares_config }}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
20
rpc_deployment/roles/nfs_client/tasks/main.yml
Normal file
20
rpc_deployment/roles/nfs_client/tasks/main.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
# Copyright 2014, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create nfs_shares file
|
||||
template:
|
||||
src=nfs_shares.j2
|
||||
dest="{{ nfs_client.nfs_shares_config }}"
|
||||
when: nfs_client is defined
|
3
rpc_deployment/roles/nfs_client/templates/nfs_shares.j2
Normal file
3
rpc_deployment/roles/nfs_client/templates/nfs_shares.j2
Normal file
@ -0,0 +1,3 @@
|
||||
{% for share in nfs_client.shares %}
|
||||
{{ share.ip }}: {{ share.share }}
|
||||
{% endfor %}
|
@ -44,3 +44,4 @@ container_packages:
|
||||
- tgt
|
||||
- parted
|
||||
- qemu-utils
|
||||
- nfs-common
|
||||
|
Loading…
x
Reference in New Issue
Block a user