Skip to content

Commit 0b38cde

Browse files
authored
Update README.md
1 parent bb9bcc5 commit 0b38cde

1 file changed

Lines changed: 187 additions & 42 deletions

File tree

README.md

Lines changed: 187 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,212 @@
1+
12
# DevOps-GPT
2-
Use a brilliant assistant as your friend in your DevOps Journey.
33

4-
## What does this project offer?
5-
This project helps you to balance your daily work as a DevOps engineer, from simple bug fixes to project template generation.<br />
6-
you don't need to search on Google for some routine jobs and it helps you with a robust prompt to simplify your career.
4+
This project helps you to balance your daily work as a DevOps engineer, from simple bug fixes to project template generation. you don't need to search on Google for some routine jobs and it helps you with a robust prompt to simplify your career.
75

8-
## How it works?
9-
This is a wrapper between DevOps engineers and large language models like GPT-4-mini. The main strength of it is prompt engineering.<br />
106

11-
We have developed some (Extendable) prompt-driven solutions with a simplified interface for the DevOps process cost reduction.<br />
7+
## Run Locally
128

13-
### Docker services
14-
We run our services using docker-compose (the main Fast-API-based backend and MongoDB), so we package all dependencies and don't use any external service.<br />
15-
The second one is Mongodb. we need to save the prompt and GPT-4_mini response in the Mongo document for future use. (for example, fine-tuning the other model with our data) <br />
9+
Clone the project
1610

17-
### Media directory
18-
The third one is in the media directory. for now, We save a project called (MyTerraform) which is a Terraform template generated based on user requirements. so users can download it and use it.<be />
19-
surely we can save any static data in the `/media`.
11+
```
12+
git clone https://github.com/devopshobbies/devops-gpt.git
13+
```
2014

