Thursday, June 2, 2022
Terraform : Infrastructure as Code : Quick Example
Here we will see.
- Install Terraform on Windows Machine - Manual
- Install Terraform on AWS EC2 - Manal
- Install Docker on AWS EC2 using Terraform Script
- Install Jenkins on AWS EC2 using Terraform Script
- Install AWS Components and provisioning using Terraform Script
- Upload the Terraform Script (Code into GitHub)
- terraform.tfstate - Track, Security, Access Provisioning
- Terraform Registry and Providers
- Change Infrastructure using Script
- Destroy Infrastructure using Script - terraform destroy
- Terraform Cloud
allows teams to easily version, audit, and collaborate on infrastructure changes. It also securely stores variables, including API tokens and access keys, and provides a safe, stable environment for long-running Terraform processes.
For more hands-on experience with the Terraform configuration language, resource provisioning, or importing existing infrastructure, review the tutorials below.
Configuration Language - Get more familiar with variables, outputs, dependencies, meta-arguments, and other language features to write more sophisticated Terraform configurations.
Modules - Organize and re-use Terraform configuration with modules.
Provision - Use Packer or Cloud-init to automatically provision SSH keys and a web server onto a Linux VM created by Terraform in AWS.
Import - Import existing infrastructure into Terraform.
Wednesday, June 1, 2022
Spring Boot, Jenkins, Docker, Kubernetes on AWS EKS
Here we will
- Simple Spring Webflux based API
- Containerize the application using Docker
- Create CI Jenkins Pipeline
- Build
- Run Unit Tests
- Run Jacoco Reports
- Create Docker Image and Push to DockerHub
- Create CD Pipeline
- Login to AWS
- Pull Docker Image from Docker Hub and create container
- Deploy in AWS EKS
- Configure CI pipeline to be triggered only when code checked-in to any feature/* branches
- Configure CI pipeline to be triggered only when PR raised
- Configure CD pipeline to be triggered only when PR merged
1. Simple Spring Webflux based API
- Please check the README.md for how to build locally
- Beer-Service.postman_collection.json for testing the application using postman.
2. Containerize the application using Docker
Here in above file we use the image adoptopenjdk/openjdk11 We copy the built jar file as beerOrderService.jar We expose the post it need to be executed. The execution command to run application once container started |
3. Create CI Jenkins Pipeline
- Build
- Run Unit Tests
- Run Jacoco Reports
- Create Docker Image and Push to DockerHub
- Login to AWS
- Pull Docker Image from Docker Hub and create container
- Deploy in AWS EKS
Configure CI pipeline to be triggered only when PR raised
Configure CD pipeline to be triggered only when PR merged
Tuesday, July 20, 2021
AWS : VPC and Subnet Selection : IPV4 and IPV6
What is VPC? Why do we need?
- Choose your own IP address range
- Choose your gateways
- Configure route tables
- Add subnets
- And create VPN connection
- ACL - Access Control Lists
What is Subnet? How to configure?
It is just range of IP addresses within your VPC. You can create any resource and it will have the IP address assigned to it and within the Subnet range. By editing CIDR IPV4 or IPV6 you can increase IP address range. See below for detailed explanation.
Subnet Selection : IPV4
Lets define Subnet: What is Subnet?
Subnets are part of available networks within the Availability zone. Each VPC has its own isolated virtual private networks which are parts of available network addresses with-in the availability zone. The subnets cannot span across multiple availability zones.