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.

 

 

 

Clap


Ajeet Raina

My name is Ajeet Singh Raina and I am an author of this blogging site. I am a Docker Captain, ARM Innovator & Docker Bangalore Community Leader. I bagged 2 special awards last year(2019) : Firstly, “The Tip of Captain’s Hat Award” at Dockercon 2019, San Francisco and secondly, “2019 Docker Community Award“. I was overwhelmed to receive the first award in front of around 5000 audience.

31 Comments

Amy · 10th June 2016 at 12:49 pm

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!

Chrinstine · 10th June 2016 at 11:09 pm

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.

JonasYLavgle · 20th June 2016 at 1:15 am

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.

LiliLSaenger · 21st June 2016 at 10:57 pm

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?

TimmyFLiem · 27th June 2016 at 12:53 pm

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.

JanVMaloch · 28th June 2016 at 11:59 pm

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!

CasandraGPap · 13th July 2016 at 12:09 am

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.

SalNSprake · 17th July 2016 at 8:42 pm

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!

ChetOKumar · 23rd July 2016 at 8:47 pm

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.

LynnWEpstein · 24th July 2016 at 7:16 pm

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.

RubenCRouzer · 25th July 2016 at 7:05 am

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.

YongZHergert · 27th July 2016 at 2:54 pm

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!

LamarQEllrod · 28th July 2016 at 2:41 am

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.

    ajeetraina · 28th July 2016 at 7:51 am

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

ZelmaFMoro · 30th July 2016 at 9:28 pm

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!

HansIArntzen · 8th August 2016 at 10:46 pm

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

JericaGDural · 12th August 2016 at 5:16 am

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?

LucilaMChoen · 14th August 2016 at 6:02 am

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.

KeilaSSalehi · 17th August 2016 at 2:14 am

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

DanialQValot · 17th August 2016 at 7:00 am

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?

ToryPHession · 18th August 2016 at 12:57 pm

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

    ajeetraina · 18th August 2016 at 4:15 pm

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

ElvinXBogh · 1st September 2016 at 12:55 am

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!!

EdieVKorol · 9th September 2016 at 10:15 pm

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!

eebest8 · 30th September 2016 at 6:35 pm

“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?”

GaleUKnabe · 1st October 2016 at 3:26 am

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!

KeithWVeness · 13th October 2016 at 4:44 am

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

brain smart ultra · 23rd October 2016 at 3:49 pm

Say, you got a nice blog article. Want more.

Jack · 12th November 2016 at 2:41 pm

I couldn’t resist commenting. Exceptionally well written!

TonjaZNannen · 24th November 2016 at 7:20 am

Touche. Great arguments. Keep up the amazing spirit.

DevOpsLinks #11 Back To Basics, Use Docker To Capture All Traffic From Host & AWS Lambda Tutorials – DevOpsLinks · 7th August 2016 at 10:20 pm

[…] [Docker] Implementing Multi-Host Docker Networking with Docker-Datacenter (DDC) […]

Leave a Reply

Your e-mail address will not be published. Required fields are marked *