Coder Social home page Coder Social logo

buildkite / on-demand Goto Github PK

View Code? Open in Web Editor NEW
21.0 19.0 3.0 575 KB

CloudFormation resources for scheduling On-Demand Buildkite Agents with AWS ECS and AWS Fargate

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%
buildkite serverless aws fargate continuous-integration cloudformation-template elastic-container-service buildkite-agent-orchestration

on-demand's Issues

Try using SSM parameter for IAM SSH Agent backend ARN

Allow the stack to passively discover an IAM SSH Agent backend configured using SSM.

The IAM SSH Agent ARN is needed in several places, CloudFormation parameters, dynamic task definition generation. It might make sense to make this an SSM parameter that is set once when deploying IAM SSH Agent for your infrastructure, and all the components auto discover it.

Putting the stack name in the parameter would ensure multiple deployments in the same region can use or not use iam ssh agent.

Rework agent-scheduler VPC to support a separate VPC stack

Currently the agent-scheduler stack either creates a toy vpc, or accepts a comma separated list of vpc subnets.

Should this support taking the name of another stack + stack export name so that it can import details of the VPC instead, to prevent deleting the VPC stack while the agent-scheduler is deployed?

Make the IAM TaskRole and ExecutionRole prefix stack-name specific

To facilitate separate queues having access to different IAM roles in an account, the iam:PassRole grant can be scoped to a path scoped to each agent-scheduler that is deployed. This is needed because IAM is a global resource but agent-scheduler can be deployed more than once.

These paths need to be generated by the agent-scheduler and passed to the existing resources. They will also need to be consumed by agent-composer stacks to place IAM roles in an appropriate spot.

This could be done with an agent-scheduler stack export and by passing the agent-scheduler stack name in to the agent-composer sub stack.

Access Denied on S3 template URL

We are trying to deploy this stack and are currently seeing an Access Denied message for the following S3 template URL's.

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>P24WHP9ME7CYMW2B</RequestId>
<HostId>
yt7S1rUlHWRn8o5jyWOUXMr3exTyq6lUqu+Ed9naFflvW4YzGSl6DjO6rsc6THTxQRejogFKcrg=
</HostId>
</Error>

Build specialised `buildkite-agent pipline upload` lambda

For first pipeline steps that clone a repository and upload a pipeline from the repo, an on-demand agent can introduce a lengthy wait. Perhaps this can be specialised by the ScheduleTask lambda to recognise simple cases and delegate them to lambda based 'specialised agents' instead.

Decide whether to include the Buildkite Agent CloudFormation macro in agent-scheduler

Using the macro is very compelling, perhaps it should be deployed by default when deploying agent-scheduler to remove a step?

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-application.html

Resources:
  AgentMacro:
    Type: AWS::Serverless::Application
    Properties:
      Location:
        ApplicationId: 'arn:aws:serverlessrepo:us-east-1:832577133680:applications/buildkite-on-demand-transform'
        SemanticVersion: '0.1.0'

Global resources prevent >1 deploys to the same region

agent-scheduler creates a /aws/events/Buildkite CloudWatch Log group to monitor the event bridge events being received, but this is a globally named resource and prevents deploying the scheduler to a region more than once.

The agent token is also stored globally in SSM as /buildkite/agent-token.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.