Skip to content

Commit

Permalink
Merge pull request #303 from openebs/kmova-patch-v0.5-travis-fix
Browse files Browse the repository at this point in the history
Fix travis build error with minikube 1.7.0
  • Loading branch information
Karthik Satchitanand authored May 13, 2018
2 parents 133987f + aa5cec8 commit 70b87b1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ install:
- make bootstrap
before_script:
# Download kubectl, which is a requirement for using minikube.
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.9.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download minikube.
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- sudo minikube start --vm-driver=none --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
- sudo minikube start --vm-driver=none --bootstrapper=localkube --kubernetes-version=v1.9.4 --extra-config=apiserver.Authorization.Mode=RBAC
# Fix the kubectl context, as it's often stale.
- minikube update-context
# Wait for Kubernetes to be up and ready.
Expand Down
13 changes: 10 additions & 3 deletions ci/helm_install_openebs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
kubectl -n kube-system patch deploy/tiller-deploy -p '{"spec": {"template": {"spec": {"serviceAccountName": "tiller"}}}}'
# With helm 2.9.0 and K8s 1.9.x there is an issue
# Use the following workaround to enable access
# https://github.com/kubernetes/helm/issues/3985#issuecomment-385102874
kubectl -n kube-system patch deployment tiller-deploy -p '{"spec": {"template": {"spec": {"automountServiceAccountToken": true}}}}'

#Replace this with logic to wait till the pods are running
sleep 60
kubectl get pods --all-namespaces
kubectl get sa --all-namespaces

helm repo add openebs-charts https://openebs.github.io/charts/
helm repo update
helm install openebs-charts/openebs --name ci --set apiserver.imageTag="ci",apiserver.replicas="1",jiva.replicas="1"
helm version
helm install stable/openebs --name ci --namespace openebs --set apiserver.imageTag="ci",jiva.replicas="1"

#Replace this with logic to wait till the pods are running
sleep 30
kubectl get pods --all-namespaces -o yaml
kubectl get pods --all-namespaces
sleep 30
kubectl apply -f https://raw.githubusercontent.com/openebs/openebs/master/k8s/openebs-storageclasses.yaml

2 changes: 1 addition & 1 deletion ci/setup_env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

MAPI_SVC_ADDR=`kubectl get service -n openebs ci-openebs-maya-apiservice -o json | grep clusterIP | awk -F\" '{print $4}'`
MAPI_SVC_ADDR=`kubectl get service -n openebs ci-openebs-apiservice -o json | grep clusterIP | awk -F\" '{print $4}'`
export MAPI_ADDR="http://${MAPI_SVC_ADDR}:5656"
export KUBERNETES_SERVICE_HOST="127.0.0.1"
export MAYACTL="$GOPATH/src/github.com/openebs/maya/bin/maya/maya"
2 changes: 1 addition & 1 deletion ci/ubuntu-compile-nsenter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
set -e

sudo apt-get update
sudo apt-get install libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool
sudo apt-get install libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool bison
mkdir .tmp || true
wget https://www.kernel.org/pub/linux/utils/util-linux/v2.30/util-linux-2.30.2.tar.gz -qO - | tar -xz -C .tmp/
cd .tmp/util-linux-2.30.2 && ./autogen.sh && ./configure && make nsenter
Expand Down

0 comments on commit 70b87b1

Please sign in to comment.