chialab / aws-autoscaling-gitlab-runner

CloudFormation template to deploy a GitLab Runner with auto-scaling on AWS.
MIT License
43 stars 35 forks source link

Clarification on Manager Image #6

Open mikesiconolfi opened 5 years ago

mikesiconolfi commented 5 years ago

Im trying to deploy your aws template but not sure what i need to do for the Manager Image ID? Do i need to create my own server with docker and gitlab-runner installed on it first?

fquffio commented 5 years ago

Hi @mikesiconolfi ! Thanks for your interest in this project.

No, the AMI should be an Amazon Linux image. I'm currently using ami-0922553b7b0369273 for us-east-1, but there are newer images available.

You may obtain an AMI ID for this stack using the AWS CLI:

export AWS_DEFAULT_REGION='<your-AWS-region>'
aws ec2 describe-images \
  --owners amazon \
  --filters 'Name=name,Values=amzn2-ami-hvm-*-gp2' \
    'Name=image-type,Values=machine' \
    'Name=virtualization-type,Values=hvm' \
    'Name=architecture,Values=x86_64' \
  --query 'reverse(sort_by(Images, &CreationDate))[0].ImageId' \
  --output text
fantapop commented 5 years ago

In order to make this step easier for newcomers to this template, it would be great to have a default ami populated in the template based on the region its deployed in.

fquffio commented 5 years ago

PR #11 removes the CloudFormation parameter, so that we're no longer required to pass an AMI ID, that might not be easy to find.

Instead, AMI IDs are now retrieved with make list-latest-amis and then embedded in the template as a mapping, so that the correct value can be selected at launch/update time based on the AWS region the stack is in.

freeyland commented 4 years ago

Looks like this has never been merged