Rails 3 Server on EC2 - ruby-on-rails-3

I'm trying to setup a production server for a rails 3 app on a single amazon ec2 instance, and am wondering what route to take.
I'm quite new to deploying rails apps - is there a pre-existing ami I can use for rails3?
Any tips/wisdom/advice appreciated - thanks!

I'd like to suggest to use verified EC2 AMIs, for instance by Rightscale. You can not use the Rightscale as a service, but theirs AMIs are pretty stable and reliable.
UPDATE: I advice to use Amazon Linux Machine based on CentOS 6

In terms of reasonably priced EC2 management services check out scalr.com.
As for gems that makes it easier to deploy Rails to EC2 have a look at Poolparty and Rubber.

Ubuntu has a nice guide on EC2 and Ubuntu images. https://help.ubuntu.com/community/EC2StartersGuide
Also see http://alestic.com/ I just set up one of these images on my EC2 free usage tier with no issues.

Related

Is it possible to deploy Spinnaker to an instance smaller than m4.xlarge on AWS?

We are currently following the default deployment instructions for Spinnaker which states using m4.xlarge as the instance type.
http://www.spinnaker.io/v1.0/docs/creating-a-spinnaker-instance#section-amazon-web-services
We did make an unsuccessful attempt to deploy it to m4.large but the services didnt start.
Has anyone tried the something similar and succeeded?
It really depends on the size of your cloud.
There are 4 core services that you need - gate/deck/orca/clouddriver. You can shut the other ones off if say, you don't care about automated triggers, baking or jenkins integration.
I'm able to run this locally with the docker images with about 8 gigs of ram and it works. Using s3 instead of cassandra also helps here.
You can play around with the settings in the baked image of spinnaker, but for internal demos and what not, I've been able to just spin up a VM, install docker and run the docker compose config correctly on m4.large.

Install and deploy on EC2 with Apache/passenger app using capistrano

Anybody knows (A-Z)step by step popular instructions/guidance/tutorial/blog to install and deploy rails 3 app with Mysql DB on Amazon EC2 with capistrano including up setting up Apache and Phusion Passanger servers?Thank you very much.
Linode has a few tutorials. For example, this seem pretty useful.
http://library.linode.com/frameworks/ruby-on-rails-apache/ubuntu-10.04-lucid

How install Wordpress in a EC2 machine?

I have an EC2 instance running with Glassfish Server Open Source Edition.
And now I need to setup the a website in wordpress.
How can I do that ?
I'm looking for 5 minutes installation tutorial but I'm stuck in the part where it's says about the webserver.
I have to install the Apache in Linux then enable the FTP access ? (to upload the wordpress files ? )
For now I'm stuck in this part guys, any tip is very welcome.
Ok. This is going to be a bit of a high level overview of what you need to do. Its a long process which you need to look into.
Glassfish server is (afaik) for Java applications. Wordpress is a PHP/mysql based system.
Apache is a free and open source web server which you can use, which integrates with php and mysql nicely. What you need is called a LAMP setup (LAMP stands for "linux, apache, mysql and php). You haven't specified what your EC2 is running (what linux distro) but lets say its Ubuntu. A quick search for "installing lamp ubuntu" on google turns up many different tutorials and walkthroughs for installing a lamp setup on your machine.
You'll need SSH access (which you'll have with EC2) then if you run through your tutorial of choice you'll have a working web server, you'll specify a public_html directory (usually by default /var/www).
Now to install Wordpress. What you could do is install an FTP server. This is going to be relatively complicated though, however it will be the easiest way to install Wordpress. Install FTP and upload the wordpress files to the public html directory, then you will be able to run through the 5 minute install process using the mysql database credentials you set up in the LAMP tutorial.
An easier way to do what you need to do is to install subversion on your EC2 instance - e.g. sudo apt-get install subversion on ubuntu. That way you can svn export the wordpress repository to your public html folder (http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion).
However, without an FTP server running on your EC2 instance you won't be able to FTP in to modify files or anything. You'll have to do everything over SSH (or SFTP) which may or may not be manageable for you.
In all honesty, and with the utmost respect, if you don't know about apache and installing a LAMP server and such then you're probably a bit out of your depth with Amazon's EC2 server. You'd be better off with a dedicated server from a hosting company who will have installed everything you need.

About Amazon AWS EC2

I am new to deploy a rails3.1 app to the AWS platform(heroku only previously).
However, I want to take the advantage of EC2 + S3 free-tier micro instance.
I've heard that there's something called AMI and some other things like Capistrano etc.
Can anyone explain the whole concept of AWS cloud computing?
How can I upload files to EC2? Via the terminal?
E.g. I am using ubuntu 11.10, Can I just type "rails s" in the terminal and then Ec2 just going running in production mode?
Thanks.
Amazon ec2 is just another service just like a dedicated server that you would get from certain hosting providers, an AMI stands for Amazon Machine Images, which is basically a pre-configured operating system, it can be any linux distro or even windows, once you decide on an AMI you will get a SSH account that you can use to connect to your server, you can use the command line to connect or any number of programs that can ssh, for instance I use zend studio on my mac and thats how I edit my files on the server but I also use the command line with the rsync command to backup all my files from the server to my laptop.

Amazon EC2 Windows AMI with shared S3 storage

I've currently got a base Windows 2008 Server AMI that I created on Amazon EC2. I use it to create 20-30 EBS-based EC2 instances at a time for processing large amounts of data into PDFs for a client. However, once the data processing is complete, I have to manually connect to each machine and copy off the files. This takes a lot of time and effort, and so I'm trying to figure out the best way to use S3 as a centralised storage for the outputted PDF files.
I've seen a number of third party (commercial) utilities that can map S3 buckets to drives within Windows, but is there a better, more sensible way to achieve what I want? Having not used S3 before, only EC2, I'm not sure of what options are available, and I've not been able to find anything online addressing the issue of using S3 as centralised storage for multiple EC2 Windows instances.
Update: Thanks for suggestions of command line tools for using S3. Was hoping for something a little more integrated and less ad-hoc. Seeing as EC2 is closely related to S3 (S3 used to be the default storage mechanism for AMIs, etc), that there might be something neater/easier I could do. Perhaps even around Private Cloud Networks and EC2 backed S3 servers, etc, or something (an area I know nothing about). No other ideas?
I'd probably look for a command line tool. A quick search on Google lead me to a .Net tool:
http://s3.codeplex.com/
And a Java one:
http://www.beaconhill.com/opensource/s3cp.html
I'm sure there are others out there as well.
You could use an EC2 instance with EBS exported through samba which can act as a centralized storage that windows instances can map?
this sounds very much like a hadoop/Amazon MapReduce job to me. Unfortunately, hadoop is best deployed on Linux:
Hadoop on windows server
I assume the software you use for pdf-processing is Windows only?
If this is not the case, I'd seriously consider porting your solution to Linux.