Skip to content

Commit

Permalink
update avd config
Browse files Browse the repository at this point in the history
  • Loading branch information
brwilkinson committed May 18, 2024
1 parent 9d1d09c commit 3a2297b
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 26 deletions.
89 changes: 89 additions & 0 deletions ADF/ext-CD/AVD-ConfigurationData.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#
# ConfigurationData.psd1
#

@{
AllNodes = @(
@{
NodeName = 'LocalHost'
PSDscAllowPlainTextPassword = $true
PSDscAllowDomainUser = $true

DSCConfigurationMode = 'ApplyOnly'

# IncludesAllSubfeatures
# WindowsFeaturePresent = @('Web-Server')

DirectoryPresent = @(
'C:\Source\Logs\AVD\azcopy_logs'
)

# Blob copy with Managed Identity - Oauth2
AZCOPYDSCDirPresentSource = @(
@{
SourcePathBlobURI = 'https://{0}.blob.core.windows.net/source/AVD/'
DestinationPath = 'C:\Source\AVD\'
LogDir = 'C:\Source\Logs\AVD\azcopy_logs'
}
)

AVDInstall = @(
@{
PoolNameSuffix = 'BPO01'
PackagePath = 'C:\Source\AVD\Microsoft.RDInfra.RDAgent.Installer-x64-1.0.7539.8300.msi'
LogDirectory = 'C:\Source\Logs\AVD'
}
)

SoftwarePackagePresent = @(
@{
Name = 'Remote Desktop Agent Boot Loader'
Path = 'C:\Source\AVD\Microsoft.RDInfra.RDAgentBootLoader.Installer-x64.msi'
ProductId = '{4B380ECF-71DB-4BEC-921A-AEFD534C9E5C}'
Arguments = '/log "C:\Source\Logs\AVD\AgentBootLoaderInstall.txt"'
}
)
}
)
}









































53 changes: 27 additions & 26 deletions ADF/ext-DSC/DSC-AppServers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,20 @@ Configuration $Configuration
Import-DscResource -ModuleName ComputerManagementDsc
Import-DscResource -ModuleName ActiveDirectoryDSC
Import-DscResource -ModuleName StorageDsc
Import-DscResource -ModuleName xWebAdministration
Import-DscResource -ModuleName WebAdministrationDSC
Import-DscResource -ModuleName xPSDesiredStateConfiguration -Name xRemoteFile, xPackage -ModuleVersion 9.1.0
Import-DscResource -ModuleName SecurityPolicyDSC
Import-DscResource -ModuleName xWindowsUpdate
Import-DscResource -ModuleName xDSCFirewall
Import-DscResource -ModuleName NetworkingDSC
Import-DscResource -ModuleName NetworkingDSC
Import-DscResource -ModuleName SQLServerDsc
Import-DscResource -ModuleName xRemoteDesktopSessionHost
Import-DscResource -ModuleName AccessControlDsc
Import-DscResource -ModuleName PolicyFileEditor
Import-DscResource -ModuleName xSystemSecurity
Import-DscResource -ModuleName DNSServerDSC
Import-DscResource -ModuleName PackageManagementProviderResource
Import-DscResource -ModuleName AZCOPYDSCDir # https://github.com/brwilkinson/AZCOPYDSC
Import-DscResource -ModuleName WVDDSC # https://github.com/brwilkinson/WVDDSC
Import-DscResource -ModuleName AVDDSC # https://github.com/brwilkinson/WVDDSC
Import-DscResource -ModuleName AppReleaseDSC # https://github.com/brwilkinson/AppReleaseDSC
Import-DscResource -ModuleName DevOpsAgentDSC # https://github.com/brwilkinson/DevOpsAgentDSC
Import-DscResource -ModuleName EnvironmentDSC # https://github.com/brwilkinson/EnvironmentDSC
Expand Down Expand Up @@ -327,7 +326,8 @@ Configuration $Configuration
#-------------------------------------------------------------------
foreach ($RegistryKey in $Node.RegistryKeyPresent)
{
Registry $RegistryKey.ValueName
$Name = $RegistryKey.Key -replace $StringFilter
Registry $Name
{
Key = $RegistryKey.Key
ValueName = $RegistryKey.ValueName
Expand All @@ -337,7 +337,7 @@ Configuration $Configuration
Force = $true
PsDscRunAsCredential = $AdminCreds
}
$dependsonRegistryKey += @("[Registry]$($RegistryKey.ValueName)")
$dependsonRegistryKey += @("[Registry]$Name")
}

#-------------------------------------------------------------------
Expand Down Expand Up @@ -392,7 +392,7 @@ Configuration $Configuration
$dependsonDir += @("[File]$Name")
}

