Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spark-integration-test-minikube-k8s issue #578

Merged
merged 1 commit into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.