
"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. Step 5: Now we will create a task definition for our slave to launch dynamic agents to do our task. Go to ECS > Task Definition > click on "Create New Task Definition." Name: jenkins-agent Infrastructure requirements: Launch type: AWS fargate OS: Linux/x86_64 CPU: 1 Memory: 3 gb Task role: create one or"
Create an ECS service using the jenkins-master-task family and name it jenkins-master-service with Fargate as the compute option and the latest platform version. Select the VPC containing EFS and assign a Security Group that allows the required inbound ports. Configure an Application Load Balancer named Jenkins-Alb mapped to container Jenkins on port 8080 and create a target group jenkins-tg using HTTP on port 8080 with a 300-second deregistration delay and health check path /login. After the service becomes Active, obtain the ALB DNS to access Jenkins and retrieve the initial admin password from the task logs. Install the Amazon ECS/Fargate plugin in Jenkins, then create a jenkins-agent Fargate task definition with Linux/x86_64, CPU 1, and 3 GB memory.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]