]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: do not deploy all daemons for shrink osds scenarios
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 23 Jul 2018 14:40:49 +0000 (16:40 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 23 Jul 2018 16:31:12 +0000 (18:31 +0200)
Let's create a dedicated environment for these scenarios, there is no
need to deploy everything.
By the way, doing so will save some times.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b89cc1746f8652b67d95410ed80473d1a2c3d312)

15 files changed:
tests/functional/centos/7/shrink_osd/Vagrantfile [new symlink]
tests/functional/centos/7/shrink_osd/ceph-override.json [new file with mode: 0644]
tests/functional/centos/7/shrink_osd/group_vars/all [new file with mode: 0644]
tests/functional/centos/7/shrink_osd/group_vars/mons [new file with mode: 0644]
tests/functional/centos/7/shrink_osd/group_vars/osds [new file with mode: 0644]
tests/functional/centos/7/shrink_osd/hosts [new file with mode: 0644]
tests/functional/centos/7/shrink_osd/vagrant_variables.yml [new file with mode: 0644]
tests/functional/centos/7/shrink_osd_container/Vagrantfile [new symlink]
tests/functional/centos/7/shrink_osd_container/ceph-override.json [new symlink]
tests/functional/centos/7/shrink_osd_container/group_vars/all [new file with mode: 0644]
tests/functional/centos/7/shrink_osd_container/group_vars/mons [new file with mode: 0644]
tests/functional/centos/7/shrink_osd_container/group_vars/osds [new file with mode: 0644]
tests/functional/centos/7/shrink_osd_container/hosts [new file with mode: 0644]
tests/functional/centos/7/shrink_osd_container/vagrant_variables.yml [new file with mode: 0644]
tox.ini

