Configure remote script method
2 minute read
Cloud Management Platform (CMP) runs remote scripts through a platform-specific mechanism where one exists, and over SSH or WinRM otherwise. You can change that choice globally, or for particular servers and environments.
Choose the execution method
What happens by default depends on the platform:
- VMware runs remote scripts through VMware Tools.
- AWS, Azure, and Oracle Cloud Infrastructure can run scripts through their own channels, but do not by default; you must enable it.
- Every other platform uses SSH or WinRM.
The Use Tech-Specific Script Execution parameter sets this per server or environment: True to use the platform’s own mechanism, False to use SSH for *nix and WinRM for Windows.
The global TECH_SPECIFIC_SCRIPT_EXECUTION setting in customer_settings.py applies to VMware only. Set it to False to make every VMware server use SSH or WinRM instead of VMware Tools. The parameter overrides it wherever both apply.
On VMware, the same choice applies when CMP extends a Windows server’s C: drive during provisioning with a larger root disk: through VMware Tools, or over WinRM when the parameter is False.
Run a script with sudo
When you create or edit a remote script, you can set it to run with sudo on *nix. The whole script then runs with root privileges, which helps on servers that do not allow the root user to be used directly.
This applies only to scripts run over SSH. It has no effect on VMware servers that are using VMware Tools.
Temporary files on the target server
Running a script over SSH or through VMware Tools writes a temporary file on the target server. CMP deletes it once the script finishes. To keep it for debugging, turn off Remove after running on the script’s detail page.
The default locations are /tmp/ on *nix servers and C:\Windows\Temp\ on Windows servers running scripts through VMware Tools. Change either one in Admin > Miscellaneous Settings, on the Resource management tab, under *nix Temporary Directory for Remote Scripts and Windows Temporary Directory for Remote Scripts.
A tilde is not supported in either path. Give the directory in full.
Related
- Authentication requirements: the credentials the generic method needs.
- OS-specific requirements: preparing a server for SSH or WinRM.