10-25-2019 01:08 PM
I am going through the Getting Hands On with Ansible lab and running into an issue trying to perform the initial steps to install ansible 2.2 and clone sample code from git. If this access is no longer allowed is there a workaround?
(venv) [root@devbox ~]# pip install ansible==2.2
Collecting ansible==2.2
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f6225087b38>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/ansible/
Could not find a version that satisfies the requirement ansible==2.2 (from versions: )
No matching distribution found for ansible==2.2
(venv) [root@devbox ~]#
(venv) [root@devbox ~]# git clone https://github.com/DevNetSandbox/sbx_nxos
Cloning into 'sbx_nxos'...
fatal: unable to access 'https://github.com/DevNetSandbox/sbx_nxos/': Could not resolve host: github.com; Unknown error
(venv) [root@devbox ~]#
Thanks
Solved! Go to Solution.
10-26-2019 06:37 AM
Hi Bill, I am sorry to hear you are having an issue with this lab, allow me to help. The sandbox's had a security posture change a few months back, as such tools and repo's were preinstalled. Once you have entered the virtual environment, you can check the installed Ansible
(venv) [developer@devbox ~]$pip freeze | grep ansible ansible==2.6.2 (venv) [developer@devbox ~]$which ansible ~/venv/bin/ansible (venv) [developer@devbox ~]$which ansible-playbook ~/venv/bin/ansible-playbook (venv) [developer@devbox ~]$
From here, now change your directory to code/sbx_nxos
(venv) [developer@devbox ~]$cd code/sbx_nxos/ (venv) [developer@devbox sbx_nxos]$pwd /home/developer/code/sbx_nxos
From here you can access the learning labs
(venv) [developer@devbox sbx_nxos]$cd learning_labs/ (venv) [developer@devbox learning_labs]$ls LM-1451 intro-ansible LM-5601 intro-nxos poap README.md telemetry yang
Bonus tip! Check to see if your switches are online
(venv) [developer@devbox learning_labs]$cd .
(venv) [developer@devbox sbx_nxos]$pwd
/home/developer/code/sbx_nxos
(venv) [developer@devbox learning_labs]$virl ls --all Running Simulations ╒══════════════╤══════════╤════════════════════════════╤═══════════╕ │ Simulation │ Status │ Launched │ Expires │ ╞══════════════╪══════════╪════════════════════════════╪═══════════╡ │ ~jumphost │ ACTIVE │ 2018-08-02T19:21:08.764190 │ │ ╘══════════════╧══════════╧════════════════════════════╧═══════════╛
You will a file 'topology.virl' here, you need to `virl up` from this folder
(venv) [developer@devbox sbx_nxos]$virl up Creating default environment from topology.virl (venv) [developer@devbox sbx_nxos]$virl nodes Here is a list of all the running nodes ╒══════════════╤═════════════╤══════════╤═════════════╤════════════╤══════════════════════╤════════════════════╕ │ Node │ Type │ State │ Reachable │ Protocol │ Management Address │ External Address │ ╞══════════════╪═════════════╪══════════╪═════════════╪════════════╪══════════════════════╪════════════════════╡ │ nx-osv9000-1 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ├──────────────┼─────────────┼──────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-2 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ├──────────────┼─────────────┼──────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-3 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ├──────────────┼─────────────┼──────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-4 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ╘══════════════╧═════════════╧══════════╧═════════════╧════════════╧══════════════════════╧════════════════════╛
Warning, this can take a little time! Pro tip: Coffee time! When this is ready, all nodes will say 'reachable' you can ping these. You can also ssh and console into the Nexus.
(venv) [developer@devbox sbx_nxos]$virl nodes Here is a list of all the running nodes ╒══════════════╤═════════════╤═════════╤═════════════╤════════════╤══════════════════════╤════════════════════╕ │ Node │ Type │ State │ Reachable │ Protocol │ Management Address │ External Address │ ╞══════════════╪═════════════╪═════════╪═════════════╪════════════╪══════════════════════╪════════════════════╡ │ nx-osv9000-1 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.101 │ N/A │ ├──────────────┼─────────────┼─────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-2 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.102 │ N/A │ ├──────────────┼─────────────┼─────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-3 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.103 │ N/A │ ├──────────────┼─────────────┼─────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-4 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.104 │ N/A │ ╘══════════════╧═════════════╧═════════╧═════════════╧════════════╧══════════════════════╧════════════════════╛ (venv) [developer@devbox sbx_nxos]$ (venv) [developer@devbox sbx_nxos]$ping 172.16.30.101 PING 172.16.30.101 (172.16.30.101) 56(84) bytes of data. 64 bytes from 172.16.30.101: icmp_seq=1 ttl=254 time=1.91 ms 64 bytes from 172.16.30.101: icmp_seq=2 ttl=254 time=1.72 ms ^C --- 172.16.30.101 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 1.722/1.818/1.915/0.105 ms (venv) [developer@devbox sbx_nxos]
(venv) [developer@devbox sbx_nxos]$virl ssh nx-osv9000-1
Attemping ssh connectionto nx-osv9000-1 at 172.16.30.101
Warning: Permanently added '172.16.30.101' (RSA) to the list of known hosts.
User Access Verification
Password:
Aborted!
(venv) [developer@devbox sbx_nxos]$virl console nx-osv9000-1 Attempting to connect to console of nx-osv9000-1 Trying 10.10.20.160... Connected to 10.10.20.160. Escape character is '^]'. nx-osv9000-1#
Hope this helps! :)
10-26-2019 06:37 AM
Hi Bill, I am sorry to hear you are having an issue with this lab, allow me to help. The sandbox's had a security posture change a few months back, as such tools and repo's were preinstalled. Once you have entered the virtual environment, you can check the installed Ansible
(venv) [developer@devbox ~]$pip freeze | grep ansible ansible==2.6.2 (venv) [developer@devbox ~]$which ansible ~/venv/bin/ansible (venv) [developer@devbox ~]$which ansible-playbook ~/venv/bin/ansible-playbook (venv) [developer@devbox ~]$
From here, now change your directory to code/sbx_nxos
(venv) [developer@devbox ~]$cd code/sbx_nxos/ (venv) [developer@devbox sbx_nxos]$pwd /home/developer/code/sbx_nxos
From here you can access the learning labs
(venv) [developer@devbox sbx_nxos]$cd learning_labs/ (venv) [developer@devbox learning_labs]$ls LM-1451 intro-ansible LM-5601 intro-nxos poap README.md telemetry yang
Bonus tip! Check to see if your switches are online
(venv) [developer@devbox learning_labs]$cd .
(venv) [developer@devbox sbx_nxos]$pwd
/home/developer/code/sbx_nxos
(venv) [developer@devbox learning_labs]$virl ls --all Running Simulations ╒══════════════╤══════════╤════════════════════════════╤═══════════╕ │ Simulation │ Status │ Launched │ Expires │ ╞══════════════╪══════════╪════════════════════════════╪═══════════╡ │ ~jumphost │ ACTIVE │ 2018-08-02T19:21:08.764190 │ │ ╘══════════════╧══════════╧════════════════════════════╧═══════════╛
You will a file 'topology.virl' here, you need to `virl up` from this folder
(venv) [developer@devbox sbx_nxos]$virl up Creating default environment from topology.virl (venv) [developer@devbox sbx_nxos]$virl nodes Here is a list of all the running nodes ╒══════════════╤═════════════╤══════════╤═════════════╤════════════╤══════════════════════╤════════════════════╕ │ Node │ Type │ State │ Reachable │ Protocol │ Management Address │ External Address │ ╞══════════════╪═════════════╪══════════╪═════════════╪════════════╪══════════════════════╪════════════════════╡ │ nx-osv9000-1 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ├──────────────┼─────────────┼──────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-2 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ├──────────────┼─────────────┼──────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-3 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ├──────────────┼─────────────┼──────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-4 │ NX-OSv 9000 │ BUILDING │ N/A │ N/A │ N/A │ N/A │ ╘══════════════╧═════════════╧══════════╧═════════════╧════════════╧══════════════════════╧════════════════════╛
Warning, this can take a little time! Pro tip: Coffee time! When this is ready, all nodes will say 'reachable' you can ping these. You can also ssh and console into the Nexus.
(venv) [developer@devbox sbx_nxos]$virl nodes Here is a list of all the running nodes ╒══════════════╤═════════════╤═════════╤═════════════╤════════════╤══════════════════════╤════════════════════╕ │ Node │ Type │ State │ Reachable │ Protocol │ Management Address │ External Address │ ╞══════════════╪═════════════╪═════════╪═════════════╪════════════╪══════════════════════╪════════════════════╡ │ nx-osv9000-1 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.101 │ N/A │ ├──────────────┼─────────────┼─────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-2 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.102 │ N/A │ ├──────────────┼─────────────┼─────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-3 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.103 │ N/A │ ├──────────────┼─────────────┼─────────┼─────────────┼────────────┼──────────────────────┼────────────────────┤ │ nx-osv9000-4 │ NX-OSv 9000 │ ACTIVE │ REACHABLE │ telnet │ 172.16.30.104 │ N/A │ ╘══════════════╧═════════════╧═════════╧═════════════╧════════════╧══════════════════════╧════════════════════╛ (venv) [developer@devbox sbx_nxos]$ (venv) [developer@devbox sbx_nxos]$ping 172.16.30.101 PING 172.16.30.101 (172.16.30.101) 56(84) bytes of data. 64 bytes from 172.16.30.101: icmp_seq=1 ttl=254 time=1.91 ms 64 bytes from 172.16.30.101: icmp_seq=2 ttl=254 time=1.72 ms ^C --- 172.16.30.101 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 1.722/1.818/1.915/0.105 ms (venv) [developer@devbox sbx_nxos]
(venv) [developer@devbox sbx_nxos]$virl ssh nx-osv9000-1
Attemping ssh connectionto nx-osv9000-1 at 172.16.30.101
Warning: Permanently added '172.16.30.101' (RSA) to the list of known hosts.
User Access Verification
Password:
Aborted!
(venv) [developer@devbox sbx_nxos]$virl console nx-osv9000-1 Attempting to connect to console of nx-osv9000-1 Trying 10.10.20.160... Connected to 10.10.20.160. Escape character is '^]'. nx-osv9000-1#
Hope this helps! :)
10-28-2019 07:54 AM
Thanks that has me moving along again! The lab is having me log in as root so once I switched users to developer I was able to follow the process you outlined.
(venv) [root@devbox ~]
(venv) [root@devbox ~]# su - developer
[developer@devbox ~]$
Thanks again for the help!
01-21-2020 08:32 PM
01-24-2020 07:39 AM
It looks like you are having the same issue as Bill did (above post) change from root to user developer. HTH
(venv) [root@devbox ~] (venv) [root@devbox ~]# su - developer [developer@devbox ~]$
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide