Hello there! It looks like this might be your first time to my blog. You should...
Subscribe to my
RSS feed
Follow me
on Twitter.
Check out
.NET Dev Buzz

Building Windows Machines in Amazon EC2

Saturday, January 30, 2010 9:46:04 PM (Pacific Standard Time, UTC-08:00)

In this article I'm going to give you a simple, step-by-step overview of how to create a Windows 2008 server image in Amazon's Elastic Cloud Compute (EC2) infrastructure. Now I must admit I'd rather have found a good tutorial on The Internets or even in a book. Feel free to send me any I missed. My experience is they are either dated or about Linux and so on...

First, briefly why does one care about EC2? Well maybe you are buying into the whole cloud computing story which lets you cheaply out-source your computer hardware for amazingly cheap prices (staring around $0.20 / hour for a dedicated machine). That's a great reason and Microsoft and Google have interesting plays there too.

Personally I just want a simpler way to create virtual machines. We'll have full admin access over remote desktop to our system to install whatever we want. I'm putting Visual Studio 2010 Beta on mine to play around with that software without 'polluting' my real system.

Here we go. If you don't delay I suspect this would take you about 20 minutes from start to login! Subsequent virtual machines are much faster to create and launch because the can be based on pre-configured images.

1. Create an Account

Register for an Amazon Web Services account at http://aws.amazon.com/.

2. Enable EC2 Features

Enable Elastic Compute Cloud for your AWS account at http://aws.amazon.com/ec2/.

3. Launch a New Instance

Use the AWS Management Console to launch and manage your virtual images: http://aws.amazon.com/ec2/home. As the console says, choose "Launch Instance" under the "Getting Started" section. You will be presented with a list of pre-configured images. We'll start with a stock Amazon Windows 2008 server image.

4. Choose a Base Image

Now you'll be presented with a list of pre-configured virtual disk images. This time we'll setup a 64-bit Windows 2008 Server (Data Center Edition). Just choose "select" out of the list below:

5. Use the Request Instances Wizard

Use the Request Instances Wizard to configure the newly created instance which includes configuring the security, choosing an encryption key, opening ports in the firewall, and kicking off the new instance. Below you'll see the encryption key step - be sure to download the key pair as you'll need it for retrieving the administrator password.

6. Launch!

Here's what you can expect for the review screen of the Request Instances Wizard. Press launch and you're almost there.

7. Launching... (AKA Wait 5 Minutes)

After you launch you're instance you'll get a confirmation screen to show you it's being prepared and allow you to configure durable storage and IP addresses (both entirely optional).

8. Back to the Management Console

Now if you choose "View your instances..." you'll see that your instance is being prepared - it has a yellow pending status. This screen doesn't always refresh on its own so use the refresh button in the upper right of the console (rather than your browser's refresh button).

9. Running!

After a few minutes your instance with the yellow icon will turn green and be in the running state. Note that at first this really means booting up so you can't get to it right away. Give it another minute or two...

10. Login Part 1: Getting the Credentials

Now you'll want to login. Of course, the system was created with an administrator account which has a strong password. You'll need to retrieve that password using the "Instance Actions -> Get Windows Admin Password" option.

11. Login Part 2: A Little Hasty

You're probably excited to get this thing running and if you try right away you'll get another message telling you to be patient and try again in a few minutes. Just keep trying.

12. Login Part 3: Using Private Key

Eventual the new system is up and running and you can get the password. The first step here is to pass in your encryption key from the wizard step before.

13. Login Part 4: Administrator Account and Password

Pass in the encryption keys and you'll see the username and password (don't get excited, I already changed the password!).

14. Login Part 5: Finding the Machine Address

When your instance starts, it'll be given an Internet visible DNS name that you can use to connect via Remote Desktop. You'll find it in several places. One of them is highlighted below. Note that this address changes as you start and stop your instance.

15. Connected!

Now just fire up Remote Desktop, use the Administrator account and password from step 13 to log in. Now you have full access to your Windows 2008 machine. You can do with it what you will, install software, start serving web pages, etc.

16. A Word of Caution

If your intent is to run a web server, then let it run. But if you are just using this for your own purposes and don't need it when you're not logged in to the machine, be sure to return to the Management Console and stop the instance. You can alternatively do that by choosing "Shutdown" instead of logging out of your Remote Desktop instance.

I hope you found this walk-through helpful. I just learned most of this myself so I figured I'd blog it and everyone can learn from it.

Cheers!
Michael

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Attend My Live, Free TDD Webinar with Llewellyn Falco and Myself at 10am Tomorrow!

Monday, October 26, 2009 3:29:46 PM (Pacific Standard Time, UTC-08:00)

