Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Customizable Agent Nodes at Package Level #405

Open
lewijacn opened this issue Mar 21, 2024 · 2 comments
Open

Allow Customizable Agent Nodes at Package Level #405

lewijacn opened this issue Mar 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lewijacn
Copy link

Is your feature request related to a problem? Please describe

As a user of this package, I feel restrained that I cannot control the default Agent Nodes and the way they are initialized at the top CDK level without modifying the underlying package. Defining Agent Nodes seems like a common use case that will vary from setup to setup. Correct me if I'm wrong but it seems the expected way to do this currently is to modify the internal agent-nodes class.

Describe the solution you'd like

I'd like to be able to provide a JSON file path as a prop to the CIStack such that if this optional file path is provided, the CIStack will parse this file to determine what Agent Nodes should be used.

I'd expect basic validation to ensure any required fields for configuring an AgentNode are provided. A possible format for this file below, which is similar to what happens internally:

{
    "agentNodes": [
        {
            "agentType": "unix",
            "customDeviceMapping": "/dev/xvda=:300:true:::encrypted",
            "workerLabelString": "Jenkins-Agent-AL2023-X64-C54xlarge-Single-Host",
            "instanceType": "C54xlarge",
            "remoteUser": "ec2-user",
            "maxTotalUses": -1,
            "minimumNumberOfSpareInstances": 1,
            "numExecutors": 1,
            "amiId": "ami-0d09563cd5663bdc7",
            "initScript": "sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist && sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps",
            "remoteFs": "/var/jenkins"
        }
    ]
}

Describe alternatives you've considered

No response

Additional context

No response

@lewijacn lewijacn added enhancement New feature or request untriaged Issues that have not yet been triaged labels Mar 21, 2024
@rishabh6788
Copy link
Collaborator

Hi @lewijacn, thank you for creating this issue.
While we try to prioritize this, would really appreciate if you can take a stab at it and raise a PR.
Would be happy to review.

@rishabh6788 rishabh6788 removed the untriaged Issues that have not yet been triaged label Apr 1, 2024
@lewijacn
Copy link
Author

Thanks @rishabh6788 will see if I can fit this in, and will update here if I'm able to get started on it. Otherwise, please let me know if someone else is working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants