Closed ghost closed 6 years ago
@sgithubs manage to make any headway with this?
I have been running a derivative of this image with ecs and jenkins, for months. If you are still having troubles with this, let me know I'll try my best to help you out.
Thanks @JonCubed. I think I won and it works. But the building of the project takes 11 minutes. It is so long... :(
@sgithubs Could you expand a little on what your issue was and how you resolved it? I am in the process of setting this up on ECS as well, and want to make sure I don't end up with a similar issue. Thanks!
@BurtonR I have configured:
Template Name | jnlp-slave Label | ecs-windows Docker Image | jonathank/jenkins-jnlp-slave-windows Filesystem root | c:\\Jenkins Soft Memory Reservation | 0
Great! Thank you @sgithubs! That's also great you have it running on Fargate as that is our plan as well. Thanks for the quick response! :100:
@sgithubs no super familiar with fargate yet but I found that in normal ECS, upping the instance size made for quicker builds. In Fargate terms this probably mean higher CPU
@sgithubs I'm going to close this now, feel free to reopen if you think there is something still outstanding
@burtonr I have configured:
- aws ecs fargate cluster.
- jenkins ecs plugin: https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Container+Service+Plugin
- "ECS slave templates" inside jenkins main configure should be:
Template Name | jnlp-slave Label | ecs-windows Docker Image | jonathank/jenkins-jnlp-slave-windows Filesystem root | c:\Jenkins Soft Memory Reservation | 0
- Inside jenkins job: Restrict where this project can be run: ecs-windows
@burtonr I have configured:
- aws ecs fargate cluster.
- jenkins ecs plugin: https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Container+Service+Plugin
- "ECS slave templates" inside jenkins main configure should be:
Template Name | jnlp-slave Label | ecs-windows Docker Image | jonathank/jenkins-jnlp-slave-windows Filesystem root | c:\Jenkins Soft Memory Reservation | 0
- Inside jenkins job: Restrict where this project can be run: ecs-windows
Hello: we have tried using ecs plugin for spinngup linux fargate container using docker image jenkinsci/jnlp-slave and working fine.
Now we are trying to spinup windows fargate and we are using same docker image jenkinsci/jnlp-slave and the slave is spinningup but we have observed jnlpurl and secret text on the agent , but now the question is how to pass this values to the container?
we have tried using jonathank/jenkins-jnlp-slave-windows docker image still not working .
Could you please share your configuration for windows which was working for you and help us in resoving this issue? is there any pre defined docker image that we can leverage for windows fargate container?
appreciate your help here.
Above is my configuration screenshot which i have tried still not working . below is my log
@prashanthkasoju I havent used it with fargate, 2 things I can think of to help diagnose what is going wrong are. Check ECS console to see if the containers are trying to start, there could be an error message there. The other is make sure you have specified the two roles in your configuration (was not included in your screenshot above)
Hi Jonathan,
many thanks for replying to my post. i am including the screenshots which you have requested.
when i am running the job by restricting the label 'fargate_tss_dev_windows we have observed ECS is trying to provision a new fargate slave and waiting for few seconds and terminating and again it is trying to start new slave and waiting for few seconds and terminating.
attaching few screenshot from ECS cluster as well.
Below is the output from my linux server.
INFO: [ecs_windows-qw4tz]: Waiting for agent to start Aug 12, 2019 4:39:06 AM com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher launch INFO: [ecs_windows-qw4tz]: Waiting for agent to start Aug 12, 2019 4:39:07 AM com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher launch INFO: [ecs_windows-qw4tz]: Waiting for agent to start Aug 12, 2019 4:39:08 AM com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher launch INFO: [ecs_windows-qw4tz]: Waiting for agent to start
Please help me if iam missing any configuration and you let me know if you need further information. thank you, Prashanth k.
FYI .. whole configuration looks like this.
@prashanthkasoju under Advanced..
you need to fill Task Role ARN
and Task Execution Role ARN
You can also click on the task id in the console and look at the containers for extra information on why it exited
Hello,
i just want to mention on point here . i have did similar kind of configuration for linux and it is working fine and it is spinning fargate container in aws cluster there we have not mentioned Task Role ARN & Task Execution Role ARN ,both are empty still we could able to spinup fargate containers.
Hello. I want to use Jenkins plugin: https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Container+Service+Plugin and tried to use your image: jonathank/jenkins-jnlp-slave-windows instead of jenkins/jnlp-slave (works good in linux). But it doesn't work and I don't understand why (logs are very poor) (( Did you try to connect your image to aws ecs and jenkins?
Jenkins log:
Apr 25, 2018 4:21:29 PM hudson.slaves.NodeProvisioner$StandardStrategyImpl apply INFO: Started provisioning ECS Slave ecs-windows from ecs-cloud with 1 executors. Remaining excess workload: 0 Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService waitForSufficientClusterResources INFO: Found 1 instances Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService waitForSufficientClusterResources INFO: Resources found in instance arn:aws:ecs:us-east-1:184542755555:container-instance/47bc7f7b-8003-4c1b-9e1b-719c132bf46b: [{Name: CPU,Type: INTEGER,DoubleValue: 0.0,LongValue: 0,IntegerValue: 2048,StringSetValue: []}, {Name: MEMORY,Type: INTEGER,DoubleValue: 0.0,LongValue: 0,IntegerValue: 4095,StringSetValue: []}, {Name: PORTS,Type: STRINGSET,DoubleValue: 0.0,LongValue: 0,IntegerValue: 0,StringSetValue: [135, 445, 3389, 2376, 139, 2375, 80, 5985, 51678, 51679, 53]}, {Name: PORTS_UDP,Type: STRINGSET,DoubleValue: 0.0,LongValue: 0,IntegerValue: 0,StringSetValue: []}] Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService waitForSufficientClusterResources INFO: Instance arn:aws:ecs:us-east-1:184542755555:container-instance/47bc7f7b-8003-4c1b-9e1b-719c132bf46b has 4,095mb of free memory. 512mb are required Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService waitForSufficientClusterResources INFO: Instance arn:aws:ecs:us-east-1:184542755555:container-instance/47bc7f7b-8003-4c1b-9e1b-719c132bf46b has 2,048 units of free cpu. 1 units are required Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSCloud$ProvisioningCallback call INFO: Created Slave: ecs-cloud-f6b05ed3d58e6 Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService registerTemplate INFO: Match on container definition: true Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService registerTemplate INFO: Match on volumes: true Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSService registerTemplate INFO: Match on task role: true Apr 25, 2018 4:21:30 PM com.cloudbees.jenkins.plugins.amazonecs.ECSCloud$ProvisioningCallback call INFO: Slave ecs-cloud-f6b05ed3d58e6 - Slave Task Started : arn:aws:ecs:us-east-1:184542755555:task/3498c8c2-735e-419a-8b77-eb5dae4050f2