Developer tools
Installation of each product should be carried out following the distributors current guidance, depending on your operating system.
Docker Desktop
A cross-platform GUI tool to help developers build images to create containers for application development and deployment to cloud containers in azure. Desktop docker allows the user full administrative rights over all aspects of the development of applications which run transparently in a virtual machine containers. Docker Desktop is Written using the go language to take advantage of the linux kernal to deliver its functionality, utilising a technology called namespaces to achieve containerisation For tech guidance instructions.
Azure CLI
The Azure Command-Line Interface (CLI) is a cross-platform command-line tool to connect to Azure and execute administrative commands on Azure resources. It allows the execution of commands through a terminal using interactive command-line prompts or a script.
GIT
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Terraform
The Terraform software is an infrastructure as code (IaC) tool that allows you to build, change, and version infrastructure safely and efficiently.
Installation
Follow these instructions. Or install using tfenv as detailed under Versions below.
Versions
When installing Terraform locally it is important to make sure you have a version that matches the Github version.
Pin the version in a GitHub Actions workflow:
- name: Pin Terraform version uses: hashicorp/setup-terraform@v1 with: terraform_version: 0.13.1
Pin the version in Terraform code (e.g. versions.tf):
terraform { required_version = ">= 0.13.1" }
Install a matching version locally
To allow you to manage multiple versions locally, it is suggested to use tfenv:
- Install:
brew install tfenv
- List remote available versions:
tfenv list-remote
- Install a specific version:
tfenv install 0.13.1
- List all versions which are installed locally:
tfenv list
- Use a specific version:
tfenv use 0.13.1
State
Terraform keeps a register of all the resources it has created in a long json file called the state file. This allows keeping them under control to validate configuration, update or remove them. To work in a team and in automation, terraform provides remote storage so the state can be shared. We recommend storing it as a Blob Container within the Blob Storage Account
Since the state is critical, we strongly recommend using versioning. This allows restoring the state in case it’s deleted or restoring a previous version in case it’s corrupted or updated by mistake (new terraform version for instance). Soft delete for blobs and soft delete for containers are important too.
Ruby
Using RVM
- install homebrew, this will ask to install the xcode command line tools if you dont have it already
Run
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- install gpg2
Run
brew install gpg2
- import the RVM keys do not use these keys get them from the official website (https://rvm.io/rvm/security) as they change often
Run
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
- trust the first key
Run
echo 409B6B1796C275462A1703113804BB82D39DC0E3:6: | gpg2 --import-ownertrust # mpapis@gmail.com
- install rvm
Run
\curl -sSL https://get.rvm.io | bash -s stable
- enable rvm (replace
) Run source /Users/<your-user-name>/.rvm/scripts/rvm
- install ruby 2.7.4
Run
rvm install ruby 2.7.4
- switch your system to use ruby 2.7.4
Run
rvm use 2.7.4` - install yarn
Run
brew install yarn
Asdf
Introduction
The asdf software is a version manager used for managing software you install on your computer, it’s a command line interface
tool that handles installing multiple versions of software packages, allowing you to switch between those versions at runtime.
Ruby and Terraform are examples of software which can be managed using asdf
. As the .tool-versions
file is committed to the
repository, it ensures consistency among developers.
Each software package is managed by a plugin, here is the official list of plugins.
Installation
The required versions of project dependencies are defined in the .tool-versions
file of the repository and these can be automatically installed using
asdf
. Their installation instructions can be found here.
Commands
- Install a plugin:
asdf plugin add <plugin_name>
- List installed plugins:
asdf plugin list
- List installed versions of a plugin:
asdf list <plugin_name>
- List all possible versions of a plugin:
asdf list <plugin_name> all
- Install specific version of a plugin:
asdf install <plugin_name> <plugin_version>
- Update the
.tool-versions
file with a new plugin version:asdf local <plugin_name> <plugin_version>
- for issues attempting to install in linux, try https://deanpcmad.com/2022/installing-older-ruby-versions-on-ubuntu-22-04/
WSL - Windows Subsystem for Linux
A windows subsystem that allows users to run Linux without the need of a vm. The present version is v2, with has performance benefits.
Installation
See https://learn.microsoft.com/en-us/windows/wsl/install for devices that are not locked down
See https://learn.microsoft.com/en-us/windows/wsl/install-manual for device that are (vpn and policy conditions)
Working with a VPN: using the DfE VPN you will need to install wsl-vpnkit here and confirm it running with ‘wsl -l –running’ along with Ubuntu.
Working with VS Code.
These is an extension that will allow for better integration with wsl, search in the extensions for ‘wsl’ or see the extension here
Working with GIT
For git, you will need to set the ‘git config –global credential.helper’, see here for detailed instructions. You may need to search the the credential helper, as opposed to the ones listed in the docs.