Description
EC2 Instance Bundler Toolbox
A toolbox to bundle Linux instances in Amazon EC2. Supports Ubuntu 12.04/10.04 (with RightLink 5.8) only at this stage.
This is a RightScale OSS ServerTemplate supported by the community only and is an alpha release not recommended for production systems.
Documentation
At this time only bundling of instance-store instances under RightScale Servers is supported. EBS-backed instance support will be completed in the next revision.
Summary of RightScripts needed
Boot Scripts
- Install default JRE
- Import AWS and EC2 credentials
- Install Amazon EC2 API Tools
- Install Amazon EC2 AMI Tools
Operational Scripts
- MIB: Pre re-bundle cleanup
- MIB: EC2 snapshot EBS volume and register EBS AMI
- MIB: EC2 create bundled AMI
- MIB: EC2 upload bundled AMI to S3
- MIB: EC2 register S3 AMI
- MIB: Create and Tag EBS & S3 MCIs (optional)
- MIB: Tag EC2 EBS & S3 AMIs (optional)
- Set EBS volume ID in cloud cache (only needed for EBS, experimental)
- Install & configure RestConnection (optional)
Instance Store bundling
Notes on situations for bundling
On a running server using a committed revision
If the ServerTemplate was created in the same account, you can consider adding the RightScripts to the template, commit a new revision then on the Info tab of the running server, edit the Server and select the new revision. You can then set or copy the inputs as needed.
On a running server using a HEAD revision or when designing a ServerTemplate before use
If the ServerTemplate is owned by the same account (i.e. is not a private share from another acount), simply add the required RightScripts to your template's boot and operational phases as follows, then set the new inputs as required:
Important
The default inputs provided with the template use naming matching the default MCI (Ubuntu 12.04) and in EC2 us-east-region (RS cloud 1). It is important to review all inputs before bundling so the registered image matches the instance bundled.
Inputs to review and set prior to bundling
- First check the AWS category and the AWS_ inputs which by default use credentials. As long as these are set in your account, no change is required but a quick spot check is recommended
Next is a large range of inputs in the MIB category
- AMIARCH - Default is x8664, change this if your instance is x86
- AMIBUNDLEARCH - Default is x86_64, change this if your instance is x86
- AMIBUNDLEIMAGE_SIZE - Default is 10GiB (10240), increase or decrease this if needed
- AMIBUNDLEKERNEL_ID - Default is pvgrub for us-east-1, update this with your instance's aki ID if different
- AMIBUNDLEMANIFEST - Default is '/mnt/RightImageUbuntu12.04x64v5.8.8.5-bundle.manifest.xml', change to an appropriate filename as desired
- AMIBUNDLEPREFIX - Default is 'RightImageUbuntu12.04x64v5.8.8.5-bundle' also change to a name as desired
- AMIBUNDLEUPLOADS3BUCKET - Set this to the S3 bucket to store the bundled image in
- AMICLOUDID - Default is 1 (us-east-1); set to the same cloud your instance is in (check the Clouds menu in the dashboard to identify the rs cloud ID)
- AMIDESCRIPTION - Default is 'RightImageUbuntu12.04x64_v5.8.8.5-bundled' change to a name desired
- AMIEBSKERNEL_ID - Default is pvgrub for us-east-1, update this with your instance's aki ID if different (only if attempting EBS bundle)
- AMIKERNELID - Default is pvgrub for us-east-1, update this with your instance's aki ID if different
- AMIMANIFEST - Set to yours3bucket/yourmanifest_file
- AMI_NAME - Set to an appropriate name for your AMI with EC2
- AMI_REGION - Set to the EC2 region your instance is running in
- AMIREGISTERNOTIFY_EMAIL - Set this if you would like mail notifications when an image is registered
Instructions
Run 'MIB: Pre re-bundle cleanup' (operational script) to do a quick cleanup of non-bundle files. If you have users that have logged in by SSH during the life of the instance and would like to remove those users prior to bundle, update the BUNDLEREMOVEUSERS input with an array of users to remove. Note, setting BUNDLEREMOVERSSSH will remove SSH access for the rightscale user (Managed Login) and BUNDLEREMOVE_STATE will remove artifact files breaking RightLink operation on the current instance (these are set to false by default and only for advanced users who decide to manually bundle without RightScale).
Mote: all SSH users should be logged out of the instance prior to running this script (particularly any that you are removing or you will intentionally receive "userdel: user foo is currently logged in").
Run 'MIB: EC2 create bundled AMI' (operational script) to create the bundled AMI.
Run 'MIB: EC2 upload bundled AMI to S3' (operational script) to upload the AMI to a given S3 bucket.
Run 'MIB: EC2 register S3 AMI' (operational scrip
Contents
-
Cookbook Repo: git://github.com/rightscale-blueprints/linux_server.git of blueprint:linux_server
-
MultiCloudImage: RightImage_Ubuntu_12.04_x64_v5.8_HVM_EBS [rev 5]
-
MultiCloudImage: Ubuntu Server 12.04 (precise) amd64 [rev 5]
-
MultiCloudImage: Ubuntu Server 12.04 (precise) amd64 EBS HVM [rev 4]
-
MultiCloudImage: RightImage_Ubuntu_12.04_x64_v5.8_XenServer [rev 10]
-
MultiCloudImage: RightImage_Ubuntu_12.04_x64_v5.8_VMWare [rev 9]
-
MultiCloudImage: Ubuntu Server 12.04 (precise) amd64 EBS [rev 6]
-
MultiCloudImage: RightImage_Ubuntu_12.04_x64_v5.8_EBS [rev 6]
-
MultiCloudImage: RightImage_Ubuntu_10.04_x64_v5.8 - VMWare [rev 6]
-
MultiCloudImage: RightImage_Ubuntu_10.04_x64_v5.8_EBS [rev 4]
-
MultiCloudImage: RightImage_Ubuntu_10.04_x64_v5.8 [rev 7]
-
MultiCloudImage: RightImage_Ubuntu_10.04_x64_v5.8 - XenServer [rev 6]
-
MultiCloudImage: RightImage_Ubuntu_10.04_x64_v5.8 - KVM [rev 6]
-
MultiCloudImage: RightImage_Ubuntu_12.04_x64_v5.8 [rev 21]
-
Recipe: python::source
-
Recipe: python::virtualenv
-
Recipe: resolver::default
-
Recipe: rightscale::default
-
Recipe: rightscale::server_tags
-
Recipe: ruby::default
-
Recipe: rubygems::install_gems
-
Recipe: rubygems::update_gems
-
Recipe: python::pip
-
Recipe: sudo::default
-
Recipe: python::default
-
Recipe: system::default
-
Recipe: python::package
-
Recipe: collectd::client
-
Recipe: collectd::collectd_web
-
Recipe: collectd::default
-
Recipe: collectd::server
-
Recipe: system::hostname
-
Recipe: ntp::default
-
Recipe: postfix::default
-
Recipe: system::timezone
-
RepoPath: blueprint:linux_server [rev 3]
-
RightScript: MIB: EC2 create bundled AMI [rev 6]
-
RightScript: MIB: Tag EC2 EBS & S3 AMIs [rev 2]
-
RightScript: MIB: Pre re-bundle cleanup [rev 1]
-
RightScript: MIB: EC2 upload bundled AMI to S3 [rev 2]
-
RightScript: MIB: EC2 snapshot EBS volume and register EBS AMI [rev 5]
-
RightScript: MIB: EC2 register S3 AMI [rev 3]
-
RightScript: Set EBS volume ID in cloud cache [rev 1]
-
RightScript: MIB: Create and Tag EBS & S3 MCIs [rev 3]
-
RightScript: Install default JRE [rev 1]
-
RightScript: Install Amazon EC2 API Tools [rev 7]
-
RightScript: Install Amazon EC2 AMI Tools [rev 7]
-
RightScript: Install & configure RestConnection [rev 4]
-
RightScript: Import AWS and EC2 credentials [rev 7]
See More
Revisions
Revision 1 | Jan 25, 2013
Initial version for public release/testing.
Discussion
Info
No Ratings
Supported Clouds
Pricing
All Users
Sign-up for RightScale
Support Information
Support is limited to the RightScale Community.
Please post bugs and enhancement requests on the RightScale OSS forums. Feel free to join us on #rightscale IRC.