diff --git a/tests/functional/centos/7/shrink_osd/Vagrantfile b/tests/functional/centos/7/shrink_osd/Vagrantfile
new file mode 120000 (symlink)
index 0000000..dfd7436
--- /dev/null
@@ -0,0 +1 @@
+../../../../../Vagrantfile
\ No newline at end of file
diff --git a/tests/functional/centos/7/shrink_osd/ceph-override.json b/tests/functional/centos/7/shrink_osd/ceph-override.json
new file mode 100644 (file)
index 0000000..1a9600a
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "ceph_conf_overrides": {
+               "global": {
+                       "osd_pool_default_pg_num": 12,
+                       "osd_pool_default_size": 1
+               }
+       },
+  "ceph_mon_docker_memory_limit": "2g"
+}
diff --git a/tests/functional/centos/7/shrink_osd/group_vars/all b/tests/functional/centos/7/shrink_osd/group_vars/all
new file mode 100644 (file)
index 0000000..13a644b
--- /dev/null
@@ -0,0 +1,19 @@
+---
+ceph_origin: repository
+ceph_repository: community
+cluster: test
+public_network: "192.168.1.0/24"
+cluster_network: "192.168.2.0/24"
+journal_size: 100
+radosgw_interface: eth1
+osd_objectstore: filestore
+ceph_conf_overrides:
+  global:
+    osd_pool_default_size: 3
+devices:
+  - '/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001'
+  - '/dev/sdb'
+dedicated_devices:
+  - '/dev/sdc'
+  - '/dev/sdc'
+openstack_config: False
diff --git a/tests/functional/centos/7/shrink_osd/group_vars/mons b/tests/functional/centos/7/shrink_osd/group_vars/mons
new file mode 100644 (file)
index 0000000..4b88173
--- /dev/null
@@ -0,0 +1,10 @@
+---
+create_crush_tree: True
+crush_rule_config: True
+crush_rule_hdd:
+  name: HDD
+  root: HDD
+  type: host
+  default: true
+crush_rules:
+  - "{{ crush_rule_hdd }}"
\ No newline at end of file
diff --git a/tests/functional/centos/7/shrink_osd/group_vars/osds b/tests/functional/centos/7/shrink_osd/group_vars/osds
new file mode 100644 (file)
index 0000000..c3b18db
--- /dev/null
@@ -0,0 +1,4 @@
+---
+os_tuning_params:
+  - { name: fs.file-max, value: 26234859 }
+osd_scenario: non-collocated
diff --git a/tests/functional/centos/7/shrink_osd/hosts b/tests/functional/centos/7/shrink_osd/hosts
new file mode 100644 (file)
index 0000000..9f49394
--- /dev/null
@@ -0,0 +1,10 @@
+[mons]
+ceph-mon0 monitor_address=192.168.1.10
+
+[mgrs]
+ceph-mon0
+
+[osds]
+ceph-osd0 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'ceph-osd0' }"
+ceph-osd1 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'ceph-osd1' }"
+ceph-osd2 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'ceph-osd2' }"
diff --git a/tests/functional/centos/7/shrink_osd/vagrant_variables.yml b/tests/functional/centos/7/shrink_osd/vagrant_variables.yml
new file mode 100644 (file)
index 0000000..768b7b7
--- /dev/null
@@ -0,0 +1,76 @@
+---
+
+# DEPLOY CONTAINERIZED DAEMONS
+docker: false
+
+# DEFINE THE NUMBER OF VMS TO RUN
+mon_vms: 1
+osd_vms: 3
+mds_vms: 0
+rgw_vms: 0
+nfs_vms: 0
+rbd_mirror_vms: 0
+client_vms: 0
+iscsi_gw_vms: 0
+mgr_vms: 0
+
+# Deploy RESTAPI on each of the Monitors
+restapi: false
+
+# INSTALL SOURCE OF CEPH
+# valid values are 'stable' and 'dev'
+ceph_install_source: stable
+
+# SUBNETS TO USE FOR THE VMS
+public_subnet: 192.168.71
+cluster_subnet: 192.168.72
+
+# MEMORY
+# set 1024 for CentOS
+memory: 1024
+
+# Ethernet interface name
+# use eth1 for libvirt and ubuntu precise, enp0s8 for CentOS and ubuntu xenial
+eth: 'eth1'
+
+# Disks
+# For libvirt use disks: "[ '/dev/vdb', '/dev/vdc' ]"
+# For CentOS7 use disks: "[ '/dev/sda', '/dev/sdb' ]"
+disks: "[ '/dev/sdb', '/dev/sdc' ]"
+
+# VAGRANT BOX
+# Ceph boxes are *strongly* suggested. They are under better control and will
+# not get updated frequently unless required for build systems. These are (for
+# now):
+#
+# * ceph/ubuntu-xenial
+#
+# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64
+# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet
+# libvirt CentOS: centos/7
+# parallels Ubuntu: parallels/ubuntu-14.04
+# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller'
+# For more boxes have a look at:
+#   - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
+#   - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
+vagrant_box: centos/7
+#ssh_private_key_path: "~/.ssh/id_rsa"
+# The sync directory changes based on vagrant box
+# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant
+#vagrant_sync_dir: /home/vagrant/sync
+vagrant_sync_dir: /vagrant
+# Disables synced folder creation. Not needed for testing, will skip mounting
+# the vagrant directory on the remote box regardless of the provider.
+vagrant_disable_synced_folder: true
+# VAGRANT URL
+# This is a URL to download an image from an alternate location.  vagrant_box
+# above should be set to the filename of the image.
+# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
+# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box
+# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
+
+os_tuning_params:
+  - { name: fs.file-max, value: 26234859 }
+
+# VM prefix name, need to match the hostname
+label_prefix: ceph
diff --git a/tests/functional/centos/7/shrink_osd_container/Vagrantfile b/tests/functional/centos/7/shrink_osd_container/Vagrantfile
new file mode 120000 (symlink)
index 0000000..dfd7436
--- /dev/null
@@ -0,0 +1 @@
+../../../../../Vagrantfile
\ No newline at end of file
diff --git a/tests/functional/centos/7/shrink_osd_container/ceph-override.json b/tests/functional/centos/7/shrink_osd_container/ceph-override.json
new file mode 120000 (symlink)
index 0000000..775cb00
--- /dev/null
@@ -0,0 +1 @@
+../cluster/ceph-override.json
\ No newline at end of file
diff --git a/tests/functional/centos/7/shrink_osd_container/group_vars/all b/tests/functional/centos/7/shrink_osd_container/group_vars/all
new file mode 100644 (file)
index 0000000..a730b07
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# this is only here to let the CI tests know
+# that this scenario is using docker
+docker: True
+
+containerized_deployment: True
+cluster: test
+monitor_interface: eth1
+radosgw_interface: eth1
+ceph_mon_docker_subnet: "{{ public_network }}"
+journal_size: 100
+ceph_docker_on_openstack: False
+osd_objectstore: filestore
+public_network: "192.168.17.0/24"
+cluster_network: "192.168.18.0/24"
+rgw_override_bucket_index_max_shards: 16
+rgw_bucket_default_quota_max_objects: 1638400
+ceph_conf_overrides:
+  global:
+    osd_pool_default_size: 1
+devices:
+  - '/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001'
+  - /dev/sdb
+openstack_config: False
diff --git a/tests/functional/centos/7/shrink_osd_container/group_vars/mons b/tests/functional/centos/7/shrink_osd_container/group_vars/mons
new file mode 100644 (file)
index 0000000..4b54059
--- /dev/null
@@ -0,0 +1,10 @@
+---
+create_crush_tree: True
+crush_rule_config: True
+crush_rule_hdd:
+  name: HDD
+  root: HDD
+  type: host
+  default: true
+crush_rules:
+  - "{{ crush_rule_hdd }}"
diff --git a/tests/functional/centos/7/shrink_osd_container/group_vars/osds b/tests/functional/centos/7/shrink_osd_container/group_vars/osds
new file mode 100644 (file)
index 0000000..793d76b
--- /dev/null
@@ -0,0 +1,5 @@
+---
+# OSD_FORCE_ZAP is only for Jewel, the function does not exist anymore on Luminous and above
+ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
+ceph_osd_docker_run_script_path: /var/tmp
+osd_scenario: collocated
diff --git a/tests/functional/centos/7/shrink_osd_container/hosts b/tests/functional/centos/7/shrink_osd_container/hosts
new file mode 100644 (file)
index 0000000..8f48f40
--- /dev/null
@@ -0,0 +1,10 @@
+[mons]
+mon0
+
+[mgrs]
+mon0
+
+[osds]
+osd0 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'osd0' }"
+osd1 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'osd1' }"
+osd2 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'osd2' }"
diff --git a/tests/functional/centos/7/shrink_osd_container/vagrant_variables.yml b/tests/functional/centos/7/shrink_osd_container/vagrant_variables.yml
new file mode 100644 (file)
index 0000000..354ef8f
--- /dev/null
@@ -0,0 +1,63 @@
+---
+
+# DEPLOY CONTAINERIZED DAEMONS
+docker: True
+
+# DEFINE THE NUMBER OF VMS TO RUN
+mon_vms: 1
+osd_vms: 3
+mds_vms: 0
+rgw_vms: 0
+nfs_vms: 0
+rbd_mirror_vms: 0
+client_vms: 0
+iscsi_gw_vms: 0
+mgr_vms: 0
+
+# Deploy RESTAPI on each of the Monitors
+restapi: false
+
+# SUBNETS TO USE FOR THE VMS
+public_subnet: 192.168.73
+cluster_subnet: 192.168.74
+
+# MEMORY
+# set 1024 for CentOS
+memory: 1024
+
+# Disks
+# For libvirt use disks: "[ '/dev/vdb', '/dev/vdc' ]"
+# For CentOS7 use disks: "[ '/dev/sda', '/dev/sdb' ]"
+disks: "[ '/dev/sda', '/dev/sdb' ]"
+
+# VAGRANT BOX
+# Ceph boxes are *strongly* suggested. They are under better control and will
+# not get updated frequently unless required for build systems. These are (for
+# now):
+#
+# * ceph/ubuntu-xenial
+#
+# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64
+# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet
+# libvirt CentOS: centos/7
+# parallels Ubuntu: parallels/ubuntu-14.04
+# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller'
+# For more boxes have a look at:
+#   - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
+#   - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
+vagrant_box: centos/atomic-host
+#client_vagrant_box: centos/7
+#ssh_private_key_path: "~/.ssh/id_rsa"
+# The sync directory changes based on vagrant box
+# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant
+#vagrant_sync_dir: /home/vagrant/sync
+vagrant_sync_dir: /vagrant
+# Disables synced folder creation. Not needed for testing, will skip mounting
+# the vagrant directory on the remote box regardless of the provider.
+vagrant_disable_synced_folder: true
+# VAGRANT URL
+# This is a URL to download an image from an alternate location.  vagrant_box
+# above should be set to the filename of the image.
+# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
+# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box
+# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
diff --git a/tox.ini b/tox.ini
index 2970c4a855cfe3a8299b269cba18e8dd56ddbf2f..efd76f17eaca06b7b80c7328a74ae00e84976951 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -168,8 +168,8 @@ changedir=
   bluestore_osds_non_container: {toxinidir}/tests/functional/centos/7/bs-osds-non-container
   shrink_mon: {toxinidir}/tests/functional/centos/7/cluster
   shrink_mon_container: {toxinidir}/tests/functional/centos/7/docker
-  shrink_osd: {toxinidir}/tests/functional/centos/7/cluster
-  shrink_osd_container: {toxinidir}/tests/functional/centos/7/docker
+  shrink_osd: {toxinidir}/tests/functional/centos/7/shrink_osd
+  shrink_osd_container: {toxinidir}/tests/functional/centos/7/shrink_osd_container
   # an alias for centos7_cluster, this makes the name better suited for rhcs testing
   cluster: {toxinidir}/tests/functional/centos/7/cluster
   # tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker