To modify a custom RightImage that will result in faster launch times.
Note: The instructions below apply to EC2 machine images.
Table of Contents
If you build a custom ServerTemplate that contains boot scripts that download large packages, you may experience very long server launch times (e.g. greater than 30 minutes). In such cases, you may want to include some of the large packages as part of the image in order to reduce overall server launch times. This tutorial describes the recommended steps for building a custom RightImages for optimal launch times.
Although it's a recommended best practice to use one of the base RightImages that were published with the ServerTemplate, there may be certain conditions (such as long boot times) that require you to build a custom RightImage. In such cases, it's strongly recommended that you follow the steps outlined below, which will make it easier to receive support from RightScale's Support team. It's difficult to troubleshoot a server that was launched with a custom RightImage because identifying all of the changes that were made to the underlying image can be difficult.
RightScale's RightImages create a root disk on the instance that's 10GB in size. Data that is stored in the ephemeral drive or in mounted voumes is not preserved and is included in a bundled image. Therefore, you cannot include an attachment that is 10GB in size. If you want to include a package that is larger than 10GB in size, you can use a snapshot that will create and attach a volume to the instance at boot time.
$ sudo -i
# rm -vf /home/rightscale/.ssh/* (for RightLink v5.8+)
# rm -rvf /tmp/*
# rm -rvf /var/cache/rightscale # rm -vf /etc/rightscale.d/*.js (for RightLink v5.7 or earlier) # rm -rvf /var/lib/rightscale (for RightLink v5.8+) # rm -rvf /var/spool/cloud/* # rm -vf /opt/rightscale/right_link/certs
© 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.