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
sudo amazon-linux-extras install epel -y | |
sudo yum install stress -y |
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
# 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
#!/bin/bash | |
yum install httpd -y | |
/sbin/chkconfig --levels 235 httpd on | |
service httpd start | |
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
region=$(curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}') | |
echo "<h1>$instanceId</h1>" > /var/www/html/index.html | |
aws ec2 create-tags --resources "$instanceId" --tags Key=Name,Value="PROD-$instanceId" --region "$region" |
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
#!/bin/bash | |
yum install -y aws-cli | |
cd /home/ec2-user/ | |
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1 | |
yum -y install codedeploy-agent.noarch.rpm |
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 | |
yum update -y | |
yum install -y httpd | |
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
echo "<h1>Hello World from $instanceId</h1>" > /var/www/html/index.html | |
systemctl start httpd | |
systemctl enable 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
#!/bin/bash | |
yum update -y | |
yum install -y httpd | |
echo '<h1>Hello World</h1>' > /var/www/html/index.html | |
systemctl start httpd | |
systemctl enable 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
#!/bin/bash | |
az appservice plan create \ | |
-g webapps-dev-rg \ | |
-n gm-asp-dev-02 \ | |
--is-linux \ | |
--number-of-workers 1 \ | |
--sku S1 | |
az webapp 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
param( | |
$Name = 'WEB1', | |
$Location = 'westus2', | |
$ResourceGroup = 'WebServers' | |
) | |
New-AzResourceGroup -Name $ResourceGroup -Location $Location | |
$params = @{ | |
Name = $Name |
NewerOlder