Vagrant with Docker: How to set up Postgres, Elasticsearch and Redis on Mac OS X(maori.geek.nz)
maori.geek.nz
Vagrant with Docker: How to set up Postgres, Elasticsearch and Redis on Mac OS X
http://maori.geek.nz/post/vagrant_with_docker_how_to_set_up_postgres_elasticsearch_and_redis_on_mac_os_x
5 comments
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.
I would love to see your Vagrantfile! I have a similar need, but can't figure it out :(
> 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.
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.
Have you looked into Fig? (http://orchardup.github.io/fig/)
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.
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.
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.
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
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
Sent you an email
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?
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.
The format for the fig.yml file is even very similar to that of your VagrantFile (https://gist.github.com/ChrisChares/66916dd6dc0d5828520a)
The format for the fig.yml file is even very similar to that of your VagrantFile (https://gist.github.com/ChrisChares/66916dd6dc0d5828520a)
As someone who uses brew versions of postgres, elasticsearch and redis, what benefit would I get moving to a setup like this?
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.
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.
More direct question:
Our team uses virtualenv and pip install from requirement lists. What additional benefits does Docker offer?
Our team uses virtualenv and pip install from requirement lists. What additional benefits does Docker offer?
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.
That's a good benefit for consideration, thanks for the answer.
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.
Possibility to break things, use multiple versions at the same time, testing dangerous operations, seamless deployments, etc.
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.
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.
For one, you can mirror your production environment in dev.
This will drain your battery. Better is to use GNU/Linux natively, e.g. Fedora, Ubuntu.
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)
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)
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).
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.