简体   繁体   English

在Rails上是否有EC2的linode版本?

[英]Is there a linode version of EC2 on Rails?

We really like the idea of hosting with Amazon EC2 and the excellent EC2 on Rails , but our cashflow isn't enough to justify a move to EC2. 我们非常喜欢使用Amazon EC2和出色的Rails EC2进行托管的想法,但是我们的现金流不足以证明转向EC2是合理的。 So we've decided to host with linode. 因此,我们决定托管linode。 Now we're trying to put together the best Rails server build. 现在,我们试图将最佳的Rails服务器构建在一起。

For those that don't know, EC2 on Rails is an opinionated Ubuntu Linux Server image for Amazon's EC2 hosting service. 对于那些不知道的人,EC2 on Rails是针对Amazon EC2托管服务的自以为是的Ubuntu Linux Server映像。 Out of the box, it runs a standard Ruby on Rails application with little to no customization. 开箱即用,它运行标准的Ruby on Rails应用程序,几乎不需要定制。

So, is there something like EC2 on Rails for linode? 那么,是否有类似EC2 on Rails for linode的东西?

We'd need at least the following: 我们至少需要以下条件:

  • Ruby 1.8.7 Ruby 1.8.7
  • Ruby on Rails 2.3.8 Ruby on Rails 2.3.8
  • MySQL 5 MySQL 5
  • memcached memcached的
  • Automatically runs hourly, daily, weekly and monthly scripts if they exist in Rails application's script directory 如果它们存在于Rails应用程序的脚本目录中,则自动每小时,每天,每周和每月运行一次脚本
  • Local Postfix SMTP mail server 本地Postfix SMTP邮件服务器
  • SSL support SSL支持
  • Passenger + Ngnix or Mongrel + Apache 乘客+ Ngnix或Mongrel + Apache
  • 32 bit image Ubuntu 32位图像Ubuntu

With a railsy setup, meaning fast and simple. 具有混乱的设置,意味着快速和简单。 So, anyone run across anything like EC2 on Rails, but for linode? 因此,有人会碰到类似Rails上的EC2之类的东西,但是要使用linode吗?

I have been using linode for my personal use for a while and I think no matter what, you are probably going to have to get your hands dirty. 我已经将linode用于个人用途已有一段时间了,我认为无论如何,您可能都必须弄脏手。 I kind of like it for exactly that reason, but that is just my taste. 出于这个原因,我有点喜欢,但这只是我的口味。 They do have stack scripts with some predefined setups. 它们确实具有带有一些预定义设置的stack scripts The closest I can find to what you are looking for is a ruby/apache/mysql script that is fairly customizable. 我能找到的最接近您所需要的是可自定义的ruby / apache / mysql脚本。

From the script: 从脚本中:

Installs a fully functioning, ready to go stack that's optimized specifically for your Linode's resources. 安装功能齐全的随时可用的堆栈,该堆栈专门针对您的Linode的资源进行了优化。 By default, it creates a VirtualHost using the reverse DNS of your Linode's primary IP. 默认情况下,它使用Linode的主IP的反向DNS创建VirtualHost。

This installs a stack based on Ruby, Apache, and MySQL. 这将安装基于Ruby,Apache和MySQL的堆栈。 This also gives you the options to install gems so that you can be up and running Ruby on Rails in no time. 这还为您提供了安装gem的选项,以便您可以立即启动并运行Ruby on Rails。

Optionally creates a MySQL database and user, and assigns that user grants to the database. (可选)创建一个MySQL数据库和用户,并将该用户授予的权限分配给该数据库。

You may use this as an example for creating more VirtualHosts. 您可以以此为例来创建更多虚拟主机。 Set up VirtualHosts, install your sites, point your domains to your Linode, and you're set! 设置VirtualHosts,安装站点,将您的域指向Linode,就可以开始了!

This script downloads and compiles the source from Ruby's ftp. 该脚本从Ruby的ftp下载并编译源代码。 Along with Ruby, the latest version of ruby gems is installed and you have a choice of initial gems to install. 与Ruby一起,安装了最新版本的ruby gems,您可以选择安装初始宝石。 Rails and passenger can be used to have a ready to go Rails server. Rails和passenger可用于准备就绪的Rails服务器。 Once this script has finished be sure to run 'passenger-install-apache2-module' to complete the passenger install. 一旦该脚本完成,请确保运行“ passenger-install-apache2-module”以完成乘客安装。

Note that this script may take 1.5 - 2 hrs depending on the gems that are specified. 请注意,根据指定的宝石,该脚本可能需要1.5-2小时。

All details of this stack script are logged to /root/log.txt and the stack script is finish when the line "StackScript Finished!" 该堆栈脚本的所有详细信息都记录到/root/log.txt,并且在“ StackScript Finished!”行中,该堆栈脚本已完成。 is written to the log file. 写入日志文件。

You might have good luck talking to their support though, they might have some more secret sauce that I haven't found yet. 您可能会很幸运地与他们交谈,但他们可能还有一些我尚未发现的秘密调味料。

Nothing in that setup sounds EC2-specific beyond the name. 除了名称外,该设置中的所有内容听起来都不是EC2特定的。 It appears it is just convenient to use with EC2, because they let you grab a disk image from another account. 看来,与EC2一起使用很方便,因为它们使您可以从另一个帐户获取磁盘映像。

You are welcome to create your own StackScript to do this and contribute it to the community. 欢迎您创建自己的StackScript来做到这一点,并将其贡献给社区。 Once a StackScript is written, it can be marked public and used by others. 编写完StackScript之后,就可以将其标记为公共并供其他人使用。 EC2 on Rails has a public GitHub repository from which you can get started, and honestly, I'd love to see things like this ported to the StackScript system. EC2 on Rails有一个公共的GitHub存储库 ,您可以从中开始使用。老实说,我很乐意将类似的东西移植到StackScript系统中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM