Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by andredublin on Monday July 07, 2014 @05:22PM
(#8001508)
I have done something similar to this with a MEAN stack where I boot docker containers inside a single vagrant vm that is provisioned with shell scripts. The containers then have their ports exposed to vagrant up to my localhost so I can interact with each container individually. I should write a blog post about this soon.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by revscat on Monday July 07, 2014 @04:23PM
(#8001160)
> I cannot yet see where this "Vagrant with Docker" path is going. However, after seeing what is possible I cannot help but think about how else it can be used. Plus, it is the most fun I have ever had with virtualisation, and fun is what programming is all about.
For me the biggest benefit is being able to have a developer workstation setup in minutes that (more-or-less) mirrors the production environment. This has big benefits for simplifying development setup as well as making testing more realistic.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by gault8121 on Monday July 07, 2014 @11:59PM
(#8002946)
If you have the time, could you please review our docker + fig instructions? These instructions are for Quill.org, a web app that provides free writing activities to middle school and high school students.
We are a non-profit, open source community, and we recently set up our dev environment in Docker to encourage OSS contributions. We may be missing a few crucial pieces of instruction for developers unfamiliar with Docker, such as killing docker images once a developer is finished working on a project.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by grahar64 on Monday July 07, 2014 @05:17PM
(#8001482)
Hey, so what is the difference between my setup and figs? I assume it is just that all the port forwarding and folder stuff from the virtual machine is made easier?
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by eunoia on Tuesday July 08, 2014 @12:42PM
(#8005393)
That's pretty much it. Just two different approaches to the same thing. I use docker-osx (https://github.com/noplay/docker-osx) instead of boot2loader. Didn't run into any weird virtualization issues with it.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by jives on Monday July 07, 2014 @03:34PM
(#8000855)
If you have multiple people on your team, a common dev environment can be a huge time-saver. New developers can install an identical environment quickly.
Another benefit is that your project's development environment is self-contained. It's not going to clash with anything else on your system, and will even work across platforms.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by radnam on Monday July 07, 2014 @05:48PM
(#8001692)
You can do a pip install of python bindings but not the source package itself. For e.g., pip install redis gets you python bindings for the redis but not redis itself. With this setup, you can install a specific version of redis, run it as a service with your custom configuration right out of the box.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by scott_karana on Monday July 07, 2014 @05:40PM
(#8001640)
I'm guessing easy resource allocation, either through local machine quotas/cgroups or the easier ability to move specific services to different machines as you need to scale them.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by Groxx on Monday July 07, 2014 @04:17PM
(#8001128)
Multiple versions at once is a big sell for me. At the moment I have 3 different MySQL installs to handle different work and side projects. With vagrant, this is practically trivial to maintain.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by grahar64 on Monday July 07, 2014 @05:12PM
(#8001451)
One reason why I started to use Docker is that we work in a SOA environment, and eventually bundling our own services as Docker containers would make it much easier to replicate our production environment locally.
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by sfilipov on Monday July 07, 2014 @03:43PM
(#8000918)
Please elaborate. Do you suggest to run Linux on the Mac or to run it in a VM?
I would think that one would get better battery life from running it in a VM, especially a headless one compared to running Linux 'natively' mainly because Linux desktop is notorious for worse battery life than Mac/Windows.
(yes there are ways to improve the out-of-the box battery life of Linux but that's another topic)
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by l33tfr4gg3r on Monday July 07, 2014 @04:17PM
(#8001126)
I think he means running Docker natively on a Linux distro of choice, since LXC / Docker rely heavily on Linux kernel features to implement their functionality (these do not run natively on Mac/Windows/etc). You can't run Linux on a Mac other than running it inside a VM so the overhead as a result would be a drain on battery life (at least that's what I assume chatman means).
Re:Vagrant with Docker: How to set up Postgres, Elasticsearc...
by zrail on Monday July 07, 2014 @06:32PM
(#8001985)
That's how I read it, and I agree with him. When I'm running a linux VM on my Macbook Air the battery drains significantly faster than normal, even if the VM isn't actually doing anything. It must have something to do with the way that VirtualBox responds to power management from the host OS.
For me the biggest benefit is being able to have a developer workstation setup in minutes that (more-or-less) mirrors the production environment. This has big benefits for simplifying development setup as well as making testing more realistic.
I use it to accomplish something very similar, standardized dev environments on OS X through docker containers.
Edit: I should probably add that my dev environment also relies on containers running both Postgres and Redis.
https://github.com/empirical-org/Documentation/blob/master/G...
We are a non-profit, open source community, and we recently set up our dev environment in Docker to encourage OSS contributions. We may be missing a few crucial pieces of instruction for developers unfamiliar with Docker, such as killing docker images once a developer is finished working on a project.
You can reach me at peter at quill.org
The format for the fig.yml file is even very similar to that of your VagrantFile (https://gist.github.com/ChrisChares/66916dd6dc0d5828520a)
Another benefit is that your project's development environment is self-contained. It's not going to clash with anything else on your system, and will even work across platforms.
Our team uses virtualenv and pip install from requirement lists. What additional benefits does Docker offer?
I would think that one would get better battery life from running it in a VM, especially a headless one compared to running Linux 'natively' mainly because Linux desktop is notorious for worse battery life than Mac/Windows.
(yes there are ways to improve the out-of-the box battery life of Linux but that's another topic)