Added comments and tidied package setup.
This commit is contained in:
178
wsl-setup.org
178
wsl-setup.org
@ -11,118 +11,138 @@ This guide will walk through setting up [[https://en.wikipedia.org/wiki/Windows_
|
|||||||
*Acknowledgements:* Large elements of this wsl setup came about through collaboration with the great people at [[https://ii.coop][ii.coop]]. I encourage you to explore and contribute to their work on [[https://gitlab.ii.coop][gitlab]] as many elements form a core part of this setup and workflow.
|
*Acknowledgements:* Large elements of this wsl setup came about through collaboration with the great people at [[https://ii.coop][ii.coop]]. I encourage you to explore and contribute to their work on [[https://gitlab.ii.coop][gitlab]] as many elements form a core part of this setup and workflow.
|
||||||
|
|
||||||
|
|
||||||
* Setup home folder structure
|
** Setup home folder structure
|
||||||
|
|
||||||
This section sets up my preferred set of initial folders inside my home directory.
|
After installing the Debian WSL distribution no folders are present in your home folder.
|
||||||
|
|
||||||
|
In this section we create some quick standard folders to keep our home folder somewhat organised.
|
||||||
|
|
||||||
#+NAME: Setup home folder strucuture
|
#+NAME: Setup home folder strucuture
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
cd ~/
|
# Ensure we are in our home folder
|
||||||
mkdir Documents
|
cd ~/
|
||||||
mkdir Downloads
|
|
||||||
#+END_SRC
|
# Create a documents folder for our git repositories
|
||||||
|
mkdir Documents
|
||||||
|
|
||||||
|
# Create a downloads folder for temporary objects
|
||||||
|
mkdir Downloads
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
* Update and install packages
|
** Update and install packages
|
||||||
|
|
||||||
To get started we ensure the package manager is up to date.
|
To get started we ensure the package manager is up to date.
|
||||||
|
|
||||||
#+NAME: Update system packages
|
#+NAME: Update system packages
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
sudo apt-get update && sudo apt-get upgrade
|
sudo apt-get update && sudo apt-get upgrade
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
Next we install a series of standard packages that form part of our workflow or
|
Next we install a series of standard packages that form part of our workflow or
|
||||||
are dependencies for other tools in our environment.
|
are dependencies for other tools in our environment.
|
||||||
|
|
||||||
#+NAME: Install standard packages
|
#+NAME: Install standard packages
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
# Install basic utilities
|
# Install basic utilities
|
||||||
sudo apt-get install -y git locales curl wget xclip tmux net-tools less wget htop screenfetch
|
sudo apt-get install -y git locales curl wget xclip tmux net-tools less wget htop screenfetch
|
||||||
|
|
||||||
# Install pre-requisites for compiling emacs
|
# Install pre-requisites for compiling emacs
|
||||||
sudo apt-get install -y make gcc libgnutls28-dev libtinfo-dev
|
sudo apt-get install -y make gcc libgnutls28-dev libtinfo-dev
|
||||||
|
|
||||||
# Install dpkg management tools
|
# Install dpkg and apt management tools
|
||||||
sudo apt-get install -y software-properties-common apt-transport-https ca-certificates
|
sudo apt-get install -y software-properties-common apt-transport-https ca-certificates
|
||||||
|
|
||||||
# Install terminal customisation packages
|
# Install terminal customisation packages
|
||||||
sudo apt install -y xterm xtermcontrol
|
sudo apt install -y xterm xtermcontrol
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
We use [[https://pandoc.org/][pandoc]] for documentation export from spacemacs.
|
We use [[https://pandoc.org/][pandoc]] for documentation export from spacemacs and other markup conversion tasks.
|
||||||
|
|
||||||
#+NAME: Install pandoc
|
#+NAME: Install pandoc
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
curl -L -O https://github.com/jgm/pandoc/releases/download/2.7.3/pandoc-2.7.3-1-amd64.deb
|
# Work from our downloads folder
|
||||||
sudo dpkg -i /tmp/pandoc-2.7.3-1-amd64.deb
|
cd ~/Downloads
|
||||||
#+END_SRC
|
|
||||||
|
# Download the latest release (check if newer is available)
|
||||||
|
curl -L -O https://github.com/jgm/pandoc/releases/download/2.9/pandoc-2.9-1-amd64.deb
|
||||||
|
|
||||||
|
# Install the package with dpkg
|
||||||
|
sudo dpkg -i pandoc-2.9-1-amd64.deb
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
For additional package management we use node. The code below installs node ~12~.
|
For additional package management we use [[https://www.npmjs.com/][node package manager]]. The code below installs node ~12~.
|
||||||
|
|
||||||
#+NAME: Install node
|
#+NAME: Install node
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
sudo curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
|
# Curl down the shell script for adding version 12 of nodejs to apt
|
||||||
sudo apt-get install -y nodejs
|
sudo curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
|
||||||
#+END_SRC
|
|
||||||
|
# Install the nodejs package via apt
|
||||||
|
sudo apt-get install -y nodejs
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
For managing secrets we use [[https://bitwarden.com/][bitwarden]] which provides a great [[https://github.com/bitwarden/cli][cli utility]].
|
For managing secrets we use [[https://bitwarden.com/][bitwarden]] which provides a great [[https://github.com/bitwarden/cli][cli utility]].
|
||||||
|
|
||||||
#+NAME: Install bitwarden and login
|
This section should be expanded in future to cover setting alias for common bitwarden tasks.
|
||||||
#+BEGIN_SRC shell
|
|
||||||
export account=[BITWARDEN_ACCOUNT]
|
#+NAME: Install bitwarden and login
|
||||||
sudo npm install -g @bitwarden/cli
|
#+BEGIN_SRC shell
|
||||||
bw login $account
|
# Set an environment variable with our login email for bitwarden
|
||||||
#+END_SRC
|
export account=[BITWARDEN_ACCOUNT]
|
||||||
|
|
||||||
|
# Install the bitwarden cli via node package manager
|
||||||
|
sudo npm install -g @bitwarden/cli
|
||||||
|
|
||||||
|
# Test login to bitwarden
|
||||||
|
bw login $account
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
For working with google cloud platform we use the [[https://cloud.google.com/sdk/][GCP SDK]], which provides our cli tools.
|
For working with google cloud platform we use the [[https://cloud.google.com/sdk/][GCP SDK]], which provides our cli tools.
|
||||||
|
|
||||||
#+NAME: Install google cloud sdk
|
#+NAME: Install google cloud sdk
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
# Add the Cloud SDK distribution URI as a package source:
|
# Add the Cloud SDK distribution URI as a package source:
|
||||||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
||||||
|
|
||||||
# Import the Google Cloud public key:
|
|
||||||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
|
|
||||||
|
|
||||||
# Update then install the Google Cloud SDK & kubectl:
|
# Import the Google Cloud public key:
|
||||||
sudo apt-get update && sudo apt-get install google-cloud-sdk kubectl
|
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
|
||||||
#+END_SRC
|
|
||||||
|
# Update then install the Google Cloud SDK & kubectl:
|
||||||
|
sudo apt-get update && sudo apt-get install google-cloud-sdk kubectl
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
For cloud infrastructure deployments we use [[https://www.terraform.io/][terraforms]].
|
For cloud infrastructure deployments we use [[https://www.terraform.io/][terraforms]].
|
||||||
|
|
||||||
#+NAME: Install hashicorp terraforms
|
#+NAME: Install hashicorp terraforms
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
# Download the binary
|
# Download the binary
|
||||||
wget 'https://releases.hashicorp.com/terraform/0.12.9/terraform_0.12.9_linux_amd64.zip'
|
wget 'https://releases.hashicorp.com/terraform/0.12.9/terraform_0.12.9_linux_amd64.zip'
|
||||||
|
|
||||||
# Unzip it
|
# Unzip it
|
||||||
unzip *.zip
|
unzip *.zip
|
||||||
|
|
||||||
# Move the binary to path
|
# Move the binary to path
|
||||||
sudo mv terraform /usr/bin/
|
sudo mv terraform /usr/bin/
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm *amd64.zip
|
rm *amd64.zip
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+RESULTS:
|
|
||||||
| Archive: | terraform_0.12.9_linux_amd64.zip |
|
|
||||||
| inflating: | terraform |
|
|
||||||
|
|
||||||
|
|
||||||
For ad-hoc system administration we use ansible
|
For ad-hoc system administration we use [[https://deb.nodesource.com/setup_12.x ][ansible]].
|
||||||
|
|
||||||
#+NAME: Install ansible
|
#+NAME: Install ansible
|
||||||
#+BEGIN_SRC shell
|
#+BEGIN_SRC shell
|
||||||
sudo yum install -y ansible
|
# Install ansible via apt package manager
|
||||||
#+END_SRC
|
sudo apt-get install -y ansible
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
* Install iimacs
|
* Install iimacs
|
||||||
@ -170,7 +190,7 @@ This guide will walk through setting up [[https://en.wikipedia.org/wiki/Windows_
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Setup mutt email client
|
* Setup mutt email client
|
||||||
|
|
||||||
For reading email we ideally use a cli based client for fast searching
|
For reading email we ideally use a cli based client for fast searching
|
||||||
|
|||||||
Reference in New Issue
Block a user