dev ops question

12 views
Skip to first unread message

Allen Maxwell

unread,
Aug 11, 2015, 4:31:32 PM8/11/15
to ur...@googlegroups.com
Hi all,

I’ve been playing with setting up an EC2 server and deploying a rails app to it.  Stumbling around a bit, a few steps forward, some back.  I want to use postgresql and that was having trouble bundling.

any pointers or good websites/instructions for doing this would be greatly appreciated!

Thanks,


Allen Maxwell
Chief Technology Officer

Better Homes and Gardens Mason-McDuffie Real Estate
1555 Riviera Avenue, Suite E
Walnut Creek, CA   94596
801.790.4500 Office





Eric Berry

unread,
Aug 11, 2015, 4:32:47 PM8/11/15
to ur...@googlegroups.com, Allen Maxwell
I highly recommend using cloud66 to do all devops stuff
--
http://utruby.org
http://groups.google.com/group/urug
 
please prefix the subject with [JOB] when regarding job opportunities
---
You received this message because you are subscribed to the Google Groups "Utah Ruby Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urug+uns...@googlegroups.com.
To post to this group, send email to ur...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim

unread,
Aug 11, 2015, 4:33:41 PM8/11/15
to ur...@googlegroups.com
I would recommend using elastic beanstalk.

David Mitchell

unread,
Aug 11, 2015, 4:37:11 PM8/11/15
to ur...@googlegroups.com
Heroku is simple. 


Jason Staten

unread,
Aug 11, 2015, 5:54:48 PM8/11/15
to ur...@googlegroups.com
For running postgres, Amazon's RDS is nice.

Tim Harper

unread,
Aug 11, 2015, 5:56:59 PM8/11/15
to ur...@googlegroups.com
Another +1 for RDS. It's relatively inexpensive, and we haven't had a single issue with it in the 2 years it's been running.

Not to say that it will continue that way forever...

They're multi-AZ replication option is a nice and works well out of the box. They'll handle failover for you in the case an instance dies or you want to resize the database server.

Tim

Eric Shelley

unread,
Aug 11, 2015, 6:04:49 PM8/11/15
to ur...@googlegroups.com
Another +1 for RDS. If you are already on Amazon you should check out OpsWorks. Manage your full stack with chef recipes and add your own cookbooks if you need more control. Also, you can manage your own instances outside of Amazon with OpsWorks too. I think all of the other solutions are nice too, but this one works for me since I do all my production hosting on Amazon.

Allen Maxwell

unread,
Aug 12, 2015, 7:33:16 AM8/12/15
to ur...@googlegroups.com
Hi again…  and thanks for all the great input.

I played with setting up a server by hand and got close but never had nginx and unicorn working right so didn’t have the site exposed for use, so rolled back and decided to use OpsWorks and RDS…  Got up to where my migration is trying to run and am having trouble…

I found this url which discusses what seems to be my problem (https://github.com/aws/opsworks-cookbooks/issues/136) and I’ve tried to plug in the custom JSON to fix the database reference to no avail.  

I can run the deploy without migration and it succeeds - obviously doesn’t work though since there’s no db.
When I ssh into the server and look, the database.yml has mysql… I can’t manually change it and get any positive results...

In looking at the recipes - opsWorks has added a recipe for mysql even though I’m not using it and didn’t call for it (I specified postgres when I built the opsworks stuff)… and I don’t know how to get it out of there.  I did add the postgres recipe by hand to the config as an “OS Package”… seemed like a good idea at the time.;)

I have the RDS postgres db defined and running - all seems ok there, just can’t get the ec2 instance to see it and use it…

feels like I’m close to having this working - any pointers or help would be appreciated.

Thanks,

Max

David Anderson

unread,
Aug 12, 2015, 10:42:32 AM8/12/15
to ur...@googlegroups.com
Also I have found that the opsworks cookbooks install the Unicorn gem globally and then uses bundle exec unicorn to try to start it.  Which means it will fail because Unicorn isn't in the Gemfile.  You either have to use Apache + Nginx or change the cookbooks.   Also with postgres and RDS you need to add a setting or it won't set the database.conf right either.

Dave

Eric Shelley

unread,
Aug 12, 2015, 10:46:04 AM8/12/15
to ur...@googlegroups.com, Allen Maxwell
Hi Max,

If you want I can jump on a join.me session with you and we could look at it together. I think the issue is the security group for your RDS instance. I usually create a new security group within the RDS Dashboard and allow my ec2 groups access to RDS. I’ll create a quick test security group and send you a screenshot, http://cl.ly/image/2n1m0n2V1j20?_ga=1.245740676.1810321990.1435079420.

Eric
Reply all
Reply to author
Forward
0 new messages