diff --git a/tests/README.md b/tests/README.md index 20712d616..7e31375c7 100644 --- a/tests/README.md +++ b/tests/README.md @@ -18,8 +18,10 @@ quickly spin up a kubernetes cluster.The Test framework is designed to install R #### Install Kubernetes You can choose any kubernetes flavor of your choice. The test framework only depends on kubectl being configured. The framework also provides scripts to install Kubernetes. There are two scripts to start the cluster: -1. Minikube: Run [minikube.sh](/tests/scripts/minikube.sh) to setup a single-node Minikube kubernetes. Minikube 0.21.0 and higher is supported. Older minikube versions do not have cephfs or rbd tools installed.(recommended for MacOS) -2. Kubeadm : run [kubeadm.sh](/tests/scripts/kubeadm.sh) to setup a single-node K8s cluster using kubeadm (recommended for ubuntu) +1. **Minikube** (recommended for MacOS): Run [minikube.sh](/tests/scripts/minikube.sh) to setup a single-node Minikube kubernetes. + 1. Minikube v0.21.0 and higher is supported. Older minikube versions do not have cephfs or rbd tools installed. + 1. If using Kubernetes v1.7.3 or higher, then Minikube v0.22.2 or higher is required. +1. **Kubeadm** (recommended for ubuntu): run [kubeadm.sh](/tests/scripts/kubeadm.sh) to setup a single-node K8s cluster using kubeadm These start-up scripts are designed to start any version of kubernetes, Based on `KUBE_VERSION` environment variable By default they start kubernetes version v1.7.5. @@ -35,8 +37,8 @@ To copy rook images generated by build into minikube vm, run the following comma ``` tests/scripts/minikube.sh update tests/scripts/minikube.sh helm -``` -kubeadm.sh starts kubernetes on the host, so all the images generated by build should be available to the cluster. +``` +kubeadm.sh starts kubernetes on the host, so all the images generated by build should be available to the cluster. ### Install Helm @@ -78,7 +80,7 @@ In addition to standard go tests parameters, the following custom parameters are Parameter | Description | Possible values | Default --- |--- | --- | --- rook_platform| platform rook needs to be installed on | kubernetes | kubernetes -k8s_version | version of Kubernetes to be installed | v1.5+ | v1.7.4 +k8s_version | version of Kubernetes to be installed | v1.5+ | v1.7.5 rook_image | rook image name to be installed | valid image name | rook/rook toolbox_image | toolbox image name to be installed | valid image name | rook/toolbox skip_install_rook | skips installing rook (if already installed) | true or false | false diff --git a/tests/framework/installer/install_data.go b/tests/framework/installer/install_data.go index 020a68cb0..1a4735b44 100644 --- a/tests/framework/installer/install_data.go +++ b/tests/framework/installer/install_data.go @@ -189,37 +189,6 @@ spec: versionTag: master dataDirHostPath: hostNetwork: false -# To control where various services will be scheduled by kubernetes, use the placement configuration sections below. -# The example under 'all' would have all services scheduled on kubernetes nodes labeled with 'role=storage' and -# tolerate taints with a key of 'storage-node'. -# placement: -# all: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: role -# operator: In -# values: -# - storage-node -# tolerations: -# - key: storage-node -# operator: Exists -# api: -# nodeAffinity: -# tolerations: -# mds: -# nodeAffinity: -# tolerations: -# mon: -# nodeAffinity: -# tolerations: -# osd: -# nodeAffinity: -# tolerations: -# rgw: -# nodeAffinity: -# tolerations: storage: # cluster level storage configuration and selection useAllNodes: true useAllDevices: false @@ -230,20 +199,7 @@ spec: storeType: filestore databaseSizeMB: 1024 # this value can be removed for environments with normal sized disks (100 GB or larger) journalSizeMB: 1024 # this value can be removed for environments with normal sized disks (20 GB or larger) -# Individual nodes and their config can be specified as well, but 'useAllNodes' above must be set to false. Then, only the named -# nodes below will be used as storage resources. Each node's 'name' field should match their 'kubernetes.io/hostname' label. -# nodes: -# - name: "172.17.4.101" -# directories: # specific directores to use for storage can be specified for each node -# - path: "/rook/storage-dir" -# - name: "172.17.4.201" -# devices: # specific devices to use for storage can be specified for each node -# - name: "sdb" -# - name: "sdc" -# storeConfig: # configuration can be specified at the node level which overrides the cluster level config -# storeType: bluestore -# - name: "172.17.4.301" -# deviceFilter: "^sd."` +` } //GetRookToolBox returns rook-toolbox manifest diff --git a/tests/framework/utils/k8s_helper.go b/tests/framework/utils/k8s_helper.go index 3be69b715..0984c2184 100644 --- a/tests/framework/utils/k8s_helper.go +++ b/tests/framework/utils/k8s_helper.go @@ -751,5 +751,5 @@ func (k8sh *K8sHelper) CreateAnonSystemClusterBinding() { logger.Warningf("anon-user-access not created") return } - logger.Warningf("anon-user-access created") + logger.Infof("anon-user-access created") } diff --git a/tests/scripts/minikube.sh b/tests/scripts/minikube.sh index b6cf2207f..ec4427650 100755 --- a/tests/scripts/minikube.sh +++ b/tests/scripts/minikube.sh @@ -65,6 +65,8 @@ case "${1:-}" in copy_image_to_cluster ${BUILD_REGISTRY}/rook-amd64 rook/rook:master copy_image_to_cluster ${BUILD_REGISTRY}/toolbox-amd64 rook/toolbox:master + + docker pull ceph/base copy_image_to_cluster ceph/base ceph/base ;;