Sign inSign up

cldeluna/bionic-immigrant

By cldeluna

Updated over 6 years ago

Bionic Immigrant (Ubuntu 18.04 LTS Bionic Beaver) and Ansible 2.9 Immigrant Song *

Image
0

381

cldeluna/bionic-immigrant repository overview

NetDevOps

2019-12-22 [email protected]

Ubuntu Bionic Beaver 18.04 LTS and Ansible 2.9 "Immigrant Song" Dockerfile*

* if you are not sure which image to use, go with this one, Bionic Immigrant! It's the most mature, based on Ubuntu Long Term Support (LTS), supports the automated Documentation examples you may have seen, and includes the Batfish client, Batfish Ansible module/role, and Ansible Network Engine role. It is also the image that will run all of my shared repositories.

Docker Icon

cldeluna/bionic-immigrant image


Purpose built Ansible image starting with Ubuntu:18.04 Long Term Support (LTS) Bionic Beaver base and including:

  • Python 2.7 (Legacy)
  • Python 3.6 and IPython
  • ansible 2.9.2
  • git
  • tree
  • nano
  • wget
  • vim
  • traceroute
  • iputils-ping
  • snmp
  • snmp-mibs-downloader
  • yaml
  • jinja2
  • httplib

Python Modules:

  • argparse
  • requests
  • nornir
  • textfms (on Python2 and Python3)
  • openpyxl
  • ciscoconfparse
  • netmiko
  • pandas
  • PyYAML
  • pyang
  • Pillow
  • pysnmp
  • ncclient
  • xlrd
  • virtualenv
  • batfish
  • genie
  • pyats

Repositories:

Ansible Galaxy Roles

  • Batfish
  • Network Engine

Getting Started with the Docker Container (the running version of this Docker image)

A few tips to get you started quickly with the Docker container.

Using Docker Cheatsheet

Build

Claudias-iMac:bionic-immigrant claudia$ tree
.
├── AboutDocker.png
├── About_iMac.png
├── Dockerfile
└── README.md

0 directories, 4 files
Claudias-iMac:bionic-immigrant claudia$ docker build -t cldeluna/bionic-immigrant .

Run

Run interactively

Claudias-iMac:bionic-immigrant claudia$ docker run -it cldeluna/bionic-immigrant

Run interactively and map a local directory /Users/claudia/Documents/docker_volume to the /ansible directory in the container.

Claudias-iMac:bionic-immigrant claudia$ docker run -v  /Users/claudia/Documents/docker_volume:/ansible -it cldeluna/bionic-immigrant

Check versions and modules in container

