iscsi-gw: preparing the new iscsi role

adding the bare minimum to test and start the new role.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/960/head
Sébastien Han 2016-08-26 15:22:47 +02:00
parent 64cb2dba68
commit d3ceab904d
9 changed files with 52 additions and 1 deletions

32
Vagrantfile vendored
View File

@ -15,6 +15,7 @@ NNFSS = settings['nfs_vms']
RESTAPI = settings['restapi'] RESTAPI = settings['restapi']
NRBD_MIRRORS = settings['rbd_mirror_vms'] NRBD_MIRRORS = settings['rbd_mirror_vms']
CLIENTS = settings['client_vms'] CLIENTS = settings['client_vms']
NISCSI_GWS = settings['iscsi_gw_vms']
SUBNET = settings['subnet'] SUBNET = settings['subnet']
BOX = settings['vagrant_box'] BOX = settings['vagrant_box']
BOX_URL = settings['vagrant_box_url'] BOX_URL = settings['vagrant_box_url']
@ -55,7 +56,8 @@ ansible_provision = proc do |ansible|
'rgws' => (0..NRGWS - 1).map { |j| "#{OSPREFIX}rgw#{j}" }, 'rgws' => (0..NRGWS - 1).map { |j| "#{OSPREFIX}rgw#{j}" },
'nfss' => (0..NNFSS - 1).map { |j| "#{OSPREFIX}nfs#{j}" }, 'nfss' => (0..NNFSS - 1).map { |j| "#{OSPREFIX}nfs#{j}" },
'rbd_mirrors' => (0..NRBD_MIRRORS - 1).map { |j| "#{OSPREFIX}rbd_mirror#{j}" }, 'rbd_mirrors' => (0..NRBD_MIRRORS - 1).map { |j| "#{OSPREFIX}rbd_mirror#{j}" },
'clients' => (0..CLIENTS - 1).map { |j| "#{OSPREFIX}client#{j}" } 'clients' => (0..CLIENTS - 1).map { |j| "#{OSPREFIX}client#{j}" },
'iscsi_gw' => (0..NISCSI_GWS - 1).map { |j| "#{OSPREFIX}iscsi_gw#{j}" }
} }
if RESTAPI then if RESTAPI then
@ -283,6 +285,34 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end end
end end
(0..NISCSI_GWS - 1).each do |i|
config.vm.define "#{OSPREFIX}iscsi_gw#{i}" do |iscsi_gw|
iscsi_gw.vm.hostname = "#{OSPREFIX}ceph-iscsi-gw#{i}"
if !OSVM
iscsi_gw.vm.network :private_network, ip: "#{SUBNET}.9#{i}"
end
# Virtualbox
iscsi_gw.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', "#{MEMORY}"]
end
# VMware
iscsi_gw.vm.provider :vmware_fusion do |v|
v.vmx['memsize'] = "#{MEMORY}"
end
# Libvirt
iscsi_gw.vm.provider :libvirt do |lv|
lv.memory = MEMORY
end
# Parallels
iscsi_gw.vm.provider "parallels" do |prl|
prl.name = "ceph-iscsi-gw#{i}"
prl.memory = "#{MEMORY}"
end
end
end
(0..NMONS - 1).each do |i| (0..NMONS - 1).each do |i|
config.vm.define "#{OSPREFIX}mon#{i}" do |mon| config.vm.define "#{OSPREFIX}mon#{i}" do |mon|
mon.vm.hostname = "#{OSPREFIX}ceph-mon#{i}" mon.vm.hostname = "#{OSPREFIX}ceph-mon#{i}"

View File

@ -28,6 +28,7 @@ dummy:
#restapi_group_name: restapis #restapi_group_name: restapis
#rbdmirror_group_name: rbdmirrors #rbdmirror_group_name: rbdmirrors
#client_group_name: clients #client_group_name: clients
#iscsi_group_name: iscsigws
# If check_firewall is true, then ansible will try to determine if the # If check_firewall is true, then ansible will try to determine if the
# Ceph ports are blocked by a firewall. If the machine running ansible # Ceph ports are blocked by a firewall. If the machine running ansible

View File

@ -0,0 +1,10 @@
---
# Variables here are applicable to all host groups NOT roles
# This sample file generated by generate_group_vars_sample.sh
# Dummy variable to avoid error because ansible does not recognize the
# file as a good configuration file when no variable in it.
dummy:

View File

@ -20,6 +20,7 @@ nfs_group_name: nfss
restapi_group_name: restapis restapi_group_name: restapis
rbdmirror_group_name: rbdmirrors rbdmirror_group_name: rbdmirrors
client_group_name: clients client_group_name: clients
iscsi_group_name: iscsigws
# If check_firewall is true, then ansible will try to determine if the # If check_firewall is true, then ansible will try to determine if the
# Ceph ports are blocked by a firewall. If the machine running ansible # Ceph ports are blocked by a firewall. If the machine running ansible

View File

@ -0,0 +1 @@
---

View File

@ -0,0 +1 @@
---

View File

@ -0,0 +1 @@
---

View File

@ -45,3 +45,8 @@
become: True become: True
roles: roles:
- ceph-client - ceph-client
- hosts: iscsigws
become: True
roles:
- ceph-iscsi-gw

View File

@ -11,6 +11,7 @@ rgw_vms: 0
nfs_vms: 0 nfs_vms: 0
rbd_mirror_vms: 0 rbd_mirror_vms: 0
client_vms: 0 client_vms: 0
iscsi_gw_vms: 0
# Deploy RESTAPI on each of the Monitors # Deploy RESTAPI on each of the Monitors
restapi: true restapi: true