Manually run a RightScript on a running server(s).
Notes: You cannot run a RightScript on an inactive or "stranded" server. You can only run a RightScript on an instance that was launched using the ServerTemplates model.
Table of Contents
An operational instance that was launched and configured with a ServerTemplate.
One of the more common tasks when managing a running server is modifying its Inputs and then executing (running) a RightScript that passes the new Input parameters to the server. You also have the ability to run a RunScript on multiple servers at the deployment level.
A RightScript can be run at different levels:
A RightScript can either be run automatically or manually:
Any script listed under the boot/operational/decomission script list can be manually run on-demand. Go to a running server's Scripts tab. (Manage -> Servers -> Active tab)
Execute (run) one of the listed boot/operational/decommission RightScripts by clicking the 'Run' action icon. A server will inherit its list of available RightScripts from its ServerTemplate.
You can track the status of the executed action under the server's Audit Entries tab.
You also have the ability to use the 'Any Script' option to run any RightScript in the RightScale account on the running server that is not listed in its ServerTemplate.
You can also SSH into an instance and run a RightScript from the command line of a server using the 'rs_run_right_script' command, although it is not a recommended best practice. This option may be useful for users who are developing or testing RightScripts or ServerTemplates, but it should only be performed by advanced users.
Note: If you use rs_run_right_script with the -p option, you must pass a COMPLETE set of input values in which case the input values that are defined on the server are not merged. If you omit any inputs, e.g. do not use -p, then the values defined on the server are used. However we do not provide a way to mix and match
You can SSH into an instance and run the following command to manually run a script.
Note: You will only be able to run a script that is currently listed in the server's ServerTemplate. You cannot use this command to run any script in the RightScale account.
# rs_run_right_script --name 'WEB Apache (re)start - 11H1'"
One of the problems with using this option to run a script is that a complete audit entry will not be generated. When a script is run using this method an audit entry is created and displayed in the dashboard, however the user who executed the script cannot be absolutely identified. Notice in the example screenshot below that the user who executed the script from the command line is listed as N/A.
You might argue that the user who ran the script is obviously the last person to SSH into the server, however it is possible to SSH into an instance outside of the RightScale system especially if a user has the right authentication information and the instance's firewall permissions are not set up to prevent it. Therefore, in such cases it's often impossible to positively identify who actually ran the script.
Remember, one of the key benefits of using the RightScale cloud management platform is that fact that user actions are properly tracked and recorded. Therefore, as a best practice you should always perform manual actions from within the dashboard so that all user actions can be properly tracked and recorded.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.