Implementing Multi-Host Docker Networking with Docker-Datacenter (DDC)

In our previous post, we looked at detailed implementation of Docker-Datacenter-In-A-Box (Container-as-a-Service) on VMware ESXi platform. DDC pluggable architecture and open APIs allows flexibility in compute, networking and storage providers used in your CaaS infrastructure without disrupting the application code. Under this blog post, we will talk about Multi-host Docker networking. We will see  how overlay networking brings the capability of multi-host networking where the hundreds and thousands of containers can reach each other, even when they are running across different hosts machines and resolve each others DNS names, making service discovery a breeze to name a few.

A Quick brief about Overlay:

Docker’s overlay network driver supports multi-host networking natively out-of-the-box. This support is accomplished with the help of libnetwork, a built-in VXLAN-based overlay network driver, and Docker’s libkv library. Libnetwork provides a network overlay that can be used by your containers so that they appear on the same subnet. The huge bonus is that they can reach each other and resolve each other’s DNS names, making service discovery a breeze.

The overlay network requires a valid key-value store service. Currently, Docker’s libkv supports Consul, Etcd, and ZooKeeper (Distributed store). Before creating a network you must install and configure your chosen key-value store service. The Docker hosts that you intend to network and the service must be able to communicate.

If you have Docker Datacenter installed, it means you already have environment to play around the overlay networking.

Setting up Overlay Networking:

Machine #1: 10.94.214.195

Machine #2: 10.94.214.210

I assume that Docker-datacenter is properly configured and running in your setup. I have DDC Web UI running under Machine #1. Browse to Networks section and click on “Create Network” as shown below:

 

picture1

Suppose you have multiple teams in your floor like DB-team, OS-team, VMware-team and HPC-team and all you want is to create respective network for them. You have multiple Dockerhost running as your VM environment on VMware ESXi 6. Let’s go ahead and create a network “DB-network” for DB-team first:

picture-2

This is equivalent to the below command if you run on your UCP host:

#docker network create –driver overlay DB-network

P8

Ensure that Driver option chosen as “Overlay” and NOT bridge, none or null.Once you click on “Create Network”, it should succeed with the acknowledgment as shown below:

P3

We have overlay network setup for DB-team. Interestingly, due to Docker swarm and UCP integration, one can easily see this network from any of UCP client nodes. All you need is run the “docker network ls” utility to see the list of the networks.

Creating container in Overlay Network:

Click on Containers > Deploy Container section to create a container under DB-team overlay network.

P4

We choose “mysql” as image name which will be fetch automatically from the Dockerhub. I have named this new container as “db-mysql-new” for keeping it simple.

P5As we are going to put this newly create container under DB-network(overlay), I have specified hostname and required port(3306) and bind it to the Dockerhost accordingly.

 

P6

Though the above looks a minimal parameters to be considered to bring up the MySQL container but still it might throw warning if you miss out choosing the below parameters:

P7

It will take sometime to get this container running based on your network speed. Once done, it just shows up as shown below:

Pfinal

You can login to any one of Dockerhost machine in the cluster to see the details about this newly created container through docker network inspect utility. From Machine #2, the overlay network and containers running inside this container can be viewed very clearly as shown below:

P11

Let’s create mediawiki container under the same network as shown:

P22Once you deploy mediwiki container, it will show up under Container section as shown below:

 

P23

You can check under what UCP client node is this mediawiki running:

P25

P28

As shown above, this container is running under Machine #2. Fire up the IP to see the mediawiki default page:

P24

It’s just cool..the mediawiki page comes up magically.

P27

You can go ahead and configure Mediawiki to work with MySQL. If you want to use Docker compose, its more simple by clicking over “Compose the application” and it just work flawlessly.

In the forthcoming post, we will look at “Docker Volumes” from Docker-Datacenter (DDC) perspective.

 

 

 

