diff --git a/group_vars/all.docker.sample b/group_vars/all.docker.sample index 48cf7066a..c30b8f403 100644 --- a/group_vars/all.docker.sample +++ b/group_vars/all.docker.sample @@ -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" diff --git a/group_vars/all.sample b/group_vars/all.sample index 0779a6269..c585b840a 100644 --- a/group_vars/all.sample +++ b/group_vars/all.sample @@ -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 + diff --git a/group_vars/nfss.sample b/group_vars/nfss.sample index 027949468..e0942cb92 100644 --- a/group_vars/nfss.sample +++ b/group_vars/nfss.sample @@ -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" diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index 3f6dc4ccd..3e4cc259e 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -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 diff --git a/roles/ceph-common/tasks/installs/install_on_redhat.yml b/roles/ceph-common/tasks/installs/install_on_redhat.yml index 528358832..b3561fdbc 100644 --- a/roles/ceph-common/tasks/installs/install_on_redhat.yml +++ b/roles/ceph-common/tasks/installs/install_on_redhat.yml @@ -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 diff --git a/roles/ceph-common/templates/ganesha.conf.j2 b/roles/ceph-common/templates/ganesha.conf.j2 index 38bb67b0b..0c661b3d3 100644 --- a/roles/ceph-common/templates/ganesha.conf.j2 +++ b/roles/ceph-common/templates/ganesha.conf.j2 @@ -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 }}; diff --git a/roles/ceph-nfs/defaults/main.yml b/roles/ceph-nfs/defaults/main.yml index 2848361ef..f4b82f316 100644 --- a/roles/ceph-nfs/defaults/main.yml +++ b/roles/ceph-nfs/defaults/main.yml @@ -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" diff --git a/roles/ceph-nfs/tasks/docker/create_configs.yml b/roles/ceph-nfs/tasks/docker/create_configs.yml index 560ff20fc..1bbd65733 100644 --- a/roles/ceph-nfs/tasks/docker/create_configs.yml +++ b/roles/ceph-nfs/tasks/docker/create_configs.yml @@ -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 diff --git a/roles/ceph-nfs/tasks/pre_requisite.yml b/roles/ceph-nfs/tasks/pre_requisite.yml index 695f93cab..adb5ec426 100644 --- a/roles/ceph-nfs/tasks/pre_requisite.yml +++ b/roles/ceph-nfs/tasks/pre_requisite.yml @@ -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 diff --git a/roles/ceph-rgw/tasks/docker/copy_configs.yml b/roles/ceph-rgw/tasks/docker/copy_configs.yml index 3345f1803..b63866e00 100644 --- a/roles/ceph-rgw/tasks/docker/copy_configs.yml +++ b/roles/ceph-rgw/tasks/docker/copy_configs.yml @@ -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]