yusufakdas / knowzone

Knowzone is a knowledge sharing application. You can share your recent bugfixes or any new tips with others.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Knowzone

Build and deploy backend to AKS
Build and deploy frontend to AKS

Knowzone is a knowledge sharing application. You can share your recent bugfixes or any new tips with others.

Create Post Browse & Search Posts
create-post posts-and-search
  • We started this project to practice MERN stack and k8s. As we move on the project, we came up with new ideas to make the application more useful. If you want to help us you can contribute to the repository.

  • Knowzone is not available as a service, but you can find instructions for running it locally or on Azure below.

Table of Contents

Installations

  • Install Node.js, version: 14.17.4

  • Install npm

    Note: You may not have to install npm separately but make sure that npm version is 7.20.3 if it comes with Node installation.

    Check the installed version of npm.

    npm -v

    If npm installed on your development environment already, you can update it to a specific version.

    npm install -g npm@7.20.3
  • Install MongoDB Community Edition and make sure that you are able to run mongo shell with mongosh command in a terminal after the installation. Otherwise, you may need to install separately. Details

  • Install MongoDB Compass. This is a nice desktop application for MongoDB. Note: This, may already come with the MongoDB Community Installer.

Running

Node Express

cd server

Note: Install dependencies if you run the application for the first time. Otherwise, you can skip this step.

npm install

Run the application on your development environment.

# This will execute the command corresponding to the dev property
# under the scripts object in server/package.json
npm run dev

See the details of the architecture used in the Node.js project.

React

cd web

Install dependencies.

npm install

Run the application.

npm start

Running on local Kubernetes cluster

Tested on Linux (Ubuntu), macOS, and Windows.
For Windows, running the cluster outside of WSL can cause performance issues. Install the tools in WSL and run the cluster in WSL.

Pre-requisites

  • Docker

    • Only the Docker CLI is required since we are using minikube's internal registry. If you are using Docker Desktop, you can stop Docker daemon by quitting the application.
  • kubectl

  • minikube

  • Tilt

    • Since we are using minikube, you can skip these steps in the Tilt installation:
      • In the preferences, click Enable Kubernetes
      • Make Docker for Windows (or Mac) your local Kubernetes cluster: kubectl config use-context docker-desktop
  • git

Make sure they are in the path by running:

docker --version
kubectl version --client
minikube version
tilt version
git --version

Running Startup Script

cd infra
./init-local.sh run

Startup script is divided into 4 steps:

  1. Create a minikube cluster
  2. Generate Kubernetes manifests
  3. Deploy secret and MongoDB operator
  4. Run Tilt developer environment

You can quit Tilt by pressing Ctrl-C. This does not remove the environment, you can start the development environment again with tilt up. If you want to remove the whole infrastructure, run ./init-local.sh clean. This tears down the minikube cluster, removes the generated manifests and the cloned MongoDB repository.

Running on Azure Kubernetes Service Cluster

Please refer the guide inside infra directory.

About

Knowzone is a knowledge sharing application. You can share your recent bugfixes or any new tips with others.

License:MIT License


Languages

Language:JavaScript 88.9%Language:Shell 8.5%Language:HTML 1.3%Language:CSS 0.8%Language:Starlark 0.5%