JamesBranam's Blog

Tuesday Jun 30, 2009

NetBeans 6.7 Available

Hi all,

You've probably heard the big news: NetBeans 6.7 is live. Here is the official press release:

NetBeans.org is proud to announce the availability of NetBeans IDE 6.7!

The focus of NetBeans IDE 6.7 is connectivity—helping developers to connect to the latest technologies and to each other. New features include integration with Project Kenai, a collaborative environment for developers to host their open-source projects; native Maven support, and Hudson integration.

Building on the success of previous releases, NetBeans IDE 6.7 offers enhancements for Java, PHP, Ruby, JavaScript, Groovy and C/C++, and more. Additional highlights include a self-diagnostic Profiler, and support for SVG Rich Components, remote debugging in Ruby, and the latest version of GlassFish. The release also provides plug-in support for Zembly, a single registry and repository for popular Web APIs.

Providing superior support for multiple languages and innovative team support through Project Kenai, the NetBeans IDE 6.7 is the ideal tool for developers to stay connected to their teams and to the latest technologies!

NetBeans IDE 6.7 is available in English, Brazilian Portuguese, Japanese and Simplified Chinese. There are several community-contributed localization efforts underway to support additional languages. Join the efforts today.

More information about NetBeans IDE 6.7:

As always, we welcome and encourage feedback about your experience using the NetBeans IDE. Share your thoughts on our mailing lists and forums. If you blog about NetBeans add your blog to Planet NetBeans. Follow NetBeans on Twitter for updates about NetBeans news and development.

NetBeans IDE Connects Developers!

Cheers!

--James

Monday Jun 29, 2009

AWS Experience Part 10: Configuring GlassFish in the Cloud

Hi all,

I'm still working on my cloud computing course. Now I'm more into GlassFish, and how to configure it on a virtual server. I'm not finished, but here's what I have so far:

  1. The first step in this process is to create a domain. Let's name the domain domain1. Type the following commands in the command line:
    cd /opt/gf21/glassfish
    chmod -R +x lib/ant/bin
    lib/ant/bin/ant -f setup.xml

  2. Back up the original domain1 configuration by typing
    cp /opt/gf21/glassfish/domains/domain1/config/domain.xml /opt/gf21/glassfish/domains/domain1/config/domain.xml.org.
  3. To put GlassFish tools in the path, type echo export PATH=$PATH:/opt/gf21/glassfish/bin >>~/.profile.
  4. Type exit to return to the root user.
  5. Start the server by typing /opt/gf21/glassfish/bin/asadmin start-domain domain1.
  6. Log in as the user gf21 by typing su - gf21.
  7. To tweak GlassFish configuration for use with an AWS EC2 c1.small instance, type
    asadmin create-jvm-options -- "-Xmx1024m"
    cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx
    asadmin delete-jvm-options -- -Xmx512m
    cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx
  8. Exit gf21 and type the following to determine if GlassFish is running:
    ps -ef |grep gf21
    svcs glassfish/domain1
    svcs -l glassfish/domain1 | grep logfile
Thanks fo Rudolf Kutina for help with this.

Cheers!

--James

Saturday Jun 27, 2009

Interesting Czech Holiday

Hi all,

Glancing at today's calendar page, I learned that today is "Victims of the Communist Regime Memorial Day." Wow. I'm glad that the Czech government set aside a day for these people, who were for the most part real heroes. They were imprisoned and even executed for their beliefs, or rather for their refusal to accept Communist domination in their country. Most of the charges were trumped up, and were used by the communist to get rid of possible threats (think intellectuals, educators, scientists, etc.).

Recently there was a documentary on such victims on Czech television. They'd found lost footage of the trials (which were a circus). I hope that a lot of young Czechs were able to watch the series and see what heroism really is (think Milada Horakova, who was executed).

A lot of young people in the country today were born after the revolution or are too young to remember it. More should be done to teach them what life under communism was like. Then they might appreciate the life they have a little more.

Cheers!

--James

Tuesday Jun 23, 2009

Installing Packages on OpenSolaris

Hi all,

I've been working more on my cloud computing course. I'm working on a module for creating a custom OpenSolaris AMI. In a couple of the steps, the user installs software on his virtual machine. It was so easy to do.

JDK 6.

pkg install SUNWj6dev

MySQL.

