Note that there are some explanatory texts on larger screens.

plurals
  1. POdeploying an nginx/rails/node app onto EC2
    primarykey
    data
    text
    <h1>Basic Problem</h1> <ul> <li>I have an app I'm building, and was hoping to get some help deploying it to EC2</li> <li>I've been told I should use capistrano</li> <li>What are my next steps?</li> </ul> <h2>About the App</h2> <ul> <li>simple rails app (3.1.1)</li> <li>simple node app (0.4.2)</li> <li>redis to communicate between rails and node (2.0.4)</li> <li>nginx to reverse proxy both rails and node (1.0.6)</li> <li>database is currently sqlite (but will probably upgrade to mysql or mongo in the near future)</li> <li><p>an nginx.conf file is as follows:</p> <pre><code>worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { proxy_pass http://localhost:3000/; } location /events/ { proxy_pass http://localhost:3001/; proxy_buffering off; proxy_read_timeout 1000s; } } } </code></pre></li> </ul> <h2>About the EC2 instance</h2> <ul> <li>ec2-12-34-56-789.compute-1.amazonaws.com</li> <li>Basic 64 bit Amazon Linux t1.micro (until I get everything working, then I'll find some other place to deploy; possibly EC2, possibly rackspace, possibly something completely different)</li> </ul> <h2>About my deploying platform</h2> <ul> <li>OSX 10.6.8</li> <li><p>Have the following contents stored in ~/.ec2/ (probably needs to be moved to get capistrano to work)</p> <pre><code>cert-123456789ABCDEF0123456789ABCDEF0.pem pk-123456789ABCDEF0123456789ABCDEF0.pem ec2-keypair </code></pre></li> <li><p>Currently have the following deploy.rb (but it's not working)</p> <pre><code>set :application, "clashcentral" set :repository, "git@github.com:HairyMezican/GameLobby.git" set :branch, "master" set :repository_cache, "git_cache" set :deploy_via, :remote_cache set :ssh_options, { :forward_agent =&gt; true } set :scm, :git ssh_options[:keys] = [File.join(ENV["HOME"], ".ec2", "ec2-keypair")] role :web, "ec2-12-34-56-789.compute-1.amazonaws.com" role :app, "ec2-12-34-56-789.compute-1.amazonaws.com" role :db, "ec2-12-34-56-789.compute-1.amazonaws.com", :primary =&gt; true </code></pre></li> </ul> <h3>errors</h3> <ul> <li>The original error I was getting was <code>connection failed for: ec2-12-34-56-789.compute-1.amazonaws.com (Net::SSH::AuthenticationFailed: Empty)</code></li> <li>The current error I am getting, when I added in the line <code>set :user, "ec2-user"</code> is <code>failed: "sh -c 'if [ -d /u/apps/clashcentral/shared/git_cache ]; then cd /u/apps/clashcentral/shared/git_cache &amp;&amp; git fetch -q origin &amp;&amp; git fetch --tags -q origin &amp;&amp; git reset -q --hard cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd &amp;&amp; git clean -q -d -x -f; else git clone -q git@github.com:HairyMezican/GameLobby.git /u/apps/clashcentral/shared/git_cache &amp;&amp; cd /u/apps/clashcentral/shared/git_cache &amp;&amp; git checkout -q -b deploy cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd; fi'" on ec2-12-34-56-789.compute-1.amazonaws.com</code></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload