Table of Contents1. SCALABLE CLOUD HOSTED DB - COSMOS NOSQL 2. SPRING BOOT MICROSERVICE FOR DB CRUD OPERATIONS 3. CLOUD HOSTED SPRING BOOT FRONTEND 4. HOW DOES IT INTEGRATE 5. FUTURE: CI / CD WITH GITHUB ACTIONS FOR WEB CALENDAR APPLICATION 6. REFERENCES Back to Top |
1. SCALABLE CLOUD HOSTED DB - COSMOS NOSQLCosmos SQL Database is a web scalable database, in my case hosted in Azure. When we need to scale upwards, with traditional SQL databases, we have to bump up the server RAM/CPU or manage data across servers painstakingly. With Azure Cosmos No SQL db, it is a distributed database and can easily be split apart across multiple data centers, making it highly scalable. The 'NoSQL' nature means that we can continue to use SQL queries to manage it. It manages this via maintaining a Partition id for each record. More later. Back to Table Of Contents |
2. SPRING BOOT MICROSERVICE FOR DB CRUD OPERATIONSTo reduce risk and improve usability an application with an api interface sits infront of Web Calendar's Cosmos DB. This is also hosted in the cloud. Below is a screenshot of its API interface being tested with Postman API tool. Back to Table Of Contents |
3. CLOUD HOSTED SPRING BOOT FRONTENDAs you can see from the url, this is a spring boot site hosted on Azure Cloud. Entire application is hosted entirely on cloud and code is in Git hub. Next step is to setup CI/CD with 'Github actions'! HOW WAS APP DEPLOYED TO AZURE? This was done via native functionality in VS Code IDE. Log into azure portal with your paid/trial account. In your spring boot application in VS code, under the 'targets' folder, there is a .jar/.war file. Right click it and select 'deploy to web app..' option. Follow prompts and it should deploy as shown below: |
4. HOW DOES THE INTEGRATION WORKA. Integraton between Spring Boot Microservice and DB It is seamlessly achieved via native features of java spring boot due to maven dependency called: - spring-cloud-azure-starter-data-cosmo B. Integration between Spring Boot Microservice and Spring Boot Thymeleaf based front end This is via simple API calls (see section 2.0 above). Back to Table Of Contents |
5. FUTURE: CI / CD WITH GITHUB ACTIONS FOR WEB CALENDAR APPLICATIONEND GOAL - DEVSECOPS - CONTINUOUS INTEGRATION/ CONTINOUS DEPLOYMENT (CI/CD) WITH BUILT IN SECURITY PLAN TO ACHIEVE Development Security Operations (DEVSECOPS) Paradigm via this exercise DevOps is about integrating Development (includes 'quality assurance'/testing) and Operations in one seamless process with a focus on automation to make the process efficient as it is a lot of work if done manually (as in the past). It does that via CI/CD pipelines and agile processes for software development (see Agile Manifesto e.g. 'Responding to change over following a plan'. DevSecOps is a recent pradigm shift to that and is the future of IT. It is a system where security is inbuilt in every step of development and deployment/operations. Continous monitoring (e.g. via code/automation following is setup - automated vulnerability scanning on nuget packages, alerts on availability cloud Infrastructure) in addtion to Devops automated testing provides continous and automated compliance enforcement[33]. This helps with maintaining 'Zero Trust', where there is an assumption that malicius users can be anywhere and have access to our systems already, so our job is to limit the damage. DevSecOps pillars are Develop, Build, Test, Release & Deploy, and Runtime aimed at achieving a secure posture with the focus being on automation and integration going forward [32], inorder to make the process sustainable.
This was achieved with Jenkins previously in 2016 (see link in footer for CI/CD). The objective is now to do that with the latest technology, particulary the cloud. Now our infrastructure is also in the cloud, so we provision that with our application via YAML pipelines. BICEP is Microsoft recommeneded language to provision infrastructure in Cloud (Infrastructure as Service). So, if I was to port this application to use CI/CD pipelines for cloud, I would first provision the infrastructure in Azure using BICEP via yaml pipelines (e.g. WebApp to host application and keyVault to store secrets). in Git hub actions with secrets in Azure Key Vault. I would then use the same pipleline to build the application code and deploy it in Azure. A part of this would also be to run my test automation suite. All this would happen via a click of a button and this would be a CI/CD pipeline. I will also do some automated vulnerability scanning as part of deployment and use containers. The reason is to include some Security aspects to my devops setup. Together, this would be a basic DevSecOps pipeline. I have done similar work before but I now plan to do this via free software in Git Hub actions. Please watch this space. WITH CONTINUOUS INTEGRATION --coming-- WHAT IT MEANS TO THE WEB CALENDAR APPLICATION In 2016, this application was configured to auto-run Selenium tests using the TestNG framework right after the application build is triggered in Jenkins to enable instant Quality feedback. At the end of my exercise, it will be on the first ladder of cloud based DevSecOps. Back to Table Of Contents |