Ruby on Rails Wednesday, October 26, 2016

On Wed, Oct 26, 2016 at 06:37:13AM -0700, Vivek Vvk wrote:
> yes, thats more of a deployment tool. I am able to deploy my rails app in a
> continuos manner right now. I just want to know if my approach is rite and
> if there is any specific build techniques for rails app. Currently, I just
> pull the source code from repo --> tar it into a package--> stop app in
> target ---> untar the package in target (and some other release versioning
> stuff) using ansible --> start the app.

Continuous integration is not a well defined term, but you are just
describing the deployment step. That is not continuous integration. That
said it really doesn't matter what deployment tool you use. Capistrano
is the most popular. Ansible is fine, but it sounds like you aren't
really leveraging most of Ansible's features.

If you want to improve you process:

* Get your deployment processes dialed in to where you can deploy at any
time by calling a single command. You don't want a combination of
manual steps, home rolled scripts, and tools.

* Fully leverage whatever tool you choose. Both Ansible and Capistrano
can do everything you describe, but you are just using Ansible to
restart your web server.

* Try and reduce your down time - you are stopping your app too
soon. Setup your new app, point your web server at the new app, and
then restart the web server. There are many ways to do this. One
popular way is to make a symlink that points at your application
directory and configure your web server to use that symlink as your
application directory. Then you can just point the symlink at
your new directory and restart the web server. Capistrano does this
for you.

There's a lot of good information on deploying rails apps with
Capistrano. If you aren't already an expert in Ansible I would give
Capistrano a go. I does a lot of things correctly right out of the box.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/20161026143906.GA55261%40endor.local.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment