cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1854
Views
0
Helpful
4
Replies

Issue with Open NX-OS with Nexus 9Kv sandbox

bill.smith
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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! :)

 

 

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

4 Replies 4

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! :)

 

 

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

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!

yangcharlie
Level 1
Level 1
Hello,

I am seeing this issue as well.same issue as above.

follow the solution, not able to see Ansible
no code/sbx_nxos/

(venv) [root@devbox ~]# pip freeze | grep ansible (no output)
(venv) [root@devbox ~]# which ansible
/usr/bin/ansible
(venv) [root@devbox ~]# cd code/sbx_nxos/
-bash: cd: code/sbx_nxos/: No such file or directory
(venv) [root@devbox ~]# pwd
/root
(venv) [root@devbox ~]# ls -l
total 1616
-rw-------. 1 root root 985 Jul 27 2018 anaconda-ks.cfg
drwxr-xr-x. 2 root root 6 Aug 11 2018 code
-rw-r--r--. 1 root root 1642522 Jul 30 2018 get-pip.py
-rw-r--r-- 1 root root 1033 Aug 7 2018 initial-setup-ks.cfg
drwxr-xr-x 5 root root 69 Aug 15 2018 venv
(venv) [root@devbox ~]# cd code
(venv) [root@devbox code]# ls -l
total 0

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 ~]$
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io