I hereby claim:
- I am mlapida on github.
- I am mlapida (https://keybase.io/mlapida) on keybase.
- I have a public key whose fingerprint is 4FA6 EF78 A865 B98E 3004 9A74 1FB2 D101 B85F 9F75
To claim this, I am signing this object:
| knife azure server create --azure-dns-name aos-chef-poc-01 --azure-vm-size Small ` | |
| --azure-source-image 'a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201409.01-en.us-127GB.vhd' --azure-service-location 'West US' ` | |
| --winrm-user myadmin --winrm-password 'P@ssw0rd' --bootstrap-protocol winrm --distro 'windows-chef-client-msi' |
| 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 |
| $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 | |
| } |
| param ( | |
| # Define Parameters | |
| [parameter(Mandatory=$true)] | |
| [string]$sub, | |
| [parameter(Mandatory=$true)] | |
| [string]$vm, | |
| [parameter(Mandatory=$true)] | |
| [string]$service |
| #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 | |
| ( |
I hereby claim:
To claim this, I am signing this object:
| import boto3 | |
| import logging | |
| import datetime | |
| import re | |
| import time | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.ERROR) |
| import boto3 | |
| import logging | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| #define the connection | |
| ec2 = boto3.resource('ec2') |
| import boto3 | |
| import logging | |
| from datetime import * | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.WARNING) | |
| #define the connection | |
| ec2 = boto3.resource('ec2', region_name="us-west-2") |
| import boto3 | |
| import logging | |
| import json | |
| import gzip | |
| from StringIO import StringIO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| client = boto3.client('firehose') |