Setting up an Amazon EC2 Server to Run TeamCity

http://www.improfiel.be/?t=1993-dbq-ap-us-history-sample-essays&d84=5a 1993 dbq ap us history sample essays

http://zumwinkle.com/?pyk=hum-176-week-7-dq&192=c3 hum 176 week 7 dq

http://misterharder.com/tag/sensodata/ apply for scholarships without essays In this post I will walk you through the following steps:

  1. Setting up an Amazon EC2 account
  2. Configuring and launching an instance
  3. Downloading and installing TeamCity on the instance
  4. Configuring TeamCity to communicate with GitHub*
  5. Saving the instance for later use

exam questions and answers acc 201 syllabus

Setting up an Amazon EC2 account

thesis topics on embedded system

http://wlacgallery.org/?kisd=english-101-essay-writing english 101 essay writing

Figure 1-1 - Amazon EC2 Console Dashboard

http://juergen-christ.com/wp-content/uploads/chat-64.png inclusion equality and diversity essay

Configuring and launching an instance

http://oakstop.com/?gefest=psy-310-week-1-history-of-psychology-paper&17c=3d psy 310 week 1 history of psychology paper

Figure 2-1 - Request Instances Wizard: Choose an AMI

fin 571 exam

http://misterharder.com/tag/taal/feed/ purdue thesis latex format

Figure 2-1 - Request Instances Wizard: Instance Details

bus 640 managerial economics week 1

12 domains of culture essay

Figure 2-3 - Request Instance Wizard: Instance Details

http://wlacgallery.org/?kisd=bibl-104-quiz-7 bibl 104 quiz 7

bsa 375 week 1 individual

Figure 2-4 - Request Instance Wizard: Instance Details

http://zumwinkle.com/?pyk=fin-571-cost-of-capital-video&cdb=c9 fin 571 cost of capital video

romeo and juliet flaw essay

Figure 2-5 - Request Instance Wizard: Create Key Pair

http://juergen-christ.com/wp-content/uploads/100126-JAC-icon-türkis-v21.gif obesity essay introduction

http://oakstop.com/?gefest=psy-315-week-5-individual-assignment&ea6=97 psy 315 week 5 individual assignment

Figure 2-6 - Request Instance Wizard: Configure Firewall

3 page essay soccer

Figure 2-7 - Request Instance Wizard: Review

Figure 2-7 - Request Instance Wizard: Review

This is the final review before spinning up the new instance. If everything looks good, click "Launch". You should now see Figure 2-8.

Figure 2-8 - Launch Instance Wizard

Figure 2-8 - Launch Instance Wizard

You can either read about all the other AWS features, or just click "Close" like me. You should now see a table row with your instance info and a status of "running". See Figure 2-9.

Figure 2-9 - Instance running

Figure 2-9 - Instance running

Once the status switches from "pending" to "running", right click anywhere on the row, you will see a popup (Figure 2-10), click "Connect" and you will see Figure 2-11.

Figure 2-10 - Running instance option menu

Figure 2-10 - Running instance option menu

Figure 2-11 - Connect Help - Secure Shell (SSH)

Figure 2-11 - Connect Help - Secure Shell (SSH)

This part screwed me up. IMO these instructions are painful. It's stuff like this that bother me. In hindsight, now that I have done this I think "that was a stupid mistake" and probably have the same unhelpful mentality as people around me who just said "oh that's easy" when I asked for help. I fortunately do have at least one friend who took the time to talk me through it despite my bitching and moaning.

So http://wlacgallery.org/?kisd=bshs-332-dynamics-of-ethics bshs 332 dynamics of ethics here are the easy instructions - copy that line of code in the example, paste it into your SSH client (PuTTY, Terminal, etc.) and hit enter. If this doesn't work, read through those 4 instructions again, specifically step 3 regarding setting the file permissions. You might just have to run chmod 400 on it first. Another possible error (the one I encountered) was this message:

Please login as the ec2-user user rather than the root user

To remedy this, just change the "root@" part of your command line to "ec2-user@" like this:

ssh -i {YourKeyName}.pem ec2-user@ec2-xxx-xx-xx-xxx.compute-1.amazonaws.com

If this goes well, you should see a little EC2 ascii art, and a blank commmand line. You will likely find yourself in /home/ec2-user/.

FINALLY we can move onto the next step...

Downloading and installing TeamCity on the instance

Now that we have the EC2 instance up and running, we can move back to my previous post which elaborates on downloading and installation:
Intro to Continuous Integration with TeamCity: Downloading and installing TeamCity.

Please read make sure you understand the concepts described there before continuing.

Saving the instance for later use

One thing about Amazon EC2 is that whenever you stop an instance, you lose everything. This includes any downloads, installations, configurations, etc. In order to avoid losing all the effort you put into setting up this server you'll need to create an image.

To do this, right click on your instance name, and in the subsequent popup box click "Create Image (EBS AMI)". You should see Figure 3-1.

Figure 3-1 - Create Image

Figure 3-1 - Create Image

Type in an Image Name and Description and click "Create This Image". You should now see Figure 3-2.

Figure 3-2 - Create Image

Figure 3-2 - Create Image

Click "Close". Now if you click "AMIs" in the Navigation panel, you should see your new image processing. See Figure 3-3.

Figure 3-3 - Saved image

Figure 3-3 - Saved image

At this point the next step will be to set up one more EC2 instance for the TeamCity Build Agent to run on. To briefly elaborate, we will save an image of the larger instance, and instruct the micro instance to spin it up when a repo change is detected. I will absolutely document the process of configuring TeamCity to do just that in another post.

In closing

Hopefully this has provided you with some helpful info. If you've got any questions please drop them in the comments below. They're more likely to get answered there either by me or someone else as this is a fairly highly trafficked blog.

Thanks for reading!

Helpful Articles

http://www.dennisplucinik.com/blog/2011/03/25/intro-to-continuous-integration-with-teamcity

http://www.jadurham.com/codevault/amazon-cloud-aws/17-ec2-a-teamcity-youtrack-a-ssl.html
http://confluence.jetbrains.net/display/TCD6/Installing+and+Configu...uringtheTeamCityServer-installingWithTomcat
http://www.jetbrains.com/teamcity/features/amazon_ec2.html

Related Books

  1. Pingback: Intro to Continuous Integration with TeamCity | Dennis Plucinik's Web Design Blog

  2. Very useful article, thanks!

  3. Igor says:

    Hi!
    I’ve just start using TeamCity v7.2 and got a problem with setting up a cloud client.
    TeamCity agent can not recognize my Amazon instance as Amazon EC2 instance.
    Here is log:

    [2012-04-04 22:30:12,698] INFO – t.AmazonInstanceMetadataReader – Amazon is not available. Amazon EC2 integration is not active: Failed to connect to http://169.254.169.254/2009-04-04. Read timed outRead timed out
    [2012-04-04 22:30:12,699] INFO – .amazon.agent.AmazonProperties – Fetched AmazonEC2 instance metadata:
    [2012-04-04 22:30:12,702] INFO – zon.agent.AmazonMetadataChecks – Amazon EC instance metadata contains no keys
    [2012-04-04 22:30:12,702] WARN – .amazon.agent.AmazonProperties – Fetched Amazon EC2 instance metadata does not contain required values. Probably this agent was not started inside Amazon EC2. Is proxy server used?

  4. Was looking for someone with TC in the cloud, and here you are. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>