Closed armartirosyan closed 7 years ago
i will work on this issue with armen and update an share i have running on dcloud in SJ. This will need an revision and need to be re-published.
Eddie,
Please use below steps to fix the issues on the Ubuntu host and make adjustments on Windows machine.
Open LXTerminal and navigate to /home/cisco/Code
folder
Remove the code-samples folder by using following command sudo rm -rf devnet-express-code-samples
Clone the repository to Code
folder by using git clone https://www.github.com/CiscoDevNet/devnet-express-code-samples.git
command
After cloning, the folder structure should look like this
(mycode) cisco@ubuntu:~/Code$ pwd
/home/cisco/Code
(mycode) cisco@ubuntu:~/Code$ ll
total 20
drwxrwxr-x 5 cisco cisco 4096 May 18 18:09 ./
drwxr-xr-x 26 cisco cisco 4096 May 18 18:04 ../
drwxr-xr-x 13 cisco cisco 4096 May 18 18:09 devnet-express-code-samples/
drwxrwxr-x 7 cisco cisco 4096 Oct 14 2016 mycode/
drwxrwxr-x 6 cisco cisco 4096 Oct 17 2016 virl-utils/
Replace contents of the rc.local
file located in /etc
folder with below script
USER=cisco
BASHRC=/home/$USER/.bashrc
CODE=/home/$USER/Code/devnet-express-code-samples
cp /home/$USER/.bashrc.bak /home/$USER/.bashrc
if cd $CODE && git pull; then
logger "git pull succeeded"
echo 'echo -e "Code-Samples were successfully updated.\\n"' >>$BASHRC
echo 'echo -e "Navigate to '$CODE' and start coding.\\n"' >>$BASHRC
else
logger "git pull failed. Make a fresh clone of a repository"
rm -rf $CODE
cd /home/$USER/Code && git clone https://www.github.com/CiscoDevNet/devnet-express-code-samples.git
echo 'echo -e "Code-Samples were successfully updated.\\n"' >>$BASHRC
echo 'echo -e "Navigate to '$CODE' and start coding.\\n"' >>$BASHRC
fi
chown -R cisco:cisco $CODE
exit 0
Remove .ngrok2
folder from user's home directory using sudo rm -rf .ngrok2/
command.
Install flask
module by using pip install flask
and pip3 install flask
commands
Please make following changes on the Windows machine as well.
Open Notepad text editor and use Ctrl+O shortcut keys to open a file. Type git-pull.bat
and click Open
Change the contents of the file with below commands
@echo off
cd "C:\Users\Administrator.WKST1\Code\" && rmdir /s /q devnet-express-code-samples && git clone https://github.com/CiscoDevNet/devnet-express-code-samples.git >> pull_log.txt
Open Use me as a Terminal
terminal and install flask
module by using pip install flask
and pip3 install flask
commands.
Open Windows CMD and install flask using commands mentioned in step 3.
Note: The difference between steps 3 and 4 is virtual environment (venv) and global site-packages directory for python
Above steps should fix all issues we have noticed with Ubuntu and Windows machines.
Please let me know if you have any questions.
Thanks, Armen
hi armen. thanks for the capturing the information. all are updated from yesterday.
@yawming can you test the following 2 missions from the DNA track to see if the pod image is now working. Make sure that the 3 issues reported above are fixed.
You might need to check out the pre-event setup to make sure you have access to the Ubuntu host in the dCloud pod: https://learninglabs.cisco.com/tracks/devnet-express-dna/00-pre-event-preparation/00-prep-01-prep-before-you-go/step/1
05-apic-04-mission - working fine
https://learninglabs.cisco.com/tracks/devnet-express-dna/dna-restconf-netconf-yang/06-dmi-05-mission/step/1 - couple of problems:
devnet-express/labs/06-dmi-05-mission/1.md @ line 28 module06/lab05_mission need to change to LM-4602/05-mission
I ran script "01_get_interface_stats.py" in Ubuntu. Script itself is ok but got some environment issue - module not found.
(mycode) cisco@ubuntu:~/devnet-express-code-samples/LM-4602/05-mission$ python3 01_get_interface_stats.py
Traceback (most recent call last):
File "01_get_interface_stats.py", line 8, in
Corrected item 1 from comment above:
devnet-express/labs/06-dmi-05-mission/1.md @ line 28
module06/lab05_mission need to change to LM-4602/05-mission
I published the updated mission to stage and prod.
Delivered as part of v2.1.
Ubuntu host in Cisco DevNet Express DNA Sandbox v2 pod has several issues and needs to be re-imaged. Issues are:
/home/cisco/
) has a.ngrok
folder which needs to be removed. It prevents multiple ngrok instance from running.cp /home/$USER/.bashrc.bak /home/$USER/.bashrc
if cd $CODE && git pull; then logger "git pull succeeded" echo 'echo -e "Code-Samples were successfully updated.\n"' >>$BASHRC echo 'echo -e "Navigate to '$CODE' and start coding.\n"' >>$BASHRC else logger "git pull failed" echo 'echo -e "Sorry, but the system was not able to update the code-samples.\n"' >>$BASHRC echo 'echo -e "To manually pull the latest code-samples, please navigate to the \"'$CODE'\" folder and type \"git pull\"\n"' >>$BASHRC fi
exit 0