31 thoughts on “Implementing Multi-Host Docker Networking with Docker-Datacenter (DDC)

  1. I really love your blog.. Great colors & theme. Did you make
    this site yourself? Please reply back as I’m looking to create my own personal website and would like to know
    where you got this from or just what the theme
    is named. Appreciate it!

  2. I will right away seize your rss as I can not in finding your
    email subscription hyperlink or newsletter service.
    Do you have any? Please permit me understand so that
    I may subscribe. Thanks.

  3. Excellent post. I used to be checking constantly this weblog and I’m impressed!
    Extremely helpful info specially the closing phase 🙂 I care for such information a lot.

    I was seeking this particular info to get a number of years.
    Thanks and best of luck.

  4. I was wondering if you ever looked at changing the structure of your respective site?
    Its well written; I like what youve reached say. But maybe you could a little more when it comes to content so people could get in touch with it better.
    Youve got an awful lot of text for just having 1 or two images.

    You could possibly could space it better?

  5. Hello i am kavin, its my first occasion to commenting
    anyplace, when i read this paragraph i thought i
    could also create comment due to this brilliant piece of
    writing.

  6. Hi! This is my first comment here so I just wanted to give a quick
    shout out and tell you I really enjoy reading your posts.
    Can you recommend any other blogs/websites/forums that deal with the same topics?
    Appreciate it!

  7. It’s really a great and useful component of
    information. I am satisfied that you just shared this useful information with us.
    Please stay us updated like this. Thanks for sharing.

  8. Wow that was unusual. I just wrote an incredibly long comment but after I clicked
    submit my comment didn’t show up. Grrrr… well I’m not writing
    all that over again. Regardless, just wanted to say fantastic
    blog!

  9. Helpful information. Fortunate me I found your
    web site by chance, and I am surprised why this twist
    of fate didn’t came about earlier! I bookmarked it.

  10. Hmm it seems just like your blog ate my first comment (it was actually
    super long) therefore i guess I’ll just sum it the things i wrote and say, I’m thoroughly enjoying your site.
    I too am an aspiring blog blogger but I’m still unfamiliar with everything.

    Do you possess any helpful hints for inexperienced blog writers?
    I’d really appreciate it.

  11. Hi it’s me, I am also visiting this web site on a regular basis,
    this site is really good and the viewers are really sharing fastidious
    thoughts.

  12. Greetings from California! I’m bored at the job so I chosen to take a
    look at your site on my own iphone during lunch break.
    I enjoy the info you provide here and can’t wait to have a look once i get home.
    I’m surprised at how fast your blog loaded on my small cell phone ..
    I’m not really using WIFI, just 3G .. Anyways, great site!

  13. Thanks for some other excellent article. The place else may just anybody get that type of information in such a perfect way of writing?
    I’ve a presentation next week, and I am at the search for such information.

    1. Great to hear this. Good that the article is helping you in your presentation.

  14. Have you ever thought about including a little more than simply your posts?
    I mean, what you say is important and everything.
    But think about should you added some terrific images or videos to provide your site content more,
    “pop”! Your articles is extremely good although
    with images and clips, this blog could definitely be among the greatest in the field.
    Fantastic blog!

  15. Thank you a lot for sharing this with all people you really
    realize what you’re speaking approximately! Bookmarked.

    Please also talk over with my site =). We could have a
    hyperlink change arrangement between us

  16. Write more, thats all We have to express. Literally, it appears to be just like you used
    the recording to create your point. You obviously understand what youre talking about,
    why waste your intelligence on just posting videos in your weblog when you could be giving
    us something informative to learn?

  17. I do trust every one of the ideas you’ve introduced in your post.
    These are very convincing and may certainly work. Nonetheless, the posts are very quick
    for beginners. Could you please lengthen them a little from
    subsequent time? Many thanks for your post.

  18. Fantastic beat ! I desire to apprentice while you amend your site, how can i subscribe for
    any blog site? The account aided us a acceptable deal.

    I was tiny bit acquainted of this your broadcast offered bright clear concept

  19. Hello there! Do you know if they make any plugins to safeguard against
    hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?

  20. Neat blog! Can be your theme customized or did you download it from somewhere?
    A theme like yours with just a few simple adjustements would actually make my blog jump out.

    Please inform me where you got your design. Bless you

    1. Thanks for liking the layout. Its Refur theme from WordPress.

  21. Oh my goodness! Impressive article dude! Thanks a lot, However I am just having troubles with your RSS.
    I don’t know the reason why I am just not able to join it.

    Is there anybody else having the identical RSS issues?

    Anyone who knows the perfect solution will you kindly respond?
    Thanks!!

  22. wonderful submit, very informative. I’m wondering why the other specialists with
    this sector don’t realize this. You must continue your writing.
    I’m sure, you have an enormous readers’ base already!

  23. “Wow! Thank you! I always needed to write on my site something like that. Can I include a portion of your post to my blog?”

  24. Hi there! I’m at work surfing around your blog from my new iphone 4!

    Just wanted to say I love reading your blog and look forward to
    all your posts! Keep up the outstanding work!

  25. Great information. Lucky me I came across your web site accidentally (stumbleupon).
    We have book marked it for later!

  26. I couldn’t resist commenting. Exceptionally well written!

  27. Touche. Great arguments. Keep up the amazing spirit.

Leave a Reply

Your email address will not be published. Required fields are marked *