SlideShare una empresa de Scribd logo
1 de 47
Setup a Dev environment
that Feels like $HOME
Stefan Scherer, SEAL Systems AG
https://www.youtube.com/watch?v=Zi0eofqAkXU
Agenda
• Windows 10
• Choose your shell
• Choose your editor
• Vagrant
• Docker
• .dotfiles
Choose your shell
CMD PowerShell bash
• Windows Subsystem for Linux
• Run Linux binaries on Windows
• Not just like Cygwin
• Real ELF binaries, packages, ...
What is WSL?
Install WSL
• Open Control Panel
• Turn Windows features on or off
• Select Windows Subsystem for Linux
• Open Admin PowerShell
Enable-WindowsOptionalFeature `
-Online –FeatureName `
Microsoft-Windows-Subsystem-Linux
• Reboot
Install Ubuntu
https://www.microsoft.com/de-de/store/p/ubuntu/9nblggh4msv6
First Ubuntu shell
•Editors
•bash
•git, ssh, ...
Files
•Editors
•bash
•git, ssh, ...Files
✔
Feeling at $HOME?
Coming $HOME
sudo mkdir /Users
cd $HOME/..
windowsuser=$(cmd.exe /c echo %USERNAME% | tr -d 'r')
sudo cp -r $USER /Users/$windowsuser
sudo chown $USER:$USER /Users/$windowsuser
sudo sed -i "s,$HOME,/Users/$windowsuser," /etc/passwd
exit
Coming $HOME – the lazy way
curl https://stefanscherer.github.io/wsl/home.sh | sh
Feeling at $HOME!
•Editors
•bash
•git, ssh, ...Files
✔
Activate metadata for chmod/chown
sudo vi /etc/wsl.conf
[automount]
options = "metadata,umask=22,fmask=11,uid=1000,gid=1000"
• Now close the bash terminal and start another Ubuntu shell.
Shared code folder
echo $HOME # -> eg. /Users/stefan.scherer
mkdir /mnt/c$HOME/code
ln -s /mnt/c$HOME/code $HOME/code
• Now you can clone Git repos in WSL
• And edit with Windows editors like Atom or VSCode
Install editors of choice
iwr -useb https://chocolatey.org/install.ps1 | iex
choco install -y atom
choco install -y visualstudiocode
Happy coding
•VMware Workstation
•Vagrant VMware Utility
•Vagrant
•Vagrant VMware plugin
•Other Vagrant plugins
•some Patches ...
Install VMware and Vagrant utility
choco install -y vmwareworkstation
choco install -y vagrant-vmware-utility
• Workaround for Vagrant 2.1.0: Add a symlink
mkdir mntcUsers
cmd /c mklink /D mntcUsers$env:USERNAME `
Users$env:USERNAME
Prepare Windows – the lazy way
curl.exe https://stefanscherer.github.io/wsl/prep.ps1 | iex
Install Vagrant in WSL
mkdir -p /mnt/c$HOME/.vagrant.d
ln -s /mnt/c$HOME/.vagrant.d ~/.vagrant.d
sudo chown $USER:$USER ~/.vagrant.d
chmod 755 ~/.vagrant.d
wget https://releases.hashicorp.com/vagrant/2.1.0/vagrant_2.1.0_x86_64.deb
sudo dpkg -i vagrant_2.1.0_x86_64.deb
• Add this to your ~/.bashrc
export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS=1
Prepare Vagrant VMware
sudo ln -s 
/mnt/c/ProgramData/HashiCorp/vagrant-vmware-desktop 
/opt/vagrant-vmware-desktop
vagrant plugin install vagrant-vmware-desktop
vagrant plugin license vagrant-vmware-desktop ./license.lic
Patch Vagrant 2.1.0 for VMware
wget
https://raw.githubusercontent.com/StefanScherer/dotfiles/mast
er/bin/vmrun.exe-helper
sudo cp vmrun.exe-helper '/usr/bin/C:Program Files
(x86)VMwareVMware Workstationvmrun.exe'
sudo ln -s '/usr/bin/C:Program Files (x86)VMwareVMware
Workstationvmrun.exe' /usr/bin/vmrun
Install Vagrant VMware – the lazy way
curl https://stefanscherer.github.io/wsl/vagrant.sh | sh
Run Vagrant boxes
cd ~/code
mkdir tst
vagrant init bento/ubuntu-18.04
vagrant up
Use shared folders
• Bind mounts work in the Windows user‘s directory
• Usable with the shared code folder
vagrant ssh
touch /vagrant/xxx
exit
ls xxx
•VMware Workstation
•docker-machine.exe
•Docker Machine VMware
plugin •Docker CLI
•Docker Compose
•some helpers ...
Install Docker Machine
choco install -y docker-machine
choco install -y docker-machine-vmwareworkstation
Install Docker CLI and Compose
curl https://get.docker.com | sh
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin/docker-compose
Install Docker tools – the lazy way
curl https://stefanscherer.github.io/wsl/docker.sh | sh
Create a Docker Machine
docker-machine.exe create -d vmwareworkstation default
Switch to a Docker Machine
eval $(docker-machine.exe env --shell bash default | 
sed 's,,/,g' | sed 's,C:,/mnt/c,g')
docker version
dm default
Use bind mounts in Docker
• Bind mounts work in the Windows user‘s directory
• Usable with the shared code folder
cd ~/code
docker run -it -v $(pwd):/test ubuntu bash
touch /test/xxx
exit
ls xxx
Start and stop Docker Machine
docker-machine.exe start default
docker-machine.exe stop default
docker-machine.exe ls
dm
dm
dm
What are .dotfiles?
• Save your .bashrc et al files in a GitHub repo
• Restore them easily in your VM‘s or in WSL
• Install looks like
cd ~/code
git clone https://github.com/StefanScherer/dotfiles
cd dotfiles && ./sync.sh
What are .dotfiles?
Aliases
z - "z foo" - cd to most frecent dir matching foo
.. - one dir up
... - two dirs up
.... - three dirs up
..... - four dirs up
dm start default Docker Machine shortcuts
dm default
dm stop default
Questions?
Thank you!
Stefan Scherer
@stefscherer

Más contenido relacionado

La actualidad más candente

WSL2 and Docker Desktop
WSL2 and Docker DesktopWSL2 and Docker Desktop
WSL2 and Docker DesktopStefan Scherer
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with DockerElton Stoneman
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwiliodotCloud
 
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsBauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsStefan Scherer
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterdotCloud
 
#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with DockerElton Stoneman
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerJürgen Gutsch
 
Getting Started with Azure Kubernetes Service
Getting Started with Azure Kubernetes ServiceGetting Started with Azure Kubernetes Service
Getting Started with Azure Kubernetes ServiceSean Whitesell
 
Hooking Docker With Selenium
Hooking Docker With SeleniumHooking Docker With Selenium
Hooking Docker With SeleniumSujith Vakathanam
 
WinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's GuideWinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's GuideElton Stoneman
 
Build Your Own SaaS using Docker
Build Your Own SaaS using DockerBuild Your Own SaaS using Docker
Build Your Own SaaS using DockerJulien Barbier
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CDHenry Huang
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantMitchell Hashimoto
 
The Automated Container Deployment Pipeline- JAXDevOps
The Automated Container Deployment Pipeline- JAXDevOpsThe Automated Container Deployment Pipeline- JAXDevOps
The Automated Container Deployment Pipeline- JAXDevOpsKontena, Inc.
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyAjeet Singh Raina
 
What’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerWhat’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerDocker, Inc.
 

La actualidad más candente (20)

WSL2 and Docker Desktop
WSL2 and Docker DesktopWSL2 and Docker Desktop
WSL2 and Docker Desktop
 
Docker for a .NET web developer
Docker for a .NET web developerDocker for a .NET web developer
Docker for a .NET web developer
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at Twilio
 
Docker, OSS and Azure
Docker, OSS and AzureDocker, OSS and Azure
Docker, OSS and Azure
 
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsBauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
 
Dockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @TwitterDockerizing your applications - Docker workshop @Twitter
Dockerizing your applications - Docker workshop @Twitter
 
#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
Getting Started with Azure Kubernetes Service
Getting Started with Azure Kubernetes ServiceGetting Started with Azure Kubernetes Service
Getting Started with Azure Kubernetes Service
 
Hooking Docker With Selenium
Hooking Docker With SeleniumHooking Docker With Selenium
Hooking Docker With Selenium
 
WinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's GuideWinOps 2017 - Docker on Windows, the Beginner's Guide
WinOps 2017 - Docker on Windows, the Beginner's Guide
 
Azure Container Services
Azure Container Services Azure Container Services
Azure Container Services
 
Build Your Own SaaS using Docker
Build Your Own SaaS using DockerBuild Your Own SaaS using Docker
Build Your Own SaaS using Docker
 
Exploring Docker in CI/CD
Exploring Docker in CI/CDExploring Docker in CI/CD
Exploring Docker in CI/CD
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing Vagrant
 
The Automated Container Deployment Pipeline- JAXDevOps
The Automated Container Deployment Pipeline- JAXDevOpsThe Automated Container Deployment Pipeline- JAXDevOps
The Automated Container Deployment Pipeline- JAXDevOps
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of Technology
 
What’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, DockerWhat’s New in Docker - Victor Vieux, Docker
What’s New in Docker - Victor Vieux, Docker
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
 

Similar a Setup a Dev environment that feels like $HOME on Windows 10

Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)Soshi Nemoto
 
Run Docker On Windows Using Vagrant
Run Docker On Windows Using VagrantRun Docker On Windows Using Vagrant
Run Docker On Windows Using VagrantJulien Barbier
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerJohn Rofrano
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxmoirarandell
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a containerJohan Janssen
 
Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easyMarco Silva
 
Simplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackSimplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackB1 Systems GmbH
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsMicael Gallego
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersSagar Acharya
 
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...Artefactual Systems - AtoM
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantAntons Kranga
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeSoshi Nemoto
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 

Similar a Setup a Dev environment that feels like $HOME on Windows 10 (20)

Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Run Docker On Windows Using Vagrant
Run Docker On Windows Using VagrantRun Docker On Windows Using Vagrant
Run Docker On Windows Using Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docx
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Vagrant - Team Development made easy
Vagrant - Team Development made easyVagrant - Team Development made easy
Vagrant - Team Development made easy
 
Simplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackSimplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStack
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for Beginners
 
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 

Más de Stefan Scherer

Azure Saturday - Build and Deploy multi-arch Docker Images
Azure Saturday - Build and Deploy multi-arch Docker ImagesAzure Saturday - Build and Deploy multi-arch Docker Images
Azure Saturday - Build and Deploy multi-arch Docker ImagesStefan Scherer
 
Docker Meetup Mannheim: Multiarch docker images for cross-platform apps
Docker Meetup Mannheim: Multiarch docker images for cross-platform appsDocker Meetup Mannheim: Multiarch docker images for cross-platform apps
Docker Meetup Mannheim: Multiarch docker images for cross-platform appsStefan Scherer
 
Swarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP Nodes
Swarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP NodesSwarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP Nodes
Swarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP NodesStefan Scherer
 
Build and deploy multiarch Linux and Windows Container images
Build and deploy multiarch Linux and Windows Container imagesBuild and deploy multiarch Linux and Windows Container images
Build and deploy multiarch Linux and Windows Container imagesStefan Scherer
 

Más de Stefan Scherer (6)

Azure Saturday - Build and Deploy multi-arch Docker Images
Azure Saturday - Build and Deploy multi-arch Docker ImagesAzure Saturday - Build and Deploy multi-arch Docker Images
Azure Saturday - Build and Deploy multi-arch Docker Images
 
Docker Meetup Mannheim: Multiarch docker images for cross-platform apps
Docker Meetup Mannheim: Multiarch docker images for cross-platform appsDocker Meetup Mannheim: Multiarch docker images for cross-platform apps
Docker Meetup Mannheim: Multiarch docker images for cross-platform apps
 
Swarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP Nodes
Swarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP NodesSwarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP Nodes
Swarm 2 Go - Build A Portable Multi-Arch Data Center with Pi and UP Nodes
 
Build and deploy multiarch Linux and Windows Container images
Build and deploy multiarch Linux and Windows Container imagesBuild and deploy multiarch Linux and Windows Container images
Build and deploy multiarch Linux and Windows Container images
 
DockerCon 2016 Recap
DockerCon 2016 RecapDockerCon 2016 Recap
DockerCon 2016 Recap
 
Docker on Windows
Docker on WindowsDocker on Windows
Docker on Windows
 

Último

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 

Último (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 

Setup a Dev environment that feels like $HOME on Windows 10

  • 1. Setup a Dev environment that Feels like $HOME Stefan Scherer, SEAL Systems AG
  • 3. Agenda • Windows 10 • Choose your shell • Choose your editor • Vagrant • Docker • .dotfiles
  • 4. Choose your shell CMD PowerShell bash
  • 5. • Windows Subsystem for Linux • Run Linux binaries on Windows • Not just like Cygwin • Real ELF binaries, packages, ... What is WSL?
  • 6. Install WSL • Open Control Panel • Turn Windows features on or off • Select Windows Subsystem for Linux • Open Admin PowerShell Enable-WindowsOptionalFeature ` -Online –FeatureName ` Microsoft-Windows-Subsystem-Linux • Reboot
  • 7.
  • 10.
  • 14. Coming $HOME sudo mkdir /Users cd $HOME/.. windowsuser=$(cmd.exe /c echo %USERNAME% | tr -d 'r') sudo cp -r $USER /Users/$windowsuser sudo chown $USER:$USER /Users/$windowsuser sudo sed -i "s,$HOME,/Users/$windowsuser," /etc/passwd exit
  • 15. Coming $HOME – the lazy way curl https://stefanscherer.github.io/wsl/home.sh | sh
  • 18. Activate metadata for chmod/chown sudo vi /etc/wsl.conf [automount] options = "metadata,umask=22,fmask=11,uid=1000,gid=1000" • Now close the bash terminal and start another Ubuntu shell.
  • 19. Shared code folder echo $HOME # -> eg. /Users/stefan.scherer mkdir /mnt/c$HOME/code ln -s /mnt/c$HOME/code $HOME/code • Now you can clone Git repos in WSL • And edit with Windows editors like Atom or VSCode
  • 20. Install editors of choice iwr -useb https://chocolatey.org/install.ps1 | iex choco install -y atom choco install -y visualstudiocode
  • 22.
  • 23.
  • 24. •VMware Workstation •Vagrant VMware Utility •Vagrant •Vagrant VMware plugin •Other Vagrant plugins •some Patches ...
  • 25. Install VMware and Vagrant utility choco install -y vmwareworkstation choco install -y vagrant-vmware-utility • Workaround for Vagrant 2.1.0: Add a symlink mkdir mntcUsers cmd /c mklink /D mntcUsers$env:USERNAME ` Users$env:USERNAME
  • 26. Prepare Windows – the lazy way curl.exe https://stefanscherer.github.io/wsl/prep.ps1 | iex
  • 27. Install Vagrant in WSL mkdir -p /mnt/c$HOME/.vagrant.d ln -s /mnt/c$HOME/.vagrant.d ~/.vagrant.d sudo chown $USER:$USER ~/.vagrant.d chmod 755 ~/.vagrant.d wget https://releases.hashicorp.com/vagrant/2.1.0/vagrant_2.1.0_x86_64.deb sudo dpkg -i vagrant_2.1.0_x86_64.deb • Add this to your ~/.bashrc export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS=1
  • 28. Prepare Vagrant VMware sudo ln -s /mnt/c/ProgramData/HashiCorp/vagrant-vmware-desktop /opt/vagrant-vmware-desktop vagrant plugin install vagrant-vmware-desktop vagrant plugin license vagrant-vmware-desktop ./license.lic
  • 29. Patch Vagrant 2.1.0 for VMware wget https://raw.githubusercontent.com/StefanScherer/dotfiles/mast er/bin/vmrun.exe-helper sudo cp vmrun.exe-helper '/usr/bin/C:Program Files (x86)VMwareVMware Workstationvmrun.exe' sudo ln -s '/usr/bin/C:Program Files (x86)VMwareVMware Workstationvmrun.exe' /usr/bin/vmrun
  • 30. Install Vagrant VMware – the lazy way curl https://stefanscherer.github.io/wsl/vagrant.sh | sh
  • 31. Run Vagrant boxes cd ~/code mkdir tst vagrant init bento/ubuntu-18.04 vagrant up
  • 32. Use shared folders • Bind mounts work in the Windows user‘s directory • Usable with the shared code folder vagrant ssh touch /vagrant/xxx exit ls xxx
  • 33.
  • 34.
  • 35. •VMware Workstation •docker-machine.exe •Docker Machine VMware plugin •Docker CLI •Docker Compose •some helpers ...
  • 36. Install Docker Machine choco install -y docker-machine choco install -y docker-machine-vmwareworkstation
  • 37. Install Docker CLI and Compose curl https://get.docker.com | sh curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o docker-compose chmod +x docker-compose sudo mv docker-compose /usr/local/bin/docker-compose
  • 38. Install Docker tools – the lazy way curl https://stefanscherer.github.io/wsl/docker.sh | sh
  • 39. Create a Docker Machine docker-machine.exe create -d vmwareworkstation default
  • 40. Switch to a Docker Machine eval $(docker-machine.exe env --shell bash default | sed 's,,/,g' | sed 's,C:,/mnt/c,g') docker version dm default
  • 41. Use bind mounts in Docker • Bind mounts work in the Windows user‘s directory • Usable with the shared code folder cd ~/code docker run -it -v $(pwd):/test ubuntu bash touch /test/xxx exit ls xxx
  • 42. Start and stop Docker Machine docker-machine.exe start default docker-machine.exe stop default docker-machine.exe ls dm dm dm
  • 43.
  • 44. What are .dotfiles? • Save your .bashrc et al files in a GitHub repo • Restore them easily in your VM‘s or in WSL • Install looks like cd ~/code git clone https://github.com/StefanScherer/dotfiles cd dotfiles && ./sync.sh
  • 45. What are .dotfiles? Aliases z - "z foo" - cd to most frecent dir matching foo .. - one dir up ... - two dirs up .... - three dirs up ..... - four dirs up dm start default Docker Machine shortcuts dm default dm stop default
  • 46.