From 9183c3cd13492455837474976b7a67caef9311b9 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 11:23:11 +0530 Subject: [PATCH 01/62] Initial changes for login Signed-off-by: anisha.kj --- .travis.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8180cc78d..b887f4462 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ jobs: - stage: unit name: Unit tests env: - - HELM_VERSION=v2.12.0 + - HELM_VERSION=v3.2.1 - DEP_VERSION=v0.5.0 install: - curl -Lo dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/ @@ -45,27 +45,17 @@ jobs: env: - KUBECTL_VERSION=v1.15.0 - OPERATOR_SDK_VERSION=v0.17.0 - - HELM_VERSION=v2.12.0 + - HELM_VERSION=v3.2.1 - DEP_VERSION=v0.5.0 - - CLUSTER_NAME="pravega-operator-travis-$(date +'%Y%m%d%H%M%S')" - - CLUSTER_ZONE=us-west-2 - - CLUSTER_SIZE=3 - - CLUSTER_NODE_TYPE=m5.xlarge - - CLUSTER_NODE_GROUP=standard-workers install: - - pip install --upgrade --user awscli - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + - curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz && tar xvzf sshpass-1.06.tar.gz && cd sshpass-1.06 && ./configure && sudo make install - curl -Lo dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/ - curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/ - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - - curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp - - sudo mv /tmp/eksctl /usr/local/bin - - eksctl version - - aws configure set default.region $CLUSTER_ZONE - - aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID - - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY - travis_wait 20 eksctl create cluster --name $CLUSTER_NAME --version 1.15 --nodegroup-name $CLUSTER_NODE_GROUP --node-type $CLUSTER_NODE_TYPE --nodes $CLUSTER_SIZE + - sshpass -p pravega ssh -p 22 -o StrictHostKeyChecking=no root@147.75.94.155 - kubectl config view - kubectl config current-context - kubectl get nodes -o wide @@ -73,7 +63,6 @@ jobs: # Install Helm Tiller - kubectl create serviceaccount --namespace kube-system tiller - kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller - - helm init --service-account tiller --wait # Install NFS provisioner - helm install stable/nfs-server-provisioner - kubectl -n default create -f test/e2e/resources/tier2.yaml From c74b35d611ab0ddba1e51b21b55cccaaaede890f Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 11:38:57 +0530 Subject: [PATCH 02/62] made changes for helm2 Signed-off-by: anisha.kj --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b887f4462..9136b0355 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ jobs: - stage: unit name: Unit tests env: - - HELM_VERSION=v3.2.1 + - HELM_VERSION=v2.12.0 - DEP_VERSION=v0.5.0 install: - curl -Lo dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/ @@ -45,7 +45,7 @@ jobs: env: - KUBECTL_VERSION=v1.15.0 - OPERATOR_SDK_VERSION=v0.17.0 - - HELM_VERSION=v3.2.1 + - HELM_VERSION=v2.12.0 - DEP_VERSION=v0.5.0 install: - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ @@ -54,7 +54,6 @@ jobs: - curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/ - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - - travis_wait 20 eksctl create cluster --name $CLUSTER_NAME --version 1.15 --nodegroup-name $CLUSTER_NODE_GROUP --node-type $CLUSTER_NODE_TYPE --nodes $CLUSTER_SIZE - sshpass -p pravega ssh -p 22 -o StrictHostKeyChecking=no root@147.75.94.155 - kubectl config view - kubectl config current-context @@ -63,6 +62,7 @@ jobs: # Install Helm Tiller - kubectl create serviceaccount --namespace kube-system tiller - kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller + - helm init --service-account tiller --wait # Install NFS provisioner - helm install stable/nfs-server-provisioner - kubectl -n default create -f test/e2e/resources/tier2.yaml From a902cd5e28aa8e660739d469a15964f2a6628d5a Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 12:03:44 +0530 Subject: [PATCH 03/62] Made the changes Signed-off-by: anisha.kj --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9136b0355..3a94efb7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,6 @@ jobs: - stage: e2e name: End-to-end tests - if: type = pull_request OR branch = master OR tag IS present services: - docker env: From 47b13e69a9fae8e37b5c4e59543d60db1bba1dbd Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 18:46:58 +0530 Subject: [PATCH 04/62] Made login changes Signed-off-by: anisha.kj --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3a94efb7d..5562a715d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,7 @@ jobs: - OPERATOR_SDK_VERSION=v0.17.0 - HELM_VERSION=v2.12.0 - DEP_VERSION=v0.5.0 + - CLUSTER_NAME="pravega-operator-travis-$(date +'%Y%m%d%H%M%S')" install: - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ - curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz && tar xvzf sshpass-1.06.tar.gz && cd sshpass-1.06 && ./configure && sudo make install @@ -53,7 +54,13 @@ jobs: - curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/ - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - - sshpass -p pravega ssh -p 22 -o StrictHostKeyChecking=no root@147.75.94.155 + - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 + - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli + - ./packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - sleep 120 + - CLUSTER_ID='packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'' + - CLUSTER-IP='packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}'' + - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From bf63673c6983bf620001d7129679d0944574362f Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 19:01:37 +0530 Subject: [PATCH 05/62] modified travis Signed-off-by: anisha.kj --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5562a715d..944703e24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,8 +58,8 @@ jobs: - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli - ./packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 120 - - CLUSTER_ID='packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'' - - CLUSTER-IP='packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}'' + - CLUSTER_ID=`./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` + - CLUSTER-IP=`./packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}'` - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view - kubectl config current-context From 6e8646407f223d1279a2a1c23473ef2d7adf9e3d Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 19:13:39 +0530 Subject: [PATCH 06/62] modified travis Signed-off-by: anisha.kj --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 944703e24..43efbccaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,8 +58,9 @@ jobs: - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli - ./packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 120 - - CLUSTER_ID=`./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` - - CLUSTER-IP=`./packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}'` + - CLUSTER-ID=`./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` + - echo $CLUSTER-ID + - CLUSTER-IP=`./packet-cli device get -i $CLUSTER-ID | grep "\- address:" | head -1 |awk '{print $3}'` - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view - kubectl config current-context From 268860b1d18c8fb8a9c823731af919ef4e4ef854 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 19:26:07 +0530 Subject: [PATCH 07/62] Modified job Signed-off-by: anisha.kj --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 43efbccaf..9b6f901dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,7 @@ jobs: - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli - ./packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 120 + - ./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER-ID=`./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` - echo $CLUSTER-ID - CLUSTER-IP=`./packet-cli device get -i $CLUSTER-ID | grep "\- address:" | head -1 |awk '{print $3}'` From d20679682169db476e4f1cc5e3888ff1462c187d Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 19:37:52 +0530 Subject: [PATCH 08/62] modified travis Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9b6f901dd..777f86d5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,7 @@ jobs: - sleep 120 - ./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER-ID=`./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` - - echo $CLUSTER-ID + - echo " clsuter id is $CLUSTER-ID" - CLUSTER-IP=`./packet-cli device get -i $CLUSTER-ID | grep "\- address:" | head -1 |awk '{print $3}'` - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view From 877e0bbd87752ed3c0a259a6ed7c7f9c0bc571bf Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 19:53:48 +0530 Subject: [PATCH 09/62] Modified packet Signed-off-by: anisha.kj --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 777f86d5d..7353e67af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,13 +55,13 @@ jobs: - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 - - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli - - ./packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && mv packet-cli /usr/local/bin/ + - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 120 - - ./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - - CLUSTER-ID=`./packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` + - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' + - CLUSTER-ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` - echo " clsuter id is $CLUSTER-ID" - - CLUSTER-IP=`./packet-cli device get -i $CLUSTER-ID | grep "\- address:" | head -1 |awk '{print $3}'` + - CLUSTER-IP=`packet-cli device get -i $CLUSTER-ID | grep "\- address:" | head -1 |awk '{print $3}'` - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view - kubectl config current-context From 0a30a7229ed5231a8ba3c6c49b507b69c55b12c8 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 20:00:36 +0530 Subject: [PATCH 10/62] fixed sudo Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7353e67af..f2b5d9b9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ jobs: - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 - - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && mv packet-cli /usr/local/bin/ + - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 120 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' From 10fb89106114c54e191712444ade8298f00fb064 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 20:18:10 +0530 Subject: [PATCH 11/62] Modified travis Signed-off-by: anisha.kj --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2b5d9b9c..6a162478c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,9 +59,9 @@ jobs: - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 120 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - - CLUSTER-ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}'` - - echo " clsuter id is $CLUSTER-ID" - - CLUSTER-IP=`packet-cli device get -i $CLUSTER-ID | grep "\- address:" | head -1 |awk '{print $3}'` + - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` + - echo " clsuter id is $CLUSTER_ID" + - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}'` - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view - kubectl config current-context From 3a977cea64802773dd00a0b3ac64eec0f1358946 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 20:31:26 +0530 Subject: [PATCH 12/62] modified space Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6a162478c..e8184a6cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ jobs: - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - echo " clsuter id is $CLUSTER_ID" - - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}'` + - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP - kubectl config view - kubectl config current-context From 72e422cfb2ffcccc33ff3f22ce9b2a5395e3d944 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 20:48:25 +0530 Subject: [PATCH 13/62] modified cluster ip Signed-off-by: anisha.kj --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e8184a6cc..ee6bda3c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,7 +62,8 @@ jobs: - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - - ssh -p 22 -o StrictHostKeyChecking=no root@$CLUSTER-IP + - echo "Cluster IP is $CLUSTER_IP" + - ssh root@$CLUSTER-IP - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From e208ca11da356bd76bf3fb38b43fc95a65b75dd9 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 21:16:42 +0530 Subject: [PATCH 14/62] increased sleep Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee6bda3c3..e806ded9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ jobs: - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - - sleep 120 + - sleep 600 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - echo " clsuter id is $CLUSTER_ID" From 498ecadcf4a418b485612f66f2ea2d01cb75098a Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 21:35:51 +0530 Subject: [PATCH 15/62] Modified command Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e806ded9f..2891e1301 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ jobs: - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - echo " clsuter id is $CLUSTER_ID" - - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` + - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - ssh root@$CLUSTER-IP - kubectl config view From 21577974cc0bdba637b3a66bc74fa7f845f4bdca Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 21:54:46 +0530 Subject: [PATCH 16/62] Reduced sleep Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2891e1301..ff29bf845 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ jobs: - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - - sleep 600 + - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - echo " clsuter id is $CLUSTER_ID" From 53e06a83f08fcdba6830eb1d1afaaa185c45bb6e Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 22:08:40 +0530 Subject: [PATCH 17/62] Changed variable name Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff29bf845..2780c135a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,7 +63,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh root@$CLUSTER-IP + - ssh root@$CLUSTER_IP - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From 51b9e508c5006cff990185be1027aeaa97acb169 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 22:24:25 +0530 Subject: [PATCH 18/62] Modified ssh Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2780c135a..6220637a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,7 +63,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh root@$CLUSTER_IP + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From e757921db00630b1660488c4f79a1244d78d4b7f Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 27 Jul 2020 22:51:48 +0530 Subject: [PATCH 19/62] added sudo Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6220637a9..015f2d31d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,7 +63,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP + - sudo ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From 50bfbb39d2799948804b4556e3a070bd0a4f21c3 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 10:25:49 +0530 Subject: [PATCH 20/62] Added ssh keys Signed-off-by: anisha.kj --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 015f2d31d..d42460fe2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,10 @@ jobs: before_script: - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ + - ssh-keygen -f ~/.ssh/id_rsa -P "" + - pub_key=`cat ~/.ssh/id_rsa.pub` + - echo " publc key is $pub_key" + - packet-cli ssh-key create --key $pub_key --label pravega - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' From fe21847c7431b42bd5d20ddff215d6b0ab3d3c9e Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 10:54:31 +0530 Subject: [PATCH 21/62] Added logs Signed-off-by: anisha.kj --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d42460fe2..c4c9020e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,6 +59,7 @@ jobs: - ssh-keygen -f ~/.ssh/id_rsa -P "" - pub_key=`cat ~/.ssh/id_rsa.pub` - echo " publc key is $pub_key" + - echo "packet-cli ssh-key create --key $pub_key --label pravega" - packet-cli ssh-key create --key $pub_key --label pravega - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 From 410872479f9998dba893f9625f0535deb535b0b4 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 11:02:54 +0530 Subject: [PATCH 22/62] Added quotes Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c4c9020e5..ccb452c9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,7 @@ jobs: - pub_key=`cat ~/.ssh/id_rsa.pub` - echo " publc key is $pub_key" - echo "packet-cli ssh-key create --key $pub_key --label pravega" - - packet-cli ssh-key create --key $pub_key --label pravega + - packet-cli ssh-key create --key \"$pub_key\" --label pravega - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' From 9114014856f6f7dfe22465385bb3649fe1112349 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 11:23:26 +0530 Subject: [PATCH 23/62] Added logs Signed-off-by: anisha.kj --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ccb452c9a..71ce503d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,8 +59,8 @@ jobs: - ssh-keygen -f ~/.ssh/id_rsa -P "" - pub_key=`cat ~/.ssh/id_rsa.pub` - echo " publc key is $pub_key" - - echo "packet-cli ssh-key create --key $pub_key --label pravega" - - packet-cli ssh-key create --key \"$pub_key\" --label pravega + - echo "packet-cli ssh-key create --key \"$pub_key\" --label pravega" + - packet-cli ssh-key create --key \"$pub_key\" --label "pravega" - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' From 535450ed6c5004f86af425b04bdac4cf3b6ec9de Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 15:26:17 +0530 Subject: [PATCH 24/62] Added ssh keys Signed-off-by: anisha.kj --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71ce503d5..280adec7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,8 +59,8 @@ jobs: - ssh-keygen -f ~/.ssh/id_rsa -P "" - pub_key=`cat ~/.ssh/id_rsa.pub` - echo " publc key is $pub_key" - - echo "packet-cli ssh-key create --key \"$pub_key\" --label pravega" - - packet-cli ssh-key create --key \"$pub_key\" --label "pravega" + - echo "packet-cli ssh-key create --key \"$(cat ~/.ssh/id_rsa.pub)\" --label \"pravega\"" + - packet-cli ssh-key create --key "$(cat ~/.ssh/id_rsa.pub)" --label "pravega" - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' From db1fb8c46a0b078a69049b9c505a78e285179f83 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 15:41:39 +0530 Subject: [PATCH 25/62] removed sudo Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 280adec7f..f2fe1b7df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,7 +68,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - sudo ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From 832ea56458515286faf550fa4c922b06fb6fd0f0 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 17:24:15 +0530 Subject: [PATCH 26/62] added more nodes Signed-off-by: anisha.kj --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f2fe1b7df..8866d1e1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,6 +62,8 @@ jobs: - echo "packet-cli ssh-key create --key \"$(cat ~/.ssh/id_rsa.pub)\" --label \"pravega\"" - packet-cli ssh-key create --key "$(cat ~/.ssh/id_rsa.pub)" --label "pravega" - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - packet-cli device create -H $(CLUSTER_NAME)-worker1 -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - packet-cli device create -H $(CLUSTER_NAME)-worker2 -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` From aea4177fa88449ad2366034cba6a36e9c9643948 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 28 Jul 2020 17:29:14 +0530 Subject: [PATCH 27/62] removed token Signed-off-by: anisha.kj --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8866d1e1e..d52c10fc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,6 @@ jobs: - curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/ - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - - export PACKET_TOKEN=qD8sD5RmExZFcRpQo2hBXi2FNyAFkA31 - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ - ssh-keygen -f ~/.ssh/id_rsa -P "" - pub_key=`cat ~/.ssh/id_rsa.pub` From dea6edd5fd268ec7d3d96413fa2946bd175d2899 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 09:45:44 +0530 Subject: [PATCH 28/62] Added script for k8 install Signed-off-by: anisha.kj --- .travis.yml | 2 +- .../resources/kubernetes_master_install.sh | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 test/e2e/resources/kubernetes_master_install.sh diff --git a/.travis.yml b/.travis.yml index d52c10fc9..6c91c2b9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP 'bash -s' Date: Wed, 29 Jul 2020 10:20:08 +0530 Subject: [PATCH 29/62] modified ssh Signed-off-by: anisha.kj --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6c91c2b9c..ef4aa463c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,8 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP 'bash -s' Date: Wed, 29 Jul 2020 10:25:30 +0530 Subject: [PATCH 30/62] modified cmd Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef4aa463c..32c70f231 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "git clone https://github.com/pravega/pravega-operator.git; git checkout issue-cncf-cluster" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP ./root/pravega-operator/test/e2e/resources/kubernetes_master_install.sh - kubectl config view - kubectl config current-context From cbab87e58c343abff1520d1bc6b89fced98d78bd Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 11:01:55 +0530 Subject: [PATCH 31/62] modified install Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 32c70f231..045b94392 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ jobs: - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP ./root/pravega-operator/test/e2e/resources/kubernetes_master_install.sh - kubectl config view - kubectl config current-context From fa179f8df753bb70b992e9a1a5a1154d6d2ae33e Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 11:15:07 +0530 Subject: [PATCH 32/62] Fixed error Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 045b94392..a18f0bd8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ jobs: - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP ./root/pravega-operator/test/e2e/resources/kubernetes_master_install.sh + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP /root/pravega-operator/test/e2e/resources/kubernetes_master_install.sh - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From e1ac6e26a7f29109f6b02be8aeee56656ba2da7c Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 12:04:29 +0530 Subject: [PATCH 33/62] Added worker install scripts Signed-off-by: anisha.kj --- .travis.yml | 12 ++++++++-- .../e2e/resources/kubernetes_slave_install.sh | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 test/e2e/resources/kubernetes_slave_install.sh diff --git a/.travis.yml b/.travis.yml index a18f0bd8b..0a8994ede 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,8 +61,8 @@ jobs: - echo "packet-cli ssh-key create --key \"$(cat ~/.ssh/id_rsa.pub)\" --label \"pravega\"" - packet-cli ssh-key create --key "$(cat ~/.ssh/id_rsa.pub)" --label "pravega" - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - - packet-cli device create -H $(CLUSTER_NAME)-worker1 -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - - packet-cli device create -H $(CLUSTER_NAME)-worker2 -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - packet-cli device create -H $CLUSTER_NAME"-worker1" -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - packet-cli device create -H $CLUSTER_NAME"-worker2" -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` @@ -71,6 +71,14 @@ jobs: - echo "Cluster IP is $CLUSTER_IP" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP /root/pravega-operator/test/e2e/resources/kubernetes_master_install.sh + - CLUSTER_ID1=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME"-worker1" | awk '{print $2}' | tr -d ' '` + - CLUSTER_IP1=`packet-cli device get -i $CLUSTER_ID1 -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` + - CLUSTER_ID2=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME"-worker2" | awk '{print $2}' | tr -d ' '` + - CLUSTER_IP2=`packet-cli device get -i $CLUSTER_ID2 -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP1 "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP2 "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP1 /root/pravega-operator/test/e2e/resources/kubernetes_slave_install.sh + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP22 /root/pravega-operator/test/e2e/resources/kubernetes_slave_install.sh - kubectl config view - kubectl config current-context - kubectl get nodes -o wide diff --git a/test/e2e/resources/kubernetes_slave_install.sh b/test/e2e/resources/kubernetes_slave_install.sh new file mode 100755 index 000000000..697df697e --- /dev/null +++ b/test/e2e/resources/kubernetes_slave_install.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +sudo apt-get update +echo "update done" +sudo apt install docker.io -y +echo "docker install" +sudo systemctl enable --now docker +apt-get update && apt-get install -y \ + apt-transport-https ca-certificates curl software-properties-common gnupg2 +echo "installed certs" +sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - +echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" \ + | sudo tee -a /etc/apt/sources.list.d/kubernetes.list \ + && sudo apt-get update +sudo apt-get update \ + && sudo apt-get install -yq \ + kubelet \ + kubeadm \ + kubernetes-cni +sudo apt-mark hold kubelet kubeadm kubectl +UUID=`cat /etc/fstab | grep swap | awk '{print $1}' | tr -d "#UUID="` +sed -i '2 s/^/#/' /etc/fstab +echo "swapoff UUID=$UUID" +swapoff UUID=$UUID From 21a33622d921235c0dcfa317037a4f8b69582634 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 15:08:18 +0530 Subject: [PATCH 34/62] Added joining script Signed-off-by: anisha.kj --- .travis.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a8994ede..fad010f9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,11 +61,12 @@ jobs: - echo "packet-cli ssh-key create --key \"$(cat ~/.ssh/id_rsa.pub)\" --label \"pravega\"" - packet-cli ssh-key create --key "$(cat ~/.ssh/id_rsa.pub)" --label "pravega" - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 + - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' + - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` + - echo " clsuter id is $CLUSTER_ID" - packet-cli device create -H $CLUSTER_NAME"-worker1" -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - packet-cli device create -H $CLUSTER_NAME"-worker2" -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" @@ -78,7 +79,11 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP1 "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP2 "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP1 /root/pravega-operator/test/e2e/resources/kubernetes_slave_install.sh - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP22 /root/pravega-operator/test/e2e/resources/kubernetes_slave_install.sh + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP2 /root/pravega-operator/test/e2e/resources/kubernetes_slave_install.sh + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP 'kubeadm token create --print-join-command | head -2' >JOIN + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP1 $(cat JOIN) + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP2 $(cat JOIN) + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes" - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From 4f2359b8d2fa438103870824218cb86ff285fdf9 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 16:59:03 +0530 Subject: [PATCH 35/62] Added zookeeper install Signed-off-by: anisha.kj --- .travis.yml | 8 ++ test/e2e/resources/local-storage.yaml | 114 ++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 test/e2e/resources/local-storage.yaml diff --git a/.travis.yml b/.travis.yml index fad010f9d..9db7c6612 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,6 +84,14 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP1 $(cat JOIN) - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP2 $(cat JOIN) - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/pravega-operator/test/e2e/resources/local-storage.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/zookeeper.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bookkeeper.yaml" + - sleep 30s + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bk-version-map.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bk-config-map.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bk-cluster.yaml" + - kubectl config view - kubectl config current-context - kubectl get nodes -o wide diff --git a/test/e2e/resources/local-storage.yaml b/test/e2e/resources/local-storage.yaml new file mode 100644 index 000000000..2002d4b9a --- /dev/null +++ b/test/e2e/resources/local-storage.yaml @@ -0,0 +1,114 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: local-path-storage +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: local-path-provisioner-service-account + namespace: local-path-storage +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: local-path-provisioner-role +rules: +- apiGroups: [""] + resources: ["nodes", "persistentvolumeclaims"] + verbs: ["get", "list", "watch"] +- apiGroups: [""] + resources: ["endpoints", "persistentvolumes", "pods"] + verbs: ["*"] +- apiGroups: [""] + resources: ["events"] + verbs: ["create", "patch"] +- apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: local-path-provisioner-bind +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: local-path-provisioner-role +subjects: +- kind: ServiceAccount + name: local-path-provisioner-service-account + namespace: local-path-storage +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: local-path-provisioner + namespace: local-path-storage +spec: + replicas: 1 + selector: + matchLabels: + app: local-path-provisioner + template: + metadata: + labels: + app: local-path-provisioner + spec: + serviceAccountName: local-path-provisioner-service-account + containers: + - name: local-path-provisioner + image: rancher/local-path-provisioner:v0.0.14 + imagePullPolicy: IfNotPresent + command: + - local-path-provisioner + - --debug + - start + - --config + - /etc/config/config.json + volumeMounts: + - name: config-volume + mountPath: /etc/config/ + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumes: + - name: config-volume + configMap: + name: local-path-config +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: standard + annotations: + storageclass.kubernetes.io/is-default-class: "true" +provisioner: rancher.io/local-path +volumeBindingMode: WaitForFirstConsumer +reclaimPolicy: Delete +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: local-path-config + namespace: local-path-storage +data: + config.json: |- + { + "nodePathMap":[ + { + "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", + "paths":["/data"] + } + ] + } + setup: |- + #!/bin/sh + path=$1 + mkdir -m 0777 -p ${path} + teardown: |- + #!/bin/sh + path=$1 + rm -rf ${path} \ No newline at end of file From 68c198dc0d184ba0d6bda5d76a25c548ae7176a4 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 17:17:15 +0530 Subject: [PATCH 36/62] Added bk installation Signed-off-by: anisha.kj --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9db7c6612..1423fd961 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,11 +86,11 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/pravega-operator/test/e2e/resources/local-storage.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/zookeeper.yaml" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bookkeeper.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bookkeeper.yaml" - sleep 30s - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bk-version-map.yaml" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bk-config-map.yaml" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f test/e2e/resources/bk-cluster.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-version-map.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-config-map.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-cluster.yaml" - kubectl config view - kubectl config current-context From cb498a18a02747c0359c8c0b651c2b7abb20fb57 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 18:50:24 +0530 Subject: [PATCH 37/62] Added certificate install Signed-off-by: anisha.kj --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1423fd961..51843f5fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,14 +24,6 @@ jobs: - stage: unit name: Unit tests - env: - - HELM_VERSION=v2.12.0 - - DEP_VERSION=v0.5.0 - install: - - curl -Lo dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/ - - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ - before_script: - - helm init --client-only script: - make test-unit after_success: @@ -85,13 +77,21 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP2 $(cat JOIN) - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/pravega-operator/test/e2e/resources/local-storage.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm install test estable/nfs-server-provisioner;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP JSONPATH='{.status.phase}'; until kubectl get pvc pravega-tier2 -o jsonpath="$JSONPATH" 2>&1 | grep -q \"Bound\"; do sleep 1; done" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/zookeeper.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bookkeeper.yaml" - sleep 30s - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-version-map.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-config-map.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-cluster.yaml" - + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "JPATH1='{.spec.replicas}'; JPATH2='{.status.readyReplicas}'; bk_replicas=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH1);bk_ready=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH2); echo "REPLICAS=$bk_replicas, READY=$bk_ready"; while [ "$bk_replicas" != "$bk_ready" ]; do sleep 1; bk_replicas=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH1); bk_ready=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH2); echo "REPLICAS=$bk_replicas, READY=$bk_ready"; done" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f deploy/version_map.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl apply -f \"https://github.com/jetstack/cert-manager/releases/download/v0.14.1/cert-manager.crds.yaml\"" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add jetstack https://charts.jetstack.io" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo update" - kubectl config view - kubectl config current-context - kubectl get nodes -o wide From 1edf25095b391d5f03641467d18905d36312307a Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 19:07:51 +0530 Subject: [PATCH 38/62] fixed helm error Signed-off-by: anisha.kj --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 51843f5fe..5709a3a4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,8 +78,8 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/pravega-operator/test/e2e/resources/local-storage.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm install test estable/nfs-server-provisioner;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP JSONPATH='{.status.phase}'; until kubectl get pvc pravega-tier2 -o jsonpath="$JSONPATH" 2>&1 | grep -q \"Bound\"; do sleep 1; done" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm install stable/nfs-server-provisioner --generate-name;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "JSONPATH='{.status.phase}'; until kubectl get pvc pravega-tier2 -o jsonpath="$JSONPATH" 2>&1 | grep -q \"Bound\"; do sleep 1; done" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/zookeeper.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bookkeeper.yaml" From 9cb0043d740f3ecce6000e8923ba4188e62a714b Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 21:00:31 +0530 Subject: [PATCH 39/62] added helm update Signed-off-by: anisha.kj --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5709a3a4b..54b741e9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,8 +78,7 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/pravega-operator/test/e2e/resources/local-storage.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm install stable/nfs-server-provisioner --generate-name;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "JSONPATH='{.status.phase}'; until kubectl get pvc pravega-tier2 -o jsonpath="$JSONPATH" 2>&1 | grep -q \"Bound\"; do sleep 1; done" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add stable https://kubernetes-charts.storage.googleapis.com;helm install stable/nfs-server-provisioner --generate-name;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/zookeeper.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bookkeeper.yaml" @@ -87,8 +86,7 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-version-map.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-config-map.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bk-cluster.yaml" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "JPATH1='{.spec.replicas}'; JPATH2='{.status.readyReplicas}'; bk_replicas=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH1);bk_ready=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH2); echo "REPLICAS=$bk_replicas, READY=$bk_ready"; while [ "$bk_replicas" != "$bk_ready" ]; do sleep 1; bk_replicas=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH1); bk_ready=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH2); echo "REPLICAS=$bk_replicas, READY=$bk_ready"; done" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f deploy/version_map.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/deploy/version_map.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl apply -f \"https://github.com/jetstack/cert-manager/releases/download/v0.14.1/cert-manager.crds.yaml\"" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add jetstack https://charts.jetstack.io" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo update" From 41601df72cd4b07c886c5739618bac20ce6763e9 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 23:19:57 +0530 Subject: [PATCH 40/62] ADDEd tests Signed-off-by: anisha.kj --- .travis.yml | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54b741e9f..b1c119208 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,44 +90,18 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl apply -f \"https://github.com/jetstack/cert-manager/releases/download/v0.14.1/cert-manager.crds.yaml\"" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add jetstack https://charts.jetstack.io" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo update" - - kubectl config view - - kubectl config current-context - - kubectl get nodes -o wide - - kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$GOOGLE_SERVICE_ACCOUNT - # Install Helm Tiller - - kubectl create serviceaccount --namespace kube-system tiller - - kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller - - helm init --service-account tiller --wait - # Install NFS provisioner - - helm install stable/nfs-server-provisioner - - kubectl -n default create -f test/e2e/resources/tier2.yaml - - JSONPATH='{.status.phase}'; until kubectl get pvc pravega-tier2 -o jsonpath="$JSONPATH" 2>&1 | grep -q "Bound"; do sleep 1; done - # Install ZooKeeper - - kubectl -n default create -f test/e2e/resources/zookeeper.yaml - - JSONPATH1='{.spec.replicas}'; JSONPATH2='{.status.readyReplicas}'; replicas=$(kubectl get zookeepercluster zk -o jsonpath=$JSONPATH1);ready=$(kubectl get zookeepercluster zk -o jsonpath=$JSONPATH2); echo "REPLICAS=$replicas, READY=$ready"; while [ "$replicas" != "$ready" ]; do sleep 5s; replicas=$(kubectl get zookeepercluster zk -o jsonpath=$JSONPATH1);ready=$(kubectl get zookeepercluster zk -o jsonpath=$JSONPATH2); echo "REPLICAS=$replicas, READY=$ready"; done - # Install Bookkeeper - - kubectl -n default create -f test/e2e/resources/bookkeeper.yaml - - sleep 30s - - kubectl -n default create -f test/e2e/resources/bk-version-map.yaml - - kubectl -n default create -f test/e2e/resources/bk-config-map.yaml - - kubectl -n default create -f test/e2e/resources/bk-cluster.yaml - - JPATH1='{.spec.replicas}'; JPATH2='{.status.readyReplicas}'; bk_replicas=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH1);bk_ready=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH2); echo "REPLICAS=$bk_replicas, READY=$bk_ready"; while [ "$bk_replicas" != "$bk_ready" ]; do sleep 1; bk_replicas=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH1); bk_ready=$(kubectl get bookkeepercluster pravega -o jsonpath=$JPATH2); echo "REPLICAS=$bk_replicas, READY=$bk_ready"; done - # Install the ConfigMap for version dependency - - kubectl -n default create -f deploy/version_map.yaml - - kubectl apply -f "https://github.com/jetstack/cert-manager/releases/download/v0.14.1/cert-manager.crds.yaml" - - helm repo add jetstack https://charts.jetstack.io - - helm repo update - - helm install --name cert-manager --namespace cert-manager --version v0.14.1 jetstack/cert-manager --wait - - kubectl create -f deploy/certificate.yaml - - kubectl create -f deploy/webhook.yaml - - kubectl create -f test/e2e/resources/crd.yaml + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create namespace cert-manager;helm install cert-manager jetstack/cert-manager --namespace cert-manager --version v0.14.1 --wait" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/deploy/certificate.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/deploy/webhook.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/crd.yaml" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/" # Show Pravega dependencies - kubectl -n default get pod,pvc,svc -o wide script: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do kubectl get pods; done & - - make test-e2e + - sh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/prvega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: From 701cf58316e205a506dd95f6ca58ed234a33902a Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 29 Jul 2020 23:50:59 +0530 Subject: [PATCH 41/62] Removed comment Signed-off-by: anisha.kj --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b1c119208..42cdaa64e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,11 +96,10 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/crd.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/" # Show Pravega dependencies - - kubectl -n default get pod,pvc,svc -o wide script: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - - while sleep 5m; do kubectl get pods; done & + - while sleep 5m; do echo hello; done & - sh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/prvega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 From 552a9dc52bbe8680d6fbe7488291a23abbe7768a Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 00:09:48 +0530 Subject: [PATCH 42/62] Fixed typo Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 42cdaa64e..c054f76f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ jobs: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & - - sh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/prvega-operator;make test-e2e" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/prvega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: From a814907235d815afc6a5e445d6f44827f7e4cf8f Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 08:47:48 +0530 Subject: [PATCH 43/62] Fixed typo Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c054f76f0..537ef6a01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ jobs: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/prvega-operator;make test-e2e" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/pravega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: From 5c64c2a2d40e7d3de5fa6b8cc892d4cd92a37d02 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 09:11:12 +0530 Subject: [PATCH 44/62] exported username Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 537ef6a01..a7a372461 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ jobs: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/pravega-operator;make test-e2e" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "export DOCKER_TEST_USER;export DOCKER_TEST_PASS;cd /root/pravega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: From 6cb1f593fdbd649b8dde4ed2929eb789c95681a9 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 09:44:42 +0530 Subject: [PATCH 45/62] Modified Makefile Signed-off-by: anisha.kj --- .travis.yml | 2 +- Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7a372461..537ef6a01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ jobs: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "export DOCKER_TEST_USER;export DOCKER_TEST_PASS;cd /root/pravega-operator;make test-e2e" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/pravega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: diff --git a/Makefile b/Makefile index b89629b16..295324ae8 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,14 @@ SHELL=/bin/bash -o pipefail PROJECT_NAME=pravega-operator -REPO=tristan1900/$(PROJECT_NAME) +REPO=testzkop/$(PROJECT_NAME) VERSION=$(shell git describe --always --tags --dirty | sed "s/\(.*\)-g`git rev-parse --short HEAD`/\1/") GIT_SHA=$(shell git rev-parse --short HEAD) TEST_IMAGE=$(REPO)-testimages:$(VERSION) GOOS=linux GOARCH=amd64 +DOCKER_TEST_PASS=testzkop@123 +DOCKER_TEST_USER=testzkop .PHONY: all build check clean test From 2741b50d1dac8c8fd00c92221dbac2daa00b5f61 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 10:16:02 +0530 Subject: [PATCH 46/62] Installing go Signed-off-by: anisha.kj --- test/e2e/resources/kubernetes_master_install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/e2e/resources/kubernetes_master_install.sh b/test/e2e/resources/kubernetes_master_install.sh index 65637d9ec..f4947a258 100755 --- a/test/e2e/resources/kubernetes_master_install.sh +++ b/test/e2e/resources/kubernetes_master_install.sh @@ -30,3 +30,8 @@ sudo chown $(id -u):$(id -g) $HOME/.kube/config kubectl get nodes kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml kubectl get nodes +sudo apt-get install binutils bison gcc -y +bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) +source /root/.gvm/scripts/gvm +gvm install go1.13.8 --binary +gvm use go1.13.8 --default From da17ceed107a0d73027bf50cb8251c13b6a43ae1 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 10:46:51 +0530 Subject: [PATCH 47/62] Installing go Signed-off-by: anisha.kj --- .travis.yml | 1 + test/e2e/resources/kubernetes_master_install.sh | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 537ef6a01..baee11d77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,6 +100,7 @@ jobs: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer);source /root/.gvm/scripts/gvm;gvm install go1.13.8 --binary;gvm use go1.13.8 --default" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/pravega-operator;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 diff --git a/test/e2e/resources/kubernetes_master_install.sh b/test/e2e/resources/kubernetes_master_install.sh index f4947a258..f1c21e00d 100755 --- a/test/e2e/resources/kubernetes_master_install.sh +++ b/test/e2e/resources/kubernetes_master_install.sh @@ -31,7 +31,3 @@ kubectl get nodes kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml kubectl get nodes sudo apt-get install binutils bison gcc -y -bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) -source /root/.gvm/scripts/gvm -gvm install go1.13.8 --binary -gvm use go1.13.8 --default From 27886bcdb4219b1b3553079a039a94f0121fe416 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 30 Jul 2020 11:29:18 +0530 Subject: [PATCH 48/62] sourcing gvm Signed-off-by: anisha.kj --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index baee11d77..05655df38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,7 +101,7 @@ jobs: # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer);source /root/.gvm/scripts/gvm;gvm install go1.13.8 --binary;gvm use go1.13.8 --default" - - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/pravega-operator;make test-e2e" + - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "cd /root/pravega-operator;source /root/.gvm/scripts/gvm;make test-e2e" # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: From 8b4558778a660a838a14d351305bca6e707d0ff3 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 3 Aug 2020 11:13:06 +0530 Subject: [PATCH 49/62] Modified kubernetes master script Signed-off-by: anisha.kj --- test/e2e/resources/kubernetes_master_install.sh | 5 +++++ test/e2e/resources/kubernetes_slave_install.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/e2e/resources/kubernetes_master_install.sh b/test/e2e/resources/kubernetes_master_install.sh index f1c21e00d..8db195431 100755 --- a/test/e2e/resources/kubernetes_master_install.sh +++ b/test/e2e/resources/kubernetes_master_install.sh @@ -5,6 +5,11 @@ echo "update done" sudo apt install docker.io -y echo "docker install" sudo systemctl enable --now docker +sudo apt-get install nfs-common -y +sudo rm /lib/systemd/system/nfs-common.service +sudo systemctl daemon-reload +sudo systemctl start nfs-common +sudo systemctl status nfs-common apt-get update && apt-get install -y \ apt-transport-https ca-certificates curl software-properties-common gnupg2 echo "installed certs" diff --git a/test/e2e/resources/kubernetes_slave_install.sh b/test/e2e/resources/kubernetes_slave_install.sh index 697df697e..ef89a65df 100755 --- a/test/e2e/resources/kubernetes_slave_install.sh +++ b/test/e2e/resources/kubernetes_slave_install.sh @@ -2,6 +2,11 @@ sudo apt-get update echo "update done" +sudo apt-get install nfs-common -y +sudo rm /lib/systemd/system/nfs-common.service +sudo systemctl daemon-reload +sudo systemctl start nfs-common +sudo systemctl status nfs-common sudo apt install docker.io -y echo "docker install" sudo systemctl enable --now docker From 4dcb5686453e1c5d89f429e97f07a55d01b72b73 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 3 Aug 2020 12:04:05 +0530 Subject: [PATCH 50/62] Commenting out tests for debugging Signed-off-by: anisha.kj --- test/e2e/pravegacluster_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/pravegacluster_test.go b/test/e2e/pravegacluster_test.go index 6fe8c0eca..15c10f569 100644 --- a/test/e2e/pravegacluster_test.go +++ b/test/e2e/pravegacluster_test.go @@ -57,10 +57,10 @@ func testPravegaCluster(t *testing.T) { } testFuncs := map[string]func(t *testing.T){ - "testCreateRecreateCluster": testCreateRecreateCluster, + //"testCreateRecreateCluster": testCreateRecreateCluster, "testScaleCluster": testScaleCluster, - "testUpgradeCluster": testUpgradeCluster, - "testWebhook": testWebhook, + //"testUpgradeCluster": testUpgradeCluster, + //"testWebhook": testWebhook, } for name, f := range testFuncs { From 71fec673c58c65d4990b1ea01fd59b3e1b9247ba Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 3 Aug 2020 12:26:55 +0530 Subject: [PATCH 51/62] Fixed formatting Signed-off-by: anisha.kj --- test/e2e/pravegacluster_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/pravegacluster_test.go b/test/e2e/pravegacluster_test.go index 15c10f569..06af47411 100644 --- a/test/e2e/pravegacluster_test.go +++ b/test/e2e/pravegacluster_test.go @@ -58,7 +58,7 @@ func testPravegaCluster(t *testing.T) { testFuncs := map[string]func(t *testing.T){ //"testCreateRecreateCluster": testCreateRecreateCluster, - "testScaleCluster": testScaleCluster, + "testScaleCluster": testScaleCluster, //"testUpgradeCluster": testUpgradeCluster, //"testWebhook": testWebhook, } From 4c547511d4e6f3248994b77bd75b5acb7bb2d2be Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 3 Aug 2020 13:15:11 +0530 Subject: [PATCH 52/62] Enabling only recreate cluster Signed-off-by: anisha.kj --- test/e2e/pravegacluster_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/pravegacluster_test.go b/test/e2e/pravegacluster_test.go index 06af47411..698785019 100644 --- a/test/e2e/pravegacluster_test.go +++ b/test/e2e/pravegacluster_test.go @@ -57,8 +57,8 @@ func testPravegaCluster(t *testing.T) { } testFuncs := map[string]func(t *testing.T){ - //"testCreateRecreateCluster": testCreateRecreateCluster, - "testScaleCluster": testScaleCluster, + "testCreateRecreateCluster": testCreateRecreateCluster, + //"testScaleCluster": testScaleCluster, //"testUpgradeCluster": testUpgradeCluster, //"testWebhook": testWebhook, } From 8757946ab08dcc15cd21ebb314a366a462456209 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Mon, 3 Aug 2020 13:59:47 +0530 Subject: [PATCH 53/62] Added tests back Signed-off-by: anisha.kj --- test/e2e/pravegacluster_test.go | 6 +++--- test/e2e/resources/kubernetes_master_install.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/pravegacluster_test.go b/test/e2e/pravegacluster_test.go index 698785019..6fe8c0eca 100644 --- a/test/e2e/pravegacluster_test.go +++ b/test/e2e/pravegacluster_test.go @@ -58,9 +58,9 @@ func testPravegaCluster(t *testing.T) { testFuncs := map[string]func(t *testing.T){ "testCreateRecreateCluster": testCreateRecreateCluster, - //"testScaleCluster": testScaleCluster, - //"testUpgradeCluster": testUpgradeCluster, - //"testWebhook": testWebhook, + "testScaleCluster": testScaleCluster, + "testUpgradeCluster": testUpgradeCluster, + "testWebhook": testWebhook, } for name, f := range testFuncs { diff --git a/test/e2e/resources/kubernetes_master_install.sh b/test/e2e/resources/kubernetes_master_install.sh index 8db195431..c4618a01a 100755 --- a/test/e2e/resources/kubernetes_master_install.sh +++ b/test/e2e/resources/kubernetes_master_install.sh @@ -36,3 +36,4 @@ kubectl get nodes kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml kubectl get nodes sudo apt-get install binutils bison gcc -y +mkdir /export From 3e0f6a474aaf7ade17b2b1a3754e7f983f7368e5 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 4 Aug 2020 10:31:05 +0530 Subject: [PATCH 54/62] Modified tests Signed-off-by: anisha.kj --- test/e2e/basic_test.go | 6 ++++++ test/e2e/scale_test.go | 3 +++ test/e2e/upgrade_test.go | 3 +++ test/e2e/webhook_test.go | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/test/e2e/basic_test.go b/test/e2e/basic_test.go index 118a7f27b..eae5d213d 100644 --- a/test/e2e/basic_test.go +++ b/test/e2e/basic_test.go @@ -34,6 +34,9 @@ func testCreateRecreateCluster(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) + defaultCluster := pravega_e2eutil.NewDefaultCluster(namespace) defaultCluster.WithDefaults() @@ -51,6 +54,9 @@ func testCreateRecreateCluster(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) + defaultCluster = pravega_e2eutil.NewDefaultCluster(namespace) defaultCluster.WithDefaults() diff --git a/test/e2e/scale_test.go b/test/e2e/scale_test.go index 939a4449c..4ff83fb09 100644 --- a/test/e2e/scale_test.go +++ b/test/e2e/scale_test.go @@ -32,6 +32,9 @@ func testScaleCluster(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) defaultCluster := pravega_e2eutil.NewDefaultCluster(namespace) defaultCluster.WithDefaults() diff --git a/test/e2e/upgrade_test.go b/test/e2e/upgrade_test.go index b570fb3d8..a5dc1af54 100644 --- a/test/e2e/upgrade_test.go +++ b/test/e2e/upgrade_test.go @@ -33,6 +33,9 @@ func testUpgradeCluster(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) + cluster := pravega_e2eutil.NewDefaultCluster(namespace) diff --git a/test/e2e/webhook_test.go b/test/e2e/webhook_test.go index a73405b47..713ba90a1 100644 --- a/test/e2e/webhook_test.go +++ b/test/e2e/webhook_test.go @@ -31,6 +31,10 @@ func testWebhook(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) + //Test webhook with an unsupported Pravega cluster version invalidVersion := pravega_e2eutil.NewClusterWithVersion(namespace, "99.0.0") From 8d559a441840ff1d1726313b5677f604d0b43eb6 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 4 Aug 2020 10:42:51 +0530 Subject: [PATCH 55/62] Fixed formatting Signed-off-by: anisha.kj --- test/e2e/basic_test.go | 8 ++++---- test/e2e/scale_test.go | 6 +++--- test/e2e/upgrade_test.go | 5 ++--- test/e2e/webhook_test.go | 5 ++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/test/e2e/basic_test.go b/test/e2e/basic_test.go index eae5d213d..055fbaa4b 100644 --- a/test/e2e/basic_test.go +++ b/test/e2e/basic_test.go @@ -34,8 +34,8 @@ func testCreateRecreateCluster(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) f := framework.Global - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) defaultCluster := pravega_e2eutil.NewDefaultCluster(namespace) defaultCluster.WithDefaults() @@ -54,8 +54,8 @@ func testCreateRecreateCluster(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) defaultCluster = pravega_e2eutil.NewDefaultCluster(namespace) defaultCluster.WithDefaults() diff --git a/test/e2e/scale_test.go b/test/e2e/scale_test.go index 4ff83fb09..a7fec3e8a 100644 --- a/test/e2e/scale_test.go +++ b/test/e2e/scale_test.go @@ -32,9 +32,9 @@ func testScaleCluster(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global - - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) + + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) defaultCluster := pravega_e2eutil.NewDefaultCluster(namespace) defaultCluster.WithDefaults() diff --git a/test/e2e/upgrade_test.go b/test/e2e/upgrade_test.go index a5dc1af54..5cc13b439 100644 --- a/test/e2e/upgrade_test.go +++ b/test/e2e/upgrade_test.go @@ -33,9 +33,8 @@ func testUpgradeCluster(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) - + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) cluster := pravega_e2eutil.NewDefaultCluster(namespace) diff --git a/test/e2e/webhook_test.go b/test/e2e/webhook_test.go index 713ba90a1..211bcf041 100644 --- a/test/e2e/webhook_test.go +++ b/test/e2e/webhook_test.go @@ -31,10 +31,9 @@ func testWebhook(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global - - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) + err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) + g.Expect(err).NotTo(HaveOccurred()) //Test webhook with an unsupported Pravega cluster version invalidVersion := pravega_e2eutil.NewClusterWithVersion(namespace, "99.0.0") From 032c469f39d186f7cfa5abfaae3e3cd03808c048 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Tue, 4 Aug 2020 12:26:07 +0530 Subject: [PATCH 56/62] Commenting upgrade test Signed-off-by: anisha.kj --- test/e2e/pravegacluster_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/pravegacluster_test.go b/test/e2e/pravegacluster_test.go index 6fe8c0eca..4c02ffdba 100644 --- a/test/e2e/pravegacluster_test.go +++ b/test/e2e/pravegacluster_test.go @@ -59,8 +59,8 @@ func testPravegaCluster(t *testing.T) { testFuncs := map[string]func(t *testing.T){ "testCreateRecreateCluster": testCreateRecreateCluster, "testScaleCluster": testScaleCluster, - "testUpgradeCluster": testUpgradeCluster, - "testWebhook": testWebhook, + //"testUpgradeCluster": testUpgradeCluster, + "testWebhook": testWebhook, } for name, f := range testFuncs { From 02af4e584e7017de37d8a2b18358b28d02c94190 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 5 Aug 2020 17:33:47 +0530 Subject: [PATCH 57/62] Uncommented the upgrade test Signed-off-by: anisha.kj --- test/e2e/basic_test.go | 3 +-- test/e2e/pravegacluster_test.go | 4 ++-- test/e2e/scale_test.go | 4 +--- test/e2e/upgrade_test.go | 8 +++----- test/e2e/webhook_test.go | 4 +--- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/test/e2e/basic_test.go b/test/e2e/basic_test.go index 055fbaa4b..5c068e004 100644 --- a/test/e2e/basic_test.go +++ b/test/e2e/basic_test.go @@ -34,6 +34,7 @@ func testCreateRecreateCluster(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + // A workaround for issue 93 err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) g.Expect(err).NotTo(HaveOccurred()) @@ -78,6 +79,4 @@ func testCreateRecreateCluster(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) } diff --git a/test/e2e/pravegacluster_test.go b/test/e2e/pravegacluster_test.go index 4c02ffdba..6fe8c0eca 100644 --- a/test/e2e/pravegacluster_test.go +++ b/test/e2e/pravegacluster_test.go @@ -59,8 +59,8 @@ func testPravegaCluster(t *testing.T) { testFuncs := map[string]func(t *testing.T){ "testCreateRecreateCluster": testCreateRecreateCluster, "testScaleCluster": testScaleCluster, - //"testUpgradeCluster": testUpgradeCluster, - "testWebhook": testWebhook, + "testUpgradeCluster": testUpgradeCluster, + "testWebhook": testWebhook, } for name, f := range testFuncs { diff --git a/test/e2e/scale_test.go b/test/e2e/scale_test.go index a7fec3e8a..fd64cdd8b 100644 --- a/test/e2e/scale_test.go +++ b/test/e2e/scale_test.go @@ -33,6 +33,7 @@ func testScaleCluster(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + // A workaround for issue 93 err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) g.Expect(err).NotTo(HaveOccurred()) @@ -84,7 +85,4 @@ func testScaleCluster(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) - // A workaround for issue 93 - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) } diff --git a/test/e2e/upgrade_test.go b/test/e2e/upgrade_test.go index 5cc13b439..558307b3c 100644 --- a/test/e2e/upgrade_test.go +++ b/test/e2e/upgrade_test.go @@ -33,14 +33,15 @@ func testUpgradeCluster(t *testing.T) { namespace, err := ctx.GetNamespace() g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + // A workaround for issue 93 err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) g.Expect(err).NotTo(HaveOccurred()) cluster := pravega_e2eutil.NewDefaultCluster(namespace) cluster.WithDefaults() - initialVersion := "0.6.1" - upgradeVersion := "0.7.0" + initialVersion := "0.7.0" + upgradeVersion := "0.7.1" cluster.Spec.Version = initialVersion cluster.Spec.Pravega.Image = &api.ImageSpec{ Repository: "pravega/pravega", @@ -86,7 +87,4 @@ func testUpgradeCluster(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) - // A workaround for issue 93 - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) } diff --git a/test/e2e/webhook_test.go b/test/e2e/webhook_test.go index 211bcf041..fbe9fa113 100644 --- a/test/e2e/webhook_test.go +++ b/test/e2e/webhook_test.go @@ -32,6 +32,7 @@ func testWebhook(t *testing.T) { g.Expect(err).NotTo(HaveOccurred()) f := framework.Global + // A workaround for issue 93 err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) g.Expect(err).NotTo(HaveOccurred()) @@ -71,7 +72,4 @@ func testWebhook(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) - // A workaround for issue 93 - err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) - g.Expect(err).NotTo(HaveOccurred()) } From 04d807657dadbf838a4e7e57d196e671ce18af9f Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 5 Aug 2020 20:19:12 +0530 Subject: [PATCH 58/62] Added cleanup Signed-off-by: anisha.kj --- .travis.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 05655df38..1813b53af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,22 +36,14 @@ jobs: env: - KUBECTL_VERSION=v1.15.0 - OPERATOR_SDK_VERSION=v0.17.0 - - HELM_VERSION=v2.12.0 - - DEP_VERSION=v0.5.0 - CLUSTER_NAME="pravega-operator-travis-$(date +'%Y%m%d%H%M%S')" - install: - - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ - - curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz && tar xvzf sshpass-1.06.tar.gz && cd sshpass-1.06 && ./configure && sudo make install - - curl -Lo dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/ - - curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/ - - curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-$HELM_VERSION-linux-amd64.tar.gz && tar xfz helm.tar.gz && sudo mv linux-amd64/{helm,tiller} /usr/local/bin/ before_script: - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ - ssh-keygen -f ~/.ssh/id_rsa -P "" - pub_key=`cat ~/.ssh/id_rsa.pub` - echo " publc key is $pub_key" - echo "packet-cli ssh-key create --key \"$(cat ~/.ssh/id_rsa.pub)\" --label \"pravega\"" - - packet-cli ssh-key create --key "$(cat ~/.ssh/id_rsa.pub)" --label "pravega" + - packet-cli ssh-key create --key "$(cat ~/.ssh/id_rsa.pub)" --label "pravega-travis" - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` @@ -105,7 +97,11 @@ jobs: # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: - - eksctl delete cluster --name $CLUSTER_NAME + - SSH-KEY=`packet-cli ssh-key get | grep "pravega-travis" | awk '{print $2}' | tr -d ' '` + - echo y | packet-cli ssh-key delete -i $SSH-KEY + - echo y | packet-cli device delete -i $CLUSTER_ID + - echo y | packet-cli device delete -i $CLUSTER_ID1 + - echo y | packet-cli device delete -i $CLUSTER_ID2 - stage: deploy name: Push Docker image From 552166b1ef43544fa69252441b37ce747adb2b77 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Wed, 5 Aug 2020 21:07:13 +0530 Subject: [PATCH 59/62] Fixed the typo in variable name Signed-off-by: anisha.kj --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1813b53af..14e9acf3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,8 +97,8 @@ jobs: # kill background echo loop - echo "killing while sleep loop" && kill %1 after_script: - - SSH-KEY=`packet-cli ssh-key get | grep "pravega-travis" | awk '{print $2}' | tr -d ' '` - - echo y | packet-cli ssh-key delete -i $SSH-KEY + - SSHKEY=`packet-cli ssh-key get | grep "pravega-travis" | awk '{print $2}' | tr -d ' '` + - echo y | packet-cli ssh-key delete -i $SSHKEY - echo y | packet-cli device delete -i $CLUSTER_ID - echo y | packet-cli device delete -i $CLUSTER_ID1 - echo y | packet-cli device delete -i $CLUSTER_ID2 From 7d1011069bdd4aa979f54df6a78612a5859132a2 Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 6 Aug 2020 10:11:20 +0530 Subject: [PATCH 60/62] Added condition back for e2e Signed-off-by: anisha.kj --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 14e9acf3a..58d095fe4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,13 +31,14 @@ jobs: - stage: e2e name: End-to-end tests + if: type = pull_request OR branch = master OR tag IS present services: - docker env: - KUBECTL_VERSION=v1.15.0 - OPERATOR_SDK_VERSION=v0.17.0 - CLUSTER_NAME="pravega-operator-travis-$(date +'%Y%m%d%H%M%S')" - before_script: + script: - curl -Lo packet-cli https://github.com/packethost/packet-cli/releases/download/0.0.7/packet-linux-amd64 && chmod +x packet-cli && sudo mv packet-cli /usr/local/bin/ - ssh-keygen -f ~/.ssh/id_rsa -P "" - pub_key=`cat ~/.ssh/id_rsa.pub` @@ -47,11 +48,10 @@ jobs: - packet-cli device create -H $CLUSTER_NAME -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' - CLUSTER_ID=`packet-cli device get -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 | grep $CLUSTER_NAME | awk '{print $2}' | tr -d ' '` - - echo " clsuter id is $CLUSTER_ID" + - echo "cluster id is $CLUSTER_ID" - packet-cli device create -H $CLUSTER_NAME"-worker1" -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - packet-cli device create -H $CLUSTER_NAME"-worker2" -o "ubuntu_20_04" -P c1.small.x86 -p 454b8b42-33d3-4e7e-8acf-1d1a5fec7e85 -f nrt1 - sleep 300 - - echo " clsuter id is $CLUSTER_ID" - CLUSTER_IP=`packet-cli device get -i $CLUSTER_ID -y | grep "\- address:" | head -1 |awk '{print $3}' | tr -d ' '` - echo "Cluster IP is $CLUSTER_IP" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "sudo apt-get update;sudo apt-get install git -y;git clone https://github.com/pravega/pravega-operator.git; cd pravega-operator;git checkout issue-cncf-cluster" @@ -88,7 +88,6 @@ jobs: - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/crd.yaml" - ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/$OPERATOR_SDK_VERSION/operator-sdk-$OPERATOR_SDK_VERSION-x86_64-linux-gnu && chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/" # Show Pravega dependencies - script: # ping stdout every 5 minutes or Travis kills build # ref: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received - while sleep 5m; do echo hello; done & From 3e2c5962eb4ad8573b61096d3e17e30bae0dcb4a Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 6 Aug 2020 10:44:21 +0530 Subject: [PATCH 61/62] Addressed review comments Signed-off-by: anisha.kj --- Makefile | 4 ++-- test/e2e/basic_test.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 295324ae8..164bec07f 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ GIT_SHA=$(shell git rev-parse --short HEAD) TEST_IMAGE=$(REPO)-testimages:$(VERSION) GOOS=linux GOARCH=amd64 -DOCKER_TEST_PASS=testzkop@123 -DOCKER_TEST_USER=testzkop +DOCKER_TEST_PASS=testpravegaop +DOCKER_TEST_USER=testpravegaop .PHONY: all build check clean test diff --git a/test/e2e/basic_test.go b/test/e2e/basic_test.go index 5c068e004..f641656c3 100644 --- a/test/e2e/basic_test.go +++ b/test/e2e/basic_test.go @@ -55,6 +55,7 @@ func testCreateRecreateCluster(t *testing.T) { err = pravega_e2eutil.WaitForClusterToTerminate(t, f, ctx, pravega) g.Expect(err).NotTo(HaveOccurred()) + // A workaround for issue 93 err = pravega_e2eutil.RestartTier2(t, f, ctx, namespace) g.Expect(err).NotTo(HaveOccurred()) From 7724a1406c6f65f80eaaeb1ca66d394adf440c3b Mon Sep 17 00:00:00 2001 From: "anisha.kj" Date: Thu, 6 Aug 2020 11:09:32 +0530 Subject: [PATCH 62/62] Changed the repo name Signed-off-by: anisha.kj --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 164bec07f..bc9fbbcf3 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ SHELL=/bin/bash -o pipefail PROJECT_NAME=pravega-operator -REPO=testzkop/$(PROJECT_NAME) +REPO=testpravegaop/$(PROJECT_NAME) VERSION=$(shell git describe --always --tags --dirty | sed "s/\(.*\)-g`git rev-parse --short HEAD`/\1/") GIT_SHA=$(shell git rev-parse --short HEAD) TEST_IMAGE=$(REPO)-testimages:$(VERSION)