Skip to content

Commit

Permalink
Update structure project
Browse files Browse the repository at this point in the history
  • Loading branch information
vectornguyen76 committed Dec 2, 2023
1 parent 69bd4dd commit b87f619
Show file tree
Hide file tree
Showing 470 changed files with 188 additions and 138 deletions.
84 changes: 65 additions & 19 deletions kubernetes/helm-charts/README.md → helm-charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,60 @@
Helm is a package manager for Kubernetes, simplifying the process of defining, installing, and upgrading Kubernetes applications. This document provides guidelines and references for using Helm Charts with various Kubernetes services and tools.

## Table of Contents
1. [Model Repository S3](#model-repository-s3)
2. [Install aws-ebs-csi-driver](#install-aws-ebs-csi-driver)
3. [Install the Charts](#install-the-charts)
4. [Upgrade Charts](#upgrade-charts)
5. [Uninstall Charts](#uninstall-charts)
6. [Clean up PVC](#clean-up-pvc)
7. [Check-resources](#check-resources)
8. [References](#references)
1. [Architecture](#architecture)
2. [Create Cluster and NodeGroup](#create-cluster-and-nodegroup)
3. [Model Repository S3](#model-repository-s3)
4. [Install aws-ebs-csi-driver](#install-aws-ebs-csi-driver)
5. [Install Charts](#install-charts)
- [Ingress Nginx Controller](#ingress-nginx-controller)
- [Postgresql](#postgresql)
- [Elastic Search](#elastic-search)
- [Qdrant](#qdrant)
- [Prometheus and Grafana](#prometheus-and-grafana)
- [Triton Inference Server](#triton-inference-server)
- [Image Search Application](#image-search-application)
- [Text Search Application](#text-search-application)
- [Backend Application](#backend-application)
- [Frontend Application](#frontend-application)
6. [Upgrade Charts](#upgrade-charts)
7. [Uninstall Charts](#uninstall-charts)
8. [Clean up PVC](#clean-up-pvc)
9. [Check Resources](#check-resources)
10. [References](#references)

## Architecture

<p align="center">
<img src="./assets/kubernetes-architecture.png" alt="Kubernetes Architecture Diagram" />
<br>
<em>Fig: Kubernetes Architecture</em>
</p>

## Create Cluster and NodeGroup

- **Creating a Cluster and Node Group**

```
eksctl create cluster -f cluster-config-eksctl.yaml
```

<p align="center">
<img src="./assets/create-cluster.png" alt="Creating a Cluster and Node Group" />
<br>
<em>Fig: Creating a Cluster and Node Group</em>
</p>

- **Deleting a Cluster and Node Group**

```
eksctl delete cluster -f cluster-config-eksctl.yaml --disable-nodegroup-eviction
```

<p align="center">
<img src="./assets/delete-cluster.png" alt="Deleting a Cluster and Node Group" />
<br>
<em>Fig: Deleting a Cluster and Node Group</em>
</p>

## Model Repository S3
Instructions to create an S3 bucket and copy a model repository from local to S3.
Expand Down Expand Up @@ -49,7 +95,7 @@ kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernete

Review the [configuration values](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/charts/aws-ebs-csi-driver/values.yaml) for the Helm chart.

## Install the Charts
## Install Charts
Step-by-step instructions to create namespaces and install various Helm charts like Ingress Nginx Controller, Postgresql, Elastic Search, Qdrant, Prometheus, Grafana, and others.

- **Create Namespaces**
Expand All @@ -61,33 +107,33 @@ Step-by-step instructions to create namespaces and install various Helm charts l
kubectl create namespace monitoring
```

1. **Ingress Nginx Controller**
### Ingress Nginx Controller
Installs the Ingress Nginx controller using Helm.
```bash
helm install ingress-nginx ./ingress-nginx --namespace ingress-nginx
```

2. **Postgresql**
### Postgresql
Build dependencies and then install Postgresql Helm Chart.
```bash
helm dependency build ./postgresql
helm install database ./postgresql --namespace database --set auth.username=db_user,auth.password=db_password,auth.database=db_dev
```

3. **Elastic Search**
### Elastic Search
Build dependencies and then install Elastic Search Helm Chart.
```bash
helm dependency build ./elasticsearch
helm install elasticsearch ./elasticsearch --namespace database --set master.masterOnly=false,master.replicaCount=1,data.replicaCount=0,coordinating.replicaCount=0,ingest.replicaCount=0,master.nodeSelector.nodegroup-type=cpu-nodegroup
```

4. **Qdrant**
### Qdrant
Install Qdrant Helm Chart for vector search engine.
```bash
helm install qdrant ./qdrant --namespace database --set nodeSelector.nodegroup-type=cpu-nodegroup
```

5. **Prometheus and Grafana**
### Prometheus and Grafana
Install Prometheus and Grafana for monitoring. Assumes availability of Prometheus and Grafana.
```bash
helm dependency build ./kube-prometheus-stack
Expand All @@ -99,7 +145,7 @@ Step-by-step instructions to create namespaces and install various Helm charts l
kubectl port-forward service/monitoring-kube-prometheus 9090:9090 --namespace monitoring
```

6. **Inference Server**
### Triton Inference Server
Load models from AWS S3 and deploy the inference server using Helm.
Convert AWS credentials to base64 and update `values.yaml`.
```bash
Expand All @@ -116,25 +162,25 @@ Step-by-step instructions to create namespaces and install various Helm charts l
helm install model-serving ./triton-inference-server --namespace model-serving --set nodeSelector.nodegroup-type=gpu-nodegroup
```

7. **Image Search Application**
### Image Search Application
Install Image Search Application Helm Chart.
```bash
helm install image-search-app ./image-search --namespace application --set nodeSelector.nodegroup-type=cpu-nodegroup
```

8. **Text Search Application**
### Text Search Application
Install Text Search Application Helm Chart.
```bash
helm install text-search-app ./text-search --namespace application --set nodeSelector.nodegroup-type=cpu-nodegroup
```

9. **Backend Application**
### Backend Application
Install Backend Application Helm Chart.
```bash
helm install backend-app ./backend --namespace application --set nodeSelector.nodegroup-type=cpu-nodegroup
```

10. **Frontend Application**
### Frontend Application
Install Frontend Application Helm Chart.
```bash
helm install frontend-app ./frontend --namespace application --set nodeSelector.nodegroup-type=cpu-nodegroup
Expand Down
File renamed without changes
Binary file added helm-charts/assets/create-cluster.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added helm-charts/assets/delete-cluster.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added helm-charts/assets/kubernetes-architecture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions helm-charts/cluster-config-eksctl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: test-cluster
region: us-east-1
tags:
ApplicationName: "QAI-Monitoring"
Purpose: "Training"
Project: "QAI_Monitoring"
ProjectID: "QAI_Monitoring"
Creator: "PhuocNV9"
OwnerService: "PhuocNV9"

nodeGroups:
- name: cpu-nodegroup
instanceType: t3.medium
instanceName: eks-cpu-node
minSize: 1
maxSize: 3
volumeSize: 50
volumeType: gp3
desiredCapacity: 1
iam:
withAddonPolicies:
imageBuilder: true
autoScaler: true
externalDNS: true
certManager: true
appMesh: true
appMeshPreview: true
ebs: true
fsx: true
efs: true
labels:
nodegroup-type: cpu-nodegroup

- name: gpu-nodegroup
instanceType: g4dn.xlarge
instanceName: eks-gpu-node
minSize: 1
maxSize: 3
volumeSize: 60
volumeType: gp3
desiredCapacity: 1
iam:
withAddonPolicies:
imageBuilder: true
autoScaler: true
externalDNS: true
certManager: true
appMesh: true
appMeshPreview: true
ebs: true
fsx: true
efs: true
labels:
nodegroup-type: gpu-nodegroup

availabilityZones: ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b87f619

Please sign in to comment.