Skip to content

Commit

Permalink
Fix spark-integration-test-minikube-k8s issue
Browse files Browse the repository at this point in the history
1. Remove deprecated role "install-docker-ce"
2. Apply role "install-openjdk" instead of installing OpenJDK in run.yaml
3. Add option "--r" for command "make-distribution.sh" in minikube job
   to avoid following docker build error because R code can't be found
   in docker file.

Related-Bug: theopenlab/openlab#310
Related-Bug: theopenlab/openlab#308
  • Loading branch information
kiwik committed Jun 29, 2019
1 parent 0101d8f commit 882fbef
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 71 deletions.
4 changes: 2 additions & 2 deletions playbooks/spark-integration-test-kubeadm-k8s/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
- name: Run integration tests of Spark with k8s cluster manager
shell: |
set -ex
export KUBECONFIG=/etc/kubernetes/admin.conf
export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list javac)))
sed -i -e '/127.0.0.1/ s/\(localhost\)/'$(hostname)' \1/' /etc/hosts
# Create required account in k8s
export KUBECONFIG=/etc/kubernetes/admin.conf
kubectl create serviceaccount spark
kubectl create clusterrolebinding spark-role --clusterrole=edit --serviceaccount=default:spark --namespace=default
Expand All @@ -32,3 +31,4 @@
args:
executable: /bin/bash
chdir: '{{ zuul.project.src_dir }}'
environment: '{{ global_env }}'
11 changes: 5 additions & 6 deletions playbooks/spark-integration-test-minikube-k8s/run.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
- hosts: all
become: yes
roles:
- install-openjdk
- role: install-docker
docker_version: 18.06
- create-single-k8s-cluster-with-minikube
tasks:
- name: Run integration tests of Spark with k8s cluster manager
shell: |
set -ex
# install java8
apt-get install openjdk-8-jdk -y
export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list javac)))
sed -i -e '/127.0.0.1/ s/\(localhost\)/'$(hostname)' \1/' /etc/hosts
# NOTE: the distribution step may fail due to dependencies downloading failure, so we suport retry
for i in $(seq 1 3); do ./dev/make-distribution.sh --tgz -Pkubernetes && s=0 && break || s=$? && sleep 5; done; (exit $s)
# Create required account in k8s
kubectl create serviceaccount spark
kubectl create clusterrolebinding spark-role --clusterrole=edit --serviceaccount=default:spark --namespace=default
# NOTE: the distribution step may fail due to dependencies downloading failure, so we suport retry
for i in $(seq 1 3); do ./dev/make-distribution.sh --tgz -Pkubernetes --r && s=0 && break || s=$? && sleep 5; done; (exit $s)
pushd resource-managers/kubernetes/integration-tests
dev/dev-run-integration-tests.sh --spark-tgz $(realpath ../../../spark-*.tgz) --namespace default --service-account spark
popd
args:
executable: /bin/bash
chdir: '{{ zuul.project.src_dir }}'
environment: '{{ global_env }}'
4 changes: 0 additions & 4 deletions roles/install-docker-ce/defaults/main.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions roles/install-docker-ce/tasks/main.yml

This file was deleted.

0 comments on commit 882fbef

Please sign in to comment.