Skip to content

Set Up Developer Environment

Aron Trauring edited this page Oct 13, 2017 · 12 revisions

How to Set Up a Dev Environment on Windows 10 and Windows Server

How to install and use various open-source and other tools on Windows, particularly for data analytics environments .

Step-by-step guide

First Steps

  1. Before you do anything, install Google Chrome. While Edge is not an awful browser, it doesn’t come on Windows Server, and Chrome is just easier to use for most of your browsing needs. You can also sync it across platforms.
  2. Make Chrome your default browser.
  3. Everywhere below where it says download, it almost always means open the link in the Chrome browser and download from the given web page.

On both Windows 10 and Azure VM Windows Server machines:

Note on Windows Server

Windows Server machines are best used for serving ––particularly R, either standalone or via SQL Server 2017––not developing directly. But adding the following tools on Windows Server machines makes it easy to do the occasional light development/testing/debugging you might prefer to do when on the server itself. Still you should think carefully if you really need these tools on a particular server. In any case only install them on development and test servers, never on production servers. On production servers, the less you have installed, the better both for performance and security. When wanting to install packages for every user on a Windows Server machine, issue these commands in the server administrator account (your AD accounts shouldn’t be set as administrator). Some tools, e.g. Github for Windows, still only install locally, so install individually for each user. Also, when using DevTest Labs on Azure(which is a great option, particularly since, as noted, we are talking about development and test servers), the artifacts option allows you to install many of the packages listed below when configuring a new server. So skip the install step and go straight to the configuration instructions.

  1. Install Chocolatey package manager. Then install a few useful packages in PowerShell administrator:
    choco update chocolatey # make sure you have latest version
    choco install consolez
    choco install firacode # Nice code font for VS Code and IntelliJ
    
  2. Install the latest version of Git Credential Manager (GCM) from Github . Besides GCM this installs Git for Windows and all related tools, including a bash shell. Be careful if you want to modify the default choices. We suggest working with the bash shell and not PowerShell for consistency. Set up Windows for using git and Github following the instructions here.
  3. Now that git and the bash shell are installed, you can add them as alternative tabs for ConsoleZ. Go to Edit-> Tabs and create a tab for each alternative. Here are a list of paths for each of the different types of shells:
Shell Windows Path
PowerShell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
PowerShell Admin C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (check administrator option under Run as
Bash C:\Program Files\Git\bin\bash.exe (be sure to add your home path as the Startup Directory)
Git CMD C:\Program Files\Git\git-cmd.exe
CMD C:\Windows\System32\cmd.exe
  1. Install VS Code and set it up following the instructions here.
  2. Install Azure CLI 2.0. There are two alternative ways of doing this. We recommend the first since then you can be sure you
    1. Using Python pip:
      pip install --pre azure # install python azure sdk NB: this is still considered "pre-release"
      pip install azure-cli # install azure cli 2.0 (npt as user!)
      
    2. Using an MSI
  3. Install Azure PowerShell cmdlets.
  4. Download and install the latest version of wget 64-bit. Move it to the directory C:\Program Files\Git\mingw64\bin, so it can be called directly from git-bash.

On Windows 10 Machines Only (including Parallels & Hyper-V VMs)

  1. In Settings -> Accounts -> Access Work or School connect to the the company Office 365 AD. Create an administrative user with your email-based Azure AD username and do all your installations under that account. That allows for not having to login again for most Microsoft applications.
  2. Download and install 1Password for Windows. Setup for your user account.
  3. Download and install Office 365 after logging into the Office portal. Make sure to sync One Drive and any Sharepoint or Groups you want access to. Since your machine is connected to Azure AD for the most part you won’t have to enter your password when accessing your Office 365 account in various apps.
  4. Go to Settings and search for Turn Windows Features On and Off. Check the Windows Subsytem for Linux and hit OK. Restart Windows. Then go to the Windows store and download the Ubuntu application. Once its downloaded, start it up and do the initial set up. Once you’ve defined a username and password you can set it up like any other Ubuntu Linux machine.
  5. Download and install the latest version of Anaconda Python. It includes Jupyter Notebook (although you can also use Azure Notebook instead). Start up cmd.exe console (NB: it does not work in PowerShell) to do the Conda test drive and initial set up below. You can also do this stuff in the gui Conda navigator :
    conda info   # check versionconda update conda # update to latest version
    conda update --help # test the help functionality
    conda update --all # update all packages
    conda create --name mydev # create your first environment as a test
    activate mydev # activate the environment you just created
    conda list # show current list of packages
    deactivate # go back to root. Pip gets installed in root anyway
    pip install --pre azure # install python azure sdk NB: this is still considered "pre-release"
    pip install azure-cli # install azure cli 2.0 (npt as user!)
    conda list # even though you install with pip you should still see all the azure libraries
    
  6. Download and Install the Azul Zulu version of OpenJDK Java.
  7. Download and install Visual Studio (one of the commercial editions if you have Bizspark or a paid MSDN subscription). In the installation setup, check the Azure Development, Python Development, Data Storage and Processing, Data Science and Analytical Applications and .Net Core Cross Platform Development options. Make sure the Anaconda Python 64-bit is checked in the right-panel with the detailed options. You can choose whatever else you are interested in, but it takes a long time to download and install and uses up a great deal of disk space. These options will install Microsoft R Client and a dev version of MS SQL Server.
  8. The “traditional” R developer tool chain is based on C, make and other ancient Unix tools. It's a pain to install and in any case it is currently in flux. Microsoft is moving R development and deployment in a totally new direction. Their Machine Learning Services is part of SQL Server 2017 and can be either integrated with _SQL Server _or used as a standalone Machine Learning server. They manages R packages in a completely different way and with them it’s best to use Visual Studio or Code to develop and deploy R. For that reason, we don’t recommend using RStudio on Windows anymore. If you need to, we recommend doing traditional R package development on Mac or Linux.
  9. In the bash shell, run the following commands so you can have a shared directory for data files you can use in both WSL and Windows:
    sudo mkdir /mnt/c/Data
    sudo chown <WSL user>:<WLS user> /mnt/c/Data
    
  10. Download the latest version of the TeX Live installer. Open a PowerShell window in Administrator mode. Go to your _Download_ directory and run the installer. Leave the defaults checked to ensure it installs it for everyone on the server. Full details on TeX Live can be found here.
  11. Add the R kernel to Jupyter. In Visual Studio, open the R Interactive window and enter the following commands:
    install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
    devtools::install_github('IRkernel/IRkernel')
    IRkernel::installspec(user = FALSE)
    
  12. If you need them, it’s best to install sbt and Ammonite in WSL Linux. You can open a WSL bash shell in Visual Code even from the Windows side, so you can do any Scala development in the WSL box.
  13. Create an Azure Machine Learning experimental and model management account and install the Azure Machine Learning Workbench following the instructions here. Link it up with your Visual Studio Code following instructions here.

Related Links

Link Description
DevTest Labs Azure DevTest Labs Doco
Anaconda Python Anaconda Python Doco
Chocolatey Chocolatey Windows Package Manager
GCM Git Credential Manager for Windows
ConsoleZ Improved Windows Console
VS Code Visual Studio Code Doco
Azure CLI 2.0 Azure CLI 2.0 Doco
Azure PowerShell Azure PowerShell Overview links
Machine Learning Services Microsoft Machine Learning Services Doco
Zulu Azul Zulu Open Source Site
TeX Live TeX Live Doco
Azure Machine Learning Azure Machine Learning Doco

How-To Articles

Troubleshooting

Clone this wiki locally