This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Installation and setup » Amazon EC2
Amazon EC2 [message #17074] Fri, 01 December 2006 19:47 Go to next message
divergent  is currently offline divergent
Messages: 78
Registered: May 2006
Member
Anyone else tried setting up symfony on Amazon's EC2? This seems like a promising development and/or hosting environment for web applications. You can use an existing machine image, customize an existing one, or build your own from scratch - then launch as many instances as you like, all running on Amazon's grid. You pay per instance hour, works out to about $2 a day. It's basically infinitely scalable, cheap, virtual server hosting. The nice thing is if you're doing development you can literally start and stop the server instance so that you only pay for the actual time you use it.

I set up my first instance last night and got the symfony beta running successfully with a new project, but I haven't had success moving any existing projects. If I upgrade them to the latest beta I get "Cannot redeclare object" errors, but running them on stable breaks them because I've been using miscellaneous functions from version 0.7x. Is there a way to specify the exact version you install via pear?

I believe the errors I'm getting with the beta are because of the php version, the instance I'm using is FC4 with php 5.0.4, and it took a little tweaking to get symfony to run (missing things like xml & mysql support(. When I get some time I'll compile a newer php and see if that solves things.

Anyone else tried this and have any suggestions? I'll clean up my installation notes later today and post them for anyone who's interested.
Re: Amazon EC2 [message #22356 is a reply to message #17074 ] Fri, 23 February 2007 11:17 Go to previous messageGo to next message
prasadkarri  is currently offline prasadkarri
Messages: 69
Registered: April 2006
Location: INDIA
Member

Hi,

am intersted in using Amazon EC2 for my project and do some R&D on how to store DB.

can u please guide me doing this ofcourse AWS provides docs but still...

Thanks
Re: Amazon EC2 [message #22695 is a reply to message #22356 ] Wed, 28 February 2007 19:05 Go to previous messageGo to next message
divergent  is currently offline divergent
Messages: 78
Registered: May 2006
Member
I've deployed two projects on EC2 so far with good results. The big weakness of EC2 is the ephemeral nature of data on the instances - anything on the instance exists only as long as that instance is runnning. You can restart an instance and retain your data, and supposedly a crash won't lose your data - but I wouldn't count on it. If you reboot or crash and the server doesn't come back up right away you can lose everything.

I still don't have a satisfactory solution to this. I've been working on an rsync solution to backup to a remote server, but I don't think that'll scale well. Ideally it would be nice to backup to S3 (bandwidth between EC2 & S3 is free) but it's not a straightforward process - maybe the new sfAmazonS3 plugin could be used to build backups right into an application. I'll have to give it a try.

Other than the backup issue it's been good - once you get the process down it's pretty quick to deploy a new server and get your app running. The performance has been good - so good in one case it's actually caused problems with the application. I setup visual effects before and on completion of a lot of ajax calls - works fine on my dev server, but on EC2 the ajax response is so fast the effects collide and break everything!

In the meantime I'll clean up and post my '15 minutes to symfony on EC2' notes in the next day or so.
Re: Amazon EC2 [message #43858 is a reply to message #22695 ] Mon, 21 January 2008 14:13 Go to previous messageGo to next message
robroy  is currently offline robroy
Messages: 4
Registered: February 2007
Location: Watford UK
Junior Member
divergent wrote on Wed, 28 February 2007 18:05


In the meantime I'll clean up and post my '15 minutes to symfony on EC2' notes in the next day or so.


Divergent, did you ever get around to doing this? I'd also be interested in your ongoing experience using EC2.



Rob Roy
===================
Re: Amazon EC2 [message #43946 is a reply to message #43858 ] Tue, 22 January 2008 22:57 Go to previous messageGo to next message
divergent  is currently offline divergent
Messages: 78
Registered: May 2006
Member
unfortunately no, I didn't ever get around to that - I still have my deployment notes around here somewhere though and I've learned a few things since then. I'm in a time crunch this week for an event coming up next week, but after I get back I'll dig up my notes and post them.

For my symfony projects I'm currently using the fedora core base AMI, then installing xampp and symfony, and finally compiling the latest xcache (1.2.1 I believe - earlier versions don't work properly with symfony). This has been a stable and fast solution so far, and it's very quick to deploy - less than 15 minutes once you've done it a couple times. Once it's set up you can save it as a custom AMI and launch as many instances as you need which are ready to deploy your symfony apps on. They've recently rolled out 4 & 8 core options but I haven't tested them yet - this gives a lot of room to scale performance if your app grows, you should be able to do things like run an 8-core db server and then spawn multiple single core web frontends as necessary to deal with spikes in traffic.

I still haven't set up an ideal backup solution to deal with data on instances though. For my development server I simply check in daily to a remote subversion server. On one production server that gets daily use I have an rsync-based remote backup which copies db and image file changes to a machine here at my office on a daily basis. On another server which only sees updates during events every month or so I just manually back up everything after the event is over.

Elastic drive looks like it could be the best solution but I haven't had a chance to configure and test it yet. It lets you mount your s3 account as a volume - and you can set that volume up in a RAID with your instance volume so that you are getting real-time backup to s3.

I've only had one instance go down and fail to restart, resulting in it disappearing from the 'cloud' and losing all data (fortunately I had backups). This was very early in the EC2 program and I've had no problems since - but it still keeps me from getting too complacent about backups.
Re: Amazon EC2 [message #75596 is a reply to message #43946 ] Wed, 25 March 2009 15:49 Go to previous message
Russpd  is currently offline Russpd
Messages: 104
Registered: September 2008
Senior Member
Hi,

I am very interested in any notes you might have as I am going to deploy my app to EC2 in the next few days. Is there any way you could post a quick "15 min tutorial" rundown? Thanks
Previous Topic:Problem with symfony init-project
Next Topic:Fatal error: Class 'sfPropel' not found
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software