pkg install SUNWmysql

Apache Ant.

pkg install SUNWant

GlassFish. This is a little tricker:

  1. Download GlassFish:
    wget  http://java.net/download/javaee5/v2.1_branch/promoted/SunOS_X86/glassfish-installer-v2.1-b60e-sunos_x86.jar
  2. Install GlassFish:
    java -Xmx256m -jar glassfish-installer-v2.1-b60e-sunos_x86.jar
  3. Click "A: or "a" to accept the license.

I wish everything were this easy.

Cheers!

--James

Saturday Jun 20, 2009

200th Blog Entry for FY2009

Hi all,

Today marks a special milestone for my blog: the 200th entry for FY 2009 (July 1, 2008 - JUne 30, 2009). It's the most I've blogged in a year, and I have to say that I've had a great time doing it. Here is a quick breakdown of my blog activity:

  • FY 2006 (Dec-Jun): 27
  • FY 2007: 87
  • FY 2008: 183
  • FY 2009: 200 and counting

The total to date is 470 blog entries (and this doesn't include blog entries made on the NetBeans Community Docs blog). I should reach an even bigger milestone in the first half of August: 500 total blog entries.

Then we'll see what happens. (You'll know what I'm talking about if you've been reading the news.)

Cheers!

--James

Friday Jun 19, 2009

Check Out NetBeans RC3

Hi all,

Just a quick reminder, be sure to check out NetBeans RC3. Here is the official press release:

NetBeans IDE 6.7 Release Candidate 3 is now available for download.

Download NetBeans 6.7 Release Candidate 3

The focus of NetBeans 6.7 is connectivity--helping developers to connect to each other and to the latest technologies. New features for 6.7 include integration with Project Kenai, a collaborative environment for developers to host their open-source projects; native Maven support; and GlassFish and Hudson integrations. This release also offers enhancements for Java, PHP, Ruby, JavaScript, Groovy and C/C++, and more. Providing superior support for multiple languages and innovative team support through Project Kenai, the NetBeans IDE 6.7 is the ideal tool for developers to connect to their teams and to the latest technologies!

Learn More about NetBeans 6.7 RC3

Tutorials & Videos

The final release of NetBeans IDE 6.7 is planned for late June. Download RC3 today and give us your feedback about your experience using the release. Join discussions about the NetBeans IDE on our mailing lists and forums. If you blog about using NetBeans add your blog to a Planet NetBeans. Follow NetBeans on Twitter for updates about NetBeans news and development.

Cheers!

--James

Thursday Jun 18, 2009

Back from Vacation

Hi all,

I'm finally back at work after a two-week vacation. Lots of email to go through. I took my mother to airport a couple of hours ago, and while I was waiting for her to check in, I thought about her trip from Cincinnati to Prague a couple of weeks ago. It's an interesting story.

She was supposed to leave Cincinnati airport on July 7, and change to her Prague-bound flight in Atlanta. However, she was told that the Cincinnati flight was already delayed 2 and half hours, and that she would miss her flight to Prague. She was offered a flight changing in Paris, but being the inexperienced and monoglot flier that she is, decided to forgo the French connection in favor of taking the Same Cincinnati-Atlanta-Prague flights the following day.

My mother got assistance through Atlanta, but she was deeply concerned about finding her way out of Prague airport. I called her in Atlanta to offer some encouragement, and by chance I was glancing at my Facebook page. An American friend of mine who lives in Prague had just typed a status message, something like: "I'm sitting at the gate, waiting for my flight back to Prague. I had to act fast. I was able to reach him via Facebook, and he offered to make sure my mother got through Prague airport OK.

And he did. He and his fiancee walked with her right up to where I was standing. Thanks, Travis!

If my mother had boarded her original flight, this would have never happened.

Cheers!

--James

P.S. It's good to be back.

Sunday Jun 07, 2009

NetBeans 6.7 RC2 Is Available

Hi all,

NetBeans 6.7 Release Candidate 2 is out. Here is the official message:

NetBeans.org is proud to announce the availability of NetBeans IDE 6.7 Release Candidate 2!

Download NetBeans 6.7 Release Candidate 2

