Our University Library is a cornerstone of academic resources, aims to enhance accessibility to educational materials through an advanced online platform. You has been asked to develop a cloud-native microservices architecture to support the library's diverse user base and streamline deployment processes. This project is divided into 5 parts as follows:
<style type="text/css"> .highlight { background-color: black; } </style>No. | Title | Task |
---|---|---|
1 | Deploying Microservice with PostgreSQL on Render | Task 4.2P |
2 | Containerizing Microservices with Docker and Deploying to Local Kubernetes | Task 6.2P |
3 | Containerizing Microservices with Docker and Deploying to Azure Managed Kubernetes | Task 7.2P |
4 | Infrastructure as Code with Terraform | Task 8.2C |
5 | CI/CD with Github Actions using Terraform | Task 9.2D |
By end of this project, you will gain a comprehensive understanding of essential DevOps practices and cloud-native application deployment techniques. More specifically, you will be able to do following:
- Create Dockerfiles to containerize application and define the runtime environment.
- Develop Kubernetes YAML files (deployment.yaml and service.yaml) to deploy and manage their microservice on Azure managed Kubernetes cluster.
- Write Terraform scripts (main.tf, variables.tf, outputs.tf, provider.tf) to provision Azure infrastructure.
- Deploy Azure Kubernetes Service (AKS) and integrate PostgreSQL for data storage.
- Configure GitHub Actions workflows to automate the CI/CD pipeline.
- Apply theoretical knowledge to real-world scenarios, enhancing their understanding of cloud computing and DevOps principles.
In this part of the project, you will integrate PostgreSQL to persist book data, enhancing the existing microservice. PostgreSQL offers robust relational database capabilities suitable for managing structured data, which aligns well with the needs of a book management system. You will create Postgres database on Render and deploy microservice.
- Downlaod code from the Task Resources and unzip.
- Create a github repository named :
<your-name-sit722-part1>
. - Add given code to a github repository (local first then push to the remote repo).
- Create account on Render using GitHub if you dont have one yet.
- Create PostgreSQL database instance on Render.
- Once database is created, copy the External Database URL in notepad for future use.
- Create new
WebService
and Deploy your microservice on Render with following settings:- Name: <STUDENT_ID>_SIT722_PART1
- Root Directory:
app
- Build Command:
pip install -r requirements.txt
- Start command:
uvicorn main:app --host 0.0.0.0 --port $PORT
- Set Environment Variable:
- DATABASE_URL: Your POSTGRES DATABASE EXTERNAL URL which you have in notepad.
- Once it is deployed, open
<RENDER_URL>/docs
url in browser. Check different endpoints via Swagger Docs such ascreate new book
,get all book
, anddelete book
.