The Scripts tab shows all of the RightScripts (executable scripts of code) that makeup a ServerTemplate. RightScripts are grouped according to when they are executed. There are three types of scripts: boot scripts (executed in succession at boot time) operational scripts (additional scripts that can be manually executed during runtime), or decommission scripts (scripts that are executed in succession during the shutdown phase). The order of the boot scripts is important. For example, an Apache install script must be listed before another script that changes the its configuration to work with Rails. To rearrange the order of how scripts are executed (boot and decommission), simply drag and drop the scripts. Since operational scripts are executed on-demand and not automatically, the order is irrelevant. For decommission scripts, you should only list scripts that can ALL be executed in less than 120 seconds, otherwise subsequent scripts may not have enough time to complete execution. For example, you should never list the "DB EBS backup" RightScript as a decommission script because it will take longer than 120 seconds to complete. They run as part of the standard Unix shutdown sequence and are automatically invoked when a server is terminated either through the web interface or using the Unix shutdown command.
To learn how to create a RightScript and add it to a ServerTemplate, check out the Intermediate Example.
When a server is operational, you can manually run (execute) any of the scripts regardless of whether it is listed as a boot, operational, or decommission script. You can also use the "Any Script" dropdown menu to select and run a specific RightScript, which is useful for one time execution. Use the button to change the revision of a script or the to view the script's code. The icon next to a RightScript denotes when a more recent revision of that script is available. No action is required. It is simply a reminder notification that you may want to upgrade your script. For example, when RightScale publishes a revised version of that script, you can click the icon to display the differences between your current script and the most recent revision that's available. And if necessary, you can merge the changes together to upgrade your script to the most recent revision.
If you are viewing an editable (HEAD) version you can perform the following actions:
As a best practice, any production-ready ServerTemplate should only reference committed (static) revisions of RightScripts. Otherwise, you could edit the HEAD revision of a script and change the functionality of multiple ServerTemplates without any warning. Therefore, when you commit a ServerTemplate, you are prompted to commit any [HEAD] RightScripts in your template (default). You can also be proactive and commit all of the [HEAD] RightScripts in a single action prior to committing the template.Design > ServerTemplates > Show > Scripts tab
© 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.