GithubHelp home page GithubHelp logo

Comments (3)

npalm avatar npalm commented on June 15, 2024

We don't use the idle config anymore. Moved to ephemeral only. Are you sure you have not enabled ephemeral? Your config looks fine. The only potential other reason I know the scale down can terminate an instance, is the instance is marked as offline in GitHub.

As far I know the feature should work. Maybe you can test the setup based on the default example. The latest change that could be related is https://github.com/philips-labs/terraform-aws-github-runner/pull/3523/files#diff-69076cf041b0bcf70b90ba1dde121bfc3cb3b57bc9d293d29f7da72affcf0041. Which was release 4.5. So ensure your terraform module and lambda code is in version sync.

from terraform-aws-github-runner.

videate-josh avatar videate-josh commented on June 15, 2024

Thanks @npalm - I'll double check but I don't think I enabled ephemeral. Here is my config if it helps track this down

module "runners" {
  source  = "philips-labs/github-runner/aws"
  create_service_linked_role_spot = true
  aws_region                      = local.aws_region
  vpc_id                          = data.aws_vpc.default.id
  subnet_ids                      = data.aws_subnets.default.ids

  prefix     = "default"
  tags = {
    Project = "Github-Action-Self-Hosted-Runners"
  }

  github_app = {
    key_base64     = data.aws_ssm_parameter.github_app_pem_key.value
    id             = local.github_app_id
    webhook_secret = random_id.random.hex
  }

  # Grab zip files via lambda_download
  webhook_lambda_zip                = "webhook.zip"
  runner_binaries_syncer_lambda_zip = "runner-binaries-syncer.zip"
  runners_lambda_zip                = "runners.zip"
  ami_housekeeper_lambda_zip        = "ami-housekeeper.zip"

  enable_organization_runners = true
  runner_extra_labels         = ["default", "self-hosted-runners","runner-ubuntu-jammy-22-lts-amd64"]

  # enable access to the runners via SSM
  enable_ssm_on_runners = true
  ami_owners        = [data.aws_caller_identity.current.account_id]

  # When we rebuild an image with packer we replace that value here
  ami_filter = {
    name  = ["github-runner-ubuntu-jammy-22-lts-amd64-202312210443"],
    state = ["available"]
  }

  lambda_s3_bucket = aws_s3_bucket.github_self_hosted_runner_lambdas_bucket.id
  webhook_lambda_s3_key  = "webhook.zip"
  runners_lambda_s3_key  = "runners.zip"
  syncer_lambda_s3_key   = "runner-binaries-syncer.zip"
  ami_housekeeper_lambda_s3_key = "ami-housekeeper.zip"

  ....
  #  idle runners from 8 to 5 in time zone Los Angeles Pacific
  idle_config = [{
    cron      = "* * 8-17 * * 1-5"
    timeZone  = "America/Los_Angeles"
    idleCount = 3
    evictionStrategy = "oldest_first"
  }]

  instance_types = ["t3.large", "m5.large"]

  # override delay of events in seconds
  delay_webhook_event   = 5
  runners_maximum_count = 5

  # set up a fifo queue to remain order
  enable_fifo_build_queue = true

  # override scaling down
  scale_down_schedule_expression = "cron(* * * * ? *)"
  ...
  runner_run_as = "ubuntu"
  enable_userdata = false
  userdata_template = "./modules/runners/templates/user-data.sh"
  enable_user_data_debug_logging_runner = true

  # prefix GitHub runners with a special name
  runner_name_prefix = "github_self_hosted_"
  enable_ami_housekeeper = true
  ...
}

from terraform-aws-github-runner.

github-actions avatar github-actions commented on June 15, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

from terraform-aws-github-runner.

Related Issues (20)

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.