ICT-Infer / timelog

Time sheet time tracking
ISC License
1 stars 0 forks source link

Containerization #14

Closed yarwelp closed 9 years ago

yarwelp commented 9 years ago

The current approach of source install of Python 3.4 in home dir followed by a virtualenv based on it is ugly. I knew this when I did it and I've been thinking about what to do instead.

On 2015-04-02, during my visit to Joakim (@swampland), I talked with him about the current state of the installation process for django-timelog. He noted that he, for one, found the process too long. He asked if I would be providing some form of bundle of everything needed.

Indeed, I don't intend for end users to have to go through all those steps. But what do I intend?

Debian packages are good but I've heard they can be a bit difficult to get right. I may end up using it as part of the solution but I don't think it is enough alone. The package format used by pip may also be useful for part of this, I don't know yet.

Anything that automates the installation must be careful not to crap all over the target.

I began first with some testing of using chroot. It seemed not so bad but also not quite sufficient.

If you've ever used FreeBSD or you've ever talked to a FreeBSD user, you will most likely have heard about FreeBSD jails. I know my friends won't be switching to FreeBSD just so they can run django-timelog in a jail, though, so for now, let's forget about that.

What else is there, then? Solaris zones? SmartOS zones?

They will want to run it on Debian, remember.

Docker, I think it is fair to say, brought container technology to the masses among Linux users.

I gave Docker a try but found it unsatisfactory and decided to check out rkt. You may have seen recent activity on my github account related to the latter. You may even have found the e-mail I sent to the rkt-dev mailing list. Okay, you've probably not seen that e-mail. Here it is: https://groups.google.com/d/msg/rkt-dev/camMGJcPOK0/cAugxBbJozoJ.

The only real problem with using rkt at the moment, at least to me, and, i would imagine, to my friends, is that it requires Linux >= 3.8. Debian Wheezy is based on Linux 3.2.something if I recall correctly.

So that's a bit of a problem. But it may not be the biggest problem in the world.

yarwelp commented 9 years ago

In the recently released Debian "Jessie" which we are now using, 3.16 images are available for install.

yarwelp commented 9 years ago

Debian packages are good but I've heard they can be a bit difficult to get right.

Indeed, there is a relevant draft page in the Debian wiki confirming this: https://wiki.debian.org/DjangoPackagingDraft.

yarwelp commented 9 years ago

On a longer term time scale, containerization should be added as the preferred installation type. For now, an install script should be provided replacing copy-pasting each step from the README.

yarwelp commented 9 years ago

The install script works pretty well. Not so sure containerization is really required or that even if it is a good idea, whether there is a point to explicit support for it in this repository. Closing for now.

yarwelp commented 9 years ago

Reopening for later reconsideration. Having since tested Docker a bit on Debian 8, I think it might be preferable over rkt after all.

yarwelp commented 9 years ago

Added to milestone 1.0.0. Might postpone.