From 5250cdc12e19cfce9123cac9bc025165e9455f69 Mon Sep 17 00:00:00 2001 From: Lucas Bacciotti Date: Sun, 16 Jun 2024 13:15:24 +0100 Subject: [PATCH] Removing terraform files. --- .gitignore | 2 + README.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 .gitignore create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a20a25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +kubernetes/.DS_Store \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d4cb132 --- /dev/null +++ b/README.md @@ -0,0 +1,114 @@ +# User Management API with Flask + +## Introduction + +Welcome to the User Management API project. This professional-grade project is designed to provide a robust and scalable user management system using Flask. It includes comprehensive endpoints for creating, retrieving, updating, and deleting users, as well as a health check endpoint. The infrastructure is managed using Terraform, containers are orchestrated with Kubernetes, and a Makefile is used to streamline commands, testing, and linting. + +## Features + +- **API Endpoints**: + - `POST /users`: Create a new user. + - `GET /users`: Retrieve a list of users. + - `PATCH /users/`: Update an existing user. + - `DELETE /users/`: Delete a user. + - `GET /healthcheck`: Check the health status of the API. + +- **Infrastructure**: + - Managed using Terraform for scalable and efficient resource provisioning. + +- **Container Orchestration**: + - Kubernetes for managing and orchestrating containers, ensuring high availability and scalability. + +- **Development and Testing**: + - A Makefile to organize and simplify commands. + - Integrated testing framework. + - Code linting with Flake8. + - Docker for containerized application deployment. + +## Getting Started + +### Prerequisites + +- Docker +- Kubernetes +- Terraform +- Make +- Python 3.x +- Pip + +### Installation + +1. **Clone the repository**: + ```bash + git clone https://github.com/bacciotti/restapi-flask.git + cd restapi-flask + ``` + +2. **Set up virtual environment**: + ```bash + python3 -m venv venv + source venv/bin/activate + ``` + +3. **Install dependencies**: + ```bash + pip install -r requirements.txt + ``` + +4. **Run the application locally**: + ```bash + make deploy-dev + ``` + +### Infrastructure Setup + +1. **Initialize Terraform**: + ```bash + terraform init + ``` + +2. **Apply Terraform configuration**: + ```bash + terraform apply + ``` + +### Kubernetes Deployment + +1. **Build Docker image**: + ```bash + make build + ``` + +2. **Push Docker image to registry**: + ```bash + make push + ``` + +3. **Deploy to Kubernetes**: + ```bash + make deploy + ``` + +### Testing and Linting + +- **Run tests**: + ```bash + make test + ``` + + +## Contributing + +We welcome contributions from the community. Please fork the repository and submit a pull request with your changes. + +## License + +This project is licensed under the MIT License. + +## Contact + +For any inquiries or issues, please contact us at [your-email@example.com]. + +--- + +Leverage this User Management API to efficiently manage users in your applications with a scalable and reliable infrastructure. As an experienced professional, you can appreciate the thoughtfulness and best practices integrated into this project.