Skip to content

Commit

Permalink
Merge pull request #22 from shailesh91/master
Browse files Browse the repository at this point in the history
Fixes Issues Listed on Github #10 #16 #17 #18 #19 #20 #21
  • Loading branch information
shailesh91 committed Mar 2, 2018
2 parents 7312983 + 494646c commit 5efd626
Show file tree
Hide file tree
Showing 65 changed files with 1,695 additions and 1,691 deletions.
21 changes: 21 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto

# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.md text
*.gitattributes text

# Declare files that will always have CRLF line endings on checkout.
*.ps1 text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf
*.psc1 text eol=crlf
*.ps1xml text eol=crlf
*.clixml text eol=crlf
*.xml text eol=crlf
*.txt text eol=crlf

# Denote all files that are truly binary and should not be mergeable.
*.dll binary
*.exe binary
4 changes: 2 additions & 2 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: 1/30/2018
# Generated on: 3/2/2018
#

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

# Version number of this module.
ModuleVersion = '0.8.2'
ModuleVersion = '0.8.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
2 changes: 1 addition & 1 deletion Modules/ArcGIS/ArcGIS.psm1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Get-FQDN
function Get-FQDN
{
[CmdletBinding()]
param(
Expand Down
28 changes: 10 additions & 18 deletions Modules/ArcGIS/ArcGISUtility.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ function Get-ServerToken
[System.String]
$ServerSiteName = 'arcgis',

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

[Parameter(Mandatory=$true)]
[System.String]
$Password,
[parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
$Credential,

[Parameter(Mandatory=$true)]
[System.String]
Expand All @@ -40,7 +36,7 @@ function Get-ServerToken
[System.Int32]$Expiration=1000
)

Invoke-ArcGISWebRequest -Url ($ServerEndPoint.TrimEnd('/') + "/$ServerSiteName/admin/generateToken") -HttpFormParameters @{ username = $UserName; password = $Password; client = 'referer'; referer = $Referer; expiration = $Expiration; f = 'json' } -Referer $Referer -TimeOutSec 30
Invoke-ArcGISWebRequest -Url ($ServerEndPoint.TrimEnd('/') + "/$ServerSiteName/admin/generateToken") -HttpFormParameters @{ username = $Credential.UserName; password = $Credential.GetNetworkCredential().Password; client = 'referer'; referer = $Referer; expiration = $Expiration; f = 'json' } -Referer $Referer -TimeOutSec 30
}


Expand All @@ -56,13 +52,9 @@ function Get-PortalToken
[System.String]
$SiteName = 'arcgis',

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

[Parameter(Mandatory=$true)]
[System.String]
$Password,
[parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
$Credential,

[Parameter(Mandatory=$true)]
[System.String]
Expand All @@ -73,7 +65,7 @@ function Get-PortalToken
$Port = 7443
)

Invoke-ArcGISWebRequest -Url "https://$($PortalHostName):$($Port)/$SiteName/sharing/rest/generateToken" -HttpFormParameters @{ username = $UserName; password = $Password; referer = $Referer; f = 'json' } -Referer $Referer -LogResponse
Invoke-ArcGISWebRequest -Url "https://$($PortalHostName):$($Port)/$SiteName/sharing/rest/generateToken" -HttpFormParameters @{ username = $Credential.UserName; password = $Credential.GetNetworkCredential().Password; referer = $Referer; f = 'json' } -Referer $Referer -LogResponse
}

function Check-ResponseStatus($Response, $Url)
Expand Down Expand Up @@ -159,7 +151,7 @@ function Wait-ForServiceToReachDesiredState
}

Write-Verbose "Waiting $SleepTimeInSeconds seconds."
Sleep -Seconds $SleepTimeInSeconds
Start-Sleep -Seconds $SleepTimeInSeconds
}
}

Expand Down Expand Up @@ -222,7 +214,7 @@ function Wait-ForUrl
}
}
if(-not $Done) {
Sleep -Seconds $SleepTimeInSeconds
Start-Sleep -Seconds $SleepTimeInSeconds
$TotalElapsedTimeInSeconds += $SleepTimeInSeconds
}
}
Expand Down
29 changes: 9 additions & 20 deletions Modules/ArcGIS/Configuration/ArcGISConfigure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,8 @@ Configuration ArcGISConfigure
}

$IsMultiMachinePortal = (($AllNodes | Where-Object { $_.Role -icontains 'Portal' } | Measure-Object).Count -gt 1)
if($IsMultiMachinePortal -or ($ConfigData.PortalEndPoint -as [ipaddress]))
{
<#if($IsMultiMachinePortal -or ($ConfigData.PortalEndPoint -as [ipaddress]))
{#>
xFirewall Portal_FirewallRules
{
Name = "PortalforArcGIS"
Expand All @@ -767,7 +767,7 @@ Configuration ArcGISConfigure
Protocol = "TCP"
}
$Depends += @('[xFirewall]Portal_FirewallRules')
}
<#}
else
{ # If single machine, need to open 7443 to allow federation over private portal URL and 6443 for changeServerRole
xFirewall Portal_FirewallRules
Expand All @@ -779,23 +779,10 @@ Configuration ArcGISConfigure
Access = "Allow"
State = "Enabled"
Profile = ("Domain","Private","Public")
LocalPort = ("7443")
Protocol = "TCP"
}

xFirewall ServerFederation_FirewallRules
{
Name = "ArcGISforServer-Federation"
DisplayName = "ArcGIS for Server"
DisplayGroup = "ArcGIS for Server"
Ensure = 'Present'
Access = "Allow"
State = "Enabled"
Profile = ("Domain","Private","Public")
LocalPort = ("6443")
LocalPort = ("7080","7443")
Protocol = "TCP"
}
}
}#>

