Smokey Pork Fillet With Salsa Salad

Having recently picked up a cheap pot belly BBQ (nicknamed Sputnik) and some wood chips I’ve been cooking outdoors in defiance of the British summer. Taking advice from the greatest grill masters I…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




ECS Jenkins Plugin to create ephemeral Jenkins Nodes in Fargate

About Jenkins:

I will assume it is in a EC2.

You can install it form ansible-galaxy, Helm,… good to do like this because you can easily install Jenkins plugins in the future without hardcoding it through web interface.

Jenkins will have communication with ECS tasks, for example: be in same VPC and same subnet.

Create a Git token so that Jenkins pipeline can checkout the repo in the Node.

Mange Jenkins →Nodes administration →Configure clouds:

Jenkins Pipeline:

Jenkinsfile that we will use in the pipeline:

IAM ecsTaskExecutionRole will have in addition, permissions to read from ECR.

taskrole param is for accessing to ECR.

executionRole parameter is for when the taks is already running.

About the Dockerfile , you can integrate the JNLP (Jenkins node software) into your own image, I have done with Python like this:

FROM jenkins/jnlp-node:alpine as jnlp

FROM python:alpine

RUN apk -U add openjdk8-jre

COPY — from=jnlp /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-agent
COPY — from=jnlp /usr/share/jenkins/agent.jar /usr/share/jenkins/agent.jar

ENTRYPOINT [“/usr/local/bin/jenkins-agent”]

You will also need to have a ECS Cluster, Fargate type, with name “jenkins-node-ecs”, same than in Jenkinsfile.

Add a comment

Related posts:

Geguri to become first female competitor in Overwatch APEX

Ex-EHOME Spear player Kim “Geguri” Se-yeon has signed with ROX Orcas, the organization confirmed to ESPN. Barring unforeseen complications, the 18-year-old professional gamer will be the first-ever…

2018.

2018 has been a year like no other. Years are like toddlers significantly different from each other but each brimming with chaotic joy that makes you want to rip your hair out and other times…

Best of 2018

In which I share what I loved in culture this year.