question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question/Feature Request: Full configuration as code

See original GitHub issue

Hi team

I noticed that your plugin does not currently support the configuration-as-code plugin.

Looking at your README.md and at your ECSDeclarativeAgent.java class, I had the impression that this may not even be required, but I was hoping you could help me out.

What I would like to achieve is to configure the build agents cloud 100% scripted. Currently the configuration-as-code plugin is my go-to approach, falling back to groovy on the exception.

Do you have any samples where you configure your build agents as code, instead of manually entering the configuration in the Jenkins web console?

Thanks, I appreciate any help given!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
pbsladekcommented, Jul 25, 2019

@gomesp I use this plugin everyday via jcasc. Happy to help out on any specific issues you are having. Here is one of the slave configs i use. Haven’t tried the lastest, but def works fine with configuration-as-code:1.19 and has for months.

  clouds:
    - ecs: # 4cpu-8gb
        cluster: "arn:aws:ecs:${AWS_REGION}:${AWS_ACCOUNT_ID}:cluster/xxxxxx-${AWS_JENKINS_ENVIRONMENT}-jenkins-ecs-cluster"
        credentialsId: "xxxxxxx_jenkins_xxxxx_credentials"
        jenkinsUrl: ${JENKINS_HOST_URL}
        name: amz2-4cpu-8gb
        regionName: ${AWS_REGION}
        retentionTimeout: 60
        tunnel: "${JENKINS_TUNNEL_URL}:${JENKINS_SLAVE_PORT}"
        templates:
          - assignPublicIp: false
            cpu: 4096
            image: xxxxx/xxxxxxxxxxx
            label: amz2-4cpu-8gb
            launchType: EC2
            memory: 8192
            memoryReservation: 4096
            networkMode: default
            privileged: false
            remoteFSRoot: /home/jenkins
            templateName: amz2-4cpu-8gb
2reactions
webratzcommented, Sep 16, 2019

Also quite some of the delay comes from Jenkins weird internal mechanism on when to request agents. This can be changed / optimized with some system params, eg -Dhudson.slaves.NodeProvisioner.initialDelay=0 -Dhudson.slaves.NodeProvisioner.MARGIN=50 -Dhudson.slaves.NodeProvisioner.MARGIN0=0.85

Read more comments on GitHub >

github_iconTop Results From Across the Web

How We Built Config as Code - YouTube
00:00 - Intro01:50 - Agenda03:04 - Discussion Time03:20 - What is Config as Code ?05:58 - What made us build Config as Code...
Read more >
Question or Feature Request: MultiSite - WordPress.org
Is there a method to configure settings for ALL sites in a multisite network globally, from Network Settings? I'd love to configure this...
Read more >
Jenkins Configuration as Code
Jenkins Configuration as Code provides the ability to define this whole configuration as a simple, human-friendly, plain text yaml syntax.
Read more >
Providing optional pre-commit (style) feedback on question ...
This forum aims to appreciate questions that require significant expertise to answer. · I assume some code review questions can be answered using ......
Read more >
Newest 'feature-request' Questions - Meta Stack Overflow
I have a simple JavaScript code snippet that displays an alert message. alert("Hello world!") Running the code snippet shows the alert as expected,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found