Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
173 views15 pages

Docker Integration & Network Management

This document discusses integrating Docker containers into a network simulation using GNS3. It provides tutorials on setting up a Nagios monitoring container, connecting it to a terminal container, and deploying an ELK stack for log aggregation and visualization. Using Docker and Docker Compose allows managing multiple containers together and automating configuration. Potential extensions include using Ansible for additional automation and customizing Logstash for advanced data extraction and visualization.

Uploaded by

Chaima Belhedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views15 pages

Docker Integration & Network Management

This document discusses integrating Docker containers into a network simulation using GNS3. It provides tutorials on setting up a Nagios monitoring container, connecting it to a terminal container, and deploying an ELK stack for log aggregation and visualization. Using Docker and Docker Compose allows managing multiple containers together and automating configuration. Potential extensions include using Ansible for additional automation and customizing Logstash for advanced data extraction and visualization.

Uploaded by

Chaima Belhedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

 

Subject: Network and Services Management 


 
Docker Integration tutorial 
 
 
---------------------------------------------------- 
Realized by: ​Mahmoud Ben Dabbabi 
  Amel Gannoun 
Supervised by: ​Mrs.Imene Elloumi 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2020 -- 2021 
Why choose to work with containers and not with virtual machines? 
 
There are several reasons for choosing containers instead of virtual machines, but the main 
reason is their rapid deployment. 

● Operating System​: The virtual machine has its guest operating system on top of the 
host operating system, which makes virtual machines heavier. In Docker, multiple 
containers share the host operating system, and that's why they're​ lightweight​. 
 
● Performance​: Containers are lightweight and consume much​ less RAM and CPU 
resources​ while virtual machines are heavy and consume more resources, so 
containers provide better performance than virtual machines. 
 
● Portability​: Containers are ​easily portable​ because they do not have separate 
operating systems. While virtual machines have a separate operating system, porting 
a virtual machine is very difficult. 
 
 
Useful docker commands to start with : 
 
The following commands are the first ones you need to know when using Docker. 
 
docker images (-a) : ​This command shows you the images you built, and the -a shows you 
the intermediate images 
 
 
 
 
docker ps (-a) :​ docker ps shows you all of the docker instances that are currently running 
in your environment. If you add the -a option, then you will even see the containers stopped 
 

 
 
 
 
 
 
docker network ls : ​The docker network ls command lists the different networks 
 

 
 
In this short section, we learned the very basics commands about docker. Along the way, 
we’ll learn a few other useful commands to build a container image and create a Dockerfile. 
 

 
Integrating Nagios container to GNS3 : 
 
In this part, we need to use a Dockerfile in order to build our docker container.  
A Dockerfile is simply a text-based script of instructions that is used to create a container 
image. 
 
1-Creating the Nagios container 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2-Creating a terminal container ( with some added dependencies ) 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3-Configure the terminal 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Monitoring the network infrastructure with ELK stack: 


 
We ‘ve connected the R5 router via the cloud through the interface "Docker0". Its 
configuration allows topology devices to communicate with the host. 

 
 

Enable logging to logstash host 

In order to configure the logging, we have to extract the docker0 address. So, we’ve 
proceed as shown:
We still have to configure the logging as follow:

logging trap debugging

logging source-interface GigabitEthernet0/2

logging host 127.17.0.1

Enable netflow 

ip flow-export destination 172.17.0.1 2055

ip flow-export version 9

interface ethernet G0/2

ip flow ingress

ip flow egress

Starting ELK stack 

To proceed, we have just to download the docker-compose file. Actually,  


the difference between Docker and Docker-compose is simple: Docker commands only 
affect one container (or image) at a time, while Docker-compose manages multiple Docker 
containers. 
 
 
Docker-compose File:

There is one important thing to remember when using indentation in a YAML file: 
indentation should be done with one or more spaces, but never with tabs.
PERSPECTIVES: 
 
● We may also use ansible playbooks in order to automate some repetitive 
configuration commands such as OSPF config … (this could be done by adding ansible 
dependencies to the ubuntu 16.04 container image )  
 
 
● Adjust logstash configuration to extract some advanced / custom insights and feed 
them to kibana for visualization .  
 
 

References : 
● https://gns3.com/community/blog/monitoring-network-infratsructur 
● Docker Commands Tutorial | Top 15 Docker Commands | Edureka 
● Docker support in GNS3 | GNS3 Documentation 

You might also like