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

[FEATURE] Support for passing custom CodeBuild project name into codeseeder #295

Open
nileshlathiya opened this issue Feb 20, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nileshlathiya
Copy link

nileshlathiya commented Feb 20, 2025

Is your feature request related to a problem? Please describe.
I am working with an Enterprise customer on ML use cases and exploring the way to orchestrate deploy using seed-farmer and aws-codeseeder. As part of customer requirement, It is asked to use existing CodeBuild project for build execution.

Describe the solution you'd like
I would like to have the ability to pass an existing CodeBuild project into CodeSeeder. This would allow for seamless integration with pre-configured CodeBuild project settings, ensuring consistency and reducing the need for duplicate configurations. Additionally, CodeSeeder should update IAM permissions relevant to the CodeBuild project, CloudWatch logs and ECR. If a CodeBuild project parameter is provided, CodeSeeder should not deploy the CodeBuild role and project from the template.

Describe alternatives you've considered
As alternative solution, I have configure input param as CodeBuild project within CodeSeeder and passing it from seedfarmer via @codeseeder.remote_function call.

I have updated the below files

  • _classes.py - added codebuild_project as parameter
  • codeseeder.py - added codebuild_project as parameter and use it to pass to _remote.run method
  • template.yaml
    • added ECR permission to have access to fetch ECR image for codebuild project by codebuild execution role
    • removed CodeBuildRole and CodeBuildProject resources

Additional context
Adding support for passing CodeBuild project into CodeSeeder would greatly enhance its flexibility and usability. This feature would be particularly beneficial for teams that rely heavily on predefined CodeBuild configurations. Ensuring that IAM permissions for the CodeBuild project, CloudWatch logs and ECR are updated appropriately would further streamline the integration process and maintain security best practices.

@nileshlathiya nileshlathiya added the enhancement New feature or request label Feb 20, 2025
@kukushking
Copy link
Contributor

Thanks @nileshlathiya we will evaluate.

@kukushking
Copy link
Contributor

kukushking commented Mar 5, 2025

HI @nileshlathiya you should be able to customize seedkit template to bring your own codebuild.

With recently added codeseeder deploy seekit --synth option (that is pending a release), you can synthesize seedkit template and customize to either contain your new CodeBuild, or export correct CodeBuild ARNs for the codeseeder to use. Make sure the deployed stack follows the expected naming convention aws-codeseeder-{seedkit_name}, and exports correct CodeBuildProject and CodeBuildProjectArn outputs. To sum up, the steps are:

  1. Use codeseeder deploy seedkit <name> --synth > template.yaml option to get the template
  2. Customize the template by either:
    1. Changing the CodeBuild project directly in the template, or
    2. in case of pre-created CodeBuild, remove the default CodeBuild project from the template and update CodeBuildProject, and CodeBuildProjectArn stack outputs to refer to the pre-created CodeBuild
  3. Deploy the seedkit stack in all target account/regions following the naming convention aws-codeseeder-{project_name}, where project_name is the name of the Seed-Farmer project e.g. aws-codeseeder-aiops

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
None yet
Development

No branches or pull requests

2 participants