0% found this document useful (0 votes)
177 views

Setting Up Your Windows Workstation As A Development Environment

1. The document provides instructions for setting up a development environment on a Windows workstation by installing common development tools including Git, Python, Node.js, text editors, APIs clients, and other utilities. 2. Step-by-step instructions are given to install each tool, including verifying the installations were successful. 3. The tools include Git, Python 3, Node.js, the Atom and Visual Studio Code text editors, the Postman API client, and the ngrok tunneling utility.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views

Setting Up Your Windows Workstation As A Development Environment

1. The document provides instructions for setting up a development environment on a Windows workstation by installing common development tools including Git, Python, Node.js, text editors, APIs clients, and other utilities. 2. Step-by-step instructions are given to install each tool, including verifying the installations were successful. 3. The tools include Git, Python 3, Node.js, the Atom and Visual Studio Code text editors, the Postman API client, and the ngrok tunneling utility.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

DenvNEt

Setting up your Windows workstation as


a development environment
So you are a follower of Gates, Balmer and Nadella, excellent! Let's super charge that Windows
workstation with everything you need to be a programability ninja!

Objectives
1. Install a basic development toolset on your local workstation
2. Verify the tools are all working as expected

Prerequisites
In this lab you'll find walkthroughs on how to install a set of common development tools on a Windows 10
workstation. If you haven't reviewed the lab "What is a Development Environment, and why do you need
one?" yet, you may want to go back and take a look. In it you will learn the reasons behind the types of
tools and choices made for this lab.

Administrative Rights
In order to complete this lab, you will need rights to install software on your workstation, typically called
"administrative rights". If you are working from a "managed laptop" and lack the ability to install software,
you will not be able to complete this lab.

Note: The instructions in this lab were designed and tested on a clean build of
Windows 10. If you are working from a different version of Windows, or have
other applications installed on your workstation the exact experience and
messages seen may differ. It is always suggested to refer to the official
installation and configuration guides for the software applications for any
questions or clarifications.

Step 2: Source Control Systems


git
Installation
Follow these steps to install git on Windows.

1. Navigate to git-scm.com/downloads.
2. Click the link for "Windows". This will download the installation file for the latest version of Git for
Windows.
3. Run the downloaded installer and take the defaults with the following considerations.
o Consider checking the box to add "Additional Icons > On the Desktop"
o Consider changing the default text editor for Git to another option, if you have one
available. For example, Notepad++

Verification
Once installation completes, let's verify it is working as expected.

1. Open git-bash. You can use the Desktop or Start Menu shortcut.


2. From within the terminal, run git --version. You should get output indicating the version of git
installed.
3. # Example output
4. git version 2.16.2.windows.1

5. Attempt to clone a repository from GitHub.


6. git clone https://github.com/CiscoDevNet/hello_network
7. # Expected Output
8. Cloning into 'hello_network'...
9. remote: Counting objects: 8, done.
10. remote: Compressing objects: 100% (7/7), done.
11. remote: Total 8 (delta 2), reused 4 (delta 1), pack-reused 0
12. Unpacking objects: 100% (8/8), done.

Next: Terminals and Shells

Step 3: Terminals and Shells


bash
Installation
The git-bash shell and interpreter for Windows was installed along as part of installing git in the last
step.
Verification
1. Change to the hello_network directory that you cloned down in the last step.
2. cd hello_network

3. Included in the repository is a bash shell script called hello_network.sh, run it to verify you
have a functioning bash shell.
4. ./hello_network.sh
5. # Expected Output
6. Hello Network!

Next: Programming Languages

Step 4: Python and Node


Installing Python
Python 3 is the recommended version of Python.

Note: Python 2 is no longer supported. As of January 1st, 2020 no new bug


reports, fixes, or changes will be made to Python 2. You can read Python 2
instructions in the appendix to this Lab, but it is not required or recommended.
1. Navigate to www.python.org/downloads/windows/.
2. Click the link "Latest Python 3 Release - Python 3.6.9".
3. In the list, download "Windows x86-64 executable installer" (If you are on 32 bit Windows
download the x86 version).
4. Run the downloaded installation file taking the defaults with the following suggestions.

o On the first page "Install Python 3.6.9" screen, check the box to "Add Python 3.6 to
PATH" at the bottom of the screen.
Verify Python installation
Note: If the following verifications do not work as expected, restart your computer
to ensure the updated "PATH" variables are fully applied.
1. Open a git-bash terminal.
2. Verify Python 3 was correctly installed. (The py application is the "Python launcher for Windows"
that provides an easy method on Windows to identify Python versions)

3. py -3 -V
4. # Expected Output
5. Python 3.6.9