[Update: See the follow-up post here: TDD Invades Space Invaders]

Tuesday, October 27, 2009 at 10am Pacific time Llewellyn Falco and I will be giving a live, unscripted, and no safety-net demonstration of Test Driven Development (TDD) as part of the DevelopMentor webinar series (this particular series is a 3-part series on Agile development).

We already have a bunch of attendees registered. But we have room for as many of you who are interested in agile and TDD. Sign up here:

   http://bit.ly/dm-tdd-m-and-l

In addition to core TDD techniques, you will see how an amazing technique and set of tools designed by Llewellyn called Approval Tests makes writing tests as simple as verifying an image or text file. Tired of writing 50 lines of test code for every 50 lines of production code but you still want the power of TDD? You need to learn more about Approvals and we'll demo that live tomorrow!

I hope to see you all online. Feel free to help me get the word out by tweeting this or shouting it (see icons below).

Cheers, Michael.

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Gmail New Mail Notifications for Windows 7

Friday, July 10, 2009 9:44:21 PM (Pacific Standard Time, UTC-08:00)

[Update: Renamed this tool from Gmailer to Gmail 7 due to pre-exiting product name conflicts]

I've been using Windows 7 as my sole operating system since Beta 1 in January. I'm completely loving it and I was pleased to see how many apps worked seamlessly on it. One that didn't and I really miss is Gmail Notifier. No matter how I try, I always get this:

It's insane to me that $130B company can't provide any more than this outdated tool for this job, but I digress...

I've looked and looked for a replacement and they are either no longer online, are crappy applications, and so on. Finally I decided to take matters into my own hands. Introducing a clean, simple, unobtrusive, and free Gmail notification application that works on Windows 7 - Gmail 7:

Gmail 7 simply runs in your tray and plays the Windows new mail sound when mail comes in to your Gmail account.

New Mail:

No New Mail:

That's pretty unobtrusive right? Your account info is encrypted and stored in your user profile and all network access uses SSL.

Download all 41 KB of Gmail 7 here: Gmail7.zip

Requires .NET 2.0 (built into Vista and Windows 7)

Just extract the folder to its final resting place and run it - select "Launch at login" if you want that.

It even comes with some cool ways to view your email by double-clicking the tray icon.

Also thanks goes to Ryan Cook for use of his Gmail C# tools as the basis for part of my project.

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Unit Testing Coming to a Workflow Near You

Tuesday, September 30, 2008 7:50:29 AM (Pacific Standard Time, UTC-08:00)
[Update: See the follow up post "Significant Advances in Unit Testing Windows Workflow"]

If you've been working with Windows Workflow, you'll find it has some cool features for orchestration, long running operations, state machines, etc.

However you won't find very much support for Test Driven Development (TDD) or unit testing in general. In fact the architecture that makes Windows Workflow powerful (strict separation of workflow, activities, and the host for example) really gets in the way of unit tests.

There has been some work done on unit testing Windows Workflows. Here's some links:

These are all very creative solutions. But, personally I find all of them more complex than they need to be. So in the near future I'll be putting together some libraries and samples on unit testing Windows Workflow. I think you'll find them far more powerful and at the same time simpler than anything out there.

So until I get that finished, if you have any feedback or considerations on unit testing Windows Workflow I'd love to hear it. If there are other articles I'm missing, please post them in the comments.

I think you're going to like this…



kick it on DotNetKicks.com

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Commercial Skip and Instant Replay for Any Computer (Not Just Media Center Anymore)

Monday, June 02, 2008 4:43:35 AM (Pacific Standard Time, UTC-08:00)
Do you watch a lot of video on your computer? I sure do. I download conference talks and interviews. I especially watch a lot of TV recorded by my Windows Media Center PC by copying the video files to my laptop. Media Center is SO much better than TiVo because you can copy / transfer / save video to other places (like your laptop).


A cool Media Center Setup (love it!)

That’s all well and good, except I really miss the ability to skip commercials and pause video via my media center remote control.


Media Center Remote (love this too!)

That’s been a pain to say the least inside Windows Media Player. Well goodbye days of frustrating commercials and TV via the mouse!

Introducing “Minimalist TV Player” (by me!):



It looks like Windows Media Player and has the same basic features for playing video.

But – you can control it like a Media Center TV to skip commercials and replay an action scene (like the crash shown above at the last Indy 500, just jump back 15 seconds to see the replay)!

You can use the keys PageUp to jump back 15 seconds and PageDown to skip commercials (forward 30 seconds). That’s a good start. But, if you have one of these presentation remotes:


Wireless presentation remote
(approx $39)

