Skip to content

Instantly share code, notes, and snippets.

@brucevanhorn2
Last active May 10, 2022 17:21
Show Gist options
  • Save brucevanhorn2/e2317c1c51a1b75287c2ac241ae935c9 to your computer and use it in GitHub Desktop.
Save brucevanhorn2/e2317c1c51a1b75287c2ac241ae935c9 to your computer and use it in GitHub Desktop.
Windows Dev Machine Setup
<#
This script is designed to automate the set up of developer machines at Clear Technologies for work on Visual Storage Intelligence.
It should be run on a Windows 10 computer. I usually run a de-bloat script first, then I run this one.
Basically it install chocolatey then uses it to install everything we need to do our work.
It's mostly an unattended install but if you want to repos towards the bottom to be checked out you should copy the generated key
to beanstalk while the script is paused.
#>
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
Invoke-Expression((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# TODO: I should prompt for the user name if anybody but me is going to use this
ssh-keygen -N P@ssw0rd -f C:\Users\bvanhorn\.ssh\id_rsa
Get-Content ~/.ssh/id_rsa.pub
# beanstalk has an api that allows the key to be added with an http post. i should try to automate that.
Read-Host -Prompt "Copy your ssh key to beanstalk then press any key to continue."
wsl --install -d Ubuntu-20.04
choco install -Force -y visualstudio2019buildtools # you need this to build pip packages
choco install -Force -y brave
choco install -Force -y microsoft-windows-terminal
choco install -Force -y git
choco install -Force -y jetbrainstoolbox
choco install -Force -y vscode
choco install -Force -y sql-server-management-studio
choco install -Force -y tortoisesvn
choco install -Force -y python
choco install -Force -y nodejs
choco install -Force -y imagemagick # you need this for working on the autobot
choco install -Force -y jetbrainstoolbox
if(Test-Path -Path "C:\vsi"){
Remove-Item 'c:\vsi' -Recurse
}
New-Item -ItemType directory -Path C:\vsi
New-Item -ItemType directory -Path c:\vsi\src
Set-Location c:\vsi\src
git clone [email protected]:/visual-storage-intelligence/vsi_react.git
Set-Location vsi_react
npm install
npm install -g yarn highcharts-export-server # you need this for working on the autobot
Set-Location c:\vsi\src
git clone [email protected]:/visual-storage-intelligence/vsi_sheet_runner.git
git clone [email protected]:/visual-storage-intelligence/vsi_api_git.git
git clone [email protected]:/visual-storage-intelligence/vsi_ai_analysis_service.git
# TODO: add all the most common repos not just the ones I usually work on
New-Item -ItemType directory -Path c:\vsi\virtual-env
Set-Location c:\vsi\virtual-env
python -m venv venv-vsi-api
# TODO: activate the venv and install requirements. to the same for the others.
python -m venv venv-vsi-sheet-runner
python -m venv venv-vsi-autobot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment