Skip to content

Commit

Permalink
Merge pull request #574 from shailesh91/main
Browse files Browse the repository at this point in the history
Add support for enterprise 11.4 and pro 3.4
  • Loading branch information
shailesh91 authored Nov 7, 2024
2 parents 4e1ea91 + b224c00 commit fa485d2
Show file tree
Hide file tree
Showing 364 changed files with 4,561 additions and 19,807 deletions.
6 changes: 3 additions & 3 deletions Modules/ArcGIS/ArcGIS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Esri
#
# Generated on: 05/23/2024
# Generated on: 11/05/2024
#

@{
Expand All @@ -12,7 +12,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '4.3.0'
ModuleVersion = '4.4.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -107,7 +107,7 @@
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = 'ArcGIS Module for PowerShell DSC - 4.3.0'
ReleaseNotes = 'ArcGIS Module for PowerShell DSC - 4.4.0'

# External dependent modules of this module
# ExternalModuleDependencies = ''
Expand Down
184 changes: 133 additions & 51 deletions Modules/ArcGIS/ArcGIS.psm1

Large diffs are not rendered by default.

Large diffs are not rendered by default.

69 changes: 15 additions & 54 deletions Modules/ArcGIS/Configurations-Azure/DataStoreConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
param(
[Parameter(Mandatory=$false)]
[System.String]
$Version = '11.3'
$Version = 11.4

,[Parameter(Mandatory=$true)]
[ValidateNotNullorEmpty()]
Expand All @@ -18,18 +18,6 @@
[ValidateNotNullorEmpty()]
[System.Management.Automation.PSCredential]
$SiteAdministratorCredential

,[Parameter(Mandatory=$false)]
[System.String]
$UseCloudStorage

,[Parameter(Mandatory=$false)]
[System.String]
$UseAzureFiles

,[Parameter(Mandatory=$false)]
[System.Management.Automation.PSCredential]
$StorageAccountCredential

,[Parameter(Mandatory=$true)]
[System.String]
Expand All @@ -39,32 +27,28 @@
[System.String]
$ServerMachineNames

,[Parameter(Mandatory=$true)]
[System.String]
$FileShareMachineName

,[Parameter(Mandatory=$true)]
[System.String]
$ExternalDNSHostName

,[Parameter(Mandatory=$false)]
[System.Int32]
$OSDiskSize = 0
,[Parameter(Mandatory=$true)]
[System.Boolean]
$UseExistingFileShare

,[Parameter(Mandatory=$false)]
,[Parameter(Mandatory=$true)]
[System.String]
$EnableDataDisk

$FileShareMachineName
,[Parameter(Mandatory=$false)]
[System.Int32]
$DataDiskNumber = 2
[System.String]
$FileShareName = 'fileshare'

,[Parameter(Mandatory=$false)]
[System.String]
$FileShareName = 'fileshare'
$FileSharePath

,[Parameter(Mandatory=$false)]
[System.String]
[System.Boolean]
$DebugMode
)

Expand All @@ -74,7 +58,6 @@
Import-DscResource -Name ArcGIS_Service_Account
Import-DscResource -name ArcGIS_WindowsService
Import-DscResource -Name ArcGIS_xFirewall
Import-DscResource -Name ArcGIS_xDisk
Import-DscResource -Name ArcGIS_Disk

$DataStoreHostNames = ($DataStoreMachineNames -split ',')
Expand All @@ -88,20 +71,11 @@
if($DataStoreHostNames.Length -gt 1) {
$PeerMachineName = $DataStoreHostNames | Select-Object -Last 1
}
$IsDebugMode = $DebugMode -ieq 'true'

$IsDataStoreWithStandby = ($DataStoreHostName -ine $PeerMachineName) -and ($PeerMachineName)
$DataStoreContentDirectory = "$($env:SystemDrive)\\arcgis\\datastore\\content"

if(($UseCloudStorage -ieq 'True') -and $StorageAccountCredential)
{
if($UseAzureFiles -ieq 'True') {
$AzureFilesEndpoint = $StorageAccountCredential.UserName.Replace('.blob.','.file.')
$FileShareName = $FileShareName.ToLower() # Azure file shares need to be lower case
$FolderName = $ExternalDNSHostName.Substring(0, $ExternalDNSHostName.IndexOf('.'))
$DataStoreBackupLocation = "\\$($AzureFilesEndpoint)\$FileShareName\$FolderName\datastore\dbbackups"
}
}


Node localhost
{
$DataStoreDependsOn = @()
Expand All @@ -113,22 +87,9 @@
RebootNodeIfNeeded = $true
}

if($OSDiskSize -gt 0)
{
ArcGIS_Disk OSDiskSize
{
DriveLetter = ($env:SystemDrive -replace ":" )
SizeInGB = $OSDiskSize
}
}

if($EnableDataDisk -ieq 'true')
ArcGIS_Disk DiskSizeCheck
{
ArcGIS_xDisk DataDisk
{
DiskNumber = $DataDiskNumber
DriveLetter = 'F'
}
HostName = $env:ComputerName
}

$HasValidServiceCredential = ($ServiceCredential -and ($ServiceCredential.GetNetworkCredential().Password -ine 'Placeholder'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$ServerMachineName,

[Parameter(Mandatory=$false)]
[System.String]
[System.Boolean]
$DebugMode
)

Expand All @@ -32,7 +32,6 @@
ArcGIS_DataStoreUpgrade DataStoreConfigUpgrade
{
ServerHostName = $ServerMachineName
Ensure = 'Present'
SiteAdministrator = $SiteAdministratorCredential
ContentDirectory = $DataStoreContentDirectory
InstallDir = $InstallDir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
param(
[Parameter(Mandatory=$false)]
[System.String]
$Version = '11.3',
$Version = 11.4,

[System.Management.Automation.PSCredential]
$ServiceCredential,
Expand All @@ -17,7 +17,7 @@
$InstallerPath,

[Parameter(Mandatory=$false)]
[System.String]
[System.Boolean]
$DebugMode,

[System.String]
Expand Down Expand Up @@ -79,7 +79,7 @@
ServiceCredentialIsDomainAccount = $ServiceCredentialIsDomainAccount
ServiceCredentialIsMSA = $False
Ensure = "Present"
EnableMSILogging = $IsDebugMode
EnableMSILogging = $DebugMode
DependsOn = $Depends
}
$Depends += '[ArcGIS_Install]DataStoreUpgrade'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$ServiceCredentialIsDomainAccount,

[Parameter(Mandatory=$false)]
[System.String]
[System.Boolean]
$DebugMode
)

Expand Down
31 changes: 3 additions & 28 deletions Modules/ArcGIS/Configurations-Azure/DiskConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DSCResource -ModuleName ArcGIS
Import-DscResource -Name ArcGIS_xDisk
Import-DscResource -Name ArcGIS_Disk

Node localhost
Expand All @@ -13,34 +12,10 @@
ConfigurationMode = 'ApplyOnly'
RebootNodeIfNeeded = $true
}

ArcGIS_Disk OSDiskSize
ArcGIS_Disk DiskSizeCheck
{
DriveLetter = 'C'
SizeInGB = 4096
HostName = $env:ComputerName
}

$DataDiskDriveLetter = 'F'
$Depends = @()
$UnallocatedDataDisks = Get-Disk | Where-Object partitionstyle -eq 'raw'
if(($UnallocatedDataDisks | Measure-Object).Count -gt 0)
{
ArcGIS_xDisk DataDisk
{
DiskNumber = 2
DriveLetter = $DataDiskDriveLetter
}
$Depends += '[ArcGIS_xDisk]DataDisk'
}

if(Get-Partition -DriveLetter $DataDiskDriveLetter -ErrorAction Ignore)
{
ArcGIS_Disk DataDiskSize
{
DriveLetter = $DataDiskDriveLetter
SizeInGB = 4095
DependsOn = $Depends
}
}
}
}
35 changes: 4 additions & 31 deletions Modules/ArcGIS/Configurations-Azure/FileShareConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@
[System.String]
$PortalContext

,[Parameter(Mandatory=$false)]
[System.Int32]
$OSDiskSize = 0

,[Parameter(Mandatory=$false)]
[System.String]
$EnableDataDisk

,[Parameter(Mandatory=$false)]
[System.Int32]
$DataDiskNumber = 2

,[Parameter(Mandatory=$false)]
[System.String]
$FileShareName = 'fileshare'
Expand All @@ -51,20 +39,18 @@
$ServerContext

,[Parameter(Mandatory=$false)]
[System.String]
[System.Boolean]
$DebugMode
)

Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DSCResource -ModuleName ArcGIS
Import-DscResource -Name ArcGIS_xDisk
Import-DscResource -Name ArcGIS_xSmbShare
Import-DscResource -Name ArcGIS_Disk

$FolderName = $ExternalDNSHostName.Substring(0, $ExternalDNSHostName.IndexOf('.')).ToLower()
$FileShareLocalPath = (Join-Path $env:SystemDrive $FileShareName)
$IsDebugMode = $DebugMode -ieq 'true'


Node localhost
{
LocalConfigurationManager
Expand All @@ -74,22 +60,9 @@
RebootNodeIfNeeded = $true
}

if($OSDiskSize -gt 0)
{
ArcGIS_Disk OSDiskSize
{
DriveLetter = ($env:SystemDrive -replace ":" )
SizeInGB = $OSDiskSize
}
}

if($EnableDataDisk -ieq 'true')
ArcGIS_Disk DiskSizeCheck
{
ArcGIS_xDisk DataDisk
{
DiskNumber = $DataDiskNumber
DriveLetter = 'F'
}
HostName = $env:ComputerName
}

$HasValidServiceCredential = ($ServiceCredential -and ($ServiceCredential.GetNetworkCredential().Password -ine 'Placeholder'))
Expand Down
Loading

0 comments on commit fa485d2

Please sign in to comment.