summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--prototypes/xci/file/exports14
-rw-r--r--prototypes/xci/file/ha/configure-targethosts.yml2
-rw-r--r--prototypes/xci/file/ha/openstack_user_config.yml45
-rw-r--r--prototypes/xci/file/mini/configure-targethosts.yml4
-rw-r--r--prototypes/xci/file/mini/openstack_user_config.yml13
-rw-r--r--prototypes/xci/file/noha/configure-targethosts.yml2
-rw-r--r--prototypes/xci/file/noha/openstack_user_config.yml13
-rw-r--r--prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml19
8 files changed, 62 insertions, 50 deletions
diff --git a/prototypes/xci/file/exports b/prototypes/xci/file/exports
deleted file mode 100644
index af64d618d..000000000
--- a/prototypes/xci/file/exports
+++ /dev/null
@@ -1,14 +0,0 @@
-# /etc/exports: the access control list for filesystems which may be exported
-# to NFS clients. See exports(5).
-#
-# Example for NFSv2 and NFSv3:
-# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
-#
-# Example for NFSv4:
-# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
-# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
-#
-# glance images are stored on compute host and made available to image hosts via nfs
-# see image_hosts section in openstack_user_config.yml for details
-/images *(rw,sync,no_subtree_check,no_root_squash)
-
diff --git a/prototypes/xci/file/ha/configure-targethosts.yml b/prototypes/xci/file/ha/configure-targethosts.yml
index b03891d0c..50da1f223 100644
--- a/prototypes/xci/file/ha/configure-targethosts.yml
+++ b/prototypes/xci/file/ha/configure-targethosts.yml
@@ -29,7 +29,7 @@
# we need to force sync time with ntp or the nodes will be out of sync timewise
- role: synchronize-time
-- hosts: compute01
+- hosts: compute00
remote_user: root
# TODO: this role is for configuring NFS on xenial and adjustment needed for other distros
roles:
diff --git a/prototypes/xci/file/ha/openstack_user_config.yml b/prototypes/xci/file/ha/openstack_user_config.yml
index 0c43702cb..09fb734c1 100644
--- a/prototypes/xci/file/ha/openstack_user_config.yml
+++ b/prototypes/xci/file/ha/openstack_user_config.yml
@@ -138,7 +138,7 @@ image_hosts:
container_vars:
limit_container_types: glance
glance_nfs_client:
- - server: "172.29.244.15"
+ - server: "172.29.244.14"
remote_path: "/images"
local_path: "/var/lib/glance/images"
type: "nfs"
@@ -148,7 +148,7 @@ image_hosts:
container_vars:
limit_container_types: glance
glance_nfs_client:
- - server: "172.29.244.15"
+ - server: "172.29.244.14"
remote_path: "/images"
local_path: "/var/lib/glance/images"
type: "nfs"
@@ -158,7 +158,7 @@ image_hosts:
container_vars:
limit_container_types: glance
glance_nfs_client:
- - server: "172.29.244.15"
+ - server: "172.29.244.14"
remote_path: "/images"
local_path: "/var/lib/glance/images"
type: "nfs"
@@ -218,28 +218,37 @@ storage_hosts:
container_vars:
cinder_backends:
limit_container_types: cinder_volume
- lvm:
- volume_group: cinder-volumes
- volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
- volume_backend_name: LVM_iSCSI
- iscsi_ip_address: "172.29.244.11"
+ nfs_volume:
+ volume_backend_name: NFS_VOLUME1
+ volume_driver: cinder.volume.drivers.nfs.NfsDriver
+ nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
+ nfs_shares_config: /etc/cinder/nfs_shares
+ shares:
+ - ip: "172.29.244.14"
+ share: "/volumes"
controller01:
ip: 172.29.236.12
container_vars:
cinder_backends:
limit_container_types: cinder_volume
- lvm:
- volume_group: cinder-volumes
- volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
- volume_backend_name: LVM_iSCSI
- iscsi_ip_address: "172.29.244.12"
+ nfs_volume:
+ volume_backend_name: NFS_VOLUME1
+ volume_driver: cinder.volume.drivers.nfs.NfsDriver
+ nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
+ nfs_shares_config: /etc/cinder/nfs_shares
+ shares:
+ - ip: "172.29.244.14"
+ share: "/volumes"
controller02:
ip: 172.29.236.13
container_vars:
cinder_backends:
limit_container_types: cinder_volume
- lvm:
- volume_group: cinder-volumes
- volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
- volume_backend_name: LVM_iSCSI
- iscsi_ip_address: "172.29.244.13"
+ nfs_volume:
+ volume_backend_name: NFS_VOLUME1
+ volume_driver: cinder.volume.drivers.nfs.NfsDriver
+ nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
+ nfs_shares_config: /etc/cinder/nfs_shares
+ shares:
+ - ip: "172.29.244.14"
+ share: "/volumes"
diff --git a/prototypes/xci/file/mini/configure-targethosts.yml b/prototypes/xci/file/mini/configure-targethosts.yml
index 7a20c0f63..50da1f223 100644
--- a/prototypes/xci/file/mini/configure-targethosts.yml
+++ b/prototypes/xci/file/mini/configure-targethosts.yml
@@ -28,5 +28,9 @@
- { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" }
# we need to force sync time with ntp or the nodes will be out of sync timewise
- role: synchronize-time
+
+- hosts: compute00
+ remote_user: root
# TODO: this role is for configuring NFS on xenial and adjustment needed for other distros
+ roles:
- role: configure-nfs
diff --git a/prototypes/xci/file/mini/openstack_user_config.yml b/prototypes/xci/file/mini/openstack_user_config.yml
index 70429cea9..f9ccee24f 100644
--- a/prototypes/xci/file/mini/openstack_user_config.yml
+++ b/prototypes/xci/file/mini/openstack_user_config.yml
@@ -160,8 +160,11 @@ storage_hosts:
container_vars:
cinder_backends:
limit_container_types: cinder_volume
- lvm:
- volume_group: cinder-volumes
- volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
- volume_backend_name: LVM_iSCSI
- iscsi_ip_address: "172.29.244.11"
+ nfs_volume:
+ volume_backend_name: NFS_VOLUME1
+ volume_driver: cinder.volume.drivers.nfs.NfsDriver
+ nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
+ nfs_shares_config: /etc/cinder/nfs_shares
+ shares:
+ - ip: "172.29.244.12"
+ share: "/volumes"
diff --git a/prototypes/xci/file/noha/configure-targethosts.yml b/prototypes/xci/file/noha/configure-targethosts.yml
index b03891d0c..50da1f223 100644
--- a/prototypes/xci/file/noha/configure-targethosts.yml
+++ b/prototypes/xci/file/noha/configure-targethosts.yml
@@ -29,7 +29,7 @@
# we need to force sync time with ntp or the nodes will be out of sync timewise
- role: synchronize-time
-- hosts: compute01
+- hosts: compute00
remote_user: root
# TODO: this role is for configuring NFS on xenial and adjustment needed for other distros
roles:
diff --git a/prototypes/xci/file/noha/openstack_user_config.yml b/prototypes/xci/file/noha/openstack_user_config.yml
index 05de6a9c1..8406d7b45 100644
--- a/prototypes/xci/file/noha/openstack_user_config.yml
+++ b/prototypes/xci/file/noha/openstack_user_config.yml
@@ -162,8 +162,11 @@ storage_hosts:
container_vars:
cinder_backends:
limit_container_types: cinder_volume
- lvm:
- volume_group: cinder-volumes
- volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
- volume_backend_name: LVM_iSCSI
- iscsi_ip_address: "172.29.244.11"
+ nfs_volume:
+ volume_backend_name: NFS_VOLUME1
+ volume_driver: cinder.volume.drivers.nfs.NfsDriver
+ nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
+ nfs_shares_config: /etc/cinder/nfs_shares
+ shares:
+ - ip: "172.29.244.12"
+ share: "/volumes"
diff --git a/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml b/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml
index 66dd0afa3..c52da0bf3 100644
--- a/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml
+++ b/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml
@@ -9,11 +9,14 @@
##############################################################################
# TODO: this is for xenial and needs to be adjusted for different distros
- block:
- - name: make NFS dir
+ - name: make NFS directories
file:
- dest: /images
+ dest: "{{ item }}"
mode: 0777
state: directory
+ with_items:
+ - "/images"
+ - "/volumes"
- name: configure NFS service
lineinfile:
dest: /etc/services
@@ -23,11 +26,15 @@
with_items:
- "nfs 2049/tcp"
- "nfs 2049/udp"
- - name: configure NFS exports on ubuntu xenial
- copy:
- src: ../file/exports
+ - name: configure NFS exports
+ lineinfile:
dest: /etc/exports
- when: ansible_distribution_release == "xenial"
+ state: present
+ create: yes
+ line: "{{ item }}"
+ with_items:
+ - "/images *(rw,sync,no_subtree_check,no_root_squash)"
+ - "/volumes *(rw,sync,no_subtree_check,no_root_squash)"
# TODO: the service name might be different on other distros and needs to be adjusted
- name: restart ubuntu xenial NFS service
service: