|
1 | 1 |
|
| 2 | +# Cloud Infrastructure Management & Operations Project |
| 3 | + |
2 | 4 | Welcome to the repository for my Cloud Infrastructure Management and Operations project, focused on deploying a Spring Boot-based Finance application using Azure services by Microsoft with Docker and GitHub Actions to Build the project. |
3 | 5 |
|
4 | | -This Project, built as a part of my Devops and cloud-native learning, showcases practical end-to-end in Dockerization, CI/CD pipelines, container registries and deploying into a production-grade environment using Azure Container Instance (ACI) and Azure Container Registry (ACR). In this project I added a feature of custom domain (via GoDaddy) mapped to the live Azure-hosted Container. |
| 6 | +This project, built as a part of my DevOps and cloud-native learning, showcases practical end-to-end implementation in Dockerization, CI/CD pipelines, container registries, and deployment into a production-grade environment using Azure Container Instance (ACI) and Azure Container Registry (ACR). It also includes custom domain mapping (via GoDaddy) to the live Azure-hosted container. |
5 | 7 |
|
6 | 8 | ### Project Highlights |
7 | 9 |
|
8 | | -- Spring Boot application containerized with Docker |
9 | | - |
10 | | -- CI pipeline created using GitHub Actions |
11 | | - |
12 | | -- Image pushed to Azure Container Registry (ACR) |
13 | | - |
14 | | -- Deployment to Azure Container Instance (ACI) |
| 10 | +- Spring Boot application containerized with Docker |
| 11 | +- CI pipeline created using GitHub Actions |
| 12 | +- Image pushed to Azure Container Registry (ACR) |
| 13 | +- Deployment to Azure Container Instance (ACI) |
| 14 | +- Custom domain setup using GoDaddy DNS (CNAME) |
15 | 15 |
|
16 | | -- Custom domain setup using GoDaddy DNS (CNAME) |
| 16 | +--- |
17 | 17 |
|
18 | | -Project Breakdown and Task List |
| 18 | +## Project Breakdown and Task List |
19 | 19 |
|
20 | | -**Task 1 : Spring Boot Application Setup** |
| 20 | +### Task 1: Spring Boot Application Setup |
21 | 21 |
|
22 | 22 | - Created a basic Spring Boot finance application |
23 | | - |
24 | | -- Added UI from Mini Finance (Tooplate #2135) |
25 | | - |
| 23 | +- Added UI from Mini Finance (Tooplate #2135) |
26 | 24 | - Built `pom.xml` and verified local execution |
27 | 25 |
|
28 | | -> Here are some screenshot of the webpage running locally. |
29 | | -
|
30 | | - |
31 | | - |
32 | | - |
| 26 | +> Here are some screenshots of the webpage running locally. |
33 | 27 |
|
34 | | - |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
35 | 33 |
|
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | -**Task 2 : Docker and containerization** |
41 | | - |
42 | | -- Wrote Dockerfile for openjdk:17-jdk-slim base image |
| 34 | +### Task 2: Docker and Containerization |
43 | 35 |
|
| 36 | +- Wrote Dockerfile using `openjdk:17-jdk-slim` base image |
44 | 37 | - Fixed auto-HTTPS redirect issues in Spring Boot |
| 38 | +- Updated `application.properties` to disable SSL by default |
45 | 39 |
|
46 | | -- Updated `application.properties` to avoid SSL by default |
47 | | - |
48 | | -`Application.properties` file |
| 40 | +**application.properties** |
| 41 | + |
49 | 42 |
|
50 | | - |
| 43 | +**Dockerfile** |
| 44 | + |
51 | 45 |
|
52 | | -`Dockerfile` |
53 | | - |
54 | | - |
55 | | - |
56 | | -**Task 3 : Azure Container Registry (ACR Setup)** |
| 46 | +### Task 3: Azure Container Registry (ACR Setup) |
57 | 47 |
|
58 | 48 | - Created ACR named `aaravregistry` |
59 | | - |
60 | 49 | - Retrieved credentials using Azure CLI |
61 | | - |
62 | 50 | - Logged in to ACR and pushed image `acidemo:latest` |
63 | 51 |
|
64 | | -![[Pasted image 20250719130623.png]] |
| 52 | + |
65 | 53 |
|
66 | | -**Task 4 : GitHub Actions CI Workflows** |
| 54 | +### Task 4: GitHub Actions CI Workflow |
67 | 55 |
|
68 | 56 | - Configured `.github/workflows/ci.yml` |
69 | | - |
70 | 57 | - Set up secrets for ACR login (username & password) |
71 | | - |
72 | 58 | - Triggered on push to `Project` branch |
73 | | - |
74 | 59 | - Built & pushed Docker image automatically to ACR |
75 | 60 |
|
76 | | -1. `ci.yml file` |
77 | | - |
78 | | -![[Pasted image 20250719130913.png|1009]] |
| 61 | +1. `ci.yml` file: |
| 62 | + |
79 | 63 |
|
80 | | -2. Secrets for ACR login |
81 | | - |
82 | | - ![[Pasted image 20250719131215.png]] |
| 64 | +2. GitHub Secrets setup: |
| 65 | + |
83 | 66 |
|
84 | | -3. Actions Tab on GitHub |
| 67 | +3. GitHub Actions tab: |
| 68 | + |
85 | 69 |
|
86 | | - |
87 | | - |
88 | | -**Task 5 : Deploy to Azure Container Instance** |
| 70 | +### Task 5: Deploy to Azure Container Instance |
89 | 71 |
|
90 | 72 | - Created ACI named `finance-container` |
91 | | - |
92 | 73 | - Pulled image from ACR |
93 | | - |
94 | 74 | - Assigned public IP with port 8080 |
95 | 75 |
|
96 | | - |
97 | | - |
98 | | -**Task 6 : Custom Domain Mapping via GoDaddy** |
| 76 | + |
99 | 77 |
|
100 | | -- Domain: `aaravdevops.xyz` (already owned) |
| 78 | +### Task 6: Custom Domain Mapping via GoDaddy |
101 | 79 |
|
| 80 | +- Domain: `aaravdevops.xyz` |
102 | 81 | - Created CNAME record in DNS for `celebal.aaravdevops.xyz` |
103 | | - |
104 | 82 | - Mapped to ACI's public DNS |
105 | | - |
106 | 83 | - Final URL: http://celebal.aaravdevops.xyz:8080 |
107 | 84 |
|
108 | | - |
| 85 | + |
109 | 86 |
|
110 | | - Note: If the URL shows this type of error |
| 87 | +> Note: If the URL shows an error like the image below, open it in **Incognito Mode**. The app is served on HTTP only. Modern browsers may automatically redirect to HTTPS, which will fail without a certificate. |
111 | 88 |
|
112 | | - |
| 89 | + |
113 | 90 |
|
114 | | -Than use incognito mode or private Tab because this webserver only works with `HTTP` not `Https` but most of the browsers redirect it on `HTTPS` service even with copy paste URL. To allocate my webserver of `HTTPS` also I have to buy the SSL Certificate. Or by using Azure Front Door Service I have to pay a lot to use that. |
| 91 | +--- |
115 | 92 |
|
116 | | -### Some more details regarding the project |
| 93 | +### Additional Information |
117 | 94 |
|
118 | | -1. GitHub Secrets Used |
119 | | - - `ACR_USERNAME`: Azure Container Registry username |
| 95 | +**GitHub Secrets Used:** |
120 | 96 |
|
121 | | - - `ACR_PASSWORD`: One of the password values from ACR credential JSON |
| 97 | +- `ACR_USERNAME`: Azure Container Registry username |
| 98 | +- `ACR_PASSWORD`: One of the password values from ACR credential JSON |
| 99 | +- Stored in: GitHub > Repository > Settings > Secrets & Variables > Actions |
122 | 100 |
|
123 | | - - Stored via GitHub > Repo > Settings > Secrets & Variables > Actions |
| 101 | +**Repository Structure:** |
124 | 102 |
|
125 | | -2. Repository Structure |
| 103 | + |
| 104 | + |
126 | 105 |
|
127 | | - |
128 | | - |
| 106 | +--- |
129 | 107 |
|
130 | 108 | ## Future Enhancements |
131 | 109 |
|
132 | 110 | - Add Azure Front Door for HTTPS termination |
133 | | - |
134 | | -- Use Azure DevOps Release Pipelines (already experimented) |
135 | | - |
| 111 | +- Use Azure DevOps Release Pipelines |
136 | 112 | - Add monitoring and alerting via Azure Monitor |
137 | 113 |
|
138 | 114 | ## Acknowledgements |
139 | 115 |
|
140 | | -- Mini Finance Template |
141 | | - |
142 | | -- Microsoft Azure for free-tier usage |
143 | | - |
144 | | -- GitHub Actions for seamless CI |
| 116 | +- Mini Finance Template (Tooplate) |
| 117 | +- Microsoft Azure (Free Tier) |
| 118 | +- GitHub Actions |
145 | 119 |
|
146 | 120 | ## Final Outcome |
147 | 121 |
|
148 | | -Your app is now live at: 🔗 http://project.aaravdevops.xyz |
149 | | - |
150 | | -But remember use private window to open and check after pasting the URL as well it should be `HTTP` not `HTTPS`. |
| 122 | +Your app is live at: 🔗 http://project.aaravdevops.xyz |
| 123 | + Use **HTTP**, not HTTPS. Open in **Private/Incognito mode** to avoid forced HTTPS redirection. |
0 commit comments