SDET Interview Question and Answers.
Jenkins Interview Questions and Answers.
Appium Interview Questions and Answers
Selenium Interview Questions and answers.
GIT Interview Questions and Answers
DevOps with Serverless Jenkins and AWS CDK
The objective of this post is to walk you through how to set up a completely serverless Jenkins environment on AWS Fargate using AWS Cloud Development Kit (AWS CDK).
Jenkins is a popular open-source automation server that provides hundreds of plugins to support building, testing, deploying, and automation. Jenkins uses a controller-agent architecture in which the controller is responsible for serving the web UI, stores the configurations and related data on disk, and delegates the jobs to the worker agents that run these jobs as their primary responsibility.
Amazon Elastic Container Service (Amazon ECS) using Fargate is a fully-managed container orchestration service that helps you easily deploy, manage, and scale containerized applications. It deeply integrates with the rest of the AWS platform to provide a secure and easy-to-use solution for running container workloads in the cloud and now on your infrastructure. Fargate is a serverless, pay-as-you-go compute engine that lets you focus on building applications without managing servers. Fargate is compatible with both Amazon ECS and Amazon Elastic Kubernetes Service (Amazon EKS).
Most Used Docker Commands:Interview Question
Solution overview
The following diagram illustrates the solution architecture. The dashed lines indicate the AWS CDK deployment.
You’ll be using the following:
- The Jenkins controller URL backed by an Application Load Balancer (ALB).
- You’ll be using your default Amazon Virtual Private Cloud (Amazon VPC) for this example.
- The Jenkins controller runs as a service on Amazon ECS using Fargate as the launch type. You’ll use Amazon Elastic File System (Amazon EFS) as a persistent backing store for the Jenkins controller task. The Jenkins controller and Amazon EFS are launched in private subnets.
Prerequisites
For this post, you’ll utilize AWS CDK using TypeScript.
Follow this guide on Getting Started for AWS CDK to:
- Get your local environment setup
- Bootstrap your development account
TOP 50 GIT Interview Q&A
Code
Please review the code used to define the Jenkins environment in AWS using AWS CDK.
Setup your imports
Setup your Amazon ECS, which is a logical grouping of tasks or services and set vpc
Setup Amazon EFS to store the data
Setup Access Points, which are application-specific entry points into an Amazon EFS file system that makes it easier to manage application access to shared datasets
Setup Task Definition to run Docker containers in Amazon ECS
Setup a Volume mapping the Amazon EFS from above to the Task Definition
Setup the Container using the Task Definition and the Jenkins image from the registry
Setup Mount Points to bind ephemeral storage to the container
Setup Fargate Service to run the container serverless
Setup ALB and add listeners to checks for connection requests, using the protocol and port that you configure.
Setup Target to route requests to Jenkins running on Amazon ECS using Fargate
Jenkins Deployment
Now that you have all the code, let’s deploy the AWS CDK definition:
- Make sure that you have done the Prerequisite steps from earlier.
- Install packages by running the following command in your IDE CLI:
- Now you’ll deploy your AWS CDK definition to your dev account:
Let’s now login to Jenkins
- In your browser, use the DNS Name from the deployed Load Balancer
- On Amazon CloudWatch, there will be a Log group that will be created that is associated to Cluster Service.
- Go into that log and you’ll see it output the Password to login to Jenkins
- In Jenkins, follow the wizard to continue the setup
Cleaning up
To avoid incurring future charges, delete my resources.
Let’s destroy our deploy solution
- From your IDE CLI:
Conclusion
With this overview we were able to cover the following:
- Build an Elastic Load Balancer
- Use AWS Fargate with Jenkins AMI
- All resources running serverlessly
- All build using AWS CDK
************************************************
✍️AUTHOR: LinkedIn Profile
************************************************
Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employee and LIVE Doubt Session
*************************************************
SeleniumWebdriver Automation Testing Interview Questions:
https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver
API Testing Interview Question Set:
https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html
DevOps Interview Q&A:
https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes
Docker Interview Question Set
https://automationreinvented.blogspot.com/Docker
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign
Java Related Interview Question Set
https://automationreinvented.blogspot.com/search/label/Java
GIT Interview Question Set:
https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html
Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
Mobile Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Mobile%20Testing
Python Interview Question Set for QAE - SDET - SDE:
https://automationreinvented.blogspot.com/search/label/Python
No comments:
Post a Comment