
"Step 4: Go to your cluster & in service tab, and click on "create." In task definition family: jenkins-master-task (created in step-3) Give a service name: jenkins-master-service In the environment: Compute option: launch Type > Fargate Platform version : Latest In the Networking section, select the same VPC in which you have created EFS and select a Security Group (SG); select either the default or create a new one. Remember, in your SG, these ports must be allowed as an inbound rule. In the load balancing section: Type: Application load balancer Container: Jenkins 8080:8080 Select Create a new load balancer & give it a name: Jenkins-Alb Listener:"
"In the target group: Select create new target group. Target group name: jenkins-tg Protocol: HTTP port: 8080 Deregistration delay: 300 health check protocol : HTTP health check path : /login Then click on create."
"Your service is ready, and within minutes, you will see the status as Active and the deployment as completed. It means our Jenkins master is live. To access, go to: Ec2 > Load balancing > Jenkins-ALB > Copy DNS name. You can even check the health status of the endpoint by going into the target group. It should be "healthy." Copy that DNS into a browser, and you will be able to see the Jenkins home page. For the first-time login, check the logs of the task to get the password. Now in Jenkins master, go to Manage jenkins > Plugins In Available plugins, search "ecs" & install the Amazon Elastic Container Service (ECS)/Fargate plugin. After installing the plugin, go back to ECS >> Task Definition."
Create an ECS service on the cluster using the task definition family jenkins-master-task and name the service jenkins-master-service. Use Fargate as the compute option and the Latest platform version. Select the VPC containing the EFS and attach a security group with the required inbound ports. Configure an Application Load Balancer mapping container port 8080 and create a target group named jenkins-tg using HTTP port 8080 with a 300-second deregistration delay and health check path /login. Access Jenkins via the ALB DNS and retrieve the initial password from the task logs. Install the Amazon ECS/Fargate plugin in Jenkins and then create a jenkins-agent task definition with Fargate, Linux/x86_64, CPU 1, and 3 GB memory.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]