-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README.md updated * Update README.md updated * Update README.md updated * Update README.md updated * Update README.md updated * Update README.md updated * update reademe and added setup sh for windows update reademe and added setup sh for windows * install & boot minikube for darwin * Install helm & off auto-update in homebrew * 1. Method name change 2. Handle debug with 0 parameter * install helm for windows, remove debug log from minikube installation in windows i. install helm for windows ii.remove debug log from minikube installation in windows * updating readme to have individual readme file updating readme to have individual readme file * updated readme * Update README.md updated. * Update README.md updated * Move environment folder to respective charts * update env folder in README * Remove env folder * updated readme for mysql and updated values yaml updated readme for mysql and updated values yaml * updated readme * NoeAffinity policy dynamic based on env * remove invalid file * Update README.md updated. * Update README.md updated * Update README.md updated. * Update README.md updated * Update README.md updated * Update README.md updated. * Update README.md updated. * 1. Add persistence.enabled to enable pvc 2. Add nodeaffinity in pv dynamic * Update README.md updated. * Update README.md updated. * Update README.md updated. * Required database variable * 1. Update README 2. Change mysql secret var name * Correct path in README * Update README.md updated. * Update README * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated. * Update README.md updated. * chart and readme updated chart and readme updated * mysql db username password update mysql db username password update * Update README.md * chart and read me update for todo-app chart and read me update for todo-app * 1. Correct docker-compose yaml for mysql * Update configuration mysql 1. Add root password 2. Add MYSQL_USER in mysql deployment env * Add mysql rootpassword in docker-compose * Correct secretkey name in deployment.yaml in mysql * read me updated read me updated * Update docker deployment README 1. Add MYSQL_ROOT_PASSWORD * use(/var/lib/mysql) mysql container volume for persistent in docker deployment * Update build.yml add failure result step if test local stack is fail * Update build.yml test failure step * Update build.yml remove test commit * config update for psi-todo in k8s config update for psi-todo in k8s * correct todo config key name * Remove dry-run for uninstall README * 1. Rename env secret file name 2. Update README Co-authored-by: Ayashkant Baral <[email protected]> Co-authored-by: Raghav2211 <[email protected]> Co-authored-by: neo <[email protected]>
- Loading branch information
1 parent
4689898
commit 19dd5bb
Showing
31 changed files
with
469 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Set directory for installation - Chocolatey does not lock | ||
# down the directory if not the default | ||
$InstallDir='C:\ProgramData\chocoportable' | ||
$env:ChocolateyInstall="$InstallDir" | ||
|
||
# If your PowerShell Execution policy is restrictive, you may | ||
# not be able to get around that. Try setting your session to | ||
# Bypass. | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; | ||
|
||
# All install options - offline, proxy, etc at | ||
# https://chocolatey.org/install | ||
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Create an internal switch | ||
New-VMSwitch -name minikube -SwitchType Internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Check and Enable Hyper-V If not enabled | ||
if ((Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online).State -ne 'Enabled') | ||
{ | ||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,50 @@ | ||
# Deploy Todo Application in K8s cluster using helm | ||
# Deploy Todo Application to K8s cluster using helm | ||
|
||
- Setup minikube | ||
https://minikube.sigs.k8s.io/docs/start/ | ||
- Local Deployment | ||
|
||
## Local Deployment ## | ||
|
||
- Setup minikube | ||
|
||
Install Dependencies and run minikube | ||
|
||
```bash | ||
bash setup.sh bootlocal | ||
``` | ||
|
||
- Link host docker client to the VM's docker daemon | ||
```bash | ||
eval $(minikube docker-env) | ||
``` | ||
```bash | ||
eval $(minikube docker-env) | ||
``` | ||
- Build | ||
[Build & Create Docker Image](../README.md#build) | ||
- Deploy mysql | ||
|
||
```bash | ||
helm install mysql ./mysql -f env/<env>/mysql-secret.yaml | ||
``` | ||
or | ||
|
||
```bash | ||
helm install mysql ./mysql -f env/<env>/mysql-secret.yaml -f env/<env>/mysql-values.yaml | ||
``` | ||
[Deploy MySql using helm](mysql/README.md#Installing%20the%20Chart) | ||
- Deploy Todo-app | ||
```bash | ||
helm install psi-todo ./psi-todo | ||
``` | ||
or | ||
|
||
```bash | ||
helm install psi-todo ./psi-todo -f env/<env>/psi-todo-secret.yaml -f env/<env>/psi-todo-values.yaml | ||
``` | ||
[Deploy Todo App using helm](psi-todo/README.md#Installing%20the%20Chart) | ||
- Verify all pods are up and running | ||
```bash | ||
$ kubectl get pods | ||
NAME READY STATUS RESTARTS AGE | ||
psi-todo-6f4f69b7d7-8t8kg 1/1 Running 0 92m | ||
mysql-58b87bf444-pshmk 1/1 Running 0 92m | ||
``` | ||
```bash | ||
$ kubectl get pods | ||
NAME READY STATUS RESTARTS AGE | ||
psi-todo-6f4f69b7d7-8t8kg 1/1 Running 0 92m | ||
mysql-58b87bf444-pshmk 1/1 Running 0 92m | ||
``` | ||
- Execute below command in a separate terminal which creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. | ||
```bash | ||
minikube tunnel | ||
``` | ||
```bash | ||
minikube tunnel | ||
``` | ||
- Access swagger api endpoint with below url. | ||
http://localhost:8080/swagger-ui/ | ||
http://localhost:8080/swagger-ui/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# MySql Helm Chart | ||
|
||
|
||
## Introduction | ||
|
||
This chart bootstraps a single node MySQL deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.19.2 | ||
- PV provisioner support in the underlying infrastructure | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `mysql` with respective environment secret file: | ||
|
||
```bash | ||
# Verify the configuration | ||
$ helm install --dry-run --debug mysql mysql -f mysql/env/<env>/secrets.yaml | ||
|
||
# Install chart | ||
$ helm install mysql mysql -f mysql/env/<env>/secrets.yaml | ||
``` | ||
|
||
To install the chart with the release name `mysql` with respective environment secret and configuration file: | ||
|
||
```bash | ||
# Verify the configuration | ||
$ helm install --dry-run --debug mysql mysql -f mysql/env/<env>/secrets.yaml -f mysql/env/<env>/values.yaml | ||
|
||
# Install chart | ||
$ helm install mysql mysql -f mysql/env/<env>/secrets.yaml -f mysql/env/<env>/values.yaml | ||
``` | ||
|
||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `mysql` deployment: | ||
|
||
```bash | ||
$ helm uninstall mysql | ||
``` | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the MySQL chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
| -------------------------------------------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | ||
| `replica` | Number of instance to run at any time | 1 | | ||
| `image` | `mysql` image configuration. | ` ` | | ||
| `image.repository` | `mysql` image repository. | `mysql`| | ||
| `image.pullPolicy` | `mysql` image pull policy. | `IfNotPresent`| | ||
| `image.tag` | `mysql` image tag. | `8.0.22`| | ||
| `service` | `mysql` service configuration | ` ` | | ||
| `service.type` | Kubernetes service type | `ClusterIP`| | ||
| `service.port` | Service Port to be exposed outside | 3306 | | ||
| `resources` | `mysql` CPU/Memory resource requests/limits | `{}` | | ||
| `persistence` | persistence is to recover data after pod kill | `{}` | | ||
| `persistence.enabled` | persistence is enabled or not | `false ` | | ||
| `persistence.storageClass` | Type of persistent volume claim | ` ` | | ||
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | ` ` | | ||
| `persistence.size` | Size of persistent volume claim | ` ` | | ||
| `persistence.hostPath` | HostPath of the volume to mount | ` ` | | ||
| `config` | Configuration for mysql | `{ database: psi }` | | ||
| `config.database` | Database name | `psi`| | ||
| `username` | Database user name | ` ` | | ||
| `password` | Database password | ` ` | | ||
| `rootPassword` | Database root user password | ` ` | | ||
| `nodeAffinity` | Assign Pods to Nodes using Node Affinity | `[]` | | ||
|
||
|
||
|
||
## Persistence | ||
|
||
A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual Pod that uses the PV, so even if the application pod gets down still the backend data will be retained and when applicatin pod will be up then , persisted data can be accessed. | ||
|
||
PersistentVolume will be created if `persistence.enabled` is set to `true` and if true then data will be mounted into specified directory. In order to disable this functionality `persistence.enabled` should be set to `false`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
username: psi | ||
password: psi | ||
rootPassword: root | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/hostname | ||
operator: In | ||
values: | ||
- minikube | ||
|
||
persistence: | ||
enabled: true | ||
storageClass: local | ||
accessMode: | ||
- ReadWriteOnce | ||
size: 1Gi | ||
hostPath: /mnt/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.