She Code Africa Cloud School Program Final Project Link: http://20.87.94.72:3000/
Using Terraform to provision AKS,ACR and MSSQL database to deploy full stack application on kubernetes
This is a final project for the She cloud Africa Cloud School Program 2023.
It is a fullstack project that queries data from a Azure SQL Sample database and displays on the website. The project contains two text files and should translate to the main.tf and node_mssql.yaml file. Due to the size limit of github, i decided to upload them as text files.
- Terraform
- Azure Kubernetes Sevice
- Azure Container Registry
- Ms-SQL database
- Docker
- Node JS
- ejs templating
-
The app is containerised using docker and its image is sent Azure Container Registry.
-
The image is then pulled by the Azure kubernetes Service and deployed.
- Used terraform to provision the Azure Container Registry, Azure kubernetes Cluster, and MS-SQL database.
- Created an app that queries the MS-SQL database.
- Created a docker file and built an image of the app.
- Pushed the image to Azure Container Registry.
- Used a yaml file to deploy the app on Azure Kubernetes Service
- Clone project
git clone https://github.com/maqamylee0/SheCloudSchoolDevOps
- Rename files
Rename files accordingly to main.tf intead of maintf.txt and node_mssql.yaml instead of node_mssqlyaml.txt
- Provision Resources using terraform
terraform apply -auto-aprove
- Containerise and push image to ACR App project repository
docker push <loginserver>/<repositoryname>
- Use yaml file to create deployment.
kubectl apply -f node_mssql.yaml
- Get External IP of the app
kubectl get svc