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

вівторок, 28 вересня 2010 р.

Making work SAS 9.2 and Oracle 11

I have to make SAS talk to Oracle today. I'm not very familiar with these products yet, and I was very unhappy that SAS 9.2 don't want work with Oracle client 11.2.

I made a quick search and not found anything valuable that could help me from the first site.
I take a look at the log file and found that module sasora, which SAS/ACCESS used to communicate with Oracle, could could not load libclntsh.9.so. Do search what the it is and found that this is library from Oracle Client version 9.

Who know who is wrong Oracle developers which does not have common library which could be reused across different version of client, or SAS who make direct link to Oracle 9 client library and since when didn't update sasora, to match with new versions. Who cares? This thing happens and I have to figure out how to solve that.

I try find how to install Oracle client version 9, but didn't found it on official Oracle website. For sure maybe this installation exists somewhere in the Oracle Download Center, but seems that this is very aging version and Oracle try to forgate about it. So I do the same, cross finger and create libclntsh.so.9.0 as soft link to libclntsh.so.11.1.

So far, so good.

Quick and Dirty Fix:


function fix_sas2ora_link()
{
  ORA_HOME=/usr/lib/oracle/11.2/client64
  ln -s ${ORA_HOME}/lib/libclntsh.so.11.1 ${ORA_HOME}/lib/libclntsh.so
  ln -s ${ORA_HOME}/lib/libclntsh.so.11.1 ${ORA_HOME}/lib/libclntsh.so.9.0
}
Be very careful with such type of fixes, as nobedy know what happens.
Since I need this working today, I made decision leave with that.

Then couple hours after that I found on the SAS support forum page where described how to made quick fix that in more clean way.
http://support.sas.com/kb/37/613.html

Hurray, no need for dirty fixes any more.
Hopefully this is helps.

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