Code Monkey home page Code Monkey logo

win10x-onboard's Introduction

win10x-onboard

Windows Laptop setup for Developer with Docker Desktop & Applications. The primary purpose is to have a standard way of configuring a development environment that is simple, fast and completely automated.

Application & Tools Summary

Following Applications & Tools are setup/teardown from the automation script

Containerization - [Docker Desktop]

Containerization - Docker Desktop

  • Check Windows Version for Compatibility
  • Check HyperV is Enabled
  • Enable Virtualization in BIOS - If Required
  • Enable WSL2 & Update Kernel
Applications and Tools
  1. Package Manager -scoop

  2. Visual Studio Code Extensions

  3. References:

Automation

Automation script does following Prerequisites Checks, Setup and Tests. Open Powershell as current user.

TIP: Search for Powershell in Windows Start Menu and open it.

1. Prerequisites Checks

1. Windows Version

Check Windows 10 and Above

Get-ComputerInfo | select WindowsProductName, WindowsVersion

The output should contain one of the following

  • Windoes 10 Pro
  • Windows 10 Enterprise and Education Edition
  • Windows 11

HyperV is supported only in above versions of Windows by default. HyperV allows running Virtual Machine on Windows.

2. HyperV is Enabled
  1. In Powershell Windows
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix*,Hyper-V* | Format-List
  1. Check the output
  • If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed. This means Hyper-V is already enabled

  • Otherwise, check for Virtualization Enabled in Firmware:.

2. Setup

1. Workspace & Applications

1.1 Workspace

In Powershell window Run following commands for workspace setup

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope currentuser
iwr -useb https://raw.githubusercontent.com/rajasoun/win10x-onboard/main/e2e.ps1 | iex
cd ~\workspace
git clone https://github.com/rajasoun/win10x-onboard
cd win10x-onboard
Invoke-Pester src\lib\Workspace.Tests.ps1 -Output Detailed
1.2 Applications Setup

In Powershell window Run following commands for Prerequisite Checks

.\e2e.ps1 apps
1.3 Check Applications Setup In Powershell window Run following commands for Automated Checks
.\e2e.ps1 apps-setup-test

2. HyperV
  1. In Powershell window Run following commands following commands to setup HyperV.

Switch to Elevated Previlage

.\e2e.ps1 elevate

In the New Elevated Powershell as Administrator

.\e2e.ps1 hyperv

FYI: System will restart.

  1. After Restarting Windows, search for Turn Windows features on or off in the Start Menu search bar and open it. 10

  2. In the Window, lookout for Hyper-V, Virtual Machine Platform and Windows Hypervisor Platform. Then check the check boxes before them and click OK. This will also take some time and then a Restart is necessary.

3. WSL2 & Kernel Update

In Powershell window Run following commands following commands to setup WSL, WSL2 Kernel Update

Switch to Elevated Previlage

.\e2e.ps1 elevate

In the New Elevated Powershell as Administrator

.\e2e.ps1 wsl

FYI: System will restart.

4. Docker Desktop

Install Docker Desktop For Windows

5. Test Docker Setup
  1. Switch to bash shell
.\e2e.ps1 bash-it
nix/assist.sh bash-setup
  1. Docker Test: Open Git Bash command prompt and output should contain Hello from Docker
docker run --rm hello-world
  1. Check the Speed of the Internet using docker
MSYS_NO_PATHCONV=1  docker run --rm rajasoun/speedtest:0.1.0 "/go/bin/speedtest-go"
  1. Switch to Powershell
exit

3. Test

In Powershell Window

1. TDD Scripts
.\e2e.ps1 apps-setup-test

Switch to Elevated Previlage

.\e2e.ps1 elevate

In the New Elevated Powershell as Administrator

.\e2e.ps1 system-setup-test
2. ATDD Scripts
Invoke-Pester e2e.Tests.ps1 -Tag "prerequisite"  -Output Detailed
Invoke-Pester e2e.Tests.ps1 -Tag "apps"   -Output Detailed

TDD - Test Driven Development

ATDD - Acceptance Test Driven Development

4. Teardown

4.1 Teardown Applications

To uninstall scoop and all applications installed via scoop

.\e2e.ps1 teardown
4.2 Disable HyperV & WSL

To Disable HyperV & WSL. Restart at End

.\e2e.ps1 elevate
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
4.3 Uninstall Docker Desktop
  1. From the Windows Start menu, select Settings > Apps > Apps & features.
  2. Select Docker Desktop from the Apps & features list and then select Uninstall.
  3. Click Uninstall to confirm your selection.

Enable Virtualization in BIOS

Manual Steps The process of enabling virtualization can vary a lot depending on the motherboard manufacturer, but it can be summarized in a few steps:
  1. Completely Shutdown you Computer and turn it on again.

  2. Keep pressing the key to open the BIOS (usually it is Del, F1, F2, F4, F11, or F12). This key depends on the Motherboard manufacturer. You can easily google it out.

  3. Once you get into the BIOS, it may look very scary or intimidating, but don't worry, you will get it right. Mouse may not work in BIOS so you might have to use the Directional or Arrow keys and the Enter key of the Keyboard to navigate.

  • Search for the CPU configuration section, it can be called CPU configuration, processor, Northbridge or Chipset and may be under an advanced or advanced mode tab or menu.
  • Now you need to look for the virtualization option and enable it, it can have different names such as Hyper-V, Vanderpool, SVM, AMD-V, Intel Virtualization Technology or VT-X.
  • Once its enabled, save and reboot your pc.

If this part did not help you, you can specifically go the Website of the Mother Board Manufacturer of you Computer and ask for help.

Credits:

  1. Manu Hali
  2. Rohini Gorige

Last Updated by Rohini Gorige

win10x-onboard's People

Contributors

raja-soundaramourty avatar rajasoun avatar rohini-gorige avatar

Watchers

 avatar  avatar

Forkers

ajithksin

win10x-onboard's Issues

2. Hyper-V enablement

Enable Hyper-V.
For Review Please check in /wiki/Setup-Updates:-Manu-Hali/Step: [1.2] Hyper-V is Enabled

8. TDD Script

For Review, please check in wiki/setup updates: Rohini Gorige

6. Docker desktop setup

Please Review @ wiki/Setup-Updates:-Manu-Hali/Step: [2.4] Install Docker Desktop For Windows

9. ATDD Scripts

Please Review @ wiki/Setup-Updates:-Manu-Hali/Step: [3.2] ATDD Scripts

4. Hyper-V Setup

Please review at wiki/Setup-Updates:-Manu-Hali/Step: [2.2] Hyper-V

4. HyperV

For Review, please check in wiki/setup updates: Rohini Gorige

Automate Pester for PowerShell module

Command:

find-module -Name Pester

Command:

get-module -Name Pester -list

Command:

find-module -Name Pester | install-module

Command:

find-module -Name Pester | install-module -SkipPublisherCheck

Command:

get-module -Name Pester -list

Command:

import-module -Name Pester -Force

2. HyperV Enable

For Review, please check in wiki/setup updates: Rohini Gorige

9. ATDD Script

For Review, please check in wiki/setup updates: Rohini Gorige

8. TDD Scripts

Please Review @ wiki/Setup-Updates:-Manu-Hali/Step: [3.1] TDD Scripts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.