mirror of https://github.com/ceph/ceph-ansible.git
NFS fixups
- Move fsal_rgw config to ceph-common, as it's shaered with ceph-rgw - Update all.docker.sample with NFS config - Rename fsal_rgw to nfs_obj_gw and fsal_ceph to nfs_file_gw, because the former names mean nothing to non-Ganesha developers Signed-off-by: Daniel Gryniewicz <dang@redhat.com>pull/941/head
parent
5b83e05be8
commit
bb9df99046
|
@ -89,3 +89,16 @@ dummy:
|
|||
#ceph_rbd_mirror_docker_image_tag: latest
|
||||
#ceph_docker_on_openstack: false
|
||||
|
||||
#######
|
||||
# NFS #
|
||||
#######
|
||||
#nfs_containerized_deployment: true
|
||||
#nfs_containerized_deployment_with_kv: false
|
||||
#ceph_nfs_docker_username: ceph
|
||||
#ceph_nfs_docker_imagename: daemon
|
||||
#ceph_nfs_docker_image_tag: latest
|
||||
#ceph_nfs_docker_extra_env: "GANESHA_EPOCH={{ ganesha_epoch }}" # comma separated variables
|
||||
#nfs_file_gw: false
|
||||
#nfs_obj_gw: false
|
||||
#ceph_nfs_rgw_access_key: "QFAMEDSJP5DEKJO0DDXY"
|
||||
#ceph_nfs_rgw_secret_key: "iaSFLDVvDdQt6lkNzHyW4fPLZugBAI1g17LO0+87[MAC[M#C"
|
||||
|
|
|
@ -84,7 +84,7 @@ dummy:
|
|||
|
||||
## Configure package origin
|
||||
#
|
||||
#ceph_origin: 'upstream' #'distro' or 'local'
|
||||
#ceph_origin: 'upstream' # or 'distro' or 'local'
|
||||
# 'distro' means that no separate repo file will be added
|
||||
# you will get whatever version of Ceph is included in your Linux distro.
|
||||
# 'local' means that the ceph binaries will be copied over from the local machine
|
||||
|
@ -369,3 +369,11 @@ dummy:
|
|||
|
||||
#osd_auto_discovery: False
|
||||
|
||||
# Confiure the type of NFS gatway access. At least one must be enabled for an
|
||||
# NFS role to be useful
|
||||
#
|
||||
# Set this to true to enable File access via NFS. Requires an MDS role.
|
||||
#nfs_file_gw: true
|
||||
# Set this to true to enable Object access via NFS. Requires an RGW role.
|
||||
#nfs_obj_gw: false
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@ dummy:
|
|||
#######################
|
||||
# Access type options #
|
||||
#######################
|
||||
# These are currently in ceph-common defaults because nfs_obj_gw shared with ceph-rgw
|
||||
# Enable NFS File access
|
||||
#fsal_ceph: true
|
||||
|
||||
#nfs_file_gw: true
|
||||
# Enable NFS Object access
|
||||
#fsal_rgw: false
|
||||
#nfs_obj_gw: false
|
||||
|
||||
######################
|
||||
# NFS Ganesha Config #
|
||||
######################
|
||||
#ceph_nfs_export_id: 20134
|
||||
#ceph_nfs_pseudo_path: "/ceph"
|
||||
#ceph_nfs_pseudo_path: "/cephfile"
|
||||
#ceph_nfs_protocols: "3,4"
|
||||
#ceph_nfs_access_type: "RW"
|
||||
#ceph_nfs_log_file: "/var/log/ganesha.log"
|
||||
|
@ -41,7 +41,7 @@ dummy:
|
|||
# FSAL Ceph Config #
|
||||
####################
|
||||
#ceph_nfs_ceph_export_id: 20134
|
||||
#ceph_nfs_ceph_pseudo_path: "/ceph"
|
||||
#ceph_nfs_ceph_pseudo_path: "/cephobject"
|
||||
#ceph_nfs_ceph_protocols: "3,4"
|
||||
#ceph_nfs_ceph_access_type: "RW"
|
||||
|
||||
|
|
|
@ -360,3 +360,11 @@ dmcrypt_journal_collocation: False
|
|||
dmcrypt_dedicated_journal: False
|
||||
|
||||
osd_auto_discovery: False
|
||||
|
||||
# Confiure the type of NFS gatway access. At least one must be enabled for an
|
||||
# NFS role to be useful
|
||||
#
|
||||
# Set this to true to enable File access via NFS. Requires an MDS role.
|
||||
nfs_file_gw: true
|
||||
# Set this to true to enable Object access via NFS. Requires an RGW role.
|
||||
nfs_obj_gw: false
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
when:
|
||||
- nfs_group_name in group_names
|
||||
- ansible_pkg_mgr == "yum"
|
||||
- fsal_ceph
|
||||
- nfs_file_gw
|
||||
|
||||
- name: install nfs ceph gateway
|
||||
dnf:
|
||||
|
@ -241,7 +241,7 @@
|
|||
when:
|
||||
- nfs_group_name in group_names
|
||||
- ansible_pkg_mgr == "dnf"
|
||||
- fsal_ceph
|
||||
- nfs_file_gw
|
||||
|
||||
- name: install nfs rgw gateway
|
||||
yum:
|
||||
|
@ -252,7 +252,7 @@
|
|||
when:
|
||||
- nfs_group_name in group_names
|
||||
- ansible_pkg_mgr == "yum"
|
||||
- fsal_rgw
|
||||
- nfs_obj_gw
|
||||
|
||||
- name: install nfs rgw gateway
|
||||
dnf:
|
||||
|
@ -263,4 +263,4 @@
|
|||
when:
|
||||
- nfs_group_name in group_names
|
||||
- ansible_pkg_mgr == "dnf"
|
||||
- fsal_rgw
|
||||
- nfs_obj_gw
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% if fsal_ceph %}
|
||||
{% if nfs_file_gw %}
|
||||
EXPORT
|
||||
{
|
||||
Export_ID={{ ceph_nfs_ceph_export_id }};
|
||||
|
@ -23,7 +23,7 @@ EXPORT
|
|||
}
|
||||
}
|
||||
{% endif %}
|
||||
{% if fsal_rgw %}
|
||||
{% if nfs_obj_gw %}
|
||||
EXPORT
|
||||
{
|
||||
Export_ID={{ ceph_nfs_rgw_export_id }};
|
||||
|
|
|
@ -14,17 +14,17 @@ cephx: true
|
|||
#######################
|
||||
# Access type options #
|
||||
#######################
|
||||
# These are currently in ceph-common defaults because nfs_obj_gw shared with ceph-rgw
|
||||
# Enable NFS File access
|
||||
fsal_ceph: true
|
||||
|
||||
#nfs_file_gw: true
|
||||
# Enable NFS Object access
|
||||
fsal_rgw: false
|
||||
#nfs_obj_gw: false
|
||||
|
||||
######################
|
||||
# NFS Ganesha Config #
|
||||
######################
|
||||
ceph_nfs_export_id: 20134
|
||||
ceph_nfs_pseudo_path: "/ceph"
|
||||
ceph_nfs_pseudo_path: "/cephfile"
|
||||
ceph_nfs_protocols: "3,4"
|
||||
ceph_nfs_access_type: "RW"
|
||||
ceph_nfs_log_file: "/var/log/ganesha.log"
|
||||
|
@ -33,7 +33,7 @@ ceph_nfs_log_file: "/var/log/ganesha.log"
|
|||
# FSAL Ceph Config #
|
||||
####################
|
||||
ceph_nfs_ceph_export_id: 20134
|
||||
ceph_nfs_ceph_pseudo_path: "/ceph"
|
||||
ceph_nfs_ceph_pseudo_path: "/cephobject"
|
||||
ceph_nfs_ceph_protocols: "3,4"
|
||||
ceph_nfs_ceph_access_type: "RW"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
state: running
|
||||
env: "CEPH_DAEMON=RGW_USER,RGW_USERNAME={{ ceph_nfs_rgw_user }},RGW_USER_ACCESS_KEY={{ ceph_nfs_rgw_access_key }},RGW_USER_SECRET_KEY={{ ceph_nfs_rgw_secret_key }}"
|
||||
volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
|
||||
when: fsal_rgw
|
||||
when: nfs_obj_gw
|
||||
|
||||
- name: get user create output
|
||||
command: docker logs ceph-{{ ansible_hostname }}-rgw-user
|
||||
|
|
|
@ -13,17 +13,17 @@
|
|||
- name: create rgw nfs user
|
||||
command: radosgw-admin user create --uid={{ ceph_nfs_rgw_user }} --display-name="RGW NFS User"
|
||||
register: rgwuser
|
||||
when: fsal_rgw
|
||||
when: nfs_obj_gw
|
||||
|
||||
- name: set access key
|
||||
set_fact:
|
||||
ceph_nfs_rgw_access_key: "{{ (rgwuser.stdout | from_json)['keys'][0]['access_key'] }}"
|
||||
when: fsal_rgw
|
||||
when: nfs_obj_gw
|
||||
|
||||
- name: set secret key
|
||||
set_fact:
|
||||
ceph_nfs_rgw_secret_key: "{{(rgwuser.stdout | from_json)['keys'][0]['secret_key']}}"
|
||||
when: fsal_rgw
|
||||
when: nfs_obj_gw
|
||||
|
||||
- name: generate ganesha configuration file
|
||||
action: config_template
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
set_fact:
|
||||
rgw_config_keys:
|
||||
- "/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
|
||||
when: fsal_rgw
|
||||
when: nfs_obj_gw
|
||||
|
||||
- name: wait for rgw keyring
|
||||
wait_for: path="/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
|
||||
when:
|
||||
- fsal_rgw
|
||||
- nfs_obj_gw
|
||||
- inventory_hostname == groups.rgws[0]
|
||||
|
||||
- name: stat for config and keys
|
||||
|
@ -19,7 +19,7 @@
|
|||
failed_when: false
|
||||
register: statconfig
|
||||
when:
|
||||
- fsal_rgw
|
||||
- nfs_obj_gw
|
||||
- inventory_hostname == groups.rgws[0]
|
||||
|
||||
- name: push ceph files to the ansible server
|
||||
|
@ -32,5 +32,5 @@
|
|||
- statconfig.results
|
||||
when:
|
||||
- item.1.stat.exists == false
|
||||
- fsal_rgw
|
||||
- nfs_obj_gw
|
||||
- inventory_hostname == groups.rgws[0]
|
||||
|
|
Loading…
Reference in New Issue