ECS Fargate with Pre-built Jenkins CI/CD pipeline
top of page
Blue Background

ECS Fargate with Pre-built Jenkins CI/CD pipeline



Technical Usage Manual – ECS Fargate with pre built CICD pipeline


AWS CloudFormation template defines and manages the entire container infrastructure and ECS Fargate with a Pre-built Jenkins CI/CD pipeline by providing solutions to groups of any size, and enables to deploy their container applications. It reduces infrastructure complexities and allows users to focus on building and delivering applications.


We ensure that your applications are deployed with the least privileged access and provide valuable insights and container performance, and overall application health using Cloudwatch. EFS files system is provided for Fargate tasks and enables shared storage for the containers.


Jenkins achieves Continuous Integration with the help of plugins and allows the integration of various DevOps stages. Test and build applications through multiple stages of verification manually or with verified software to pass the defined metrics through plugins.


Here, GitHub is the repository for source code. Appropriate docker plugins and necessary tools such as Email extensions will be integrated to Jenkins and allow users to have a seamless experience in UI.


Yobitel audits and validates that its Cloud-Native Stacks are stable, secure, and scalable, meeting production-grade standards with best practices. Yobitel stacks to ensure a few click deployments over the ECS cluster and Fargate


Abstract:


Three versions of CloudFormation templates are provided, the first one is Cloudformation Template for ECS Fargate (Database Attached) with Jenkins: Build Docker image with source code, pushed to ECR Repository and deploy the application with ECR Image. Secondly Cloudformation Template for ECS Fargate with Jenkins: is the same as the previous but here there is no database attached and mainly for Static Applications. These templates are designed for SMEs and startups, facilitating continuous testing and deployment in ECS. Jenkins with pre-built SonarQube and OWASP is available for code analysis and application testing.



Technical Usage Manual

Cloudformation Template for ECS Fargate:


Cloudformation Template for ECS Fargate with Jenkins (Database Attached) :


1.1 VPC Configuration:

  • Enter the cluster name and CIDR Ranges for VPC and Subnets

  • Select the Availability Zones for the Subnets

  • Select the SSH Key Pair for cluster


1.2 Database Configuration:

  • Enter the Database details such as DB Name, Username, Password

  • Enter the CIDR value for the DBSubnet and select the Availability Zone for DBSubnet(Note: AZ must be different from subnet selected in VPC configuration

  • In EnvironmentvariableKey, Enter the Database Keys which you have configured for your Application (Eg: DB_HOST, DB_NAME, DB_USER, DB_PASSWORD) should be in same order as shown


1.3 Container Configuration:

  • Enter the TaskCpu and TaskMemory in MiB with the supported values. To know the supported values refer ECS Fargate Cpu and Memory

  • Leave the Docker image ID and Container port as default (Note: It will create a cluster with an empty image, while using Jenkins, replace this empty image with the actual ECR image created).

  • Enter the Mail ID to receive the alarm notification

  • Please set AccessCIDR to specific IP address access or 0.0.0.0/0 to allow all IP addresses.


jenkins continuous integration
Output section for Cloudformation Stack 2

1.4 After the stack created successfully, go to outputs of the stack and copy the public ip and

paste it in the browser with :8080. So now it opens the jenkins login page.


username: admin

password: execute the following command cat /var/lib/jenkins/admin_password.txt in Jenkins Instance.

Note:- Please refer to our manual for Jenkins configuration.

1.5 After the Jenkins configuration, execute the pipeline.


Jenkins_ECS_Fargate_Pipeline_For_CodeTesting_with_OWASP+SonarQube


1.6 Enter the Essential Parameters of Github Url for the source code, AWS Account ID, Mail ID, name of the Dockerfile and Endpoint Url which is in cloudformation outputs (Eg: http://<Endpoint_URL>/ ).


1.7 Check the other parameters which is in default and change it if needed (Note: Check the stack name in Jenkins pipeline is same as stackname in cloudformation stack)


1.8 Once the Pipeline is completed, allow the target application to be deployed successfully and check it by using the same Endpoint URL cloudformation stack.




Cloud Formation template for ECS Fargate with Jenkins
Sample Application

To know about additional cloudformation template, Please visit ECS Fargate with advanced Cloudformation Templates


Note:-

  • This product collects Email ID for the sole purpose of sending alarm notifications internally. It does not store or use for any other purpose.

  • In the Jenkins instance, the security group has allowed open access to common web ports for the sole purpose of accommodating customer needs.

Insights & Support:

  • For further details about Jenkins and its uses, refer to Jenkins website

  • Yobitel will do our best to respond to your questions within the next 24 hours in business days. For any technical support or query, you can drop a mail to support@yobitel.com.

Check our other Containerized Cloud-Native application stacks as EKS, ECS, Cloud Formation, and AMI - Amazon Machine Images inAWS Marketplace.

Featured Posts
Follow Us
  • LinkedIn
  • GitHub
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
Recent Posts
bottom of page