четвер, 18 листопада 2010 р.

Adding support for new instance types in Elastic Fox

Recently Amazon announce new instance types, but don't add support for these types in the ElasticFox. At least these changes not
Maybe you are interested too in adding support for t1.micro and
clustered version of instance types (cc1.4xlarge, cg1.4xlarge) to your
ElasticFox.

Here the steps you could do to enjoy working with ElasticFox and new Aamzon features:
  1. Close FF. Check that firefox.exe is gone from process list
    Kill if it will stay too long after closing FF.
  2. Go to C:\Documents and Settings\Application
    Data\Mozilla\Firefox\Profiles\
    Go inside XXXXX.default folder. This actually your FF profile.
  3. Than go deeper in the
    extensions\{2204c510-88f3-11db-b606-0800200c9a66}\chrome
    This folder should have file ec2ui.jar to ec2ui.jar.bak
  4. Make backup of the file
  5. Change extension to ZIP. Unpack ZIP archive to ec2ui_patched folder.
  6. Go to ec2ui_patched\content\ec2ui
  7. Open newinstancesdialog.js in your favorite JS editor. This is a
    file that represent New Instance dialog in ElasticFox.
  8. In the init function found block
    // Add the instance sizes based on AMI architecture
    if (this.image.arch == "x86_64") {
        typeMenu.appendItem("m1.large", "m1.large");
        typeMenu.appendItem("m1.xlarge", "m1.xlarge");
        typeMenu.appendItem("c1.xlarge", "c1.xlarge");
        typeMenu.appendItem("m2.xlarge", "m2.xlarge");
        typeMenu.appendItem("m2.2xlarge", "m2.2xlarge");
        typeMenu.appendItem("m2.4xlarge", "m2.4xlarge");
    } else {
        typeMenu.appendItem("m1.small", "m1.small");
        typeMenu.appendItem("c1.medium", "c1.medium");
    }
    
    Replace with following
    // Add the instance sizes based on AMI architecture
    if (this.image.arch == "x86_64") {
        typeMenu.appendItem("m1.large", "m1.large");
        typeMenu.appendItem("m1.xlarge", "m1.xlarge");
        typeMenu.appendItem("c1.xlarge", "c1.xlarge");
        typeMenu.appendItem("m2.xlarge", "m2.xlarge");
        typeMenu.appendItem("m2.2xlarge", "m2.2xlarge");
        typeMenu.appendItem("m2.4xlarge", "m2.4xlarge");
        typeMenu.appendItem("t1.micro", "t1.micro");
        typeMenu.appendItem("cc1.4xlarge", "cc1.4xlarge");
        typeMenu.appendItem("cg1.4xlarge", "cg1.4xlarge");
    } else {
    typeMenu.appendItem("m1.small", "m1.small");
        typeMenu.appendItem("c1.medium", "c1.medium");
        typeMenu.appendItem("t1.micro", "t1.micro");
    }
    
  9. Package content of ec2ui_patched folder as ZIP archive.
  10. Rename ZIP archive with patched version to ec2ui.jar and place it inside C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\\extensions\{2204c510-88f3-11db-b606-0800200c9a66}\chrome
  11. Launch FF and enjoy support for new instance types in ElasticFox.

Немає коментарів: