Zwing Docs

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.ToolHow to Request?
1SlackDrop a message to your Reporting Manager on Google Chat
2GithubMake a new account using your @gsl.in id, and request access on the #ask-platform channel.
3AzureRaise a request for Azure Access on it desk
4Jira & ConfluenceMessage Rishabh Shukla on
5Cloudflare Zero TrustDrop a message on the #ask-platform channel.
6SentryDrop 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 --version
xcode-select --install

2. 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 --version
brew install gh

4. 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 -v

5. 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 -version

6. Install Azure CLI

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
brew update && brew install azure-cli

7. Install kubelogin plugin

# install (May require using the command ‘sudo’)
az aks install-cli
brew install Azure/kubelogin/kubelogin

8. 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 kubectl

9. 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 ns

10. Clone bootstrap repository

git clone git@github.com:Ginesys-One/bootstrap.git

For 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 azure

Starting 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-up

Help

If you need any help with any of the above mentioned steps, run the following command inside the bootstrap repository.

make init

and share the output with the team #ask-platform channel on slack

Edit on GitHub