kolla-ansible/tools/setup_nodes.yml
SamYaple 6adb5c0aa5 Convert gate to file backend rather than partition
The existing gate partitioned a disk for use with docker, depending
on the gate it would use the swap disk (RAX) or a spare disk (HP).
However, with the new gates (Bluebox + OVH) there is neither a spare
disk nor a swap disk. This leaves us with one choice: File based loop
device.

This patch creates a file at /swapfile to ensure we have swap. It
creates a file at /docker to ensure we have a loop device for Docker.

Right now the /docker file is 10GB and the /swapfile is 4GB due to
size limitations in the gate across all servers and types. This has
proven to be enough space for all our current tests.

Additionally, reduce the number of threads the gate uses to 4 to
prevent the lockup and hour timeout we have been seeing as more
recently in the gate.

The scripts that setup the gate are moved to the tools directory
rather than the tests directory to match the structure of the other
projects.

Partially-Implements: blueprint functional-testing-gate

Change-Id: I3e370f2382b6df36103d8b2ceda9b21d9b4229d5
2016-01-21 22:59:13 +00:00

29 lines
520 B
YAML

---
- hosts: all
sudo: yes
tasks:
- name: Setup /etc/hosts
copy:
src: /etc/hosts
dest: /etc/hosts
- name: Assign hostname
hostname:
name: "{{ inventory_hostname }}"
- name: Copy setup script
copy:
src: setup_{{ ansible_os_family }}.sh
dest: /tmp/setup.sh
mode: 0755
- hosts: all
tasks:
- name: Create log directory for node
file:
state: directory
path: /tmp/{{ inventory_hostname }}
- name: Run node setup
shell: sudo /tmp/setup.sh