Esri / arcgis-powershell-dsc

This repository contains scripts, code and samples for automating the install and configuration of ArcGIS (Enterprise and Desktop) using Microsoft Windows PowerShell DSC (Desired State Configuration).
Apache License 2.0
113 stars 61 forks source link

Trying to install 10.6.1 with PSDSC 2.1.1 fails #216

Closed jhevenor closed 4 years ago

jhevenor commented 4 years ago

I have templates for a handful of environments and some are running Enterprise 10.6.1. My cloud deploy script installs PSDSC on the target virtual machines. I've been updating these deploy scripts to attempt an install of 10.6.1 using the latest PSDSC 2.1.1.

I've been assuming I've messed up my template somewhere, but I figured I should reach out and see if the approach is wrong altogether (or if there's a bug somewhere I should know about).

So, standard -mode InstallLicenseConfigure with my usual 10.6.1 installation running PSDSC 2.1.1 gives me this error while installing the portal:

[PROJ-ENV-WEB0]:                            [[ArcGIS_WaitForComponent]WaitForPortalConfigToCompletePROJ-ENV-POR0] Attempt 7 - Portal
[PROJ-ENV-WEB0]:                            [[ArcGIS_WaitForComponent]WaitForPortalConfigToCompletePROJ-ENV-POR0] Checking for Portal
site on 'PROJ-ENV-POR0.domain.example'
[PROJ-ENV-WEB0]:                            [[ArcGIS_WaitForComponent]WaitForPortalConfigToCompletePROJ-ENV-POR0] Portal on 'PROJ-ENV-
POR0.domain.example' is not ready. Retrying after 60 Seconds
[PROJ-ENV-POR0]:                            [[ArcGIS_Portal]PortalPROJ-ENV-POR0] Response received from create site @{error=}
[PROJ-ENV-POR0]: LCM:  [ End    Set      ]  [[ArcGIS_Portal]PortalPROJ-ENV-POR0]  in 469.5530 seconds.
[PROJ-ENV-POR0]: LCM:  [ End    Set      ]
Operation 'Invoke CimMethod' complete.
[]PowerShell DSC resource ArcGIS_Portal  failed to execute Set-TargetResource functionality with error message: com.esri.arcgis.portal
.admin.core.PortalException: com.esri.arcgis.portal.admin.core.PortalException: com.esri.arcgis.portal.admin.core.PortalException: jav
a.io.FileNotFoundException: \\PROJ-ENV-ds0\share\portalforarcgis\content\items\portal\portal-config.properties (The system cannot find
 the path specified)
[]The SendConfigurationApply function did not succeed.
[PROJ-ENV-WEB0]:                            [[ArcGIS_WaitForComponent]WaitForPortalConfigToCompletePROJ-ENV-POR0] Attempt 8 - Portal
[PROJ-ENV-WEB0]:                            [[ArcGIS_WaitForComponent]WaitForPortalConfigToCompletePROJ-ENV-POR0] Checking for Portal
site on 'PROJ-ENV-POR0.domain.example'

When I try to launch portal from the portal machine I get prompted to 'Continue Portal Upgrade', which is when I started to wonder if I've hit some forced update path by accident.

Any comments help. Thanks!

cameronkroeker commented 4 years ago

@jhevenor

I suspect the issue is with the Portal "ContentDir" and "ContentDirectoryLocation" paths in the json file.

Try the following examples:

"ContentDir": "C:\\portalforarcgis\\content"

"ContentDirectoryLocation":  "\\\\[Fileshare Machine Name 1]\\[Fileshare Name]\\portalforarcgis\\content\\arcgisportal\\content"

https://github.com/Esri/arcgis-powershell-dsc/blob/master/SampleConfigs/Base%20Deployment/BaseDeployment-DualMachine.json#L70

jhevenor commented 4 years ago

I've updated to use this file structure and things move on. Seeing content twice in that path makes me cringe a bit, and requiring the deep path is a bug in my opinion.

cameronkroeker commented 4 years ago

@jhevenor

I have had success with the following examples:

Example 1: Local content directory:

"ContentDir": "C:\\arcgisportal"
"ContentDirectoryLocation":  "C:\\arcgisportal\\content"

End result:

C:\arcgisportal\content
C:\arcgisportal\db
C:\arcgisportal\index
C:\arcgisportal\logs

Example 2: Content in a file share:

"FileShareLocalPath":  "C:\\FileShare",
"FileShareName":  "FileShare",
"ContentDir": "C:\\arcgisportal"
"ContentDirectoryLocation":  "\\\\[Fileshare Machine Name 1]\\[FileShareName]\\arcgisportal\\content"

End result:

\\[Fileshare Machine Name 1]\FileShare\arcgisportal\content
C:\arcgisportal\db
C:\arcgisportal\index
C:\arcgisportal\logs

A few observations I have noticed. When performing a manual installation of portal silently using:

Setup.exe /qn INSTALLDIR="C:\ArcGIS\Portal" CONTENTDIR="C:\arcgisportal\content"

This creates C:\arcgisportal\content\arcgisportal\content. Then if during create site we specify C:\arcgisportal\content it throws the following error:

com.esri.arcgis.portal.admin.core.PortalException: com.esri.arcgis.portal.admin.core.PortalException: java.io.FileNotFoundException: C:\arcgisportal\content\items\portal\portal-config.properties (The system cannot find the path specified)

Then portal attempts to roll back, but fails to do so, and is stuck in an "upgrade" mode even though it was a fresh installation. I believe this is perhaps what we are seeing in your original post.

Looks like the Portal setup expects to see 'arcgisportal' in the "ContentDir" path, and if it doesn't then it appends 'arcgisportal\content' to the given path and causes site creation to fail unless the exact path that was created after setup completes (C:\arcgisportal\content\arcgisportal\content).

jhevenor commented 4 years ago

Thanks @cameronkroeker , I'll give this a try when I circle back to this. I had a successful run with the deep path approach.

I won't close this as it's still a weird behaviour in my view.

jhevenor commented 4 years ago

...wrong button :(

cameronkroeker commented 4 years ago

@jhevenor

If you haven't yet circled back to this, please try with the latest release, v3.0.0:

https://github.com/Esri/arcgis-powershell-dsc/releases

Local:

"ContentDir": "C:\\arcgisportal"
"ContentDirectoryLocation":  "C:\\arcgisportal\\content"

FileShare:

"FileShareLocalPath":  "C:\\FileShare",
"FileShareName":  "FileShare",
"ContentDir": "C:\\arcgisportal"
"ContentDirectoryLocation":  "\\\\[Fileshare Machine Name 1]\\[FileShareName]\\arcgisportal\\content"
cameronkroeker commented 4 years ago

Updated Sample json files to help clarify these parameters in v3.0.2.