This file contains 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
aws_ecr_curl() { | |
login_cmd=$(aws ecr get-login) | |
username=$(echo "$login_cmd" | cut -d " " -f 4) | |
password=$(echo "$login_cmd" | cut -d " " -f 6) | |
endpoint=$(echo "$login_cmd" | cut -d " " -f 9) | |
args=("$@") | |
args_length=${#args[@]} | |
args_last=${args[$args_length-1]} | |
unset 'args[${args_length}-1]' |
This file contains 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 -ex | |
docker run --rm -it --net=host --entrypoint=/opt/spark/bin/spark-submit esailors/spark:2.3.0 \ | |
--master k8s://http://localhost:8080 \ | |
--deploy-mode cluster \ | |
--name spark-pi \ | |
--class org.apache.spark.examples.SparkPi \ | |
--conf spark.executor.instances=3 \ | |
--conf spark.kubernetes.container.image=esailors/spark:2.3.0 \ |
This file contains 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
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: datadog-agent | |
namespace: monitoring | |
spec: | |
updateStrategy: | |
type: RollingUpdate | |
template: | |
metadata: |
This file contains 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
import yaml | |
import time | |
import re | |
def is_valid_yaml(yaml_content): | |
try: | |
list(yaml.load_all(yaml_content)) | |
return True | |
except Exception as err: | |
print(err) |
This file contains 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 centos:7 | |
ARG arg1 | |
ARG arg2 | |
ARG arg3 | |
RUN if [ "x$arg1" = "x" ] ; then echo arg1 not provided ; fi && \ | |
if [ "x$arg2" = "x" ] ; then echo arg2 not provided ; fi && \ | |
if [ "x$arg3" = "x" ] ; then echo arg3 not provided ; fi |