diff --git a/distributed-tests/create-vm.yml b/distributed-tests/create-vm.yml index 1dab797..5f60464 100755 --- a/distributed-tests/create-vm.yml +++ b/distributed-tests/create-vm.yml @@ -15,7 +15,7 @@ count: '{{ COUNT }}' count_offset: 1 exact_count: yes - group: distributed-test + group: '{{ NAME }}' wait: yes register: rax diff --git a/distributed-tests/delete-vm.yml b/distributed-tests/delete-vm.yml index 7c93349..28764aa 100755 --- a/distributed-tests/delete-vm.yml +++ b/distributed-tests/delete-vm.yml @@ -9,7 +9,7 @@ flavor: performance1-2 image: 8bca010c-c027-4947-b9c9-adaae6e4f020 state: absent - group: distributed-test + group: '{{ NAME }}' wait: True wait_timeout: 600 with_items: "{{ groups['all'] }}" diff --git a/distributed-tests/deploy-gluster-basic-instance.yml b/distributed-tests/deploy-gluster-basic-instance.yml new file mode 100644 index 0000000..0c4eea7 --- /dev/null +++ b/distributed-tests/deploy-gluster-basic-instance.yml @@ -0,0 +1,114 @@ +--- +- name: Deploy basic instance for gluster-test + hosts: all + gather_facts: yes + handlers: + - name: run dracut + command: dracut -v -f + - name: restart sshd + service: name=sshd state=restarted + roles: + - openssh + - selinux + tasks: + - name: Install basic packages + package: + state: present + name: + - automake + - autoconf + - libtool + - flex + - bison + - openssl-devel + - libxml2-devel + - python-devel + - libaio-devel + - libibverbs-devel + - librdmacm-devel + - readline-devel + - lvm2-devel + - glib2-devel + - userspace-rcu-devel + - libcmocka-devel + - libacl-devel + - sqlite-devel + - fuse-devel + - redhat-rpm-config + - nfs-utils + - git + - dbench + - libcurl-devel + - psmisc + + - name: Remove package that cause trouble with the regression suite + package: + state: absent + name: + - qemu-img + - glusterfs-libs + - glusterfs + - glusterfs-api + - glusterfs-client-xlators + + # current regression test suite do not support ipv6, so we have to disable + # it + - lineinfile: + dest: /etc/sysconfig/network-scripts/ifcfg-eth0 + regexp: ^IPV6INIT= + line: IPV6INIT=no + name: Disable ipv6 in eth0 config + + - lineinfile: + dest: /etc/sysconfig/network + regexp: ^NETWORKING_IPV6= + line: NETWORKING_IPV6=no + name: Disable ipv6 in network config + + - sysctl: + name: "{{ item }}" + value: 1 + state: present + reload: yes + with_items: + - net.ipv6.conf.all.disable_ipv6 + - net.ipv6.conf.default.disable_ipv6 + name: Disable ipv6 in sysctl + notify: + - run dracut + + # use "install ipv6 /bin/true", since that's what ip6tables check to see if + # ipv6 is disabled. See reload function on /etc/init.d/ip6tables on RHEL 6. + - copy: + dest: /etc/modprobe.d/ipv6.conf + content: "options ipv6 disable=1\ninstall ipv6 /bin/true" + name: Disable ipv6 module + + - name: Create various directories for tests + file: + name: "{{ item }}" + mode: "u=rwx,g=rx,o=rx" + owner: root + group: root + state: directory + with_items: + - /var/log/glusterfs + - /var/lib/glusterd + - /var/run/gluster + - /d + - /archives + - /d/archived_builds + - /d/backends + - /d/build + - /d/logs + - /archives/archived_builds + - /archives/log + - /archives/logs + + - name: Make sure that root can use password + lineinfile: + dest: /etc/ssh/sshd_config + regexp: "^PermitRootLogin" + line: "PermitRootLogin yes" + state: present + notify: restart sshd diff --git a/distributed-tests/requirements.yml b/distributed-tests/requirements.yml new file mode 100644 index 0000000..3833108 --- /dev/null +++ b/distributed-tests/requirements.yml @@ -0,0 +1,5 @@ +--- +- src: https://github.com/OSAS/ansible-role-openssh + name: openssh +- src: https://github.com/OSAS/ansible-role-selinux + name: selinux diff --git a/distributed-tests/setup.yml b/distributed-tests/setup.yml index a277702..4b50b52 100755 --- a/distributed-tests/setup.yml +++ b/distributed-tests/setup.yml @@ -3,12 +3,12 @@ hosts: all gather_facts: no tasks: - - local_action: - module: wait_for + - wait_for: port: 22 - host: "{{ ansible_ssh_host }}" + host: '{{ ansible_host }}' search_regex: OpenSSH delay: 10 + connection: local - hosts: all gather_facts: yes