Skip to content

Instantly share code, notes, and snippets.

View naviat's full-sized avatar
🪲

Harry Dam naviat

🪲
View GitHub Profile
#Hat Tip http://www.virtuallyghetto.com/2014/02/having-some-fun-with-marvel-comics-api.html
#Instructions: Aquire a Marvel API key from https://developer.marvel.com and place them in lines 63 & 64. Import this module into a VM build script and call Get-Hero to grab a random Marvel super hero.
#Imported Get-Hash function (credits http://dbadailystuff.com/2013/03/11/get-hash-a-powershell-hash-function/)
function Get-Hash
{
Param
(
$subscription = "[Subscription here]"
Select-AzureSubscription -SubscriptionName $subscription
$cloudservice = '[Cloud Service Here]'
Get-AzureVM -ServiceName $cloudservice | foreach {
$path = 'c:\vms' + $_.Name + '.xml'
Export-AzureVM -ServiceName $cloudservice -Name $_.Name -Path $path
}
New-AzureVMConfig -ImageName $image.ImageName -Name $VMName -InstanceSize Small -AvailabilitySetName $serviceName |
#Add VM to a domain
Add-AzureProvisioningConfig -EnableWinRMHttp -AdminUsername $VMUserName -Password $VMPassword -WindowsDomain -DomainUsername $DomainUserName -DomainPassword $DomainPassword -Domain $domain -JoinDomain $domain |
#Add a load balanced endpoint
Add-AzureEndpoint -Name "HTTP" -Protocol tcp -LocalPort "80" -LBSetName "HTTPforChef" -PublicPort "80" -DefaultProbe |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 1023 -DiskLabel "Data" -LUN 0 |
Set-AzureSubnet -SubnetNames "Subnet-1" |
#Install the Chef extension
Set-AzureVMChefExtension -ValidationPem $chefpem -Windows -ClientRb $chefclient -RunList $runlist |
New-AzureVM -ServiceName $serviceName -VNetName $vnetName -Location "South Central US" -WaitForBoot
@naviat
naviat / rds_download_logfiles.rb
Created December 28, 2017 06:42 — forked from ruckus/rds_download_logfiles.rb
Ruby script to download log files from RDS and archive to S3.
=begin
This script uses the AWS v2 API
Gemfile:
source "https://rubygems.org"
gem "aws-sdk", "2.0.17.pre"
@naviat
naviat / install_jenkins_plugin.sh
Created January 11, 2018 02:29 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
#!/usr/bin/env bash
# Generate timestamped filename
TIMESTAMPED_TAG=`date +%Y-%m-%d-%H%M%S`
BACKUP_ARCHIVE="./jenkins-backup-${TIMESTAMPED_TAG}.tar.gz"
# Inconceivable race condition avoidance
if [-f $BACKUP_ARCHIVE ]; then
rm ${BACKUP_ARCHIVE}
fi
@naviat
naviat / chmod.groovy
Created January 25, 2018 07:55 — forked from tamirko/chmod.groovy
change permissions example
/* Groovy Usage:
This code snippet changes the permissions
of all the files inside the /usr/bin/myapp/data folder.
In this case, all the files in /usr/bin/myapp/data
will be writable after invoking this command.
*/
builder = new AntBuilder()
builder.chmod(dir:"/usr/bin/myapp/data", perm:'+w', includes:"*")
@naviat
naviat / datadog-role-delegation.json
Created February 28, 2018 17:24 — forked from miketheman/datadog-role-delegation.json
Datadog AWS Integration Automated Setup - CloudFormation
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"SharedSecret": {
"Default": "SOOPASEKRET",
"Description": "Shared Secret, aka External ID",
"Type": "String",
"NoEcho": "true"
}
},
@naviat
naviat / control_ecs_asg.py
Created February 28, 2018 17:57 — forked from joey-g/control_ecs_asg.py
ECS/ASG Startup Script
import boto3
import sys
import time
# Script param validation.
def validate_params():
param_error_found = False
if len(sys.argv) < 3:
param_error_found = True
if sys.argv[1].lower() not in ['qa0', 'qa1', 'qa2', 'qa3', 'qa4', 'qa5', 'qa6', 'qa7', 'qa8', 'qa9', 'qa10']:

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from Feb