๐ Set Up Your Dev Environment
Welcome to your step-by-step guide for setting up a powerful development environment using Windows Subsystem for Linux (WSL), Visual Studio Code (VSCode), and essential tools like Git and Node Version Manager (NVM).
๐ Table of Contents
- ๐ป IDE - Install Visual Studio Code (VSCode)
- ๐ง Configure VSCode for Development
- ๐ง WSL - Setting Up Ubuntu and Updating Linux Kernel
- ๐ ๏ธ Essential Dev Tools
- ๐ Python and pip
- โก Git - Installation and Configuration
- ๐ Git Credential Manager (GCM)
- ๐ Configure Security Settings
- ๐ Final Congratulations
๐ป IDE - Install Visual Studio Code (VSCode)
VSCode is a crucial tool for development. Let's get it installed and ready!
๐ฝ Steps to Install VSCode:
- Download VSCode: Visit Visual Studio Code and download the Windows installer.
-
Run the Installer: Double-click the downloaded file and follow the instructions. Check the options to:
- Add VSCode to the PATH.
- Create a desktop icon for quick access.
๐ Install VSCode Using PowerShell CLI:
$InstallerUrl = "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user"
$InstallerPath = "$env:TEMP\VSCodeInstaller.exe"
Invoke-WebRequest -Uri $InstallerUrl -OutFile $InstallerPath
Start-Process -FilePath $InstallerPath -ArgumentList "/verysilent" -NoNewWindow -Wait
Remove-Item $InstallerPath
๐ Install VSCode Using Linux CLI:
sudo apt install curl gpg
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/ms.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/ms.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update
sudo apt install code
After installing, launch VSCode by typing
code
in your terminal.
๐ง Configure VSCode for Development
๐ ๏ธ Steps to Configure VSCode:
- Open VSCode: Launch VSCode from your Start Menu or Desktop Icon.
-
Install Extensions: Go to the Extensions Marketplace by pressing
Ctrl+Shift+X
. Recommended extensions:- ๐ Remote Development โ for remote development within WSL.
- ๐ Python โ for Python development.
- ๐งฉ GitLens โ enhances Git capabilities.
- ๐ณ Docker โ for containerization.
- โจ ESLint โ for JavaScript development.
- ๐ YAML โ for YAML language support.
- ๐ป Live Share โ for collaborative coding.
- ๐ Remote - SSH โ to connect via SSH to remote servers.
๐ง WSL - Setting Up Ubuntu and Updating Linux Kernel
Build a robust foundation by setting up WSL and Ubuntu on your Windows machine.
๐ ๏ธ Steps to Install WSL & Ubuntu:
-
Install WSL Ubuntu:
- In VSCode Open a PowerShell terminal and enter:
wsl --install -d Ubuntu
- Click Yes if prompted to allow program to make changes, view install progress in terminal.
- Wait for the installation to complete,
- Reboot your machine. (a terminal window will open upon reboot)
- In the terminal window type a username when prompted (all lowercase), enter a password wait for the process to complete then close the window.
-
Update Linux Packages:
- Now that WSL is up and running, we need to ensure our Linux packages are up-to-date.
- Open VSCode open your Ubuntu(WSL) terminal and run:
sudo apt update && sudo apt upgrade -y
๐ ๏ธ Essential Dev Tools
To build high-quality software, install these essential tools:
sudo apt-get install wget ca-certificates curl
๐ Node Version Manager (NVM):
Manage your Node.js versions efficiently with NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
๐ AWS CLI v2:
The AWS Command Line Interface (CLI) v2 is essential for interacting with AWS services directly from the command line. Install it with the following steps:
Installation:
For Linux:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
For Windows (via PowerShell):
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
Verify the installation:
aws --version
This should return the installed version of AWS CLI v2.
๐ Python and pip
Python is an essential tool for cloud development. Install Python and pip with:
sudo apt install python3-pip -y
โ CFN-Lint (CloudFormation Linter):
Ensure quality in your CloudFormation templates:
pip3 install cfn-lint
Don't forget to install the CloudFormation Linter extension in VSCode!
๐ง jq (Command-line JSON processor):
jq is a lightweight command-line JSON processor, essential for parsing and manipulating JSON data:
sudo apt-get install jq
๐ฝ Install Database Tools (if needed)
If your development requires a database, install the appropriate database. For example, for MySQL:
- Download MySQL: Go to the MySQL Downloads page and select the Windows version.
- Install MySQL: Follow the setup wizard, set up your root password, and configure the server.
โก Git - Installation and Configuration
Git is essential for version control. Install and configure Git with the following:
๐ ๏ธ Install Git:
sudo apt-get install git
๐งโ๐ป Configure Git Identity:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
๐ View Git Configuration:
git config --list
Install Git CLI:
sudo apt install gh
๐ Git Credential Manager (GCM)
Git Credential Manager (GCM) simplifies authentication for Git services like GitHub and Azure DevOps.
๐ก Setting Up GCM in WSL:
Set up GCM within WSL:
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
๐ Configure Security Settings
๐ง Steps to Secure Your System: ### (Optional)
- Windows Security: Ensure Windows Defender or your preferred antivirus is active and updated.
- Firewall Settings: Configure your Windows Firewall to allow development tools while blocking unauthorized access.
- Secure Browsers: Install security extensions like HTTPS Everywhere and ensure your browsers are up to date.
- Regular Updates: Keep Windows OS, VSCode, and all installed packages/extensions updated.
๐ Final Congratulations
You now have a fully configured, secure development environment on your Windows machine using WSL, VSCode, Git, and other standard development tools. You're ready for cloud development and ensuring your CloudFormation templates are linted before merging into the main branch.
Happy Coding! ๐ป๐
Top comments (0)