]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
iscsi-gw: preparing the new iscsi role 960/head
authorSébastien Han <seb@redhat.com>
Fri, 26 Aug 2016 13:22:47 +0000 (15:22 +0200)
committerSébastien Han <seb@redhat.com>
Fri, 26 Aug 2016 13:29:07 +0000 (15:29 +0200)
adding the bare minimum to test and start the new role.

Signed-off-by: Sébastien Han <seb@redhat.com>
Vagrantfile
group_vars/all.sample
group_vars/iscsi-gws.sample [new file with mode: 0644]
roles/ceph-common/defaults/main.yml
roles/ceph-iscsi-gw/defaults/main.yml [new file with mode: 0644]
roles/ceph-iscsi-gw/meta/main.yml [new file with mode: 0644]
roles/ceph-iscsi-gw/tasks/main.yml [new file with mode: 0644]
site.yml.sample
vagrant_variables.yml.sample

index 0423a92392a40674c1584215b93f35a66e5bdc61..eed730a20765ba6766587fc999241479fcccbf95 100644 (file)
@@ -15,6 +15,7 @@ NNFSS          = settings['nfs_vms']
 RESTAPI        = settings['restapi']
 NRBD_MIRRORS   = settings['rbd_mirror_vms']
 CLIENTS        = settings['client_vms']
+NISCSI_GWS     = settings['iscsi_gw_vms']
 SUBNET         = settings['subnet']
 BOX            = settings['vagrant_box']
 BOX_URL        = settings['vagrant_box_url']
@@ -55,7 +56,8 @@ ansible_provision = proc do |ansible|
     'rgws'            => (0..NRGWS - 1).map { |j| "#{OSPREFIX}rgw#{j}" },
     'nfss'            => (0..NNFSS - 1).map { |j| "#{OSPREFIX}nfs#{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
@@ -283,6 +285,34 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     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|
     config.vm.define "#{OSPREFIX}mon#{i}" do |mon|
       mon.vm.hostname = "#{OSPREFIX}ceph-mon#{i}"
index e0b5919d0c5b7330a6c2360863cba0b16ae67704..0c56c9ce9824ee52996272fca2c36819052d904f 100644 (file)
@@ -28,6 +28,7 @@ dummy:
 #restapi_group_name: restapis
 #rbdmirror_group_name: rbdmirrors
 #client_group_name: clients
+#iscsi_group_name: iscsigws
 
 # 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
diff --git a/group_vars/iscsi-gws.sample b/group_vars/iscsi-gws.sample
new file mode 100644 (file)
index 0000000..1a03a20
--- /dev/null
@@ -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:
+
+
index 9852ea34ea10b489185be42c989bc2d7c2cca40d..04f9cc5bd2b49a4f46e7d5d5271b3405be0f050b 100644 (file)
@@ -20,6 +20,7 @@ nfs_group_name: nfss
 restapi_group_name: restapis
 rbdmirror_group_name: rbdmirrors
 client_group_name: clients
+iscsi_group_name: iscsigws
 
 # 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
diff --git a/roles/ceph-iscsi-gw/defaults/main.yml b/roles/ceph-iscsi-gw/defaults/main.yml
new file mode 100644 (file)
index 0000000..ed97d53
--- /dev/null
@@ -0,0 +1 @@
+---
diff --git a/roles/ceph-iscsi-gw/meta/main.yml b/roles/ceph-iscsi-gw/meta/main.yml
new file mode 100644 (file)
index 0000000..ed97d53
--- /dev/null
@@ -0,0 +1 @@
+---
diff --git a/roles/ceph-iscsi-gw/tasks/main.yml b/roles/ceph-iscsi-gw/tasks/main.yml
new file mode 100644 (file)
index 0000000..ed97d53
--- /dev/null
@@ -0,0 +1 @@
+---
index e8ab7bdfa9515860516046b4e74d6d7f979ae95e..ebbcb39f8164871be6010907c5187439c2edefa3 100644 (file)
@@ -45,3 +45,8 @@
   become: True
   roles:
   - ceph-client
+
+- hosts: iscsigws
+  become: True
+  roles:
+  - ceph-iscsi-gw
index b7fb8a4919c6a5f101495d3d13c625ff6ae09ef3..c7beab01228e5dd6a8e78d3d18b98205d1dd08c3 100644 (file)
@@ -11,6 +11,7 @@ rgw_vms: 0
 nfs_vms: 0
 rbd_mirror_vms: 0
 client_vms: 0
+iscsi_gw_vms: 0
 
 # Deploy RESTAPI on each of the Monitors
 restapi: true