6. Check the version set as the "Default Python Version". (The default version is the version of
Python that is executed when you enter python).

7. python -V
8. # Expected Output
9. Python 3.6.9

Note: To open an interactive Python interpreter you can typically just use the
command python at the command prompt. Within git-bash you need to use
the command python -i to explicitly start the interactive interpreter.

Python virtual environments


Before leaving the Python setup, you need to know how to create a Python virtual environment. Python
virtual environments are a method of creating isolated "environments" where specific versions of Python
can be installed along with independent sets of libraries and dependencies.

Virtual environment usage is very common and is recommended practice when working in Python, and
most DevNet labs encourage you to create and work within virtual environments.

1. Create a Python 3 virtual environment using the venv module included with Python 3.

2. py -3 -m venv py3-venv

3. Now "activate" the environment. Look for the name of the virtual environment to be enclosed in
parenthesis after activation.

4. source py3-venv/Scripts/activate
5. # Expected Output
6. (py3-venv)
7. IEUser@IE11Win10 MINGW64 ~/code

8. Now verify that python is now linked to Python 3

9. python -V
10. Python 3.6.9
11.

12. Deactivate the virtual environment.

13. deactivate

Installing Node
1. Navigate to nodejs.org/en/download/ and download the "Windows Installer."
1. Run the downloaded installer taking the defaults.
2. Open a git-bash terminal.
3. Check the installed node version.

4. node -v
5. # Expected Output
6. v8.11.1

Next: Text Editors and IDE

Step 5: Text Editors and IDE


You probably don't need two different IDEs...but you might enjoy taking Atom and Visual Studio Code for
a side-by-side test run, so we've included installation instructions for each.

If you have a preference, certainly take your pick!

If you are participating in a DevNet Express Cloud Collaboration IT Pros, we


recommend using VS Code

Atom
Installation
1. Navigate to atom.io
2. The site should detect your OS and offer you an appropriate download link
3. Run the downloaded installer taking the defaults

Verification
1. Once installation finishes, Atom should open and display the interface
2. Select "Yes, Always" to the question about registering the atom:// URI handler

Visual Studio Code


Installation
1. Navigate to code.visualstudio.com
2. The site should detect your OS and offer you an appropriate download link
3. Run the downloaded installer taking the defaults

Verification
1. Once installation finishes, open VS Code to display the main interface
2. In the upper left, select the Extensions view, search for "python" and install the top hit, i.e. the
"Python" extension (by Microsoft)
Step 6: Development Tools and Clients
Postman
Installation
1. Navigate to www.getpostman.com/apps.
2. Click the download link for "Windows". (If you are using a 32 bit version of Windows, be sure to
change the option.)
3. Run the downloaded installer taking the defaults.
Verification
1. Once the installation completes, Postman will open and allow you to sign-up or sign-in. You
do NOT need to sign in to use Postman, you can simply click the link "Take me straight to the
app. I'll create an account another time." to bypass login.

2. Test that you can make REST API calls with Postman with this fun "Dad Joke" API.
Enter https://icanhazdadjoke.com/ into the address bar. Click the "Headers" tab and add
an entry for Accept with a value of application/json. Then click "Send" and enjoy your
joke :-)
ngrok
Installation
1. Navigate to ngrok.com/download.
2. Click the download link for "Windows". (If you are using a 32 bit version of Windows, be sure to
change the option.)
3. Open the zip file and extract it to the ngrok subdirectory under your user folder.
Verification
1. Open a cmd shell on Windows. (ngrok does not start correctly from git-bash)
2. Change to the ngrok directory under your user folder.
3. cd ngrok

4. Start a sample ngrok tunnel.


5. ngrok http 5000
6. #Expected Output
7. ngrok by @inconshreveable
(Ctrl+C to quit)
8.
9. Session Status online
10. Session Expires 7 hours, 59 minutes
11. Version 2.2.8
12. Region United States (us)
13. Web Interface http://127.0.0.1:4040
14. Forwarding http://f53d98ce.ngrok.io ->
localhost:5000
15. Forwarding https://f53d98ce.ngrok.io ->
localhost:5000
16.
17. Connections ttl opn rt1 rt5 p50
p90
18. 0 0 0.00 0.00 0.00
0.00

19. Press Cntrl-C to quit ngrok.

Google Chrome
Installation
1. Navigate to www.google.com/chrome and download Chrome.
2. Run the downloaded installer file.
3. Google Chrome will open after installation. If you'd like to use Chrome as your new default
browser, follow the steps to setup.
4. A Google Chrome icon should be added to your desktop.

