Показ дописів із міткою EC2. Показати всі дописи
Показ дописів із міткою EC2. Показати всі дописи

четвер, 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.

четвер, 16 вересня 2010 р.

Install CMake 2.6/2.8 on Fedora 8 in EC2 environment

I'm working with EC2 environment on public AMI that has preinstalled Fedora 8. Little bit old, but for most tasks, that I do, this is more than enough.

Week or two ago, I have to build C++ module, developed by third-party and place it to the EC2 instance. This module use CMake 2.6 for building, but EC2 environment has only CMake 2.4 as latest version that available through standard Yum repositories. Currently (as of September 2010) available version 2.8 of CMake, but I choose stick with version which source code required. This was mostly client requirements. After hour or so trying put downloaded package to standard location for binaries and documentation, I wrote small script, which hopefully would be helpful for others.

Here the content of script that do the job and install 2.6 version of CMake that available from CMake download page

Version for installing 2.6

#!/bin/bash

# Download CMake package
wget http://www.cmake.org/files/v2.6/cmake-2.6.4-Linux-i386.tar.gz
# Extract content of archive
tar -xf cmake-2.6.4-Linux-i386.tar.gz

chmod 755 cmake-2.6.4-Linux-i386/bin/*

# Copy files to target location
cp cmake-2.6.4-Linux-i386/bin/* /usr/bin/
cp -R cmake-2.6.4-Linux-i386/doc/* /usr/share/doc/
cp -R cmake-2.6.4-Linux-i386/man/* /usr/share/man/
cp -R cmake-2.6.4-Linux-i386/share/* /usr/share/

# Cleanup original archive and extracted files
rm -f -R cmake-2.6.4-Linux-i386
rm -f cmake-2.6.4-Linux-i386.tar.gz


Version for installing 2.8

#!/bin/bash

# Download CMake package
wget http://www.cmake.org/files/v2.8/cmake-2.8.2-Linux-i386.tar.gz
# Extract content of archive
tar -xf cmake-2.8.2-Linux-i386.tar.gz

chmod 755 cmake-2.8.2-Linux-i386/bin/*

# Copy files to target location
cp cmake-2.8.2-Linux-i386/bin/* /usr/bin/
cp -R cmake-2.8.2-Linux-i386/doc/* /usr/share/doc/
cp -R cmake-2.8.2-Linux-i386/man/* /usr/share/man/
cp -R cmake-2.8.2-Linux-i386/share/* /usr/share/

# Cleanup original archive and extracted files
rm -f -R cmake-2.8.2-Linux-i386
rm -f cmake-2.8.2-Linux-i386.tar.gz



P.S.
Still not very familiar with Linux, so if you know best way of arrange files to standard Linux locations other then copying and setting permission, please let me know.
Any feedback are welcome.