if($IsMultiMachinePortal)
{
Expand All @@ -809,7 +796,7 @@ Configuration ArcGISConfigure
Access = "Allow"
State = "Enabled"
Profile = ("Domain","Private","Public")
RemotePort = ("7654","7120","7220", "7005", "7099", "7199", "5701", "5702") # Elastic Search uses 7120,7220 and Postgres uses 7654 for replication, Hazelcast uses 5701 and 5702 (extra 2 ports for situations where unable to get port)
RemotePort = ("7120","7220", "7005", "7099", "7199", "5701", "5702", "5703") # Elastic Search uses 7120,7220 and Postgres uses 7654 for replication, Hazelcast uses 5701 and 5702 (extra 2 ports for situations where unable to get port)
Direction = "Outbound"
Protocol = "TCP"
}
Expand All @@ -824,7 +811,7 @@ Configuration ArcGISConfigure
Access = "Allow"
State = "Enabled"
Profile = ("Domain","Private","Public")
LocalPort = ("7120","7220", "5701", "5702") # Elastic Search uses 7120,7220, Hazelcast uses 5701 and 5702
LocalPort = ("7120","7220","5701", "5702", "5703") # Elastic Search uses 7120,7220, Hazelcast uses 5701 and 5702
Protocol = "TCP"
}
$Depends += @('[xFirewall]Portal_Database_InBound')
Expand Down Expand Up @@ -1689,6 +1676,7 @@ Configuration ArcGISConfigure
FileShareLocalPath = $ConfigurationData.ConfigData.DataStoreItems.RasterStore.FileShareLocalPath
Ensure = 'Present'
Credential = $SACredential
IsDomainAccount = $ConfigurationData.ConfigData.Credentials.ServiceAccount.IsDomainAccount
}

$DataStorePath = "\\$($env:ComputerName)\$($ConfigurationData.ConfigData.DataStoreItems.RasterStore.FileShareName)"
Expand Down Expand Up @@ -1719,6 +1707,7 @@ Configuration ArcGISConfigure
Ensure = 'Present'
Credential = $SACredential
FilePaths = ($FilePathsArray -join ",")
IsDomainAccount = $ConfigurationData.ConfigData.Credentials.ServiceAccount.IsDomainAccount
}
}
'LoadBalancer'{
Expand Down
2 changes: 1 addition & 1 deletion Modules/ArcGIS/Configuration/ArcGISUninstall.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Configuration ArcGISUninstall
Configuration ArcGISUninstall
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -ModuleName ArcGIS
Expand Down
6 changes: 4 additions & 2 deletions Modules/ArcGIS/Configuration/Upgrades/PortalUpgrade.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Configuration PortalUpgrade{

param(
[parameter(Mandatory = $true)]
[System.String]
Expand Down Expand Up @@ -43,7 +42,7 @@ Configuration PortalUpgrade{

[parameter(Mandatory = $false)]
[System.Boolean]
$IsSADomainAccount = $False
$IsSADomainAccount = $False,

[parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -113,6 +112,7 @@ Configuration PortalUpgrade{
PortalEndPoint = $MachineFQDN
PrimarySiteAdmin = $PrimarySiteAdmin
StandbyMachine = $StandbyMachine
Version = $Version
}

$Depends += '[ArcGIS_PortalUnregister]UnregisterStandyPortal'
Expand Down Expand Up @@ -165,6 +165,7 @@ Configuration PortalUpgrade{
Ensure = "Present"
DataDir = $DataDirsForPortal
DependsOn = $Depends
IsDomainAccount = $IsSADomainAccount
}
$Depends += '[ArcGIS_Service_Account]Portal_RunAs_Account'

Expand Down Expand Up @@ -278,6 +279,7 @@ Configuration PortalUpgrade{
Ensure = "Present"
DataDir = $DataDirsForPortal
DependsOn = $Depends
IsDomainAccount = $IsSADomainAccount
}
}
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_EGDB/ArcGIS_EGDB.psm1
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_EGDB/ArcGIS_EGDB.schema.mof
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_IIS_TLS/ArcGIS_IIS_TLS.psm1
Binary file not shown.
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_Install/ArcGIS_Install.psm1
Binary file not shown.
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_LB/ArcGIS_LB.psm1
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_LB/ArcGIS_LB.schema.mof
Binary file not shown.
Binary file modified Modules/ArcGIS/DSCResources/ArcGIS_License/ArcGIS_License.psm1
Binary file not shown.

0 comments on commit 5efd626

Please sign in to comment.