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
#!/bin/bash | |
# Tutorial: Install a LAMP web server on the Amazon Linux AMI | |
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html | |
# ensure that all of your software packages are up to date | |
sudo yum update -y | |
# install related dependencies | |
sudo yum install -y httpd24 php72 mysql57-server php72-mysqlnd |
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
#!/bin/bash | |
# Tutorial: Install a LAMP stack on an Azure Linux VM | |
# https://docs.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-lamp-stack | |
# Create the VM Resource Group | |
az group create --name LAMP-STACK-RG --location westus2 | |
# Create the VM | |
az vm create \ |
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
az acr task create -t node-demo:{{.Run.ID}} -n node-demo -r <acr name> \ | |
-f Dockerfile -c https://github.com/mikepfeiffer/node-docker-demo.git \ | |
--pull-request-trigger-enabled true \ | |
--git-access-token <token> |
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
# Create variables | |
$webappname = "mywebapp$(Get-Random)" | |
$rgname = 'webapps3-dev-rg' | |
$location = 'westus2' | |
# Create a resource group | |
New-AzResourceGroup -Name $rgname -Location $location | |
# Create an App Service plan in S1 tier | |
New-AzAppServicePlan -Name $webappname -Location $location -ResourceGroupName $rgname -Tier S1 |
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
az group create -n webapps-dev-rg -l westus2 | |
az appservice plan create --name webapps-dev-plan \ | |
--resource-group webapps-dev-rg \ | |
--sku s1 \ | |
--is-linux | |
az webapp create -g webapps-dev-rg \ | |
-p webapps-dev-plan \ | |
-n mp10344884 \ |
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
CD $HOME | |
wget https://gist.github.com/mikepfeiffer/176776a8758b4e2910554a5c33392c12/raw/e48369b8aa73348606e76cbebc603d9e89c56666/customRoleDefinition.json | |
$subscription_id = (Get-AzContext).Subscription.id | |
(Get-Content -Path $HOME/customRoleDefinition.json) -Replace 'SUBSCRIPTION_ID', $subscription_id | | |
Set-Content -Path $HOME/customRoleDefinition.json | |
New-AzRoleDefinition -InputFile ./customRoleDefinition.json |
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
{ | |
"Name": "Virtual Machine Operator (Custom)", | |
"Id": null, | |
"IsCustom": true, | |
"Description": "Allows to start and stop (deallocate) Azure VMs", | |
"Actions": [ | |
"Microsoft.Compute/*/read", | |
"Microsoft.Compute/virtualMachines/deallocate/action", | |
"Microsoft.Compute/virtualMachines/start/action" | |
], |
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
#cloud-config | |
package_upgrade: true | |
packages: | |
- httpd |
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
[CmdletBinding()] | |
param( | |
[Parameter(Position=0, Mandatory=$false)] | |
[System.Int32] | |
$count = 1, | |
[Parameter(Position=2, Mandatory=$true)] | |
[System.String] | |
$Password, |
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
param( | |
$Name = 'WEB1', | |
$Location = 'westus2', | |
$ResourceGroup = 'WebServers' | |
) | |
New-AzResourceGroup -Name $ResourceGroup -Location $Location | |
$params = @{ | |
Name = $Name |
NewerOlder