Claudias-iMac:bionic-immigrant claudia$
Claudias-iMac:bionic-immigrant claudia$ docker run -it cldeluna/bionic-immigrant
root@110e1cf9a2bd:/ansible_local# python --version
Python 2.7.17
root@110e1cf9a2bd:/ansible_local# python3 --version
Python 3.6.9
root@110e1cf9a2bd:/ansible_local# ansible --version
ansible 2.9.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17 (default, Nov  7 2019, 10:07:09) [GCC 7.4.0]
root@110e1cf9a2bd:/ansible_local# pip3 freeze
aiohttp==3.6.2
arrow==0.15.4
asn1crypto==0.24.0
async-timeout==3.0.1
attrs==19.3.0
backcall==0.1.0
backports.ssl==0.0.9
bcrypt==3.1.7
bidict==0.18.3
binaryornot==0.4.4
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
ciscoconfparse==1.4.11
Click==7.0
colorama==0.4.3
ConfigArgParse==0.15.2
cookiecutter==1.7.0
cryptography==2.8
dataclasses==0.7
decorator==4.4.1
deepdiff==4.0.9
Deprecated==1.2.7
dill==0.3.1.1
distro==1.4.0
dnspython==1.16.0
et-xmlfile==1.0.1
future==0.18.2
genie==19.12
genie.abstract==19.12
genie.conf==19.12
genie.harness==19.12
genie.libs.conf==19.12
genie.libs.filetransferutils==19.12
genie.libs.ops==19.12
genie.libs.parser==19.12
genie.libs.robot==19.12
genie.libs.sdk==19.12
genie.libs.telemetry==19.12
genie.metaparser==19.12
genie.ops==19.12
genie.parsergen==19.12
genie.predcore==19.12
genie.telemetry==19.12
genie.trafficgen==19.12
genie.utils==19.12
httplib2==0.9.2
idna==2.6
idna-ssl==1.1.0
ipaddress==1.0.23
ipython==7.10.2
ipython-genutils==0.2.0
IxNetwork==9.0.1915.16
jdcal==1.4.1
jedi==0.15.2
Jinja2==2.10
jinja2-time==0.2.0
jsonpickle==1.2
junit-xml==1.8
junos-eznc==2.3.1
keyring==10.6.0
keyrings.alt==3.0
lxml==4.4.2
MarkupSafe==1.0
multidict==4.7.2
mypy-extensions==0.4.3
napalm==2.5.0
ncclient==0.6.7
netaddr==0.7.19
netconan==0.11.0
netmiko==2.4.2
nornir==2.3.0
numpy==1.18.0
nxapi-plumbing==0.5.2
openpyxl==3.0.2
ordered-set==3.1.1
pandas==0.25.3
paramiko==2.7.1
parso==0.5.2
passlib==1.7.2
pathspec==0.7.0
pexpect==4.7.0
pickleshare==0.7.5
Pillow==6.2.1
ply==3.11
poyo==0.5.0
prettytable==0.7.2
prompt-toolkit==3.0.2
psutil==5.6.7
ptyprocess==0.6.0
pyang==2.1
pyasn1==0.4.8
pyats==19.12
pyats.aereport==19.12
pyats.aetest==19.12
pyats.async==19.12
pyats.connections==19.12
pyats.datastructures==19.12
pyats.easypy==19.12
pyats.kleenex==19.12
pyats.log==19.12
pyats.reporter==19.12
pyats.results==19.12
pyats.robot==19.12
pyats.tcl==19.12
pyats.topology==19.12
pyats.utils==19.12
pybatfish==0.36.0
pycparser==2.19
pycrypto==2.6.1
pycryptodomex==3.9.4
pydantic==0.18.2
pyeapi==0.8.2
Pygments==2.5.2
pygobject==3.26.1
pyIOSXR==0.53
PyNaCl==1.3.0
pyOpenSSL==19.1.0
pyparsing==2.4.6
pyserial==3.4
pysmi==0.3.4
pysnmp==4.4.12
python-apt==1.6.4
python-dateutil==2.8.1
pytz==2019.3
pyxdg==0.25
PyYAML==3.12
regex==2019.6.8
requests==2.22.0
requests-toolbelt==0.9.1
robotframework==3.1.2
ruamel.yaml==0.15.100
scp==0.13.2
SecretStorage==2.3.1
simplejson==3.17.0
six==1.11.0
textfsm==1.1.0
tqdm==4.41.0
traitlets==4.3.3
transitions==0.7.1
typing-extensions==3.7.4.1
unattended-upgrades==0.1
unicon==19.12
unicon.plugins==19.12.1
urllib3==1.25.7
virtualenv==16.7.9
wcwidth==0.1.7
websocket-client==0.57.0
whichcraft==0.6.1
wrapt==1.11.2
xlrd==1.2.0
XlsxWriter==1.2.7
xlwt==1.3.0
xmltodict==0.12.0
yamllint==1.20.0
yamlordereddictloader==0.4.0
yarl==1.4.2
root@110e1cf9a2bd:/ansible_local# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=37 time=11.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=37 time=10.3 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=37 time=9.65 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 9.652/10.357/11.044/0.580 ms
root@110e1cf9a2bd:/ansible_local# ls
ansible2_4_base  cisco_aci  cisco_ios
root@110e1cf9a2bd:/ansible_local# cd cisco_ios
root@110e1cf9a2bd:/ansible_local/cisco_ios# git pull
Already up to date.
root@110e1cf9a2bd:/ansible_local/cisco_ios# ls
ansible.cfg          ios_facts_lab.yml         ios_show_lab_brief.yml
filter_plugins       ios_facts_report.yml      logs
get_vrfs.yml         ios_show_cmdlist.yml      parsers
group_vars           ios_show_cmdlist_zip.yml  templates
hosts                ios_show_lab.yml
ios_all_vrf_arp.yml  ios_show_lab25.yml
root@110e1cf9a2bd:/ansible_local/cisco_ios# ansible-playbook -i hosts ios_show_lab_brief.yml

PLAY [Pull show commands form Cisco IOS_XE Always On Sandbox device] ***********

TASK [Iterate over show commands] **********************************************
ok: [ios-xe-mgmt.cisco.com] => (item=show run)
ok: [ios-xe-mgmt.cisco.com] => (item=show version)
ok: [ios-xe-mgmt.cisco.com] => (item=show inventory)
ok: [ios-xe-mgmt.cisco.com] => (item=show ip int br)
ok: [ios-xe-mgmt.cisco.com] => (item=show ip route)

TASK [debug] *******************************************************************
<...> remaining output omitted for brevity

PLAY RECAP *********************************************************************
ios-xe-mgmt.cisco.com      : ok=5    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

root@110e1cf9a2bd:/ansible_local/cisco_ios# ls ./logs/*
./logs/ios-xe-mgmt.cisco.com-config.txt
./logs/ios-xe-mgmt.cisco.com-raw-output.txt
./logs/ios-xe-mgmt.cisco.com-readable-show-output.txt
./logs/output_directory
root@110e1cf9a2bd:/ansible_local/cisco_ios# exit
exit
Claudias-iMac:bionic-immigrant claudia$
Claudias-iMac:bionic-immigrant claudia$

Docker Hub

Download Docker Image bionic-immigrant from Docker Hub and get started with Ansible and python!

Commands to build container and upload to Docker Hub.

Claudias-iMac:bionic-immigrant claudia$ docker login
Claudias-iMac:bionic-immigrant claudia$ build cldeluna/bionic-immigrant:latest .
Claudias-iMac:bionic-immigrant claudia$ docker push cldeluna/bionic-immigrant:latest

GitHub Repository

GitHub Repository

Tag summary

Content type

Image

Digest

Size

763.8 MB

Last updated

over 6 years ago

docker pull cldeluna/bionic-immigrant