From 6adb5c0aa5a5947bdeeb03b03cba29af30902d2f Mon Sep 17 00:00:00 2001 From: SamYaple Date: Tue, 12 Jan 2016 20:52:00 +0000 Subject: 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 --- tests/setup_RedHat.sh | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100755 tests/setup_RedHat.sh (limited to 'tests/setup_RedHat.sh') diff --git a/tests/setup_RedHat.sh b/tests/setup_RedHat.sh deleted file mode 100755 index 4eba9504a..000000000 --- a/tests/setup_RedHat.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -set -o xtrace -set -o errexit - -DEV=$1 - -# (SamYaple)TODO: Remove the path overriding -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -cat | sudo tee /etc/yum.repos.d/docker.repo << EOF -[docker] -name=Docker Main Repository -baseurl=https://yum.dockerproject.org/repo/main/centos/7 -enabled=1 -gpgcheck=1 -gpgkey=https://yum.dockerproject.org/gpg -EOF - -sudo yum install -y libffi-devel openssl-devel docker-engine xfsprogs - -# Only do FS optimization if we have a secondary disk -if [[ -b /dev/${DEV} ]]; then - # Setup backing disk for use with Docker. This is to ensure we use the ephemeral - # disk provided to the build instance. It ensures the correct disk and storage - # driver are used for Docker. It is recommend to use the thin provisioning - # driver. https://github.com/docker/docker/blob/master/man/docker.1.md - sudo parted /dev/${DEV} -s -- mklabel msdos mkpart pri 1 -1 - # Figure out the path to the partitioned device - PARTDEV=$(ls "/dev/${DEV}"* | egrep "/dev/${DEV}p?1") - sudo pvcreate ${PARTDEV} - sudo vgcreate kolla01 ${PARTDEV} - sudo lvcreate -n thin01 -L 60G kolla01 - sudo lvcreate -n thin01meta -L 2G kolla01 - yes | sudo lvconvert --type thin-pool --poolmetadata kolla01/thin01meta kolla01/thin01 - - # Setup Docker - sudo sed -i -r 's,(ExecStart)=(.+),\1=/usr/bin/docker daemon --storage-driver devicemapper --storage-opt dm.fs=xfs --storage-opt dm.thinpooldev=kolla01-thin01 --storage-opt dm.use_deferred_removal=true,' /usr/lib/systemd/system/docker.service - sudo systemctl daemon-reload -fi - -sudo systemctl start docker -sudo docker info - -# disable ipv6 until we're sure routes to fedora mirrors work properly -sudo sh -c 'echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf' -sudo /usr/sbin/sysctl -p - -echo "Completed $0." -- cgit v1.2.3