-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change readme to complete explanation
- Loading branch information
1 parent
f4fdabc
commit 2ace9c4
Showing
7 changed files
with
81 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Laravel App - CRUD Services | ||
|
||
This application run the service of Laravel CRUD Application with the database server. Include with the monitoring services using Prometheus and Grafana. | ||
|
||
The application it self contain of : | ||
- Laravel Apps Directory | ||
- Dockerfile and Docker compose script | ||
- Helm chart for deploying locally | ||
- Github Actions Workflow | ||
|
||
The configuration of the deployment to Kubernetes, it's using such as: | ||
- Health Checks | ||
- Horizontal Pod Autoscaling; While the container down, there are some backup to make the pods running up again. | ||
|
||
The monitoring setup with the Helm chart using Prometheus and Grafana, which that also could monitor the Laravel apps | ||
Default of the dashboard itself using Laravel App Metrics. | ||
|
||
The monitoring process its using the default of Kubernetes system, with health checks to show the process of the pods itself | ||
|
||
To run this app, you can try with: | ||
|
||
`helm install <name of the app> .` | ||
|
||
If you want to run separately, such as to work with the container itself and database container, you can try with: | ||
|
||
`docker pull mrfzy00/crud_laravel_api-sre-test-app:latest` | ||
`docker run -d -p 8000:8000 --name <the container name> crud_laravel_api-sre-test-app` | ||
|
||
Or you would try with run the app combined with docker compose its okay | ||
|
||
To run the database you can start: | ||
`docker-compose up -d` | ||
|
||
The database will start the service itself | ||
|
||
![Local Infrastructure Kubernetes Diagram](infra-local-diagram.png "Local Infrastructure Diagram") |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,20 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "laravel-minikube.fullname" . }} | ||
labels: | ||
app: {{ include "laravel-minikube.name" . }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "laravel-minikube.fullname" . }} | ||
minReplicas: {{ .Values.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.autoscaling.maxReplicas }} | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} |
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