CarltonBale.com

uncut and commercial free

Archive for the 'How-To's' Category

Detailed how-to instructions documenting various projects I've completed

Western Digital My Book - Opening the Case - Removing the Drive

Posted by Carlton Bale on 10th January 2008

I recently needed to removed the drive from a Western Digital My Book External USB/eSATA drive enclosure. Unfortunately, this wasn't an obvious process and this excellent article by Scott Cramer didn't apply to the newer version (1 TB drive) enclosure I have. So here you go, the steps required to disassemble a new-style Western Digital My Book drive enclosure.

1. Locate the two rubber pads on the bottom of the enclosure near the front, curved surface. Remove these two pads. Depress the two tabs below using a small flat-head screwdriver.

1a. With a couple of credit cards, pry the back edge of the casing apart and hold them open with the credit cards. There are some locking mechanisms there that need to be held apart. You can now slide the plastic casings apart.

Western Digital My Book Disassembly Western Digital My Book Disassembly

2. Slide the clear plastic LED front panel conduit forward and remove.

Western Digital My Book Disassembly

3. Rotate the hard drive/carrier assembly sideways and then lift away from the case

Western Digital My Book Disassembly

4. Remove the two screws holding the metal connector casing. Slide it upwards and remove it

Western Digital My Book Disassembly

5. Slide the circuit board upwards (away from the drive), just like you did for the metal casing.

Western Digital My Book Disassembly

6. Remove the 4 screws holding the hard drive to the metal carrier. You'll see that it is a standard 3.5" desktop SATA drive.

You're done!

Repeat the steps in reverse order to re-assemble the enclosure.

Posted in Computer Hardware and Software, Gadgets, How-To's | 19 Comments »

How to Alias a Domain Name or Sub Domain to Amazon S3

Posted by Carlton Bale on 28th September 2007

A few months ago, I noticed I was approaching my bandwidth limits on my hosting account. Switching hosting providers is a pain, so I decided to move some high-bandwidth graphics to Amazon S3, where the bandwidth is cheap and unlimited. All was well until I realized that Google was returning search results pointing to my bucket on s3.amazonaws.com instead of carltonbale.com. Luckily, AmazonAWS has a work-around. You can use your own domain name in an Amazon S3 bucket. Here are the instructions on how to do it, from beginning to end.

Introductory Steps for new Amazon S3 Users:

  1. First of all, obviously, you need your own domain name and your own Amazon S3 account
  2. Secondly, you need a way to create/manage Amazon S3 buckets, so you'll need to install a client on your PC.
    • I recommend using Bucket Explorer, which is a full-featured and easy-to-use client that runs on Windows and Linux; (a Mac version is in private beta and should be available Oct 2007). A free, less-featured alternative is the S3 Organizer add-on for the Mozilla Firefox web browser.
    • Install your application of choice and either:
      • Open Bucket Explorer -or-
      • Open Firefox and go to Tools menu -> S3 organizer, and click the Manage Accounts button
    • Enter your AmazonAWS Access Key and Secret Key
      • These are available by going to http://aws.amazon.com, mousing-over the "Your Web Services Account" in the upper right-hand corner, and selecting "AWS Access Identifiers"
      • AmazonAWS Your Web Services Account

How to Alias your Subdomain to an Amazon S3 Bucket:

  1. Identify the exact domain name you want to forward to Amazon S3. S3 is not a web server, so I would not recommend forwarding your entire domain there, but rather a sub-domain. The sub-domain I'm going to use is the actual one I setup: s3.carltonbale.com
  2. Create a new "bucket" (a.k.a. folder) by clicking the "create folder/bucket" icon. Name the bucket exactly what your sub-domain name is.
    • Example bucket name: s3.carltonbale.com
    • Note: you must use a unique bucket name; you won't be able to create bucket if the name is already being used by someone else.
  3. Now comes the tricky part: modifying your DNS server settings. The procedures on how to do this vary by host and software system, but are the general steps:
    • Logon to your web host control panel and select "Manage DNS Server Settings" or similar
    • Create a new CNAME entry for your domain. For my example of s3.carltonbale.com, the entry was:
      • Name: s3
      • Type: CNAME
      • Value: s3.amazonaws.com.
    • And yes, the dot at the end of "s3.amazonaws.com." is correct, at least for me. Look at your other entries to figure out what your should enter.
  4. Now comes the hardest part: waiting. It took about 2 hours for my subdomain to be recognized by AmazonAWS.
  5. Open the subdomain name in your browser. You should now be able to access your files through any of 3 urls:
    1. subdomain.domain.com (which is also the bucket name)
    2. your_bucket_name.s3.amazonaws.com
    3. s3.amazonaws.com/your_bucket_name

