Configure cluster for e2e tests.

When KUBE_E2E_STORAGE_TEST_ENVIRONMENT is set to 'true', kube-up.sh script
will:

- Install the right packages for all storage volumes.
- Use devicemapper as docker storage backend. 'aufs', the default one on
Debian, does not support extended attibutes required by Ceph RBD and Gluster
server containers.

Tested on GCE and Vagrant, e2e tests for storage volumes passes without any
additional configuration.
This commit is contained in:
Jan Safranek
2015-10-29 11:03:34 +01:00
parent f2208a9855
commit fe0741bffe
20 changed files with 81 additions and 3 deletions

View File

@@ -5,11 +5,9 @@ pkg-core:
{% if grains['os_family'] == 'RedHat' %}
- python
- git
- glusterfs-fuse
{% else %}
- apt-transport-https
- python-apt
- glusterfs-client
- nfs-common
- socat
{% endif %}

View File

@@ -1,3 +1,7 @@
{% set grains_opts = grains.get('docker_opts', '') -%}
DOCKER_OPTS="{{grains_opts}} --bridge=cbr0 --iptables=false --ip-masq=false --log-level=warn"
{% set e2e_opts = '' -%}
{% if pillar.get('e2e_storage_test_environment', '').lower() == 'true' -%}
{% set e2e_opts = '-s devicemapper' -%}
{% endif -%}
DOCKER_OPTS="{{grains_opts}} {{e2e_opts}} --bridge=cbr0 --iptables=false --ip-masq=false --log-level=warn"
DOCKER_NOFILE=1000000

View File

@@ -0,0 +1,40 @@
e2e:
{% if grains['os_family'] == 'Debian' and grains['oscodename'] == 'wheezy' %}
# Add GlusterFS 3.5.2 Debian repo - Wheezy has Gluster 3.2 and that's too old for us.
pkgrepo.managed:
- name: deb http://download.gluster.org/pub/gluster/glusterfs/3.5/3.5.2/Debian/wheezy/apt wheezy main
- dist: wheezy
- file: /etc/apt/sources.list.d/gluster.list
- key_url: http://download.gluster.org/pub/gluster/glusterfs/3.5/3.5.2/Debian/wheezy/pubkey.gpg
{% endif %}
# Install various packages required by e2e tests to all hosts.
# 'pkg.latest' is used to install updated glusterfs-client from the repo above,
# GCE image already has glusterfs-client 3.2.5, which is too old.
pkg.latest:
- refresh: true
- pkgs:
- targetcli
- ceph
{% if grains['os_family'] == 'RedHat' %}
- glusterfs-fuse
- rbd-fuse
- iscsi-initiator-utils
- nfs-utils
{% else %}
- glusterfs-client
- open-iscsi
- iscsitarget-dkms
- nfs-common
{% endif %}
{% if grains['os_family'] == 'Debian' %}
# On Debian, re-start open-iscsi to generate unique
# /etc/iscsi/initiatorname.iscsi
open-iscsi:
cmd.run:
- name: 'service open-iscsi restart'
{% endif %}

View File

@@ -6,6 +6,9 @@ base:
{% if grains.get('cloud') == 'aws' %}
- ntp
{% endif %}
{% if pillar.get('e2e_storage_test_environment', '').lower() == 'true' %}
- e2e
{% endif %}
'roles:kubernetes-pool':
- match: grain