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
PS C:\gd\Documents\dockerswarmarm> $vmss = (Get-AzureRmVmss -ResourceGroupName Swarm-RG -Name swarmhost) | |
PS C:\gd\Documents\dockerswarmarm> $vmss.Sku.Capacity = 5 | |
PS C:\gd\Documents\dockerswarmarm> Update-AzureRmVmss -ResourceGroupName Swarm-RG -Name swarmhost -VirtualMachineScaleSet $vmss |
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
PS C:\gd\Documents\dockerswarmarm> Get-AzureRmPublicIpAddress -Name swarmhostsoei4cappgwpip -ResourceGroupName swarm-rg | select IPaddress | |
IpAddress | |
--------- | |
13.84.214.117 | |
PS C:\gd\Documents\dockerswarmarm> Invoke-webrequest 13.84.214.117 | |
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
PS C:\Users\cloudadmin> Invoke-WebRequest swarmhost000001 | |
StatusCode : 200 | |
StatusDescription : OK | |
Content : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" cont... | |
RawContent : HTTP/1.1 200 OK |
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
PS C:\Users\cloudadmin> docker service ls | |
ID NAME MODE REPLICAS IMAGE PORTS | |
odt8g82356ig iis global 2/2 microsoft/iis:windowsservercore-1709 |
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
PS C:\Users\cloudadmin> docker node update --availability drain swarmmanager1 | |
swarmmanager1 | |
PS C:\Users\cloudadmin> docker node ls | |
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS | |
iamctppujla19jing2j1jeyp2 swarmhost000000 Ready Active Leader | |
tz4kj2utkhra3e9tp3ooa5ks0 swarmhost000001 Ready Active Reachable | |
y1nrx7qu5mq0x9ydhdmjmpjgw * swarmmanager1 Ready Drain Reachable |
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
PS C:\Users\cloudadmin> docker node ls | |
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS | |
iamctppujla19jing2j1jeyp2 swarmhost000000 Ready Active Leader | |
tz4kj2utkhra3e9tp3ooa5ks0 swarmhost000001 Ready Active Reachable | |
y1nrx7qu5mq0x9ydhdmjmpjgw * swarmmanager1 Ready Active Reachable |
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"vmssName": { | |
"value": "swarmhosts" | |
}, | |
"instanceCount": { | |
"value": 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
#Requires -Version 3.0 | |
Param( | |
[string] $ResourceGroupLocation = "southcentralus", | |
[string] $ResourceGroupName = 'Swarm-RG', | |
[string] $TemplateFile = 'azuredeploy.json', | |
[string] $TemplateParametersFile = 'azuredeploy.parameters-show.json' | |
) | |
If (-not (Get-AzureRmResourceGroup -Name $ResourceGroupName -ErrorAction SilentlyContinue)) {New-AzureRmResourceGroup -Name $ResourceGroupName -Location $ResourceGroupLocation -Verbose } | |
New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $TemplateFile).BaseName + '-' + ((Get-Date).ToUniversalTime()).ToString('MMdd-HHmm')) ` |
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
WORKDIR prep | |
RUN Invoke-WebRequest "https://go.microsoft.com/fwlink/?linkid=517856" -UseBasicParsing -OutFile appinsights.msi; ` | |
Start-Process -filepath "appinsights.msi" -ArgumentList "/quiet" -PassThru | Wait-Process; ` | |
Remove-Item .\* -recurse -force -Verbose | |
RUN Import-Module 'C:\Program Files\Microsoft Application Insights\Status Monitor\PowerShell\Microsoft.Diagnostics.Agent.StatusMonitor.PowerShell.dll'; ` | |
Start-ApplicationInsightsMonitoring -Name 'default web site' -InstrumentationKey '3c069cb6-fc1a-4bab-974c-0a4245ae7f1b' |
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
PS C:\Windows\system32> get-wmiobject -ComputerName 172.19.173.92 -Class win32_computersystem | |
Domain : ad.local | |
Manufacturer : Microsoft Corporation | |
Model : Virtual Machine | |
Name : CONTAINERHOST | |
PrimaryOwnerName : | |
TotalPhysicalMemory : 4105752576 |