Final Steps

  1. You'll need to set permissions on your bucket and the files within using your favorite bucket management tool. I recommend setting the bucket permission to "full control by owner" only and setting the permissions of the files within the bucket to "full control by owner, read access for everyone". This will prevent people from being able to browse/list the files in your bucket.
  2. If you don't want Google (or Google Images) to index the files in your subdomain, create a file named robots.txt containing the following and copy it into your bucket:

User-agent: *
Disallow: /

That's it, my start-to-finish guide on how to use your own domain name with Amazon S3. If I missed something or if something isn't clear, let me know in the comments and I'll fix it.

Posted in How-To's, Web Development, Internet | 8 Comments »

How to Create and Seed a Torrent Download on Amazon S3

Posted by Carlton Bale on 16th September 2007

I recently needed to share some open source files via BitTorrent and wanted to host them on my Amazon S3 account.  For those of you familiar with S3, here is the short-answer: add ?torrent to the end of the URL of a public-shared file to get the *.torrent file, so the link would be http://s3.amazonaws.com/your_bucket_name/your_file_name?torrent

If you're new to Amazon S3, read on for more info and detailed instructions.

Why would you want to distribute a file using BitTorrent?

I wanted to do this because, when sharing a file via a torrent, you use less of your Amazon S3 bandwidth and lower your monthly expense. To be more accurate, according the S3 documentation:

The difference is that if a lot of clients are requesting the same object simultaneously via BitTorrent, then the amount of data S3 must serve to satisfy those clients will be lower than with client/server delivery.

I knew it was possible to host a torrent on S3, but wasn't quite sure how to do it. After quite a bit of searching and reading, I found that it was actually pretty easy to do.

Here are the details on how to copy a file to your Amazon S3 account, make it public, create the torrent seed / tracker, and have Amazon S3 share both the .torrent file and seed the download.

Preliminary Steps for new Amazon S3 Users:

  1. You must first have an Amazon S3 account
  2. Secondly, you need a way to create/manage Amazon S3 buckets, so you'll need to install a client on your PC.
    • I recommend using Bucket Explorer, which is a full-featured and easy-to-use client that runs on Windows and Linux; (a Mac version is in private beta and should be available Oct 2007). A free, less-featured alternative is the S3 Organizer add-on for the Mozilla Firefox web browser.
    • Install your application of choice and either:
      • Open Bucket Explorer -or-
      • Open Firefox and go to Tools menu -> S3 organizer, and click the Manage Accounts button
    • Enter your AmazonAWS Access Key and Secret Key
    • These are available by going to http://aws.amazon.com, mousing-over the "Your Web Services Account" in the upper right-hand corner, and selecting "AWS Access Identifiers"
    • AmazonAWS Your Web Services Account

How to Create and Seed a Torrent Download on Amazon S3:

  1. Create a new "bucket" (a.k.a. folder) by clicking the "create folder" icon in the right-hand panel of S3 Organizer. Note: you must use a unique bucket name; you won't be able to create bucket if the name is already being used by someone else.
  2. Upload the file which will be shared into the desired bucket using S3 Organizer
  3. Make the bucket public read by right-clicking on the bucket name and selecting "Edit ACL". Select "Read" access for "Everyone". Note: you may also have to repeat the read access step for each file that is uploaded to the bucket.
  4. Now that the file is uploaded and shared, it can be downloaded via standard http from the following location: http://s3.amazonaws.com/your_bucket_name/your_file_name .
    • Note 1: You can also find the URL by right-clicking the file in S3 organizer and selecting Copy URL to Clipboard.
    • Note 2: Unfortunately, the file will always be available via http download, which can be faster than BitTorrent download, but will use more of your S3 bandwidth.)
  5. Now you want to create the torrent file itself. Just enter the following URL: http://s3.amazonaws.com/your_bucket_name/your_file_name?torrent and the torrent file will be created and you will be able to download it the *.torrent file to your computer.
  6. You can share this downloaded *.torrent file with others via e-mail, webpage download, etc.

According to this article, you can use Amazon S3 as the torrent tracker only by following the steps above, opening the torrent file on your local PC, start seeding from your local PC, and then remove the original file. S3 will continue to be the (ultra reliable) tracker for the file but you don't have to use S3 bandwidth to share the file. To save bandwidth usage and prevent someone from going directly to the http download of the file instead of using the torrent download, it's probably best to download the small *.torrent file and share that with others instead publishing the URL to the torrent file on the Amazon S3 server.

Assuming you have the file being shared stored on your local computer, you can download the *.torrent and start seeding from your local PC without re-downloading (the shared file) from S3, further reducing your S3 bandwidth.That's it, my start-to-finish guide on how to take a file and share/seed/tracker it via BitTorrent and Amazon S3. If I missed something or if something isn't clear, let me know in the comments and I'll fix it.

Posted in How-To's, Web Development, Internet | 11 Comments »