{"id":514,"date":"2020-07-27T19:06:52","date_gmt":"2020-07-27T18:06:52","guid":{"rendered":"https:\/\/zed-network.fr\/?p=514"},"modified":"2020-08-24T18:53:35","modified_gmt":"2020-08-24T17:53:35","slug":"cisco-aci-container","status":"publish","type":"post","link":"https:\/\/zed-network.fr\/?p=514","title":{"rendered":"Start a new DevOps journey with Docker and automate ACI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you want to test the automation with Cisco ACI, you can use the following container.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">docker pull zednetwork\/aci-dev:latest\n\nroot@docker1:~\/aci-dev# docker images zednetwork\/aci-dev\nREPOSITORY           TAG                 IMAGE ID            CREATED             SIZE\nzednetwork\/aci-dev   latest              b1c09a7c66f0        About an hour ago   1.31GB\n\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I preinstalled Ansible 2.9.11, the ACI SDK (COBRA) in version 4.2(4) and ARYA.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can run directly the container with the command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">docker run -it &lt;Image ID&gt; bash<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or start it with docker-compose command : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker-compose up -d <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Docker-compose file :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">---\nversion: \"3\"\n\nservices:\n  aci-dev:\n    image: zednetwork\/aci-dev:latest\n    stdin_open: true\n\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and connect to the container :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@docker1:~\/aci-dev# docker-compose ps\n      Name          Command   State   Ports\n-------------------------------------------\naci-dev_aci-dev_1   bash      Up\n\nroot@docker1:~\/aci-dev# docker exec -it  aci-dev_aci-dev_1 bash\n\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Packages version<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@3a93719ed29b:~# ansible --version\n\/usr\/local\/lib\/python2.7\/dist-packages\/cryptography\/__init__.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.\n  CryptographyDeprecationWarning,\nansible 2.9.11\n  config file = None\n  configured module search path = [u'\/root\/.ansible\/plugins\/modules', u'\/usr\/share\/ansible\/plugins\/modules']\n  ansible python module location = \/usr\/local\/lib\/python2.7\/dist-packages\/ansible\n  executable location = \/usr\/local\/bin\/ansible\n  python version = 2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0]\nroot@3a93719ed29b:~# pip list\nPackage      Version\n------------ ---------\nacicobra     4.2-4i\nacimodel     4.2-4i\nansible      2.9.11\narya         1.1.5\ncertifi      2020.6.20\ncffi         1.14.1\nchardet      3.0.4\ncryptography 3.0\nenum34       1.1.10\net-xmlfile   1.0.1\nfuture       0.18.2\nidna         2.10\nipaddress    1.0.23\njdcal        1.4.1\nJinja2       2.11.2\nMarkupSafe   1.1.1\nopenpyxl     2.6.4\npip          18.1\nply          3.11\nprettytable  0.7.2\npyaml        20.4.0\npycparser    2.20\nPyYAML       5.3.1\nrequests     2.24.0\nsetuptools   44.1.1\nsix          1.15.0\nurllib3      1.25.10\n\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then you can copy and paste one script and runs it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example with the script (<a href=\"https:\/\/zed-network.fr\/?p=511\">https:\/\/zed-network.fr\/?p=511<\/a>)  :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@40a189762958:~\/cobra# pwd\n\/root\/cobra\n\nroot@40a189762958:~\/cobra# ls\ngetEP.py\n\nroot@40a189762958:~\/cobra# python getEP.py\nMAC: FA:16:3E:9A:35:B7 | IP: 10.0.0.1 | Encaps: vlan-489\nMAC: FA:16:3E:BB:B4:BE | IP: 42.0.0.1 | Encaps: vlan-488\n[..]\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you want to test the automation with Cisco ACI, you can use the following container. docker pull zednetwork\/aci-dev:latest root@docker1:~\/aci-dev# docker images zednetwork\/aci-dev REPOSITORY TAG IMAGE ID CREATED SIZE zednetwork\/aci-dev latest b1c09a7c66f0 About an hour ago 1.31GB I preinstalled Ansible 2.9.11, the ACI SDK (COBRA) in version 4.2(4) and ARYA. You can run directly the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[24,30,28,27,4],"tags":[],"class_list":["post-514","post","type-post","status-publish","format-standard","hentry","category-aci","category-aci-automation","category-ansible","category-automation","category-cisco"],"_links":{"self":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=514"}],"version-history":[{"count":5,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions\/537"}],"wp:attachment":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}