views:

321

answers:

1

I have launched an EC2 linux instance (a rightscale CentOS v 5.2 i386 image) and want have followed a tutorial (http://www.ardentsoft.com/blog/2009/3/4/lamp-on-ec2-part-6-configuring-apache.html) for configuring PHP and Apache. Now I need to know how to get my PHP files from my dedicated server up to the cloud. I usually use dreamweaver to edit and FTP files to my dedicated server so if I could carry on using that it would be preferable. I have used Putty to login to my instance and have found some tutorials about SSH tunneling with dreamweaver but don't fully understand this.

Once I have done this, I want to know how I can package this server image with all my PHP code and have it ready to go at a moments notice, is this bundling? Can i bundle my configured running image as a new image that I can launch and have ready to go?

Many thanks

+1  A: 

Yes, this is bundling. You can either use the AWS Manager provided by Amazon or ElasticFox. Both will do what you need.

Your basic steps are:

  1. Create your server instance on EC2
  2. Upload all code and configure it fully start up and run as you expect.
    1. If you are running a Windows instance, use Remote Desktop
    2. If you are running a Linux instance, use ssh/scp
  3. Get your server fully running as you want it to operate.
  4. Create a bundle. This "archives" your instance into a Bundle. Once complete (this process can take up to an hour, IIRC), you will have a custom EC2 machine that you can fire up. Steps:
    1. Create a "bucket" on Amazon S3 to hold your bundle. You can do this from the Amazon web site or using ElasticFox
    2. Using AWS Manager (ElasticFox will be similar), click on Instance Actions and "Bundle Instance".
    3. You must enter the S3 bucket name (this is typically a lower-case, no space identifier) and your S3 access key.
  5. Lather, rinse, repeat. I had to bundle multiple times to get the startup working as I expected (so expect multiple attempts).
Mike Crowe
Thanks Mike, I now have a bundled AMI of the server as I want it to run, everything installed, configured etc. I registered it and have launched it and associated it with one of my elastic IP addresses. However I cannot seem to connect to it, when i use Putty and load the saved session that has the putty generated keypair and the elastic ip address already entered I get a timeout message, I have tried entering the public DNS (and IP) into a browser but this also fails - "because the server where this page is located isn’t responding." Do you know what could be causing this, should I try again?
undefined
I haven't used Elastic IP's, but it definitely sounds like it's something related to that. It explains both the web and SSH failure.Naturally, you're sure you have the right IP?One time, I edited /etc/rc.local and added: wget http://www.anothersite.com?thisismike(where anothersite.com was another site I had access to). Then, by searching the Apache logs, I could find the IP address I was calling from.
Mike Crowe