diff --git a/tools/gate/README.rst b/tools/gate/README.rst index bdaed3b23e..dfbad083cb 100644 --- a/tools/gate/README.rst +++ b/tools/gate/README.rst @@ -6,8 +6,17 @@ locally to aid development and for demonstration purposes. Please note that they assume full control of a machine, and may be destructive in nature, so should only be run on a dedicated host. -Usage ------ +Supported Platforms +~~~~~~~~~~~~~~~~~~~ + +Currently supported host platforms are: + * Ubuntu 16.04 + * CentOS 7 + * Fedora 25 + + +Usage (Single Node) +------------------- The Gate scripts use the ``setup_gate.sh`` as an entrypoint and are controlled by environment variables, an example of use to run the basic @@ -20,10 +29,34 @@ integration test is below: export PVC_BACKEND=ceph ./tools/gate/setup_gate.sh -Supported Platforms -~~~~~~~~~~~~~~~~~~~ -Currently supported host platforms are: \* Ubuntu 16.04 \* CentOS 7 +Usage (Multi Node) +------------------ -With some preparation to docker, and disabling of SELinux operation of -Fedora 25 is also supported. +To use for a multinode deployment you simply need to set a few extra environment +variables: + +.. code:: bash + + export INTEGRATION=multi + export INTEGRATION_TYPE=basic + export PVC_BACKEND=ceph + #IP of primary node: + export PRIMARY_NODE_IP=1.2.3.4 + #IP's of subnodes: + export SUB_NODE_IPS="1.2.3.5 1.2.3.6 1.2.3.7" + #Location of SSH private key to use with subnodes: + export SSH_PRIVATE_KEY=/etc/nodepool/id_rsa + ./tools/gate/setup_gate.sh + + +Options +------- + +Rather than ceph, you may use a nfs based backend. This option is especially +useful on old or low spec machines, though is not currently supported with +Linux Kernels >=4.10: + +.. code:: bash + + export PVC_BACKEND=nfs diff --git a/tools/gate/setup_gate_worker_nodes.sh b/tools/gate/setup_gate_worker_nodes.sh index 91db2904b7..3d3f43ec1f 100755 --- a/tools/gate/setup_gate_worker_nodes.sh +++ b/tools/gate/setup_gate_worker_nodes.sh @@ -14,15 +14,16 @@ set -ex : ${SSH_PRIVATE_KEY:="/etc/nodepool/id_rsa"} +: ${PRIMARY_NODE_IP:="$(cat /etc/nodepool/primary_node_private | tail -1)"} +: ${SUB_NODE_IPS:="$(cat /etc/nodepool/sub_nodes_private)"} + sudo chown $(whoami) ${SSH_PRIVATE_KEY} sudo chmod 600 ${SSH_PRIVATE_KEY} -PRIMARY_NODE_IP=$(cat /etc/nodepool/primary_node_private | tail -1) KUBEADM_TOKEN=$(sudo docker exec kubeadm-aio kubeadm token list | tail -n -1 | awk '{ print $1 }') - SUB_NODE_PROVISION_SCRIPT=$(mktemp --suffix=.sh) -cat /etc/nodepool/sub_nodes_private | while read SUB_NODE; do +for SUB_NODE in $SUB_NODE_IPS ; do cat >> ${SUB_NODE_PROVISION_SCRIPT} <> ~/.ssh/known_hosts ssh -i ${SSH_PRIVATE_KEY} $(whoami)@${SUB_NODE} mkdir -p ${WORK_DIR%/*}