Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Latest commit

 

History

History
121 lines (88 loc) · 3.31 KB

DEV_SETUP.md

File metadata and controls

121 lines (88 loc) · 3.31 KB

Dev Tools Setup

Recommandation usr MacOs or Linux or WindowsSubsystemLinux to interact with this project.

Minikube setup is require to test/run the application.

See this project to help you for the setup.

1. VSCode

Install VSCode To see recommanded extensions use

2. Python

Install on your system Python3.9

Version Python3.9

End of Support : 2025-10

2.1 Setup / Install VirutalEnv (venv)

#!/usr/bin/env bash

# Install Globally VirtualEnv (venv)
python3.9 -m pip venv

# Setup VirtualEnv in local project dir
python3.9 -m venv .venv

3. NPM Tooling

Install nodejs for tooling execution or use brew for MacOs

#!/usr/bin/env bash

# Install Package contains in package.json
npm install

3.1 Git Hook

Git hook is use to control and provide template for commit.

Hooks:

  • commitizen : Help to write better commit with fix format (take in account by semantic-release)
#!/usr/bin/env bash

git add your_file_to_add_for_commit
# replace git commit and create commit with interaction
npx cz

How to install hook:

#!/usr/bin/env bash

# Use hushky to setup git hook
npx husky install

3.2 Release Tools

Create manually release,tag and package on the Github with semantic-release on git main branch. How to create release manually:

#!/usr/bin/env bash

# Get Token from Github -> Settings 
# -> Developper Settings -> Personnal Access Tokens
# Scope to claim : repo:*
export GITHUB_TOKEN=*********

./script/release.sh

4. Docker

Add the capacity to interact with Github Container Registry for docker-cli Github Docs

#!/usr/bin/env bash

# Get Token from Github -> Settings 
# -> Developper Settings -> Personnal Access Tokens
# Scope to claim : write:packages, read:packages
export GITHUB_TOKEN=*********
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin

4.2 Docker with Minikube

Connect docker-cli to minikube ( replase docker-desktop due to the new licence constraint )

#!/usr/bin/env bash

# Setup Docker Config of docker-cli 
# to use minikube as dockerd backend
eval $(minikube -p minikube docker-env)

5. Skaffold

How to install skaffold

Prepare minikube/kube by creating manually the namespace (only first time)

#!/usr/bin/env bash

kubectl create namespace websocket-example

Command to launch/update application on minikube

#!/usr/bin/env bash

./script/skaffold-run.sh

After installion, you can access to the api