The focus of NetBeans 6.7 is connectivity--helping developers to connect to each other and to the latest technologies. New features for 6.7 include integration with Project Kenai, a collaborative environment for developers to host their open-source projects; native Maven support; and GlassFish and Hudson integrations. This release also offers enhancements for Java, PHP, Ruby, JavaScript, Groovy and C/C++, and more. Providing superior support for multiple languages and innovative team support through Project Kenai, the NetBeans IDE 6.7 is the ideal tool for developers to connect to their teams and to the latest technologies!

Learn More about NetBeans 6.7 RC2 Tutorials & Videos

The final release of NetBeans IDE 6.7 is planned for late June. Download RC2 today and give us your feedback about your experience using the release. Join discussions about the NetBeans IDE on our mailing lists and forums. If you blog about using NetBeans add your blog to Planet NetBeans. Follow NetBeans on Twitter for updates about NetBeans news and development.

NetBeans IDE 6.7 Connects Developers!

Cheers!

--James

Saturday Jun 06, 2009

AWS Experience Part 9: Uploading and Registering an OpenSolaris Bundle

Hi all,

Success! By bundle was created. Now it's time to upload it to S3 and to register it with AWS for use. Here's how:

  1. First, see yesterday's blog entry about setting the environment variables. This saves a lot of time.
  2. I changed to directory hosting the part of my bundled AMI: cd $DIRECTORY/parts.
  3. From there, I uploaded the bundle to my S3 bucket, which is created for me as I do it: ec2-upload-bundle -b $BUCKET -m $IMAGE.manifest.xml --url http://s3.amazonaws.com --retry -a $EC2_KEYID -s $EC2_KEY. It took a few minutes, but you can follow the progress as it uploads each bundle part.
  4. To register the AMI, I typed the following command: ec2reg -C $EC2_CERT -K $EC2_PRIVATE_KEY $BUCKET/$IMAGE.mainifest.xml.
    The nest thing you see in the command line is the AMI iD, for example: IMAGE ami-1a2b3c4de. Then you know that the AMI has been registed. Go to the AWS Management Console > AMIs and do a search to see for youself.
I write some more about AWS tomorrow.

Cheers!

--James

Friday Jun 05, 2009

AWS Experience Part 8: Bundling OpenSolaris

Hi all,