21-
![teramedia](https://github.com/user-attachments/assets/b8e10d83-68ac-4efc-b064-45f1d1a870dc)
15+
Go to the project directory
2216

23-
This is an example of a template generated in the `/media`
17+
```
18+
cd devops-gpt
19+
```
2420

25-
and the input is something like that
21+
Run the project by its docker-compose
2622

27-
![Screenshot from 2024-10-27 10-56-54](https://github.com/user-attachments/assets/63d1db07-2c25-4c10-a841-69a2c1235d9d)
23+
```
24+
sh run.sh
25+
```
2826

2927

3028

31-
### directory_generators
32-
This directory becomes updated when we trigger the template generation API. finally, It generates the MyTerraform directory based on user input which is a template.
3329

30+
## Deployment
3431

35-
## ToolChain
36-
1. Python
37-
2. Docker
38-
3. GPT-4o-mini
39-
4. FastAPI
40-
5. Helm
32+
If you want to run and use this chatbot app within your Kubernetes cluster, you can easily install it using the Helm chart provided in this repository
33+
34+
```
35+
helm install [RELEASE_NAME] helm/ -f helm/values.yaml
36+
```
4137

42-
## Pre-requisites
43-
1. Python
44-
2. Docker
4538

46-
## How to use?
47-
execute `sh run.sh` in your terminal
4839

49-
> [!WARNING]
50-
> Do Not change the GPT model! Prompts have been developed for the GPT-4-mini model and they can't be integrated with other GPT models. it can cause horrible incompatibility.
5140

52-
## Run it local on kubernetes
53-
If you want to run and use this chatbot app within your Kubernetes cluster, you can easily install it using the Helm chart provided in this repository
41+
## Running Tests
42+
43+
To run tests, run the following command
44+
45+
```
46+
cd app && pytest tests/
47+
```
48+
49+
50+
51+
52+
## Environment Variables
53+
54+
To run this project, you will need to add the following environment variables to your .env file
55+
56+
`KEY` (OpenAI API Key)
57+
58+
59+
60+
61+
## API Reference
62+
63+
#### Get helm items
64+
65+
```
66+
GET /download-helm/{filename}
67+
```
68+
69+
| Parameter | Type | Description |
70+
| :-------- | :------- | :------------------------- |
71+
| `filename` | `string` | **Required** |
72+
73+
#### Get terraform items
74+
75+
```
76+
GET /download-terraform/{filename}
77+
```
78+
79+
| Parameter | Type | Description |
80+
| :-------- | :------- | :-------------------------------- |
81+
| `filename` | `string` | **Required** |
82+
83+
#### Get list dirs
84+
85+
```
86+
GET /list-directory
87+
```
88+
89+
| Request Body | Type | Description |
90+
| :-------- | :------- | :-------------------------------- |
91+
| `folder` | `string` | **Required** |
92+
93+
94+
#### Post terraform basic questions
95+
96+
```
97+
POST /IaC-basic/
98+
```
99+
100+
| Request Body | Type | Description |
101+
| :-------- | :------- | :-------------------------------- |
102+
| `max_tokens` | `int` | **Required** |
103+
| `min_tokens` | `int` | **Required** |
104+
| `service` | `string` | **Required** |
105+
| `input` | `string` | **Required** |
106+
107+
108+
#### Post terraform bugfix
109+
110+
```
111+
POST /IaC-bugfix/
112+
```
113+
114+
| Request Body | Type | Description |
115+
| :-------- | :------- | :-------------------------------- |
116+
| `max_tokens` | `int` | **Required** |
117+
| `min_tokens` | `int` | **Required** |
118+
| `service` | `string` | **Required** |
119+
| `bug_description` | `string` | **Required** |
120+
| `version` | `string` | **Required** |
54121

55-
helm install [RELEASE_NAME] helm/ -f helm/values.yaml
56-
# Test
57122

58-
Run tests:
123+
124+
#### Post terraform installation
125+
59126
```
60-
cd app
61-
pytest tests/
127+
POST /IaC-install/
62128
```
63-
# Contributing
64-
please read the [Contribution guide](https://github.com/abolfazl8131/devops-gpt/blob/master/CONTRIBUTING.md)
129+
130+
| Request Body | Type | Description |
131+
| :-------- | :------- | :-------------------------------- |
132+
| `os` | `string` | **Required** |
133+
| `service` | `string` | **Required** |
134+
135+
136+
#### Post terraform template generation of docker resources
137+
138+
```
139+
POST /IaC-template/docker
140+
```
141+
142+
| Request Body | Type | Description |
143+
| :-------- | :------- | :-------------------------------- |
144+
| `docker_image` | `boolean` | **Required** |
145+
| `docker_container` | `boolean` | **Required** |
146+
147+
148+
#### Post terraform template generation of Ec2 resources
149+
150+
```
151+
POST /IaC-template/aws/ec2
152+
```
153+
154+
| Request Body | Type | Description |
155+
| :-------- | :------- | :-------------------------------- |
156+
| `key_pair` | `boolean` | **Required** |
157+
| `security_group` | `boolean` | **Required** |
158+
| `aws_instance` | `boolean` | **Required** |
159+
| `ami_from_instance` | `boolean` | **Required** |
160+
161+
#### Post terraform template generation of S3 resources
162+
163+
```
164+
POST /IaC-template/aws/s3
165+
```
166+
167+
| Request Body | Type | Description |
168+
| :-------- | :------- | :-------------------------------- |
169+
| `s3_bucket` | `boolean` | **Required** |
170+
| `s3_bucket_versioning` | `boolean` | **Required** |
171+
172+
173+
#### Post terraform template generation of IAM resources
174+
175+
```
176+
POST /IaC-template/aws/iam
177+
```
178+
179+
| Request Body | Type | Description |
180+
| :-------- | :------- | :-------------------------------- |
181+
| `iam_user` | `boolean` | **Required** |
182+
| `iam_group` | `boolean` | **Required** |
183+
184+
185+
186+
## Tech Stack
187+
188+
**Client:** React + TypeScript + Vite
189+
190+
**Server:** Python + FastAPI
191+
192+
**Containerization:** Docker + Kubernetes
193+
194+
**CI/CD**: Github Actions
195+
196+
197+
198+
199+
## Contributing
200+
201+
Contributions are always welcome!
202+
203+
See `CONTRIBUTING.md` for ways to get started.
204+
205+
206+
207+
65208
# Maintenance
66-
** [Abolfazl Andalib](https://github.com/abolfazl8131) - abolfazlandalib@gmail.com **<br />
209+
210+
** [Abolfazl Andalib](https://github.com/abolfazl8131) - abolfazlandalib@gmail.com **
211+
67212
** [Mohammad Madanipour](https://github.com/mohammadll) - m.madanipourr@gmail.com **

0 commit comments

Comments
 (0)