#-------------------------------------------------------------------
#-------------------------------------------------------------------
foreach ($AZCOPYDSCDir in $Node.AZCOPYDSCDirPresentSource)
{
$Name = ($AZCOPYDSCDir.SourcePathBlobURI + '_' + $AZCOPYDSCDir.DestinationPath) -replace $StringFilter
Expand All @@ -402,7 +402,7 @@ Configuration $Configuration
DestinationPath = $AZCOPYDSCDir.DestinationPath
Ensure = 'Present'
ManagedIdentityClientID = $clientIDGlobal
LogDir = 'F:\azcopy_logs'
LogDir = $AZCOPYDSCDir.LogDir
}
$dependsonAZCopyDSCDir += @("[AZCOPYDSCDir]$Name")
}
Expand Down Expand Up @@ -575,23 +575,23 @@ Configuration $Configuration
foreach ($WebSite in $Node.WebSiteAbsent)
{
$Name = $WebSite.Name -replace ' ', ''
xWebsite $Name
Website $Name
{
Name = $WebSite.Name
Ensure = 'Absent'
State = 'Stopped'
PhysicalPath = 'C:\inetpub\wwwroot'
DependsOn = $dependsonFeatures
}
$dependsonWebSitesAbsent += @("[xWebsite]$Name")
$dependsonWebSitesAbsent += @("[Website]$Name")
}

#-------------------------------------------------------------------
foreach ($AppPool in $Node.WebAppPoolPresent)
{
$Name = $AppPool.Name -replace $StringFilter

xWebAppPool $Name
WebAppPool $Name
{
Name = ($AppPool.Name -f $environment)
State = 'Started'
Expand All @@ -602,15 +602,15 @@ Configuration $Configuration
Credential = $credlookup['DomainCreds']
enable32BitAppOnWin64 = $AppPool.enable32BitAppOnWin64
}
$dependsonWebAppPool += @("[xWebAppPool]$Name")
$dependsonWebAppPool += @("[WebAppPool]$Name")
}

#-------------------------------------------------------------------
foreach ($WebSite in $Node.WebSitePresent)
{
$Name = $WebSite.Name -replace $StringFilter

xWebsite $Name
Website $Name
{
Name = ($WebSite.Name -f $environment)
ApplicationPool = ($WebSite.ApplicationPool -f $environment)
Expand All @@ -619,7 +619,7 @@ Configuration $Configuration
DependsOn = $dependsonWebAppPools
BindingInfo = foreach ($Binding in $WebSite.BindingPresent)
{
MSFT_xWebBindingInformation
DSC_WebBindingInformation
{
Protocol = $binding.Protocol
Port = $binding.Port
Expand All @@ -630,13 +630,13 @@ Configuration $Configuration
}
}
}
$dependsonWebSites += @("[xWebsite]$Name")
$dependsonWebSites += @("[Website]$Name")
}

#------------------------------------------------------
# #------------------------------------------------------
foreach ($WebVirtualDirectory in $Node.VirtualDirectoryPresent)
{
xWebVirtualDirectory $WebVirtualDirectory.Name
WebVirtualDirectory $WebVirtualDirectory.Name
{
Name = $WebVirtualDirectory.Name
PhysicalPath = $WebVirtualDirectory.PhysicalPath
Expand All @@ -646,7 +646,7 @@ Configuration $Configuration
Ensure = 'Present'
DependsOn = $dependsonWebSites
}
$dependsonWebVirtualDirectory += @("[xWebVirtualDirectory]$($WebVirtualDirectory.name)")
$dependsonWebVirtualDirectory += @("[WebVirtualDirectory]$($WebVirtualDirectory.name)")
}

# set virtual directory creds
Expand Down Expand Up @@ -695,7 +695,7 @@ Configuration $Configuration
#------------------------------------------------------
foreach ($WebApplication in $Node.WebApplicationsPresent)
{
xWebApplication $WebApplication.Name
WebApplication $WebApplication.Name
{
Name = $WebApplication.Name
PhysicalPath = $WebApplication.PhysicalPath
Expand All @@ -704,7 +704,7 @@ Configuration $Configuration
Ensure = 'Present'
DependsOn = $dependsonWebSites
}
$dependsonWebApplication += @("[xWebApplication]$($WebApplication.name)")
$dependsonWebApplication += @("[WebApplication]$($WebApplication.name)")
}

#-------------------------------------------------------------------
Expand All @@ -722,7 +722,7 @@ Configuration $Configuration
PsDscRunAsCredential = $credlookup['SQLService']
}

$dependsonSQLScripts += @("[xSQLScript]$($Name)")
$dependsonSQLScripts += @("[SQLScript]$($Name)")
}

#-------------------------------------------------------------------
Expand Down Expand Up @@ -811,13 +811,14 @@ Configuration $Configuration
}

#-------------------------------------------------------------------
if ($Node.WVDInstall)
if ($Node.AVDInstall)
{
WVDDSC RDInfraAgent
AVDDSC RDInfraAgent
{
PoolNameSuffix = $Node.WVDInstall.PoolNameSuffix
PackagePath = $Node.WVDInstall.PackagePath
ManagedIdentityClientID = $AppInfo.ClientID
PoolNameSuffix = $Node.AVDInstall.PoolNameSuffix
PackagePath = $Node.AVDInstall.PackagePath
ManagedIdentityClientID = $clientIDGlobal
LogDirectory = $Node.AVDInstall.LogDirectory
}
}

Expand Down

0 comments on commit 3a2297b

Please sign in to comment.