Live data from Hacker News

Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

blog.mccartie.com

31–40 of 49 posts

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#31
post #23

Earlier quoted context omitted.

Question -- do you have any background as a sysadmin? If not, then I can totally understand the attractiveness of something like Heroku. It really does take care of a lot of nastiness. From my side, I've got a fantastic Ansible setup for databases, security, ssl certificate distribution, and so on, and so Heroku doesn't really buy me anything for the extra money.

None as a fulltime sysadmin, most of my experience has been in operations, and in configuring servers for my own projects. I've used Puppet and Chef before, haven't checked out Ansible. My main dissatisfaction with those tools was that there wasn't a super easy way to get started on a new VPS. I had to configure roles and settings to install Puppet or Chef, and _then_ I could get started automating things. It's certa…

That's why I picked Ansible. The only dependency is SSH, and you can write modules in whatever language you choose.

Plus -- and this is a big win -- Ansible actually has usable documentation and practical examples, which coupled with a really clean design, make it way easier to get developers up to speed on the operations half of things.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#32

I used to prefer the flexibility and efficiency of having my VPS setup, and it's certainly cheaper. Over the past 2 years though, I've saved so much time and sanity using Heroku. I certainly can understand saving thousands of dollars and improving performance by moving from Heroku to a VPS or bare metal solution, but $90 is not uncomfortable enough for me to warrant the change. Interesting article!

Thanks, David. We use Heroku a TON at work and I absolutely love them. For my small-ish app, I just couldn't afford the extra cash to pay Heroku to manage my app. Thanks for reading!

Ah, that makes a lot more sense! I quickly skimmed through SproutMark and it seemed great so assumed it was a full time job.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#33
post #25
post #15

Earlier quoted context omitted.

#2 and #3 in your list are rather sweeping (fail2ban does more than protect ssh). I'm no expert either, the only thing I'd add is to disable password-based logins and root-login [1] [1] http://www.unixlore.net/articles/five-minutes-to-more-secure...

I personally have a mixed feeling about disabling password-based login. What if you've lot your key and you need to access the server for reasons such as getting the data out, how do you do it without root and without login password? Is there a way to go around this issue? Let me know if there is because right now, I have login password that I don't re-use. Well, I guess for real deployment, serving real users, you'd…

Remote consoles still allow you to login with a password -- you just can't over SSH.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#34
post #25
post #15

Earlier quoted context omitted.

#2 and #3 in your list are rather sweeping (fail2ban does more than protect ssh). I'm no expert either, the only thing I'd add is to disable password-based logins and root-login [1] [1] http://www.unixlore.net/articles/five-minutes-to-more-secure...

I personally have a mixed feeling about disabling password-based login. What if you've lot your key and you need to access the server for reasons such as getting the data out, how do you do it without root and without login password? Is there a way to go around this issue? Let me know if there is because right now, I have login password that I don't re-use. Well, I guess for real deployment, serving real users, you'd…

You can enable two factor auth for your DO account.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#35

Earlier quoted context omitted.

Thanks, David. We use Heroku a TON at work and I absolutely love them. For my small-ish app, I just couldn't afford the extra cash to pay Heroku to manage my app. Thanks for reading!

Ah, that makes a lot more sense! I quickly skimmed through SproutMark and it seemed great so assumed it was a full time job.

That's the best compliment I've gotten all day. Thanks! :)

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#37
post #31

Earlier quoted context omitted.

None as a fulltime sysadmin, most of my experience has been in operations, and in configuring servers for my own projects. I've used Puppet and Chef before, haven't checked out Ansible. My main dissatisfaction with those tools was that there wasn't a super easy way to get started on a new VPS. I had to configure roles and settings to install Puppet or Chef, and _then_ I could get started automating things. It's certa…

That's why I picked Ansible. The only dependency is SSH, and you can write modules in whatever language you choose. Plus -- and this is a big win -- Ansible actually has usable documentation and practical examples, which coupled with a really clean design, make it way easier to get developers up to speed on the operations half of things.

Can you recommend tutorials, examples for Ansible? Is Ruby knowledge required to efficiently use Ansible? I would like to automate the installation of nginx, php, nodejs, mysql, etc. incl. modify a few config files.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#38

Earlier quoted context omitted.

Heroku apps aren't performant in many areas of the world e.g Australia like where I am, Amazon EC2 has an Australian region which is amazing

I'm also Australian, but we have a fairly international customer base so the ~150ms difference for requests that hit the application hasn't been that big for us in the scheme of things.

Yeah we have a near-realtime app and all our customers are in Australia. Tried heroku meh. Silly thing is they run on Amazon so should be able to deploy to Australia.

We also do thing heroku doesn't support with some vpn setup etc but all good for those who can use it.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#39

Earlier quoted context omitted.

Even better idea is not to host the databases at all. Only those who have never experienced a corrupted backup or failed slaves think a database is something that is relatively trivial to manage. You're much better off looking at platforms like RDS, MongoHQ, Cloudant etc.

In my experience, hosted database providers are almost always either cost or latency prohibitive. Nowadays, in PostgreSQL is quite simple to replicate a db via log shipping[1]. You can even stream the WAL to an S3 bucket. [1]: http://www.postgresql.org/docs/9.3/static/warm-standby.html

I currently use MongoHQ and get response times in the tens of milliseconds for $18/month. Hardly cost or latency prohibitive. I've seen similar times for less money with Cloudant.

Making sure that master/slave scenario works when you need it to requires extensive testing and care. You also failed to address backups. I've yet to meet anyone who runs their own database who actually tests their backup.

Re: Digital Ocean: Ubuntu, Nginx, Unicorn, Rails

#40
post #36

I heard Ansible over SSH is good to automate the installation. Has some experience with it? I am interested in a good tutorial similar to OP's article.

Have you looked at these? https://www.digitalocean.com/community/tutorials/how-to-crea... + https://www.digitalocean.com/community/tutorials/how-to-inst...
Post reply on HN