diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/GitHub_Logo.png b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/GitHub_Logo.png
new file mode 100644
index 000000000..26b5e54a6
Binary files /dev/null and b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/GitHub_Logo.png differ
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/MSLogo.png b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/MSLogo.png
new file mode 100644
index 000000000..d9000a19b
Binary files /dev/null and b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/MSLogo.png differ
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/MSicon.png b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/MSicon.png
new file mode 100644
index 000000000..047940f94
Binary files /dev/null and b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/MSicon.png differ
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/github-mark.png b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/github-mark.png
new file mode 100644
index 000000000..6cb3b705d
Binary files /dev/null and b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/github-mark.png differ
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/index.html b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/index.html
new file mode 100644
index 000000000..cc9794fcc
--- /dev/null
+++ b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/index.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+ MicroHack Demo Page
+
+
+
+
+
+

+
+
+
+
+
+
+
+
MicroHack
Demo Page
+ Current Hostname:
+
+
+
+
+
+
+
+
+
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/stylesheet.css b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/stylesheet.css
new file mode 100644
index 000000000..57b3258db
--- /dev/null
+++ b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage/stylesheet.css
@@ -0,0 +1,81 @@
+body, html {
+ height: 100%;
+ margin: 0;
+ padding: 0;
+}
+
+.bg {
+ background-image: linear-gradient(-70deg, #0976D5, #9E3DB0, #6F3F95, #2C4470);
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ position: relative;
+ background-attachment: fixed;
+}
+
+.footer {
+ height: 50px; /* Adjust the height as needed */
+ width: 100%;
+ background-color: #f2f2f2;
+ overflow: hidden;
+ z-index: 1;
+ position: absolute;
+ bottom: 0;
+ text-align: center;
+}
+
+.topnav {
+ background-color: white;
+ overflow: hidden;
+ z-index: 1;
+ position: fixed;
+ width: 100%;
+ top: 0
+}
+
+.topnav .logo {
+ float: left;
+ padding: 25px;
+}
+
+.topnav .menu {
+ float: right;
+ padding: 25px;
+}
+
+img {
+ max-height: 30px;
+ width: auto;
+ object-fit:contain;
+ background-color: white;
+ vertical-align:middle
+}
+
+img:hover {
+ background-color: #ddd;
+ color: black;
+}
+
+.heading {
+ font-size: 80px;
+}
+
+.heading2 {
+ font-size: 40px;
+ font-weight: bold;
+}
+
+.heading, .heading2 {
+ color: white;
+ opacity: 90%;
+ font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
+}
+
+.center {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ text-align: center;
+ padding: 20px;
+}
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/deploy.ps1 b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/deploy.ps1
new file mode 100644
index 000000000..27d2485af
--- /dev/null
+++ b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/deploy.ps1
@@ -0,0 +1,19 @@
+# Setting Variables
+$pathToRepo = "https://raw.githubusercontent.com/microsoft/MicroHack/main/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/demopage"
+$pathToIndex = "C:\inetpub\wwwroot\index.html"
+$replaceText = ""
+$hostname = $env:computername
+
+# Remove Default contents of wwwroot
+Remove-Item -Path "C:\inetpub\wwwroot\*.*"
+
+# Download files from repository
+Invoke-WebRequest -Uri "$pathToRepo/index.html" -OutFile C:\inetpub\wwwroot\index.html
+Invoke-WebRequest -Uri "$pathToRepo/GitHub_Logo.png" -OutFile C:\inetpub\wwwroot\GitHub_Logo.png
+Invoke-WebRequest -Uri "$pathToRepo/MSLogo.png" -OutFile C:\inetpub\wwwroot\MSLogo.png
+Invoke-WebRequest -Uri "$pathToRepo/MSicon.png" -OutFile C:\inetpub\wwwroot\MSicon.png
+Invoke-WebRequest -Uri "$pathToRepo/github-mark.png" -OutFile C:\inetpub\wwwroot\github-mark.png
+Invoke-WebRequest -Uri "$pathToRepo/stylesheet.css" -OutFile C:\inetpub\wwwroot\stylesheet.css
+
+# Replace Hostname placeholter with actual Hostname
+(Get-Content -path $pathToIndex -Raw).replace($replaceText, $hostname) | Set-Content -Path $pathToIndex
\ No newline at end of file
diff --git a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/source.bicep b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/source.bicep
index dcf11bfc4..22adcf3e0 100644
--- a/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/source.bicep
+++ b/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/source.bicep
@@ -22,6 +22,8 @@ param secretsPermissions array = [
@description('GUID to be used in Password creation')
param guidValue string = newGuid()
+param deploymentScriptUrl string = 'https://raw.githubusercontent.com/microsoft/MicroHack/main/03-Azure/01-03-Infrastructure/06_Migration_Datacenter_Modernization/resources/deploy.ps1'
+
// Variables
@description('Admin user variable')
var adminUsername = '${prefix}${deployment}-${userName}'
@@ -227,7 +229,7 @@ resource vm1 'Microsoft.Compute/virtualMachines@2022-03-01' = {
vmSize: 'Standard_D2s_v5'
}
osProfile: {
- computerName: vm1Name
+ computerName: 'fe1'
adminUsername: adminUsername
adminPassword: adminPassword
}
@@ -272,7 +274,8 @@ resource vm1Extension 'Microsoft.Compute/virtualMachines/extensions@2022-03-01'
typeHandlerVersion: '1.10'
autoUpgradeMinorVersion: true
settings: {
- commandToExecute: 'powershell -ExecutionPolicy Unrestricted Add-WindowsFeature Web-Server -IncludeManagementTools; powershell -ExecutionPolicy Unrestricted Add-Content -Path "C:\\inetpub\\wwwroot\\Default.htm" -Value $($env:computername)'
+ commandToExecute: 'powershell -ExecutionPolicy Unrestricted Add-WindowsFeature Web-Server -IncludeManagementTools; powershell -ExecutionPolicy Unrestricted -File deploy.ps1'
+ fileUris: [deploymentScriptUrl]
}
protectedSettings: {
}
@@ -322,7 +325,7 @@ resource vm2 'Microsoft.Compute/virtualMachines@2022-03-01' = {
vmSize: 'Standard_D2s_v5'
}
osProfile: {
- computerName: vm2Name
+ computerName: 'fe2'
adminUsername: adminUsername
adminPassword: adminPassword
}
@@ -368,7 +371,8 @@ resource vm2Extension 'Microsoft.Compute/virtualMachines/extensions@2022-03-01'
typeHandlerVersion: '1.10'
autoUpgradeMinorVersion: true
settings: {
- commandToExecute: 'powershell -ExecutionPolicy Unrestricted Add-WindowsFeature Web-Server -IncludeManagementTools; powershell -ExecutionPolicy Unrestricted Add-Content -Path "C:\\inetpub\\wwwroot\\Default.htm" -Value $($env:computername)'
+ commandToExecute: 'powershell -ExecutionPolicy Unrestricted Add-WindowsFeature Web-Server -IncludeManagementTools; powershell -ExecutionPolicy Unrestricted -File deploy.ps1'
+ fileUris: [deploymentScriptUrl]
}
protectedSettings: {
}