Verification
To access the Chrome Developer tools.

1. Open Google Chrome, and click the "three dots" to the right of the address bar to access the
menu. Under "More tools", click the link for "Developer tools"
2. You will now see the developer tools open within the window.
OpenConnect
If you do not already have Cisco AnyConnect installed, you can install OpenConnect for an open source
VPN client to use to connect to DevNet Sandboxes.

Installation
1. Navigate to the OpenConnect-GUI Releases page.
2. Download the latest Windows release.
3. Run the downloaded installer with the following suggestions.
o On the "Install Options" page, "Add the openconnect-gui to the system PATH for all
users."
o Also on the "Install Options" page, "Create openconnect-gui Desktop Icon."
Verification
1. To fully verify OpenConnect installation you'll need a VPN server to connect to. If you don't have
one handy, go on over to the DevNet Sandbox Catalog and reserve one of our possible
sandboxes. Once the reservation is ready, you'll be provided the VPN credentials to connect to.
2. Open the OpenConnect GUI, and create a "New profile." Enter the VPN address as the
"Gateway" and "Save & Connect". You'll then be prompted for your username and password.

3. You should now have an active VPN connection to your sandbox, and be able to reach the
resources contained within your pod.
Next: Application Container Engine

Step 7: Application Container Engine


Docker
DevNet Express Cloud Collaboration for IT Pros participants can skip Docker
installation
Installation
1. Docker for Windows 10 leverages the Hyper-V feature of the operating system and requires you
enable it before Docker for Windows will install and work.
i. Open the "Turn Windows features on or off" control panel.
ii. Make sure both "Hyper-V Management Tools" and "Hyper-V Platform" are enabled under
"Hyper-V".
iii. Changes to these settings will require a reboot of the workstation.
iv. NOTE: While the Hyper-V feature is enabled on Windows 10, other hypervisor
platforms like VirtualBox and VMware Workstation will NOT work.
2. Navigate to Install Docker Desktop on Windows.
3. Click "Download from Docker Hub" link. The new page is refreshed with "Docker Desktop for
Windows" details.
4. Click "Get Docker" link to start download.
5. Run the downloaded installer taking the defaults.

Note:

 Please make sure that you will turn ON the virtualization in the BIOS.
 If any error occurs during Docker installation, refer to Docker troubleshooting page.

Verification
1. Open a git-bash terminal.
2. Enter the following command to start a test container based on the "busybox" image.
3. docker run busybox

4. The container will start, and then stop showing no output. Verify it worked with the following
command.
5. docker ps -a
6. # Sample Output
7. CONTAINER ID IMAGE COMMAND
CREATED STATUS PORTS
NAMES
8. d9a3285ba957 busybox "sh" 20
seconds ago Exited (0) 15 seconds ago
quizzical_bartik

Appendix: Python 2
Python 2 is no longer supported. As of January 1st, 2020 no new bug reports, fixes, or changes will be
made to Python 2. Python 2 instructions are included here, but it is not required or recommended. Feel
free to advance to the Summary for this lab.

Installation
1. Navigate to www.python.org/downloads/windows/.
2. Click the link "Latest Python 2 Release - Python 2.7.14".
3. In the list, download "Windows x86-64 MSI installer" (If you are on 32 bit Windows download the
x86 version).
4. Run the downloaded installation file taking the defaults with the following suggestions.
o On the "Customize Python 2.7.14" screen, install the "Add python.exe to Path" option.
Verification
1. Verify Python 2 was correctly installed.
2. py -2 -V
3. # Expected Output
4. Python 2.7.14

Virtual environments
1. Install the virtualenv package for Python within Python 2.
2. py -2 -m pip install virtualenv
3. # Expected Output
4. Collecting virtualenv
5. Downloading virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)
6. Installing collected packages: virtualenv
7. Successfully installed virtualenv-15.2.0

8. Now create a Python 2 virtual environment using the newly installed virtualenv module for
Python 2.
9. py -2 -m virtualenv py2-venv

10. Now "activate" the environment. Look for the name of the virtual environment to be enclosed in
parenthesis after activation.
11. source py2-venv/Scripts/activate
12. # Expected Output
13. (py2-venv)
14. IEUser@IE11Win10 MINGW64 ~/code

15. Now verify that python is now linked to Python 2.


16. python -V
17. Python 2.7.14

18. Deactivate the virtual environment.

deactivate
1. git clone https://github.com/CiscoDevNet/netprog_basics
cd netprog_basics/programming_fundamentals/data_formats

3. git clone https://github.com/CiscoDevNet/netprog_basics


cd netprog_basics/programming_fundamentals/rest_part_1

You might also like