Live data from Hacker News

Ask HN: How do you use Docker in production?

news.ycombinator.com

61–70 of 157 posts

Re: Ask HN: How do you use Docker in production?

#61
post #53
post #19

Earlier quoted context omitted.

The laptops are Macbook airs and were not running a VM at all. Instead, users had a script they could double click to launch the application in a terminal window. Now the laptops run the VirtualBox setup and always have the application running in the background. Docker adds value by letting us distribute a much smaller amount of data vs sending out an entire VM image. For the Windows server, we used to distribute upg…

I'm curious about a couple of things: - Are you/have you tried using "FROM" and layering things in multiple images to reduce what you need to keep shipping? - Anything stopping you from using a private registry? I'm running one at it seems to work quite well (with the caveat that it's annoying to have to specify the registry all the time). - You talk about "shuffling the data". Does that mean you're not using volumes…

1) We've talked about it but it's not a blocker so we haven't done it yet. Right now we're trying to reduce the number of layers we ship, since they seem to get big for no good reason.

2) We're using a private Docker Hub account to transfer images to the laptops. They have a script that the users can invoke that shuts down the container, updates, runs some initialization tasks (`db:migrate` + some other stuff) and then brings the container back up.

3) Yep, we're using mounted shared directories in both cases. Previously the laptops of course just stored everything on the local filesystem since they were running the app directly. I'm not 100% sure what the Windows server was doing, but I believe the operator had to move data from one share to another and run initialization tasks by hand.

Re: Ask HN: How do you use Docker in production?

#62
We are a small startup and host on Softlayer (we are part of their startup program).

I would postulate this - if you are using AWS, you will not need a lot of what Docker provides. But if you are hosting your own servers, then Docker provides close-to-metal performance with stateless behavior.

For example, when Heartbleed or Shellshock or POODLE hit the ecosystem, it took us 1 hour to recreate all our servers and be compliant.

My biggest complaint and wishlist is for Docker to roll-in Fig inside itself. The flexibility to compose services/stacks is very useful and Fig claims to be too closely tied to Orchard.

Re: Ask HN: How do you use Docker in production?

#63
I don't know if docker would be the right service for my use case, but considering the user experience on this thread I thought I'd ask...

I'm looking to deploy a python based analytics service which runs for about 12 hours per job, uploads the results to a separate server then shuts down. At any given time there could be up to 100 jobs running concurrently.

Is this 'dockable' ?

Re: Ask HN: How do you use Docker in production?

#64
post #37

Earlier quoted context omitted.

Actually, we have Nginx configured with Health Check ( http://nginx.org/en/docs/http/load_balancing.html#nginx_load... ). Hence, it will automatically take a given appserver out of the pool when it stops responding. Once the node is back again, Nginx will automatically bring it back into rotation. Also, we actually use a volume/bind-mount to store the source code on the host machine (mounted read-only). That way we c…

How do you deal with connections that are in progress to the app server? If you just take it down, you're potentially throwing away active connections.

Yes, that's absolutely true and something we're aware of. It would of course be possible to solve, but would increase the complexity by a fair amount.

It is also worth mentioning that it is a more back-end heavy service, than front-end heavy. Since each email migration runs isolated in its own Docker container, a given customer can generate 100s of Docker containers.

Hence, given the relatively low volume of users on the web app, and the fast restart time, the chance of throwing away an active connection is relatively low.

Re: Ask HN: How do you use Docker in production?

#65
post #34

At Shopify, we have moved to Docker for deploying our main product. Primary advantages for us are faster deploys, because we can do part of the old deploy process as part of the container build. Secondly: easier scalability, because we can add additional containers to have more app servers or job workers. More info at http://www.shopify.com/technology/15563928-building-an-inter...

wvanbergen, forgive me for veering off topic. I'm planning on applying to Shopify (Toronto) as a software developer before the end of the weekend. Any advice you're willing to share?

MattyMc: sure. Primarily: be yourself, show what you are passionate about, and be willing to adopt change. When applying: cover letter > resumé, and try to stand out because we get many applications. Email me at willem at shopify dot com if you have any specific questions.

Re: Ask HN: How do you use Docker in production?

#66
post #47

Here's the problems we're solving with Docker: * Sanity in our environments. We know exactly what goes into each and every environment, which are specialized based on the one-app-per-container principle. No more asking "why does software X build/execute on machine A and not machines B-C?" * Declarative deployments. Using Docker, Core OS, and fleet[1], this is the closest solution I've found to the dream of specifying…

Great explanation. If possible, I'd love to see/know more about how the statistician training step was accomplished. I also work with many nontechnical folks and haven't found success getting training on docker to 'stick'.

The Docker folks get a point for bootstrapping a familiar user interface: git. Our non-dev coworkers are competent enough with git, and they felt comfortable drawing analogies between the two. They pull the image (from our private Docker registry), run the container, make some changes, build, run, repeat. Very similar to pull, check out, commit, etc in git.

The only pain I've had is the silly flags for 'docker run'. Ugh. Before I told them to make aliases, there were all sorts of complains when they forgot '-it' and '--rm'. I think '-it' should be the default, and possibly '--rm' as well, with switches to toggle them off. Oh well.

Re: Ask HN: How do you use Docker in production?

#67
post #50
post #46

Earlier quoted context omitted.

In typical virtualisation + config management you specify a base image and bunch of config files and commands. In a Dockerfile you specify a base image and commands, may often invoke a config management tool. How is using Docker more declarative?

If you take the steps for, say, AWS, of building a new AMI for every role you have, then it's pretty much the same. (but in my experience with building AMI's, that process is way too slow compared to Docker) Docker becomes closer to declarative when you build static Docker images for every role and rebuild for every change and re-deploy. Even more so when your deployment is based on a tool like Fleet that declarative…

Thanks, that's a good answer.

Re: Ask HN: How do you use Docker in production?

#68
I'm considering Docker for a small side project I have where I want to deploy a Runnable Java Jar as a daemon. Getting Java paths right across different Linux distributions can be a hassle, hoping Docker will help me solve this. For that matter, getting a daemon (service) running correctly on different Linux'es is one more thorn I'd rather not have to deal with.

Re: Ask HN: How do you use Docker in production?

#69
post #16
post #8

I used Docker to solve a somewhat unconventional problem for a client last week. They have a Rails application that needs to be deployed in two vastly different situations: * a Windows server, disconnected from the internet * about 10 laptops, intermittently connected to the internet Docker let us build the application once and deploy it in both scenarios with much less pain than the current situation, which basicall…

What value does Docker add if you are already running a VM? Are the laptops Linux, so Docker provides a lighter alternative to a full vm environment?

What value does adding a user add if you're already running a VM? By default, all that user adds is directory-access-controls. Docker provides isolation between processes on the system it is running. Executing a root exploit from inside a Docker container is not impossible, but it's also harder than "simply" being a user. Application-level security can also be improved significantly if an application requires multiple processes to run on a host. Docker can be used to restrict processes from accessing the network, etc. Nothing that couldn't be done without Docker by a sufficiently dedicated ops team, I'll admit, but Docker greatly simplifies and standardizes these mechanisms. That's especially true if you've adopted DevOps culture where developers have come to own more of the systems security.

Re: Ask HN: How do you use Docker in production?

#70
post #46

Here's the problems we're solving with Docker: * Sanity in our environments. We know exactly what goes into each and every environment, which are specialized based on the one-app-per-container principle. No more asking "why does software X build/execute on machine A and not machines B-C?" * Declarative deployments. Using Docker, Core OS, and fleet[1], this is the closest solution I've found to the dream of specifying…

In typical virtualisation + config management you specify a base image and bunch of config files and commands. In a Dockerfile you specify a base image and commands, may often invoke a config management tool. How is using Docker more declarative?

For configuration, we separate the application and the config files into two separate containers. The config files are provided through a shared volume to the application. This model is definitely odd. However, it's allowed us to decouple our application and our configuration and to swap out configurations. With this in mind, it's more declarative because we specify "run this application with this configuration unit" rather than "here's how you get yourself started". See the Radial project for our inspiration[1]

We've found that this approach has generalized so far. For example, setting up a Cassandra cluster is often a real PITA to configure since you need the seed IPs up front. Our configuration container manages the dance by registering and pulling the IPs from Consul (etcd would work fine too). Perhaps a bit of smoke-and-mirrors, but it's achieved being able to spin up a properly-configured Cassandra cluster without needing to manually specify who's in the cluster.

[1]: http://radial.viewdocs.io/docs

Post reply on HN