Live data from Hacker News

Docker interactive tutorial

blog.docker.io

41–48 of 48 posts

Re: Docker interactive tutorial

#41
post #19
post #15

Earlier quoted context omitted.

Im a coder and owner of a small SaaS company. What I do to run applications is this: I fire up a vm or dedicated server on some provider and run my stuff on it. I use Amazon and a couple of other providers.

Ok. That's great. Then let me try to give you some examples #: Imagine you have setup your SaaS to run from some containers (1 container with your web app, 1 container with your worker, 1 container with your queue and a database somewhere. Now let's walk through a scenario for a significant new release of your web app: 1) Package your new web app, Launch it for testing (on the same host, cheap) to point to a testing…

Sorry, I dont even understand your first sentence. "Imagine you have setup your SaaS to run from some containers". What is a container? What is a "Worker"? What do you mean with "queue"?

Then you say "Package your new web app, Launch it for testing". I never package my web app. It just runs and runs and runs. And my customers use it. I develop it on another machine, and from time to time I push updates from the development machine to the production machine. Everything seems fine to me. Am I having a problem I dont know about?

Re: Docker interactive tutorial

#42
post #41
post #19

Earlier quoted context omitted.

Ok. That's great. Then let me try to give you some examples #: Imagine you have setup your SaaS to run from some containers (1 container with your web app, 1 container with your worker, 1 container with your queue and a database somewhere. Now let's walk through a scenario for a significant new release of your web app: 1) Package your new web app, Launch it for testing (on the same host, cheap) to point to a testing…

Sorry, I dont even understand your first sentence. "Imagine you have setup your SaaS to run from some containers". What is a container? What is a "Worker"? What do you mean with "queue"? Then you say "Package your new web app, Launch it for testing". I never package my web app. It just runs and runs and runs. And my customers use it. I develop it on another machine, and from time to time I push updates from the devel…

A worker is usually something that does background processing. For example a user uploads an image and you need to convert it to multiple sizes. You can either do this on your application server within the scope of the request, or set up a task queue.

Here's an oversimplification of the latter: You have an application server, a queue (something like 0MQ, or redis) and one or multiple workers. When the image is posted, you add a job to the queue, asking for the image to be processed. The worker polls the queue asking if there are any jobs, an if there are, it executes those.

> I never package my web app. It just runs and runs and runs. And my customers use it.

So how do you deploy a new version of your app?

Re: Docker interactive tutorial

#44
post #24
post #17

Earlier quoted context omitted.

Hi. Thanks! My personal take on where Docker is heading to? There are so many things people can do with this, it's hard to summarize. What I personally care most about? As a designer ex-entrepreneur and front-end developer, the thing that gets me going most is the idea that I'm able to "just run" an application. No more difficult than from the Mac store. For example Trac (a wiki system), Wordpress, Django apps, Mails…

Absolutely love docker, hope to see it mature even more :) I am currently playing around with it and building a messaging platform playground. One "pain" so far is that docker's IPAddress assignment is not very flexible. Will it be possible to assign IP addresses to containers (e.g. from "docker run")? Or have a better control what IPAddresses are used (like giving a network range on docker -d)? If i am not mistaken…

Currently using the unionize.sh script works very well for me.

http://blog.docker.io/2013/04/unionize-network-superpowers-f...

You have to run ./unionize after starting the container, but that brings up a new interface inside the container with that IP and connects it to the bridge.

This is useful for having private IPs between containers of an application, for accessing databases or similar.

Re: Docker interactive tutorial

#46
post #41

Earlier quoted context omitted.

Sorry, I dont even understand your first sentence. "Imagine you have setup your SaaS to run from some containers". What is a container? What is a "Worker"? What do you mean with "queue"? Then you say "Package your new web app, Launch it for testing". I never package my web app. It just runs and runs and runs. And my customers use it. I develop it on another machine, and from time to time I push updates from the devel…

A worker is usually something that does background processing. For example a user uploads an image and you need to convert it to multiple sizes. You can either do this on your application server within the scope of the request, or set up a task queue. Here's an oversimplification of the latter: You have an application server, a queue (something like 0MQ, or redis) and one or multiple workers. When the image is posted…

> So how do you deploy a new version of your app?

I push the new version to the server.

Re: Docker interactive tutorial

#47
post #44
post #24

Earlier quoted context omitted.

Absolutely love docker, hope to see it mature even more :) I am currently playing around with it and building a messaging platform playground. One "pain" so far is that docker's IPAddress assignment is not very flexible. Will it be possible to assign IP addresses to containers (e.g. from "docker run")? Or have a better control what IPAddresses are used (like giving a network range on docker -d)? If i am not mistaken…

Currently using the unionize.sh script works very well for me. http://blog.docker.io/2013/04/unionize-network-superpowers-f... You have to run ./unionize after starting the container, but that brings up a new interface inside the container with that IP and connects it to the bridge. This is useful for having private IPs between containers of an application, for accessing databases or similar.

I was starting with unionize as well, but the fact is that docker looks up for available IP adresses on its own. So you can give docker -d the -b parameter and pass an existing bridge and it will go through that bridges IP space and assign IP adresses already. Also that way the IP address shows in "docker inspect" which it doesn't with unionize.sh (i think).

The problem here is that the built-in IP Address allocator is rather stupid and doesn't even try to ping an address before assigning it. I got it to interfere with my network heavily when it assigned my gateways IP Address to a container ;)

It'd be nice if the whole IP Address allocation was more pluggable or configurable. Right now it's some code deeply tied into the whole system (i think) and i fear i don't have the Go skills to change that myself :(

(for example, i think i would have been able to write a little bit of Go to assign IP Addresses the way i want to, if the system would be more pluggable)

Re: Docker interactive tutorial

#48
post #16

Earlier quoted context omitted.

So I'm used to configuring stuff by hand, and now I see a lot of buzz around docker, vagrant, chef, puppet, salt and they seem like glorified shell scripts. Am I missing something?

It's basically what you get when you start your deployment toolchain as simple shell scripts, then make them evolve, add features, and at some point, rewrite from scratch with a "real" programming language. I don't know if that matches your definition of "glorified" though :-)

I'm reading this python example (http://docs.docker.io/en/latest/examples/python_web_app/) and it's a wrapper for running bash scripts with arcane syntax layered on top.
Post reply on HN