Then you can use it to control the TV Player like a Media Center Remote! Here’s the control mapping:



Controls for the TV Player

Now you have the same controls as your Media Center PC on any computer that has Windows Media Player installed! How cool is that?

Download the beta 1 version here:  MinimalistTVPlayer (128 KB)

This beta version is fully functional but will expire in 2009. The supported file types depends somewhat on your system. The program will play any video files that your Windows Media Player can play. This usually includes WMV, MPG, AVI, and possibly DVR-MS files from Windows Media Center and DivX if you have the decoder installed.

One final tip: You can associate the application with your video file types and choose “Open With” to directly launch the program from a file:



Just be careful to not set the TV Player as the default program to load your video with unless that’s what you want.

If you this program, be sure to help promote it by kicking it! kick it on DotNetKicks.com

[Update June 5, 2008: I'm working on a much slicker UI which I'll try to get out soon.]

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Visual Studio Recent Files Utility Now OpenSource on CodePlex

Monday, March 24, 2008 3:06:27 PM (Pacific Standard Time, UTC-08:00)
If you'v been using my Visual Studio Recent Files Utility, then you may be interested to find out that I just released it as open source on CodePlex here.

    Visual Studio Recent Files Utility on CodePlex

Enjoy!

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Big Mailer Utility is Now Open Source on CodePlex

Monday, March 24, 2008 12:28:40 PM (Pacific Standard Time, UTC-08:00)
Hi All,

I recently added my Big Mailer project to CodePlex.

     Big Mailer on CodePlex

You can download the source code among other things.

Enjoy!

Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Email Something Huge: Introducing the Big Mailer Utility

Monday, March 17, 2008 9:52:54 AM (Pacific Standard Time, UTC-08:00)

I often have to send large files around by email. For example, I had to email a colleague a 10 MB file. It seems a little rude to hit him out of the blue with a 10 MB email. I wanted something cleaner and less intrusive.

So I created a simple utility I called "Big Mailer". I figured I'd blog about it and share it with the world. Feel free to use it as you see fit. This program consists of both a client and server piece that simplifies uploading content to your web site. Then the program gives you a regular web link you can send via email.

Here's a screen shot:

BigMailer

You can download and install it via ClickOnce here:

Install Big Mailer (700 KB)

kick it on DotNetKicks.com

You must have the following to use this program:

  1. .NET 3.5 Framework installed on the client
  2. .NET 3.5 Framework on the server
  3. An ASP.NET web site to host the WCF service

After you install the client, click "Host Service" and you'll get the server side code to drop onto your ASP.NET web site. There is a test web site with instructions in that code.

If you don't have an ASP.NET web site to host the service at you can always use public services like Drop Boks (a great service!) or other file sharing sites. The benefit of this program / service is that you retain control of the files and you can conceivably send more sensitive content.

You can also just use FTP if you have that for your web site, but I hate FTP personally. I don't like fighting the firewall issues and I don't want it running on my servers.

So this program allows you to upload content of unlimited size, without FTP, without sending your files to a third party. Also, it sends everything in 16KB blocks, rather than one giant http message. So you get the benefit of both being able to send huge files (say 1 GB) and you get progress / cancel support.

One feature that's notably lacking is authentication. I'll probably release an update with security built-in. For now, take that into consideration before using it.

Enjoy!

PS - This project is now Open Source and is host on CodePlex.
Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post

Visual Studio Tricks Series: #3 Managing the Recent Projects List

Wednesday, September 12, 2007 5:27:40 PM (Pacific Standard Time, UTC-08:00)
Welcome to my third Visual Studio tricks post. This time it's more of a utility, than a tip. I want to talk about managing the recently projects list. If you're like me, then you work with many different projects (especially after I teach a class) and your recent project list becomes polluted with projects you don't care about.

     


In this post, "Recent Projects in Visual Studio 2005", .net DEvHammer discusses how to access the registry to alter that list.

Well, I didn't feel like going to the registry everytime I wanted to clean that list. So I whipped up a simple UI to manage that list (basically manage that registry list).




You're welcome to download this program if it looks useful to you. I decided to publish it via ClickOnce so it will always be up-to-date. If you're using FireFox, you'll need to FFClickOnce add-on to make this work.

    Install Visual Studio Recent Files Utility (approx 200 KB)

kick it on DotNetKicks.com

I hope you enjoy it!

This project is now hosted on CodePlex and is Open Source.
Tweet this Follow me on Twitter Post this to dotnetshoutout.com Digg this Submit this to Stumbleupon email this post


Just a site note: I'm doing my part to rid the world of IE 6. Visit this site with IE 6 and you'll get a shameful message telling you to "Stop Living in the Past".