gavinjalberghini / Pantry

0 stars 0 forks source link

[FEATURE]: Set Up Linux VM #3

Closed gavinjalberghini closed 1 week ago

gavinjalberghini commented 1 week ago

Contact Details

self

Associated Storyboard

n/a

What is the intended function of the feature?

Motivation: Windows environment isnt translatable to RasberryPi and NvidiaJetson. Additionally, the workstation is OSx.

Description: To avoid inconsistencies between environments we should create instillation media (scripts, automation, documentation, etc..) to configure a Linux VM on Windows.

Value Proposition: Creates stable and reproducible environment for testing and development

Acceptance Criteria:

Implementation Suggestions

n/a

Code of Conduct

gavinjalberghini commented 1 week ago

1.0.0 VM Software Options

Notes:

gavinjalberghini commented 1 week ago

1.0.1 Initial Thoughts

gavinjalberghini commented 1 week ago

1.1.0 Installing WSL 2 on Windows 10 and Configuring Software Packages

WSL Setup

source material 1 - Installing WSL2 source material 2 - Configuring passwordless sudo

  1. Open the command prompt as administrator and run wsl.exe --install
  2. Once you have set your username and password, run uname -r to verify that you are using WSL2
  3. Run the following to configure sudo to not require a password
    echo "%${USER} ALL=(ALL) NOPASSWD:ALL" | sudo EDITOR='tee ' visudo --quiet --file=/etc/sudoers.d/passwordless-sudo
  4. Run the following to update your Ubuntu environment:
    sudo apt-get update & sudo apt-get upgrade -y

Software Deps

  1. Install git

    sudo add-apt-repository ppa:git-core/ppa
    sudo apt update
    sudo apt install git
  2. Install docker

    sudo apt install --yes apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository -y "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    apt-cache policy docker-ce
    sudo apt install --yes docker-ce
    sudo systemctl status docker --no-page
  3. Install kubectl

    curl -SsL https://dl.k8s.io/release/v1.21.0/bin/$(uname |  tr '[:upper:]' '[:lower:]')/$(dpkg --print-architecture)/kubectl -o kubectl
    sudo mv kubectl /usr/local/bin
    sudo chmod +x /usr/local/bin/kubectl
  4. Install helm

    curl -SsLO https://get.helm.sh/helm-v3.8.2-$(uname |  tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture).tar.gz
    tar -zxvf helm-v3.8.2-$(uname |  tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture).tar.gz
    sudo mv linux-$(dpkg --print-architecture)/helm /usr/local/bin
    sudo chmod +x /usr/local/bin/helm
    rm -Rf linux-$(dpkg --print-architecture)
    rm helm-v3.8.2-$(uname |  tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture).tar.gz
  5. Install Kustomize

    curl -SsL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.7/kustomize_v4.5.7_linux_$(dpkg --print-architecture).tar.gz | tar xz -C /tmp
    sudo mv /tmp/kustomize /usr/local/bin
  6. Install SOPS

    curl -SsLO https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.$(uname | tr '[:upper:]' '[:lower:]').$(dpkg --print-architecture)
    sudo mv sops-v3.7.3.$(uname |  tr '[:upper:]' '[:lower:]').$(dpkg --print-architecture) /usr/local/bin/sops
    sudo chmod +x /usr/local/bin/sops
gavinjalberghini commented 1 week ago

1.2.0 Script Automation for Ubuntu Deps

See here

gavinjalberghini commented 1 week ago

1.3.0 Notes

You can configure your default git editor via: git config --global core.editor "vim"