Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh root@123.123.123.123
Add ssh fingerprint and enter password provided in email
| $.fn.serializeObject = function() | |
| { | |
| var o = {}; | |
| var a = this.serializeArray(); | |
| $.each(a, function() { | |
| if (o[this.name] !== undefined) { | |
| if (!o[this.name].push) { | |
| o[this.name] = [o[this.name]]; | |
| } | |
| o[this.name].push(this.value || ''); |
| $.fn.quickChange = function(handler) { | |
| return this.each(function() { | |
| var self = this; | |
| self.qcindex = self.selectedIndex; | |
| var interval; | |
| function handleChange() { | |
| if (self.selectedIndex != self.qcindex) { | |
| self.qcindex = self.selectedIndex; | |
| handler.apply(self); | |
| } |
| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| end |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
| #!flask/bin/python | |
| from flask import Flask, jsonify, abort, request, make_response, url_for | |
| from flask_httpauth import HTTPBasicAuth | |
| app = Flask(__name__, static_url_path = "") | |
| auth = HTTPBasicAuth() | |
| @auth.get_password | |
| def get_password(username): | |
| if username == 'miguel': |
Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).
Other application notes:
Salient points for each file:
| Steps: | |
| Set up EBS | |
| 21Created 1 TB EBS | |
| Created 64 Bit Amazon Linux AMI 2012.09 M1 Medium 3.7 gb ram, 2 ECUs | |
| Connect to ec2 instance via ssh | |
| chmod 400 IFS-KeyPair.pem | |
| ssh -v -i IFS-KeyPair.pem ec2-user@ec2-54-234-14-65.compute-1.amazonaws.com | |
| Note: Do not replace ec2-user with your user id. This is a AWS Amazon AMI requirement. |