This file contains hidden or 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
| # ... | |
| # Real deployment code | |
| # ... | |
| if ([string]::IsNullOrEmpty($env:RELEASE_DEFINITIONNAME)) | |
| { | |
| Write-Host "Wake up developer!" | |
| [Console]::Beep(200,500) | |
| [Console]::Beep(400,500) | |
| [Console]::Beep(600,500) |
This file contains hidden or 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: v1 | |
| kind: Service | |
| metadata: | |
| name: kubernetesprobedemo | |
| spec: | |
| selector: | |
| app: kubernetesprobedemo | |
| ports: | |
| - port: 32001 | |
| nodePort: 32001 |
This file contains hidden or 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
| docker ps --filter "name=ptrxm" | |
| docker exec 0035 curl -d '{"readiness":false,"liveness":true}' -H "Content-Type: application/json" -X POST http://localhost/api/HealthCheck | |
| kubectl get pods |
This file contains hidden or 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
| curl "https://gist.githubusercontent.com/JanneMattila/58312dac39b7d6b809399bf0fdfcbe54/raw/bf0b77314a4991578e4beba2b4e3edf17d3af41c/KubernetesProbeDemo.yaml" -o KubernetesProbeDemo.yaml | |
| kubectl apply -f "KubernetesProbeDemo.yaml" --record |
This file contains hidden or 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
| kubectl apply -f "https://gist.githubusercontent.com/JanneMattila/75d5ec456b3105736c510bc99a5883e0/raw/603ccd6d7beff9d8e931568023131873a5890ef4/Echo.yaml" |
This file contains hidden or 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: v1 | |
| kind: Service | |
| metadata: | |
| name: echo | |
| spec: | |
| selector: | |
| app: echo | |
| ports: | |
| - port: 31111 | |
| nodePort: 31111 |
This file contains hidden or 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
| Configuration DeployLOBApplication | |
| { | |
| Param ( | |
| [Parameter(Mandatory=$true)][string] $nodeName, | |
| [Parameter(Mandatory=$true)][string] $applicationPackage) | |
| Import-DscResource -ModuleName PSDesiredStateConfiguration | |
| Node $nodeName | |
| { |
This file contains hidden or 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
| # Get password from key vault | |
| $secret = Get-AzureKeyVaultSecret -VaultName $VaultName -Name $VaultSecretName | |
| # Create additional parameters that we pass to the template deployment | |
| $additionalParameters = New-Object -TypeName hashtable | |
| $additionalParameters['adminUsername'] = $AdminUsername | |
| $additionalParameters['adminPassword'] = $secret.SecretValue | |
| $result = New-AzureRmResourceGroupDeployment ` | |
| -ResourceGroupName $ResourceGroupName ` |
This file contains hidden or 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
| $me = Get-AzureRmADUser -SearchString "your name" | |
| Set-AzureRmKeyVaultAccessPolicy ` | |
| -VaultName $VaultName ` | |
| -ResourceGroupName $ResourceGroupName ` | |
| -UserPrincipalName $me.UserPrincipalName ` | |
| -PermissionsToKeys all ` | |
| -PermissionsToSecrets all |
This file contains hidden or 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
| Write-Host Creating resource group... | |
| New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location -Verbose | |
| Write-Host Creating key vault... | |
| New-AzureRmKeyVault ` | |
| -VaultName $VaultName ` | |
| -EnabledForDeployment ` | |
| -EnabledForTemplateDeployment ` | |
| -ResourceGroupName $ResourceGroupName ` | |
| -Location $Location -Verbose |