I created the perfect AMI: OpenSolaris with JDK, Ant, MySQl 5 and GlassFish. And then it turns out that OpenSolaris has different directions for bundling than Linux. It took me a while to find them, but I did. Here they are (I'll skip the pre-bundling cleaning up):

  1. Connect to the OpenSolaris instance in the same way as Linux (SSH).
  2. Execute the following commands: cd /mnt and /opt/ec2/sbin/rebundle.sh -v your-bundle.img. Note: of course you can name the bundle whatever you want.
  3. Get some coffee. This could take a while.
  4. Set the following environment variables:
    • export BUCKET=<bucket-name>
    • export JAVA_HOME=/usr/jdk/latest
    • export EC2_HOME=/opt/ec2
    • export PATH=$PATH:$EC2_HOME/bin
    • export RUBYLIB=$EC2_HOME/lib
    • export EC2_URL=https://ec2.amazonaws.com
    • export EC2_PRIVATE_KEY=/mnt/keys/<PRIVATE KEY FILE>
    • export EC2_CERT=/mnt/keys/<CERT FILE>
    • export EC2_KEYID=<AWS-personal-key>
    • export EC2_KEY=<AWS-secret-key>
    • export DIRECTORY=/mnt
    • export IMAGE=your-bundle.img
  5. Create the parts and keys directories inside the /mnt directory. Here's how:
    • mkdir $DIRECTORY/parts
    • mkdir $DIRECTORY/keys
  6. Copy your private key file to the /mnt/keys directory on the AMI.
    • scp -i /*.pem root@:/mnt/keys/
  7. In the AMI, bundle the image. ec2-bundle-image -c $EC2_CERT -k $EC2_PRIVATE_KEY --kernel aki-6552b60c --ramdisk ari-6452b60d --block-device-mapping "root=rpool/52@0,ami=0,ephemeral0=1" --user <AWS-acct-no> --arch i386 -i $DIRECTORY/$IMAGE -d $DIRECTORY/parts
  8. Get some more coffee... or maybe something stronger.
This is taking too long. It's getting late. I'll try again from home (maybe I'll leave my computer on all night).

Cheers!

--James

Thursday Jun 04, 2009

AWS Experience Part 7: OpenSolaris AMI

Hi all,

Up until now, I've been working with Fedora AMIs in my quest to master working with virtual servers on AWS. Today I jumped over to an OpenSolaris AMI.

I love it! The pkg command makes things very easy.

So far installing things like Ant, JDK, and MySQL have gone perfectly. I'll write more as I learn.

Cheers!

--James

Tuesday Jun 02, 2009

AWS Experience Part 6: Creating a Custom AMI

Hi all,

Here is another installment on working in the cloud, the AWS cloud that is. Today's topic: creating a custom AMI. This may sound like as easy task. And it would have been, had AWS documentation been up to scratch. I spent lots of time messing around with this, and I finally got it to work. Here's how:

  1. Launch an exiting image (I chose a Fedora 8 image). Modify the /var/www/html/index.html file to something else (thus making it "your unique AMI). I went one step further: I installed JDK 6 and MySQL on mi AMI for use at a later date.
  2. Now you have to upload your private key and x509 certificate to the AMI. Here's how to do this in the terminal:
    scp -i ~/.ssh/<yourkeypair.pem> ~/.ec2/<pk-whatever.pem> ~/.ec2/<cert-whatever.pem> root@your-public-DNS:/mnt.
    The private key and x-509 certificate should be uploaded to the mnt directory to prevent them from being bundled with the new AMI.
  3. When this has been done, log in to your AMI to check if it is there.
  4. While you're logged in to your virtual server, you can perform the next step of the process. (The reason I am even mentioning this is that AWS didn't mention it). Type the following command
    ec2-bundle-vol -d /mnt -k /mnt/<personalkey.pem> -c /mnt/<cert.pem> -u <AWS-acct-no> -r i386 -p sampleimage
  5. Get a cup of coffee as this will take a while.
  6. Type the following to check if the AMI image is indeed there where it should be:
    ls -l /mnt/sampleimage.*
  7. Upload your bundle to AWS S3 Storage. (Make sure that you sign up for S3 before you do this.) To do, type:
    ec2-upload-bundle -b <S3-bucket-name> -m /mnt/sampleimage.manifest.xml -a <AWS-access-key-id> -s  <AWS-secret-access-key> --location EU
    Note: Remember to upload to an S3 bucket in correct region. Also: if the bucket does not exit, it will be created for you. (I've used a European bucket as an example.)
  8. Now we get to register the AMI with AWS. Type the following:
    ec2-register <bucket-name>/sampleimage.manifest.xml --region EU-WEST-1

    AWS returns the new AMI ID (in my case ami-2faf875b).
  9. Go to the AMIs panel of the your AWS Management Console and do a search for part of your AMI. It's there and ready for use! (You can see mine in the screenshot at the top of this blog entry.)
I hope that this information will save a lot of people a lot of time. I have just spent hours scouring AWS documentation, forums and google search results to get this far. The most useful of these: Google by far. Amazon documentation left out key information and variables. Yuck!

Cheers!

--James

Monday Jun 01, 2009

NetBeans 6.7 RC Is Out

Hi all,

Here is the official announcement:

NetBeans.org is proud to announce the availability of NetBeans IDE 6.7 Release Candidate 1!

The focus of NetBeans 6.7 RC1 is connectivity--helping developers to connect to each other and to the latest technologies. New features for 6.7 include integration with Project Kenai, a collaborative environment for developers to host their open-source projects; native Maven support; and GlassFish and Hudson integrations. This release also offers enhancements for Java, PHP, Ruby, JavaScript, Groovy and C/C++, and more. Providing superior support for multiple languages and innovative team support through Project Kenai, the NetBeans IDE 6.7 is the ideal tool for developers to connect to their teams and to the latest technologies!

The final release of NetBeans IDE 6.7 is planned for late June. Download RC1 today and give us your feedback about your experience using the release. Join discussions about the NetBeans IDE on our mailing lists and forums. If you blog about using NetBeans add your blog to Planet NetBeans. Follow NetBeans on Twitter for updates about NetBeans news and development.

NetBeans IDE 6.7 Connects Developers!

Wow.

--James

Sunday May 31, 2009

JavaOne 2009: Are You Attending?

Hi all,

JavaOne 2009. Are you attending?

It's a great place to be.

Lots of great sessions.

Lots to learn. Lots to see.

Swag.

Cheers!

--James

Saturday May 30, 2009

JavaOne Equals Empty Offices

Hi all,

It's that time of year again. JavaOne is about to begin, and lots of Sun employees from around the globe are off to San Francisco to attend. I've never seen anything like this year. Our office in Prague is turning into a ghost town. A lot of my writer colleagues went this year. I hope they have a great time. Maybe next year I'll go to JavaOne too.

Cheers!

--James

Friday May 29, 2009

6.7 RC Around the Corner?

Hi all,

it's getting close. NetBeans IDE 6.7 Release Candidate (RC) is just around the corner, so be looking for it.

We writers have been busy updating documentation for the 6.7 release, which is this summer, but now we're focusing on the RC. It's always a big thing to move from a Beta to an RC. The IDE starts to come together. Fun, fun, fun!

Cheers!

--James

Thursday May 28, 2009

Eggs Are Flying

Hi all,

These are interesting days in the Czech Republic. A few weeks ago, the Czech Social Democrats were able to pull off a no-confidence vote in the lower house of the Czech Parliament. The result: an interim government was chosen, and the Czechs, who are in the middle of the EU rotating presidency, became the laughing stock of Europe (at least as politics is concerned).

However, nothing could have prepared us for what was to come. The opposition leader, Jiri Paroubek, an odd little fellow, not unlike a bridge troll, found himself the target of airborne eggs. At first it was a single egg in a city in the north of the country, now egg-throwers show up wherever he is.

I love it!

I could never stand the guy. He was an embarrassment to the country when he was in charge. People from both major parties are laughing at him now, and I think this will cost him the election in the autumn. I wish him all the best in his new career. You know the lemons - lemonade adage. Well, I suppose the same could apply to Jiri, who should be able to make an awful lot of omelets.

Cheers!

--James

Tuesday May 26, 2009

AWS Experience Part 5: Saving Money with EBS Snapshots

Hi all,

After playing around with Amazon Web Services for a couple of weeks now, and after racking up considerable charges to my account, I decided to look into ways of avoiding these charges. Using a snapshot is good way to do this.

A typical scenario is to launch an AMI, attach an EBS volume, and off you go. You store your data to the EBS volume. However, when you terminate your AMI, you lose your data. Here is a way around this:

  1. Create a snapshot of your volume before you delete it.
  2. Terminate your AMI and delete your EBS volume.
  3. Go to the EBS Snapshots panel of the AWS Management Console. Right-click the snapshot and choose Create Volume from Snapshot.
  4. Then attach the new EBS volume to you new AMI, with data intact!
See you tomorrow.

Cheers!

--James

Friday May 22, 2009

End of an Era

Hi all,

I found out yesterday than Roman (of Roumen's Blog fame) is leaving Sun Microsystems after five years. I wish him all the best in his new job.

Roman was loved by the NetBeans Community. He traveled around the world, spreading the world about NetBeans. He provided me with a fantastic example of how one should interact with the community.

Roman has also helped me out on a number of occasions, providing me with valuable information I need to complete a task. I learned a lot from him.

So, a new era begins at Sun: a Roumenless era.

Cheers!

--James

Thursday May 21, 2009

James on the Thames

Hi all,

I just got back from Amazon Web Services training. Most of it was good, but there were some parts that could have been done better (especially the part about creating your custom AMI).

London was great. I took a nice walk along the Thames on Tuesday evening after the course. I saw a lot of nice things and took lots of nice photographs. Now I'm trying to talk my wife into going to London on vacation.

I'll keep you posted. :-)

Cheers!

--James

Tuesday May 19, 2009

AWS Part 4: Blogging from the Road

Hi al,

I'm in London, England for an Amazon Web Services camp. It's a one day program that I'm really looking forward to. I starts in about an hour.

I was surprised by the number of things I had to do or download in preparation for the camp. Here is a list:

  1. Sign up for Amazon EC2/S3, SQS and SimpleDB.
  2. Install ElasticFox which makes it easier to work with Amazon EC2 images.
  3. Install S3Fox which makes it easier to work with Amazon S3.
  4. Download and install a trial edition of SDB Explorer.
  5. Install and configure the Amazon EC2 command line tools
  6. Download unzip the following archives:
    1. http://aws-bootcamp.s3.amazonaws.com/eclipse_installation.zip.
    2. This is just an installation of EasyEclipse Server Java with a few extra libraries.
    3. http://www.easyeclipse.org/site/distributions/server-java.html

I'll let you know how it goes.

Cheers!

--James

Thursday May 14, 2009

AWS Experience Part 3: Trying Another Instance

Hi all,

Hmmmm...

I switched on my machine this morning thinking a new day will bring new results. Nope. Same old results. As I mentioned in an earlier blog entry, I created a server instance using Fedora with LAMP, complete with MySQL. Hmmm.. Sound good? Well, it comes with MySQL 4.1. Normally an update would be a straightforward process. Since Fedora 8 doesn't come with an

apt-get
command, I chose to go the
yum
route. I tried
 yum update mysql-server
. No dice. problems. I spent another 30 minutes or so, trying to correct the problem, but to no avail. So I decided to create a whole new server instance with Fedora 8 and no MySQL. I manually installed MySQL on the machine, by doing the following:
  • I download the MySQL sever, cient, and headers and libraries from the MySQL.com.
    wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.34-0.rhel3.i386.rpm/from/http://mysql.linux.cz/
    wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-client-community-5.1.34-0.rhel3.i386.rpm/from/http://mysql.linux.cz/
    wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-community-5.1.34-0.rhel3.i386.rpm/from/http://mysql.linux.cz/
  • I installed MySQL using rpm. For example:
    rpm -i http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-community-5.1.34-0.rhel3.i386.rpm/from/http://mysql.linux.cz/
    
  • I set the root password:
    /usr/bin/mysqladmin -u root password 'mypw'
MySQL worked perfectly. I created a database and messed around with it for a few minutes. No problems.

Now there were other issues to take care of. I needed to install a JDK and ant. And while I was at it, I went ahead and downloaded GlassFish. Just getting ready.

I made sure I set my JAVA_HOME again, and made sure it was on the path. I also set my ANT_HOME and made sure it was on the path. I'll worry about getting Glassfish functioning soon.

Major Obstacles

This has been one huge learning experience for me. I've encountered a lot of obstacles, and here is a short list:

  • Creating an AWS account in itself is not so easy. You have to know some basic things before you even go there. For example: EBS, EC2, ES, etc, and why you would need them.
  • I got the impression that AWS tries to push you toward their SimpleDB. There is little support for MySQL. There is one tutorial that causes more problems than anything else.
  • Instructions in tutorials are written for the Linux user...for the Debian Linux user. Albeit, there are a lot of similarities among brands of Linux, but there are just enough differences to screw things up. This is an especially frustrating point in that AWS offers you types of servers for starting up: Fedora and Windows. But the instructions are for Debian. Hmmm. Go figure. Doesn't make much sense to me. As an AWS beginner I'm pushed toward Fedora, and end up pulling out my hair while googling for Fedora equivalents of Debian commands.
  • There is a little drop down list in the upper left-hand corner of the AWS Management Console. Even though I registered with my European address, used a European credit card, I was denied access to the US-East region. Not that I wanted access to that region, but this is the default setting. So, after several failed attempts at launching a server instance, I figured it out. I had to manually change it to the EU-West setting.
  • AWS documentation is not very good. Granted, it's only my opinion, but I write documentation for a living and I know bad documentation when I see it. It leaves you guessing too much. Why don't they just remove all the content from the documentation and replace each instance of document with one line: Google it yourself!
  • Nobody likes old versions of software (except for Windows XP maybe), so why feature MySQL 4.1 on one of your AMIs, when MySQL 5 has been out for a while now.
  • The only way to get access to other AMIs is in the Community AMIs tab. I haven't played around with this yet, but I did try to find an Open Solaris AMI. Open Solaris is listed as a choice in the drop down menu, but there are no AMIs listed. I don't blame AWS for this though, since it falls under Community. I hope this changes with time.
That's it for today.

Cheers!

--James

Wednesday May 13, 2009

AWS Experience Part 2: Accessing the Cloud

Hi all,

Today I'll be write more about my experiences with Amazon Web Services. Before I continue, I'd like to provide some background information.

I signed up for Amazon Web Services. I used the Fedora LAMP AMI to create a server instance. The main reason for choosing this AMI was its inclusion of MySQL and Apache, a nice little package indeed. I ran into a few problems at first. Because I am based in Europe, I am allowed to use only the EU-West region, and the default in the US-East region. The drop down list is rather small, and i took a couple of unsuccessful instances to figure out that this was the problem. When I say "unsuccessful instances," I mean that the nothing appeared in the browser when I copied the public DNS to the browser's address bar. I attached an EBS volume to the server instance and it was OK.

Now for more on the command line.

I spent a lot of time messing around with the commands in the EC2 toolkit, which is provided by AWS. I was able to change the region by entering

export EC2_URL=http://eu-west-1.ec2.amazonaws.com
As a matter of fact, I had to do this to get the URL to work.

Other things worth noting:

To see which instances are running, do a

ec2-describe-instances

To run an instance:

ec2-run-instances ami-amiid -k kepairname
Then came the issue of accessing the cloud. AWS documentation is very lacking, so after a bit of googling, this is how I did it:
ssh -i ~/.ssh/my-key.pem root@host-name
The host name is the same as the public DNS.

I did it. I was in the cloud. Then I was able to create a MySQL database.

I'll write more tomorrow.

Cheers!

--James

Tuesday May 12, 2009

AWS Experience Part 1: Setting up the Tools

Hi all,

I've just been reassigned (partially) to make sense of using a MySQL database server in the cloud, namely in Amazon Web Services. I'll be blogging about my experiences. Today is part 1.

After creating the account, I got to work. I signed up for EC2 (Elastic Compute Cloud 2), Simple Storage, and EBS (storage that allows for persistence). I played around with starting an instance, terminating it, etc. Then I got started with the command line tools. This is what I did.

  • I made sure that my JAVA_HOME was set correctly in my mac: I typed
    export JAVA_HOME=/Library/Java/Home/
    in the terminal. Then I typed
    $JAVA_HOME/bin/java -version
    to confirm that the JAVA_HOME was indeed set correctly.
  • Then I made created a .ec2 directory in my home directory. I then added my private key and X.509 certificate to this directory. I also made sure to point to these locations

    export EC2_PRIVATE_KEY=~/.ec2/pk-123456789ABCDEFGHIJKLMNOP.pem
    

    export EC2_CERT=~/.ec2/cert-(98765F43dFMPONUBYGSFATAJAAJJU5SG.pem

  • Then I made sure I was pointing to my EC2_HOME:
    export EC2_HOME=/Users/jb/ec2-api-tools-1.3-34128/
I was in business. In the terminal, I went to my ec2/bin folder and tried out a few commands. They didn't work. However, when I added
./
before each command, they did work. I was able to contact AWS. Wow.

I'll write more tomorrow.

Cheers!

--James

Wednesday May 06, 2009

Web and Facebook Peeves

Hi all,

Once again I feel the need to vent. And this happens to be the place I vent, so here goes...

  • I hate it when people send me huge email attachments. The other day I received two emails from my brother, each with several photos attached. Attachments totaled more than 7 MB for one email. I have a fast Internet connection, so I was able to receive them in a matter of seconds. However, he sent the email to several of my relative, a few of whom do not have fast connections. This could tie up their email server for a very long time. And maybe their provider might even decline to deliver the email. Everybody should know better by now. It's OK to send photographs and such, but scale them down a bit. Lots of free programs do this for you. Web etiquette goes a long way.
  • Why do people create Facebook accounts for their pets or babies? I have nothing at all against Facebook; I think it's a good thing. But I don't want to adf you dog as a friend and hear that he is too lazy to bark at the mailman, etc. This is not funny. And it's not original. And if your child wants to have a Facebook account, that's fine too. However, it's not interesting to read status updates for that child that were written by the parent.
  • If you want to add me as a friend, know who I am first. If I don't know you personally, or work in the same company, please don't ask me to add you. I won't. I realize that it's cool to have thousands of friends. However, I value quality over quantity.
  • When making status updates, please keep it clean. You don't know who will be reading your posts. If you want to be vulgar, then I'll remove you as a friend. It's my choice.
  • Stop sending me invitations for various things. I always decline them. You apparently haven't figured this out yet, because you keep sending them. I like Facebook for contact with people and to see what they are doing. I don't want to find out which celebrity most resembles me.
  • I could think of few more, and maybe I will. I'll do a part 2 of this if I do.
Cheers!

--James

Calendar

Feeds

Search

Links

Navigation

Referrers