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
118 stars 62 forks source link

The term 'ArcGIS_WaitForComponent is not recognized as the name of a cmdlet #447

Closed abakhtin9 closed 1 year ago

abakhtin9 commented 1 year ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

{
    "AllNodes": [
        {
            "NodeName": "mrlangpent1",
            "DataStoreTypes": [
                "Relational",
                "TileCache"
            ],
            "Role": [
                "Server",
                "Portal",
                "DataStore"
            ]

        },
        {
            "NodeName": "mrlangplb1",
            "DataStoreTypes": [
                "Relational",
                "TileCache"
            ],
            "Role": [
                "Server",
                "Portal",
                "DataStore"
            ]

        },
        {
            "NodeName": "mrlangpweb1",
            "Role": [
                "ServerWebAdaptor",
                "PortalWebAdaptor"
            ]
        }
    ],
    "ConfigData": {
        "Version": "10.9.1",
        "ServerContext": "arcgis",
        "PortalContext": "portal",
        "ServerRole": "GeneralPurposeServer",
        "Credentials": {
            "ServiceAccount": {
                "Password": "password",
                "UserName": "GISAdmin",
                "IsDomainAccount": false,
                "IsMSAAccount": false
            }
        },
        "Server": {
            "LicenseFilePath": "E:\\DSC_PRD\\Licenses\\ArcGISServerStandard_ArcGISServer_SFPUC.prvc",
            "Installer": {
                "Path": "E:\\DSC_PRD\\Installers\\ArcGIS_Server_Windows_1091_180041.exe",
                "InstallDir": "E:\\ArcGIS\\Server",
                "InstallDirPython": "E:\\Python27",
                "EnableArcMapRuntime": "False"
            },
            "ServerDirectoriesRootLocation": "\\\\10.228.120.242\\share_01\\arcgisserver\\directories",
            "ConfigStoreLocation": "\\\\10.228.120.242\\share_01\\arcgisserver\\config-store",
            "PrimarySiteAdmin": {
                "UserName": "siteadmin",
                "Password": "password"
            }
        },
        "Portal": {
            "LicenseFilePath": "E:\\DSC_PRD\\Licenses\\ArcGIS_Enterprise_Portal_1091_407009_20230126.json",
            "PortalLicenseUserTypeId": "creatorUT",
            "Installer": {
                "Path": "E:\\DSC_PRD\\Installers\\Portal_for_ArcGIS_Windows_1091_180052.exe",
                "InstallDir": "E:\\ArcGIS\\Portal",
                "ContentDir": "E:\\arcgisportal\\content"
            },
            "ContentDirectoryLocation": "\\\\10.228.120.242\\share_01\\arcgisportal\\content",
            "PortalAdministrator": {
                "UserName": "GISAdmin",
                "Email": "email",
                "Password": "password",
                "SecurityQuestionIndex": 1,
                "SecurityAnswer": "vanilla"
            }
        },
        "DataStore": {
            "ContentDirectoryLocation": "E:\\arcgisdatastore",
            "EnableFailoverOnPrimaryStop": true,
            "Installer": {
                "Path": "E:\\DSC_PRD\\Installers\\ArcGIS_DataStore_Windows_1091_180054.exe",
                "InstallDir": "E:\\ArcGIS\\DataStore"
            },
            "EnablePointInTimeRecovery": true,
            "Backups": {
                "Relational": {
                    "Name": "relational",
                    "Type": "fs",
                    "Location": "\\\\10.228.120.242\\share_01\\backups\\datastore\\relational",
                    "IsDefault": true
                },
                "TileCache": {
                    "Name": "tilecache",
                    "Type": "fs",
                    "Location": "\\\\10.228.120.242\\share_01\\backups\\datastore\\tilecache",
                    "IsDefault": true
                }
            }
        },
        "WebAdaptor": {
            "AdminAccessEnabled": true,
            "Installer": {
                "Path": "C:\\DSC_PRD\\Installers\\ArcGIS_Web_Adaptor_for_Microsoft_IIS_1091_180055.exe"
            }
        }
    }
}

