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

Invalid MOF definition for node error when installing 11.3 #545

Closed vassilo closed 4 months ago

vassilo commented 4 months ago

Community Note

Module Version

Affected Resource(s)

Configuration Files

{
    "AllNodes": [
        {
            "NodeName": "<nod name>",
            "Role": [
                "Portal",
                "Server",
                "DataStore",
                "WebAdaptor"
            ],
            "DataStoreTypes": [
                "Relational"
            ],
            "WebAdaptorConfig":[
                {
                    "Role": "Portal",
                    "Context": "portal",
                    "WebSiteId": 1
                },
                {
                    "Role": "Server",
                    "Context": "hosting",
                    "AdminAccessEnabled": true,
                    "WebSiteId": 1
                }
            ]
        }
    ],
    "ConfigData": {
        "Version": "11.3",
        "ServerContext": "hosting",
        "PortalContext": "portal",
        "ServerRole": "GeneralPurposeServer",
        "DownloadSetups": true,
        "DownloadPatches": true,
        "SkipPatchInstalls": false,
        "Credentials": {
            "ServiceAccount": {
                "UserName": "svc-arcgis",
                "Password": "<password>",
                "IsDomainAccount": false,
                "IsMSAAccount": false,
                "ForceUpdate": false
            },
            "AGOCredential":{
                "UserName": "dsc_deployer",
                "Password": "<password>"
            }   
        },
        "Portal": {
            "LicenseFilePath": "<license>",
            "Installer": {
                "Path": "D:\\Temp\\Installs_DSC\\Portal_for_ArcGIS_Windows_113_189790.exe",
                "VolumePaths": [
                    "D:\\Temp\\Installs_DSC\\Portal_for_ArcGIS_Windows_113_189790.exe.001"
                ],
                "WebStylesPath": "D:\\Temp\\Installs_DSC\\Portal_for_ArcGIS_Web_Styles_Windows_113_190232.exe",
                "InstallDir": "C:\\Program Files\\ArcGIS\\Portal",
                "PatchesDir": "D:\\Temp\\Patches_DSC\\Portal",
                "PatchInstallOrder": [
                ],
                "ContentDir": "D:\\arcgis\\portal"
            },
            "PortalAdministrator": {
                "FullName": "Admin Portal",
                "UserName": "portaladmin",
                "Password": "<password>",
                "Email": "portaladmin@localhost.com",
                "SecurityQuestionIndex": 1,
                "SecurityAnswer": "<password>"
            },
            "ContentDirectoryLocation": "D:\\arcgis\\portal\\arcgisportal\\content",
            "PortalLicenseUserTypeId": "creatorUT",
            "DefaultUserLicenseTypeIdForUser": "viewerUT",
            "DefaultRoleForUser": "iAAAAAAAAAAAAAAA",
            "EnableAutomaticAccountCreation": false,
            "DisableAnonymousAccess": true,
            "EnableHSTS": true,
            "DisableServiceDirectory": true,
            "ExternalLoadBalancer": "<FQDN>"
        },
        "Server": {
            "LicenseFilePath": "<license>",
            "Installer": {
                "Path": "D:\\Temp\\Installs_DSC\\ArcGIS_Server_Windows_113_190188.exe",
                "VolumePaths": [
                    "D:\\Temp\\Installs_DSC\\ArcGIS_Server_Windows_113_190188.exe.001"
                ],
                "InstallDir": "C:\\Program Files\\ArcGIS\\Server",
                "InstallDirPython": "C:\\Python27",
                "PatchesDir": "D:\\Temp\\Patches_DSC\\Server",
                "PatchInstallOrder": [
                ],
                "EnableArcMapRuntime": false,
                "EnableDotnetSupport": false
            },
            "PrimarySiteAdmin": {
                "UserName": "siteadmin",
                "Password": "<password>"
            },
            "ServerDirectoriesRootLocation": "D:\\arcgis\\hosting\\directories",
            "ConfigStoreLocation": "D:\\arcgis\\hosting\\config-store",
            "LocalRepositoryPath": "D:\\arcgis\\hosting\\local",
            "ServerLogsLocation": "D:\\arcgis\\hosting\\logs",
            "EnableHTTPSOnly": true,
            "EnableHSTS": true,
            "DisableServiceDirectory": true,
            "ExternalLoadBalancer": "<FQDN>"
        },
        "DataStore": {
            "Installer": {
                "Path": "D:\\Temp\\Installs_DSC\\ArcGIS_DataStore_Windows_113_190233.exe",
                "InstallDir": "C:\\Program Files\\ArcGIS\\DataStore",
                "PatchesDir": "D:\\Temp\\Patches_DSC\\Datastore",
                "PatchInstallOrder": [
                ]
            },
            "ContentDirectoryLocation": "D:\\arcgis\\datastore",
            "EnableFailoverOnPrimaryStop": false,
            "EnablePointInTimeRecovery": false
        },
        "WebAdaptor": {
            "Installer": {
                "DotnetHostingBundleDownloadUrl": "https://download.visualstudio.microsoft.com/download/pr/751d3fcd-72db-4da2-b8d0-709c19442225/33cc492bde704bfd6d70a2b9109005a0/dotnet-hosting-8.0.6-win.exe",
                "DotnetHostingBundlePath": "D:\\Temp\\Installs_DSC\\dotnet-hosting-8.0.6-win.exe",
                "WebDeployDownloadUrl": "https://download.microsoft.com/download/0/1/D/01DC28EA-638C-4A22-A57B-4CEF97755C6C/WebDeploy_amd64_en-US.msi",
                "WebDeployPath": "D:\\Temp\\Installs_DSC\\WebDeploy_amd64_en-US.msi",
                "Path": "D:\\Temp\\Installs_DSC\\ArcGIS_Web_Adaptor_for_Microsoft_IIS_113_190234.exe",
                "PatchesDir": "D:\\Temp\\Patches_DSC\\Webadaptor",
                "PatchInstallOrder": [
                ]
            },
            "AdminAccessEnabled": true,
            "WebSiteId": 1
        }
    }
}

Expected Behavior

Should have completed the install and configuration

Actual Behavior

Dot Sourcing the Configuration:- ArcGISPortal
VERBOSE: For MSA we assume these steps have been done independent of the module.
Write-NodeMOFFile : Invalid MOF definition for node 'pvw-gis.umzinyathi.gov.za': Exception calling "ValidateInstanceText" with "1" argument(s): "Undefined property EnableCreateSiteDebug
 At line:117, char:2
 Buffer:
e = "ArcGISPortal";
};^
insta
"
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2369 char:21
+ ...             Write-NodeMOFFile $Name $mofNode $Script:NodeInstanceAlia ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], InvalidOperationException
    + FullyQualifiedErrorId : InvalidMOFDefinition,Write-NodeMOFFile
Compilation errors occurred while processing configuration 'ArcGISPortal'. Please review the errors reported in error stream and modify your configuration code appropriately.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:3917 char:5
+     throw $ErrorRecord
+     ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (ArcGISPortal:String) [], InvalidOperationException
    + FullyQualifiedErrorId : FailToProcessConfiguration

Steps to Reproduce

Created a configuration file and ran the command to install license and configure. The machine that is being deployed is remote to the machine that is running the script.

Important Factoids

References

vassilo commented 4 months ago

Closing call.

Older versions of the module were causing the issues. Even though I has run an uninstall things were left behind. Had to manually delete the older folders in the Module directory.