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
#create a port forward wich exposes your mysql service to the local machine | |
kubectl port-forward svc/local-database-mysql 3306 -n test | |
MYSQL_HOST=127.0.0.1 | |
MYSQL_PORT=3306 | |
MYSQL_ROOT_PASSWORD=FUnIsntSOmethingOneConsiderWhenBalancingTheUniverse | |
#Use mysql-client to connect to the host | |
mysql -h $MYSQL_HOST -P$MYSQL_PORT -u root -p$MYSQL_ROOT_PASSWORD |
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
helm install --name local-database --namespace test -f mysql.yaml stable/mysql |
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
--- | |
mysqlUser: localUsr | |
mysqlPassword: localUsrxPwd# | |
mysqlRootPassword: FUnIsntSOmethingOneConsiderWhenBalancingTheUniverse | |
persistence: | |
enabled: true | |
storageClass: local-path |
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
#Create tiller service account | |
kubectl -n kube-system create serviceaccount tiller | |
#Create cluster role binding for tiller | |
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller | |
#Initialize tiller | |
helm init --service-account tiller |
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 |
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
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
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
#!/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
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: |
NewerOlder