Table of Contents
An attachment is a file that you can statically link with a RightScript. It's useful for attaching smaller files for development and testing purposes where can easily use the attached files in your RightScript's code using the 'RS_ATTACH_DIR' environment variable. For example, you could attach a MySQL dumpfile (.gz) or tarball of your application code (.tgz) to an install boot script. However, for production environments, it is recommended that you store your application code in a git/svn repository and your database backups using automated backups that are created using RightScale-published ServerTemplates.
When you upload an attachment to a RightScript in your own RightScale account, RightScale will store the object in our local repository and will make the object available to the instance at runtime.
Yes. See Edit RightScript Attachments.
Before a RightScript is run on an instance, all of its attachments are downloaded to a temporary directory. The path to the temporary directory is passed to the script in the RS_ATTACH_DIR environment variable. All files will be stored in that directory using their original file names (without any path component).
Note: Please use RS_ATTACH_DIR, as the ATTACH_DIR variable has been deprecated.
© 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.