From 477a22e016da736ac7fb49b147cfcf44ba846f04 Mon Sep 17 00:00:00 2001 From: adosztal Date: Tue, 27 Jun 2017 19:16:10 +0200 Subject: [PATCH 1/7] Added Network Automation container --- docker/network_automation/Dockerfile | 13 +++++++++++++ docker/network_automation/README.md | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 docker/network_automation/Dockerfile create mode 100644 docker/network_automation/README.md diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile new file mode 100644 index 0000000..c7849e1 --- /dev/null +++ b/docker/network_automation/Dockerfile @@ -0,0 +1,13 @@ +# docker base image for Netmiko, NAPALM, Pyntc, and Ansible + +FROM ubuntu:xenial + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends install \ + telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-de \ + python-pip ansible \ + && rm -rf /var/lib/apt/lists/* \ + && pip install cryptography netmiko napalm pyntc + +VOLUME [ "/root" ] +CMD [ "sh", "-c", "cd; exec bash -i" ] + diff --git a/docker/network_automation/README.md b/docker/network_automation/README.md new file mode 100644 index 0000000..756b58e --- /dev/null +++ b/docker/network_automation/README.md @@ -0,0 +1,19 @@ +# Ubuntu - Network Automation Toolbox + +This appliance contains the following network automation tools: + +- Netmiko +- NAPALM +- Pyntc +- Ansible + +The /root folder is mount by default + +## Build and publish the Images + +First the base image has to be created: + +``` +docker build -t gns3/network_autmation:latest . +docker push gns3/network_autmation:latest (optional) +``` From e7a1f2d398a9029879bb2120f7af6cf0e8932da6 Mon Sep 17 00:00:00 2001 From: adosztal Date: Tue, 27 Jun 2017 19:25:27 +0200 Subject: [PATCH 2/7] Fixed type --- docker/network_automation/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile index c7849e1..546133f 100644 --- a/docker/network_automation/Dockerfile +++ b/docker/network_automation/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:xenial RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends install \ - telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-de \ + telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-dev \ python-pip ansible \ && rm -rf /var/lib/apt/lists/* \ && pip install cryptography netmiko napalm pyntc From 319baa888e740f6fb0d5b9d19c224c79bd43945f Mon Sep 17 00:00:00 2001 From: adosztal Date: Tue, 27 Jun 2017 19:30:14 +0200 Subject: [PATCH 3/7] Added pip upgrade to Network Automation --- docker/network_automation/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile index 546133f..c534efd 100644 --- a/docker/network_automation/Dockerfile +++ b/docker/network_automation/Dockerfile @@ -6,6 +6,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-rec telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-dev \ python-pip ansible \ && rm -rf /var/lib/apt/lists/* \ + && pip install --upgrade pip \ && pip install cryptography netmiko napalm pyntc VOLUME [ "/root" ] From c12fb107e93dff4a128060e4d0f8f3d23356a225 Mon Sep 17 00:00:00 2001 From: adosztal Date: Tue, 27 Jun 2017 19:35:00 +0200 Subject: [PATCH 4/7] Added python_setuptools to Network Automation --- docker/network_automation/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile index c534efd..6c44ca5 100644 --- a/docker/network_automation/Dockerfile +++ b/docker/network_automation/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:xenial RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends install \ telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-dev \ - python-pip ansible \ + python-pip python-setuptools ansible \ && rm -rf /var/lib/apt/lists/* \ && pip install --upgrade pip \ && pip install cryptography netmiko napalm pyntc From 564a73241ffe300860300fd950d268ed59e41fd7 Mon Sep 17 00:00:00 2001 From: adosztal Date: Tue, 27 Jun 2017 19:42:02 +0200 Subject: [PATCH 5/7] Added python-dev to Network Automation --- docker/network_automation/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile index 6c44ca5..7640c87 100644 --- a/docker/network_automation/Dockerfile +++ b/docker/network_automation/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:xenial RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends install \ telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-dev \ - python-pip python-setuptools ansible \ + python-pip python-setuptools python-dev ansible \ && rm -rf /var/lib/apt/lists/* \ && pip install --upgrade pip \ && pip install cryptography netmiko napalm pyntc From 557ec8509c3fe14f48e0d708457568aceb68d9f3 Mon Sep 17 00:00:00 2001 From: adosztal Date: Tue, 27 Jun 2017 20:11:48 +0200 Subject: [PATCH 6/7] Finalized Network Automation Dockerfile, added template --- appliances/network_automation.gns3a | 18 ++++++++++++++++++ docker/network_automation/Dockerfile | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 appliances/network_automation.gns3a diff --git a/appliances/network_automation.gns3a b/appliances/network_automation.gns3a new file mode 100644 index 0000000..5481604 --- /dev/null +++ b/appliances/network_automation.gns3a @@ -0,0 +1,18 @@ +{ + "name": "Network Automation", + "category": "guest", + "description": "This container provides the popular tools used for network automation: Netmiko, NAPALM, Pyntc, and Ansible.", + "vendor_name": "GNS3", + "vendor_url": "http://www.gns3.com", + "product_name": "Network Automation", + "registry_version": 3, + "status": "stable", + "maintainer": "GNS3 Team", + "maintainer_email": "developers@gns3.net", + "symbol": "linux_guest.svg", + "docker": { + "adapters": 1, + "image": "gns3/network_automation:latest", + "console_type": "telnet" + } +} diff --git a/docker/network_automation/Dockerfile b/docker/network_automation/Dockerfile index 7640c87..8b10775 100644 --- a/docker/network_automation/Dockerfile +++ b/docker/network_automation/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:xenial RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-recommends install \ telnet curl openssh-client nano vim-tiny iputils-ping python build-essential libssl-dev libffi-dev \ - python-pip python-setuptools python-dev ansible \ + python-pip python-setuptools python-dev net-tools ansible \ && rm -rf /var/lib/apt/lists/* \ && pip install --upgrade pip \ && pip install cryptography netmiko napalm pyntc From 56040b7ff10b42297b485db76b53c55bd442e599 Mon Sep 17 00:00:00 2001 From: adosztal Date: Wed, 28 Jun 2017 08:26:21 +0200 Subject: [PATCH 7/7] Fixed typo --- docker/network_automation/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/network_automation/README.md b/docker/network_automation/README.md index 756b58e..1b3f75a 100644 --- a/docker/network_automation/README.md +++ b/docker/network_automation/README.md @@ -14,6 +14,6 @@ The /root folder is mount by default First the base image has to be created: ``` -docker build -t gns3/network_autmation:latest . -docker push gns3/network_autmation:latest (optional) +docker build -t gns3/network_automation:latest . +docker push gns3/network_automation:latest (optional) ```