Deploying ruby in a container

HI all,

I'm looking into the viability of using containers to deploy some basic ruby code. I know next to nothing about the subject.

Does anyone know of some basic resources that would help jump-start me here?

I'm looking at Rkt (https://github.com/coreos/rkt) but if you have anything Ruby-related for Docker, that would be helpful, too.

We currently use Warbler and Tomcat to deploy web-facing applications. That works well. But we have a few non-web-facing Ruby applications, and they are, as we all know, a PITA to deploy.

Ta,
Andy.

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer>

Actually, I don't know that :slight_smile:

What kind of applications are you talking about, and what are your
pain points in deploying them?

···

On Tue, Sep 27, 2016 at 6:36 AM, Andy Jones <Andy.Jones@jameshall.co.uk> wrote:

But we have a few non-web-facing Ruby applications, and they are, as we all know, a PITA to deploy.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan
Consulting Availability : Silicon Valley or remote

Hi Andy,

Check out my Docker files as an example:
- https://github.com/kozhin/docker-rails-passenger
- https://github.com/kozhin/docker-rails-server

···

On Tue, 27 Sep 2016 at 16:37, Andy Jones <Andy.Jones@jameshall.co.uk> wrote:

HI all,

I'm looking into the viability of using containers to deploy some basic
ruby code. I know next to nothing about the subject.

Does anyone know of some basic resources that would help jump-start me
here?

I'm looking at Rkt (https://github.com/coreos/rkt\) but if you have
anything Ruby-related for Docker, that would be helpful, too.

We currently use Warbler and Tomcat to deploy web-facing applications.
That works well. But we have a few non-web-facing Ruby applications, and
they are, as we all know, a PITA to deploy.

Ta,
Andy.

Click here to view Company Information and Confidentiality Notice.<
http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

> But we have a few non-web-facing Ruby applications, and they are, as we all
know, a PITA to deploy.

Actually, I don't know that :slight_smile:

What kind of applications are you talking about, and what are your
pain points in deploying them?

These are mostly small applications that run as system services or from cron. (The slightly bigger stuff is all web-facing, well, intranet-facing.)

We have a bunch of virtual servers and our infrastructure guys use chef to build them. When I write a web thing all they do is run Warbler to make a .war file and then copy the file to the Tomcat directory on the live server and one of the backup servers. That's it.

But when I write a standalone app, they or I have to:

* Figure out and install all the external dependencies
* create an account for the app to run in
* run bundle install as that user
* create a config file for the app that points to live database etc
* set up something in systemd to launch the app on boot

Additionally we don't have a chef script to build a non-system Ruby right now and we've tried using RVM in deployment but didn't like it, so that's another thing Containers would solve for us.

Right, past 5pm here. Will take this up again tomorrow. Thanks for the help everyone!

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

And what about official Ruby Docker repo <Docker?

···

2016-09-27 16:46 GMT+03:00 Konstantin Kozhin <konstantin@profitco.ru>:

Hi Andy,

Check out my Docker files as an example:
- https://github.com/kozhin/docker-rails-passenger
- https://github.com/kozhin/docker-rails-server

On Tue, 27 Sep 2016 at 16:37, Andy Jones <Andy.Jones@jameshall.co.uk> > wrote:

HI all,

I'm looking into the viability of using containers to deploy some basic
ruby code. I know next to nothing about the subject.

Does anyone know of some basic resources that would help jump-start me
here?

I'm looking at Rkt (https://github.com/coreos/rkt\) but if you have
anything Ruby-related for Docker, that would be helpful, too.

We currently use Warbler and Tomcat to deploy web-facing applications.
That works well. But we have a few non-web-facing Ruby applications, and
they are, as we all know, a PITA to deploy.

Ta,
Andy.

Click here to view Company Information and Confidentiality Notice.<
http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hello,

But we have a few non-web-facing Ruby applications, and they are, as we all know, a PITA to deploy.

Actually, I don't know that :slight_smile:

What kind of applications are you talking about, and what are your
pain points in deploying them?

These are mostly small applications that run as system services or from cron. (The slightly bigger stuff is all web-facing, well, intranet-facing.)

We have a bunch of virtual servers and our infrastructure guys use chef to build them. When I write a web thing all they do is run Warbler to make a .war file and then copy the file to the Tomcat directory on the live server and one of the backup servers. That's it.

But when I write a standalone app, they or I have to:

* Figure out and install all the external dependencies
* create an account for the app to run in
* run bundle install as that user
* create a config file for the app that points to live database etc
* set up something in systemd to launch the app on boot

Additionally we don't have a chef script to build a non-system Ruby right now and we've tried using RVM in deployment but didn't like it, so that's another thing Containers would solve for us.

Docker solves all that. If you explain what your specific problem is, we can help you put together a Dockerfile.

Right, past 5pm here. Will take this up again tomorrow. Thanks for the help everyone!

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Panagiotis (atmosx) Atmatzidis

email: atma@convalesco.org
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"Everyone thinks of changing the world, but no one thinks of changing himself.” - Leo Tolstoy

···

On 27 Sep 2016, at 19:16, Andy Jones <Andy.Jones@jameshall.co.uk> wrote:

Docker solves all that. If you explain what your specific problem is, we can
help you put together a Dockerfile.

Agreed, and thank you.

Right now I don't have a specific problem beyond: I have no idea what I am doing!

I need to learn a lot more and try a bunch of things before I can ask for specific help.

The problem is that I'm not seeing a lot of resources on the internet that talk about Ruby and containers, specifically, together. The notes on the Docker ruby image are the most useful thing I've seen so far.

Also, I've taken the possibly perverse decision to look at Rkt first, since it seems lighter and I'm finding the learning curve shallower and it addresses some security concerns that I (possibly erroneously) have with Docker. But since Rkt can use Docker images, resources about Docker are still relevant... and of course I might fall back to Docker later anyway...

(Anyone here have a strong opinion about Rkt?)

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;