Setting up local environment
Getting started with local development.
Introduction
This document outlines the steps you need to follow to setup the dev environment for zwing and ginesys one services.
Request Access
If you are joining our team and it's day 1 for you here, you will have to raise requests on the following platforms to make sure that you have everything you need to get started quickly.
| No. | Tool | How to Request? |
|---|---|---|
| 1 | Slack | Drop a message to your Reporting Manager on Google Chat |
| 2 | Github | Make a new account using your @gsl.in id, and request access on the #ask-platform channel. |
| 3 | Azure | Raise a request for Azure Access on it desk |
| 4 | Jira & Confluence | Message Rishabh Shukla on |
| 5 | Cloudflare Zero Trust | Drop a message on the #ask-platform channel. |
| 6 | Sentry | Drop a message on the #ask-platform channel. |
Once you have access to a minimum of Slack, Github, you can proceed with the following steps.
Dev Setup
To initialise the dev setup, follow the below mentioned steps.
1. Install Git
sudo apt update
sudo apt install git
git --versionxcode-select --install2. Install Docker
https://docs.docker.com/desktop/setup/install/linux/ubuntu/https://docs.docker.com/desktop/setup/install/mac-install/3. Github CLI
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh
gh --versionbrew install gh4. Install NVM (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
nvm install v20.15.0
npm -v
node -v5. Install make
sudo apt update
make -version
# only run the following command if you get an error in above command
sudo apt install make
make -version6. Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bashbrew update && brew install azure-cli7. Install kubelogin plugin
# install (May require using the command ‘sudo’)
az aks install-clibrew install Azure/kubelogin/kubelogin8. Install kubectl command
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"brew install kubectl9. Install krew plugin manager
Make sure that git is installed.
Run this command to download and install krew:
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)Add the $HOME/.krew/bin directory to your PATH environment variable. To do this, update your .bashrc or .zshrc file and append the following line:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"and restart your shell.
Run kubectl krew to check the installation.
Now, we will need to install the ns and ctx plugins.
kubectl krew install ctx
kubectl krew install ns10. Clone bootstrap repository
git clone git@github.com:Ginesys-One/bootstrap.gitFor further guide, follow the Bootstrap Setup steps
Setting up Bootstrap
Run System Checks
Head over to your bootstrap repository, and run the following command. This command will run necessary checks for verifying installations of all necessary tools we need for local development.
make init(Optional) If you are waiting on the azure access, you can skip the following step until you get the access.
make az-login # login to azureStarting Docker Containers
We use a centralized containers for common tools such as postgres, mysql, redis, and kafka, etc. To start the containers, run the following command
make all-upHelp
If you need any help with any of the above mentioned steps, run the following command inside the bootstrap repository.
make initand share the output with the team #ask-platform channel on slack