Platform Developer Environment Setup
This document lists all the tools (with the correct versions) required to perform DevOps work on the OneConnect platform.
While most of these are required on developer workstations, some may need to be installed within deployment tools like GitHub Actions, Jenkins, etc.
This document MUST be kept current with the versions used in production.
Build tools
General tools and plug-ins to build OneConnect infrastructure.
git
Version: any recent version
Git is a distributed version control system. Git must be installed, ssh keys registered with github, and access granted to ATLNZ's github.
Check git is installed:
Check ssh access to github, and check the username shown is what you expect:~$ ssh -T git@github.com
Hi user-atlnz! You've successfully authenticated, but GitHub does not provide shell access.
Git is generally installed on linux, but install instructions exist on git's website. Instructions for setting up a ssh key for github can be found on github's website. If you do not have access to ATLNZ's github, contact your team lead.
pip
Version: any for python3
pip is a python package manager.
Check pip is installed:
Installing pip
pre-commit
Version: v4.3.0
pre-commit is a framework for managing and running automated checks on code before git commits are created (on the pre-commit git hook). pre-commit is used across all OneConnect projects to ensure consistent code standards.
Installing pre-commit
Check the pre-commit command works and the installed version:
pre-commit: command not found
If the command is not found, the place pip puts executables may not be on your PATH. Check if "$HOME/.local/bin:$PATH" exists in your ~/.bashrc.
If not add it:
Deployment tools
Use-case specific tooling for building OneConnect CI/CD components.
AWS CLI
Version: 2.33.4
The AWS CLI tool lets you interact with and manage Amazon Web Services (AWS) resources from the command line.
Official install instructions here.
Installing aws cli
~$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.33.4.zip" -o "awscliv2.zip"
~$ unzip awscliv2.zip
~$ sudo ./aws/install
aws-vault
Version: 7.7.8
aws-vault is a cli tool to store AWS credentials for multiple users and switch between them easily.
Installing aws-vault
~$ curl -Lo ~/aws-vault-v7.7.8-linux-amd64 https://github.com/ByteNess/aws-vault/releases/download/v7.7.8/aws-vault-linux-amd64
~$ chmod +x ~/aws-vault-v7.7.8-linux-amd64
~$ sudo mv ~/aws-vault-v7.7.8-linux-amd64 /usr/local/bin/aws-vault
sops
Version: 3.11.0
sops is a CLI tool to encrypt and decrypt configuration files (YAML, JSON, ENV, ...) using cloud KMS or PGP, enabling secure storage of secrets in git (or elsewhere).
~$ curl -Lo ~/sops-v3.11.0.linux.amd64 https://github.com/getsops/sops/releases/download/v3.11.0/sops-v3.11.0.linux.amd64
~$ chmod +x ~/sops-v3.11.0.linux.amd64
~$ mv ~/sops-v3.11.0.linux.amd64 /usr/local/bin/sops
tfenv
Version: 3.0.0
tfenv is a cli tool to install and switch between multiple versions of Terraform.
Installing tfenv
~$ git clone https://github.com/tfutils/tfenv.git ~/tfenv
~$ cd ~/tfenv/
~$ git checkout v3.0.0
~$ chmod +x ~/tfenv/bin/tfenv
~$ chmod +x ~/tfenv/bin/terraform
~$ mkdir -p ~/.local/bin/
~$ ln -s ~/tfenv/bin/tfenv ~/.local/bin/tfenv
~$ ln -s ~/tfenv/bin/terraform ~/.local/bin/terraform
terraform
Version: 1.7.0
terraform is an infrastructure-as-code (IaC) tool that lets you define, provision, and manage cloud (or on-prem) infrastructure in a declarative configuration language, enabling consistent and repeatable deployments.
Installing terraform
The best way to install and manage terraform is with tfenv (check the instructions to install tfenv in this same readme).
With tfenv installed, navigate to a folder with terraform scripts and use tf-env to install terraform. For example:
~$ git clone git@github.com:alliedtelesis-labs-nz/oc-infrastructure.git ~/oc-infrastructure
~$ cd ~/oc-infrastructure/infrastructure/apps/one-connect/
~$ tfenv install 1.7.0
~$ tfenv use 1.7.0
Monitoring tools
Monitoring and trouble-shooting tools.
Misc tools
Miscellaneous tools.