Expected Behavior

After licensing Server and Portal, should have went to the next step for ArcGIS Server configuration.

Actual Behavior

After licensing ArcGIS Server, it fails to configure it: image

Steps to Reproduce

Use the following command with the configuration above:

  1. Add the three servers to each TrustedHosts as none of them are part of a domain and each use the same local administrator account to sign in to
  2. Create another local administrator account (the same credentials for each server) to serve as the account to run all of the enterprise services
  3. Open port 5986 for WinRM HTTPS
  4. Run the configuration with the command below:
    Invoke-ArcGISConfiguration -ConfigurationParametersFile <filelocation.json> -Mode InstallLicenseConfigure -DebugSwitch -UseSSL

    Important Factoids

  1. The three servers (all on-prem) that compose this environment are not part of a domain nor is the service account being used to run each service a domain account. It is a local administrator that has been created on each server
  2. The 10.228.120.242 network location is a file share that has been set up to house the Portal content directory and the Server config-store and directories
  3. We are using WinRM HTTPS and made sure that mrlangpweb1, mrlangpent1, and mrlangplb1 were all added to TrustedHosts for each node on the deployment. Port 5986 has been open for inbound in Windows Firewall on each server as well
  4. When running Invoke-ArcGISConfiguration -ConfigurationParametersFile <filelocation.json> -Mode InstallLicenseConfigure -DebugSwitch -UseSSL -Credential GISAdmin (using the service account), we get the following errors: image
  5. ArcGIS Portal, Server, Data Store, and the Web Adaptors successfully install and the Server and Portal components are also licensed just can't get started with the configuration due to the error seen in Actual Behavior section.
  6. Confirmed that the GISAdmin service account is being used by each ArcGIS Enterprise service after installation (Portal, Server, Data Store) on mrlangpent1 and mrlangplb1
  7. The node that is kicking off the Invoke-ArcGISConfiguration command is mrlangpent1
  8. The password for the GISAdmin account (service account), the primary Server Site Administrator account, and the Portal Administrator account are all generated with 16 characters that use upper/lower case, numbers, and special characters

References

cameronkroeker commented 1 year ago

@abakhtin9

To fix the The term 'ArcGIS_WaitForComponent' is not recognized as the name of a cmdlet error please use the following workaround (three changes). This fix will be included in a future release.

  1. Change:

https://github.com/Esri/arcgis-powershell-dsc/blob/ebd5e9a6e896b3326e2d06be14255bc235036948/Modules/ArcGIS/Configurations-OnPrem/ArcGISPortal.ps1#L276

To:

ComponentHostName = $PrimaryPortalMachine
  1. Change:

https://github.com/Esri/arcgis-powershell-dsc/blob/ebd5e9a6e896b3326e2d06be14255bc235036948/Modules/ArcGIS/Configurations-OnPrem/ArcGISPortal.ps1#L278

To:

Credential = $PortalAdministratorCredential
  1. Change:

https://github.com/Esri/arcgis-powershell-dsc/blob/ebd5e9a6e896b3326e2d06be14255bc235036948/Modules/ArcGIS/DSCResources/ArcGIS_WaitForComponent/ArcGIS_WaitForComponent.schema.mof#L4

To:

[Key, ValueMap{"Server","NotebookServer","MissionServer","Portal","ServerWA","PortalWA","DataStore","SpatioTemporal","TileCache","GraphStore","ObjectStore","UnregisterPortal"}, Values{"Server","NotebookServer","MissionServer","Portal","ServerWA","PortalWA","DataStore","SpatioTemporal","TileCache","GraphStore","ObjectStore","UnregisterPortal"}] String Component;

Note: apply these changes to the module on all the target nodes and orchestrating node. After making the updates, use a fresh powershell window to re-run the Invoke-ArcGISConfiguration command.

abakhtin9 commented 1 year ago

@cameronkroeker Thank you for this - issue was resolved with the workaround!

cameronkroeker commented 1 year ago

This has been addressed in v4.1.0.

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

Thanks, Cameron K.