This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:8-jdk-alpine | |
ENV DAEMON_RUN=true | |
ENV SPARK_VERSION=2.3.1 | |
ENV HADOOP_VERSION=2.7 | |
ENV SCALA_VERSION=2.12.4 | |
ENV SCALA_HOME=/usr/share/scala | |
RUN apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \ | |
apk add --no-cache bash curl jq && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM spark-base:2.3.1 | |
COPY start-master.sh / | |
ENV SPARK_MASTER_PORT 7077 | |
ENV SPARK_MASTER_WEBUI_PORT 8080 | |
ENV SPARK_MASTER_LOG /spark/logs | |
EXPOSE 8080 7077 6066 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM spark-base:2.3.1 | |
COPY start-worker.sh / | |
ENV SPARK_WORKER_WEBUI_PORT 8081 | |
ENV SPARK_WORKER_LOG /spark/logs | |
ENV SPARK_MASTER "spark://spark-master:7077" | |
EXPOSE 8081 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/spark/bin/spark-submit \ | |
--class ${SPARK_APPLICATION_MAIN_CLASS} \ | |
--master ${SPARK_MASTER_URL} \ | |
--deploy-mode cluster \ | |
--total-executor-cores 1 \ | |
${SPARK_SUBMIT_ARGS} \ | |
${SPARK_APPLICATION_JAR_LOCATION} \ | |
${SPARK_APPLICATION_ARGS} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
spark-master: | |
image: spark-master:2.3.1 | |
container_name: spark-master | |
hostname: spark-master | |
ports: | |
- "8080:8080" | |
- "7077:7077" | |
networks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
docker build -t spark-base:2.3.1 ./docker/base | |
docker build -t spark-master:2.3.1 ./docker/spark-master | |
docker build -t spark-worker:2.3.1 ./docker/spark-worker | |
docker build -t spark-submit:2.3.1 ./docker/spark-submit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
/** | |
* | |
* @param {String} Directory to scan | |
* @param {Array} allFiles partial list of files(used for recursivity) | |
*/ | |
const recursiveScan = function (directory, allFiles) { | |
const files = fs.readdirSync(directory); | |
allFiles = allFiles || []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const { | |
promisify | |
} = require('util'); | |
/** | |
Add Promise sugar to the fs.readdir and fs.stat functions | |
*/ | |
const fsReadDir = promisify(fs.readdir); | |
const fsStat = promisify(fs.stat); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml | |
kubectl get storageclass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#download helm | |
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh | |
#Make instalation script executable | |
chmod u+x install-helm.sh | |
#Install helm | |
./install-helm.sh |
OlderNewer