Hey,
currently we are exploring the options of automatic deployments of ArcGIS Enterprise in AWS.
For some internal regulations we cannot use Powershell DSC, Cloudformation, AMIs, Chefcookbooks.
We've decided to try with PowerShell scripts and SSM.
Currently via SSM I am failing with running createsite.bat. It won't work.
I am able to create with the same PowerShell snippet locally running from RDP or just via regular browser.
Does anyone have any insights what may be causing this?
Specs:
ArcGIS Server 11.5
AWS EC2
service account running the ags service: LocalSystem
Regards,
MJ
Solved! Go to Solution.
Hey @GlenterpriseUK @ArchitSrivastava ,
yes, I've tried with properties files as an argument the result was exactly the same.
I was able to move on, with rest/admin HTTP call to create ArcGIS Site.
Right now, I am observing similar situation, but with ArcGIS DataStore.
Can you shed the light how one can troubleshoot SSM in ArcGIS Enterprise context?
edit:
--- STDOUT ---
"Error: AGSDATASTORE variable is not set."
After setting the value:
$env:AGSDATASTORE = $InstallDir
it ran flawlessly, so SSM was missing this env setting which is regularly being set during the installation process.
Thank you for your commitment @ArchitSrivastava @GlenterpriseUK
Regards,
MJ
Hi @MikaelJ,
What is the error that you get via SSM?
Have you tried runnning createsite.bat with the following parameters [-u <arg>] [-p <arg>] [-d <arg>] [-c <arg>] or have you also tried with the option of having a createsite.properties file containing parameters as specified here: https://enterprise.arcgis.com/en/server/11.5/install/windows/silently-install-arcgis-server.htm#:~:t...
I have a feeling that the issue you are observing is likely happening because SSM runs your script in a non-interacive session under the system account which behaves differently from an RDP session.
Regards,
Glen
Hey @GlenterpriseUK @ArchitSrivastava ,
yes, I've tried with properties files as an argument the result was exactly the same.
I was able to move on, with rest/admin HTTP call to create ArcGIS Site.
Right now, I am observing similar situation, but with ArcGIS DataStore.
Can you shed the light how one can troubleshoot SSM in ArcGIS Enterprise context?
edit:
--- STDOUT ---
"Error: AGSDATASTORE variable is not set."
After setting the value:
$env:AGSDATASTORE = $InstallDir
it ran flawlessly, so SSM was missing this env setting which is regularly being set during the installation process.
Thank you for your commitment @ArchitSrivastava @GlenterpriseUK
Regards,
MJ
Hello @MikaelJ ,
I agree with @GlenterpriseUK point about the SSM session context is where I would start as well.
Since the same script works when you run it from RDP, or when you create the site through the browser, it feels like the issue may be less about createsite.bat itself and more about how the command is being run through SSM.
A few things I would check:
I would also try using a createsite.properties file instead of passing everything directly in the SSM command. That might make the test cleaner and avoid some quoting or escaping issues, especially with passwords and folder paths.
For example:
Set-Location "C:\Program Files\ArcGIS\Server\tools\createsite"
.\createsite.bat -f "C:\Temp\createsite.properties" *> "C:\Temp\createsite_ssm.log"If the same properties file works from RDP but fails through SSM, that would help narrow it down to the SSM execution context, permissions, working directory, or folder access, rather than the site creation parameters themselves.
Hope it helps!