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
# Using s3 copy with multipart uploads for efficient file merging | |
# limitation: min part size is 5MB | |
import boto3 | |
from datetime import datetime | |
client = boto3.client('s3') | |
now = datetime.now() | |
timestamp = now.strftime("%Y%m%d_%H%M%S") | |
bucket = "bucket-testing-dev" |
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
echo -e "HTTP/1.1 200 OK\r\n$(date)\r\n\r\n<h1>hello world from $(hostname) on $(date)</h1>" | sudo ncat -vl --ssl 443 |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Metadata: | |
License: Apache-2.0 | |
Description: '@Author: Sanjay Garje. AWS CloudFormation Sample Template SageMaker NotebookInstance: This template demonstrates | |
the creation of a SageMaker NotebookInstance with encryption. You will be billed for the AWS resources used if you create a stack from | |
this template.' | |
Parameters: | |
NotebookInstanceName: | |
AllowedPattern: '[A-Za-z0-9-]{1,63}' | |
ConstraintDescription: Maximum of 63 alphanumeric characters. Can include hyphens |
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
// Job == agent-build_pipeline | |
// build agent for linux/windows | |
currentBuild.description = env.TAG | |
def WORKER='worker-large' | |
def OS = [ 'redhat', 'debian' ] | |
def ARCH = [ '64' ] | |
def pipeline_branches = [:] | |
def JB='./jenkins/build' | |
def jbuild = { sh "bash ${JB}/build.sh" } | |
def provision = { sh "bash ${JB}/provision.sh" } |
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
source ~/ssh-agent.sh | |
sshagent_init |
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
#!/usr/bin/env python3 | |
import boto3 | |
import json | |
import uuid | |
import sys | |
from time import sleep | |
import backoff | |
from botocore import exceptions | |
if len(sys.argv) < 2 : |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: Amazon EKS - Node Group Role | |
Resources: | |
NodeInstanceRole: | |
Type: "AWS::IAM::Role" | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" |
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
// By Ben Yanke | |
// Based on https://gist.github.com/benyanke/862e446e5a816551928d8acc2d98b752 | |
// Handles CloudWatch alerts via SNS as Slack Attachments, instead of plaintext. | |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/...'; // put your webhook URL here// Added by Ben Yanke |
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
/* | |
* Configure the Jenkins EC2 Plugin via Groovy Script | |
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin | |
*/ | |
import com.amazonaws.services.ec2.AmazonEC2 | |
import com.amazonaws.services.ec2.AmazonEC2ClientBuilder | |
import com.amazonaws.services.ec2.model.CreateKeyPairRequest | |
import com.amazonaws.services.ec2.model.CreateKeyPairResult | |
import com.amazonaws.services.ec2.model.KeyPair | |
import com.amazonaws.services.ec2.model.DeleteKeyPairRequest |
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
/* | |
* Configure the Jenkins EC2 Plugin via Groovy Script | |
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin | |
*/ | |
import hudson.model.* | |
import jenkins.model.* | |
import hudson.plugins.ec2.* | |
import com.amazonaws.services.ec2.model.InstanceType | |
NewerOlder