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
function New-Sp { | |
param($Name, $Password) | |
$spParams = @{ | |
StartDate = Get-Date | |
EndDate = Get-Date -Year 2030 | |
Password = $Password | |
} | |
$cred= New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property $spParams |
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
Configuration IIS | |
{ | |
# This will generate three .mof files; web1.mof, web2.mof, web3.mof | |
Node ('web1', 'web2', 'web3') | |
{ | |
#ensure IIS is installed | |
WindowsFeature IIS | |
{ | |
Name = 'web-server' | |
Ensure = 'Present' |
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 group create --name MySonarServer --location westus2 | |
az container create -g MySonarServer \ | |
--name sonarqubeaci \ | |
--image sonarqube \ | |
--ports 9000 \ | |
--dns-name-label cssonar \ | |
--cpu 2 --memory 3.5 |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.RazorPages; | |
using System.Security.Claims; | |
namespace CloudSkills.Pages |
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
#!/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
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
#!/bin/bash | |
yum update -y | |
yum install -y httpd24 php56 mysql php56-mysqlnd | |
service httpd start | |
chkconfig httpd on | |
echo "fs-56fc251e.efs.us-east-1.amazonaws.com:/ /var/www/html nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0" >> /etc/fstab | |
mount -a |
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 httpd24 php70 mysql php70-mysqlnd | |
service httpd start | |
chkconfig httpd on | |
usermod -a -G apache ec2-user | |
sudo chown -R ec2-user:apache /var/www | |
sudo chmod 2775 /var/www |
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 | |
wget https://wordpress.org/latest.tar.gz | |
tar -xzf latest.tar.gz | |
cp -r wordpress/* /var/www/html/ |