Skip to content

Commit a6aaa17

Browse files
authoredJan 13, 2021
Update version of runner, update from ubuntu18 tot ubuntu20 and set docker machien version to gitlab maintained one (#276)
1 parent abbaae0 commit a6aaa17

File tree

5 files changed

+23
-17
lines changed

5 files changed

+23
-17
lines changed
 

‎.github/workflows/verify.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Verify
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- develop
7+
pull_request:
38

49
jobs:
510
verify:
@@ -9,7 +14,7 @@ jobs:
914
- uses: actions/checkout@v1
1015
- name: verify
1116
run: |
12-
./ci/bin/install.sh
17+
source ./ci/bin/install.sh
1318
./ci/bin/verify.sh
1419
1520
verify-examples:
@@ -19,5 +24,5 @@ jobs:
1924
- uses: actions/checkout@v1
2025
- name: verify-examples
2126
run: |
22-
./ci/bin/install.sh
27+
source ./ci/bin/install.sh
2328
./ci/bin/verify-examples.sh

‎README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -276,18 +276,18 @@ terraform destroy
276276
| cache\_bucket | Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared cache. To use the same cache across multiple runners disable the creation of the cache and provide a policy and bucket name. See the public runner example for more details. | `map` | <pre>{<br> "bucket": "",<br> "create": true,<br> "policy": ""<br>}</pre> | no |
277277
| cache\_bucket\_name\_include\_account\_id | Boolean to add current account ID to cache bucket name. | `bool` | `true` | no |
278278
| cache\_bucket\_prefix | Prefix for s3 cache bucket name. | `string` | `""` | no |
279-
| cache\_bucket\_set\_random\_suffix | Boolean used to append a random string to the bucket name | `bool` | `false` | no |
279+
| cache\_bucket\_set\_random\_suffix | Append the cache bucket name with a random string suffix | `bool` | `false` | no |
280280
| cache\_bucket\_versioning | Boolean used to enable versioning on the cache bucket, false by default. | `bool` | `false` | no |
281281
| cache\_expiration\_days | Number of days before cache objects expires. | `number` | `1` | no |
282282
| cache\_shared | Enables cache sharing between runners, false by default. | `bool` | `false` | no |
283283
| cloudwatch\_logging\_retention\_in\_days | Retention for cloudwatch logs. Defaults to unlimited | `number` | `0` | no |
284-
| docker\_machine\_download\_url | Full url pointing to a linux x64 distribution of docker machine. Once set `docker_machine_version` will be ingored. For example the GitLab version, https://gitlab-docker-machine-downloads.s3.amazonaws.com/v0.16.2-gitlab.2/docker-machine. | `string` | `""` | no |
284+
| docker\_machine\_download\_url | Full url pointing to a linux x64 distribution of docker machine. Once set `docker_machine_version` will be ingored. For example the GitLab version, https://gitlab-docker-machine-downloads.s3.amazonaws.com/v0.16.2-gitlab.2/docker-machine. | `string` | `"https://gitlab-docker-machine-downloads.s3.amazonaws.com/v0.16.2-gitlab.10/docker-machine-Linux-aarch64"` | no |
285+
| docker\_machine\_iam\_policy\_arns | List of policy ARNs to be added to the instance profile of the docker machine runners. | `list(string)` | `[]` | no |
285286
| docker\_machine\_instance\_type | Instance type used for the instances hosting docker-machine. | `string` | `"m5.large"` | no |
286287
| docker\_machine\_options | List of additional options for the docker machine config. Each element of this list must be a key=value pair. E.g. '["amazonec2-zone=a"]' | `list(string)` | `[]` | no |
287288
| docker\_machine\_role\_json | Docker machine runner instance override policy, expected to be in JSON format. | `string` | `""` | no |
288-
| docker\_machine\_iam\_policy\_arns | List of policy ARNs to be added to the instance profile of the docker machine runners. | `list(string)` | `[]` | no |
289289
| docker\_machine\_spot\_price\_bid | Spot price bid. | `string` | `"0.06"` | no |
290-
| docker\_machine\_version | Version of docker-machine. The version will be ingored once `docker_machine_download_url` is set. | `string` | `"0.16.2"` | no |
290+
| docker\_machine\_version | By default docker\_machine\_download\_url is used to set the docker machine version. Version of docker-machine. The version will be ingored once `docker_machine_download_url` is set. | `string` | `""` | no |
291291
| enable\_asg\_recreation | Enable automatic redeployment of the Runner ASG when the Launch Configs change. | `bool` | `true` | no |
292292
| enable\_cloudwatch\_logging | Boolean used to enable or disable the CloudWatch logging. | `bool` | `true` | no |
293293
| enable\_docker\_machine\_ssm\_access | Add IAM policies to the docker-machine instances to connect via the Session Manager. | `bool` | `false` | no |
@@ -305,7 +305,7 @@ terraform destroy
305305
| gitlab\_runner\_registration\_config | Configuration used to register the runner. See the README for an example, or reference the examples in the examples directory of this repo. | `map(string)` | <pre>{<br> "access_level": "",<br> "description": "",<br> "locked_to_project": "",<br> "maximum_timeout": "",<br> "registration_token": "",<br> "run_untagged": "",<br> "tag_list": ""<br>}</pre> | no |
306306
| gitlab\_runner\_security\_group\_ids | A list of security group ids that are allowed to access the gitlab runner agent | `list(string)` | `[]` | no |
307307
| gitlab\_runner\_ssh\_cidr\_blocks | List of CIDR blocks to allow SSH Access to the gitlab runner instance. | `list(string)` | `[]` | no |
308-
| gitlab\_runner\_version | Version of the GitLab runner. | `string` | `"13.4.0"` | no |
308+
| gitlab\_runner\_version | Version of the GitLab runner. | `string` | `"13.7.0"` | no |
309309
| instance\_role\_json | Default runner instance override policy, expected to be in JSON format. | `string` | `""` | no |
310310
| instance\_type | Instance type used for the GitLab runner. | `string` | `"t3.micro"` | no |
311311
| kms\_alias\_name | Alias added to the kms\_key (if created and not provided by kms\_key\_id) | `string` | `""` | no |
@@ -315,7 +315,7 @@ terraform destroy
315315
| metrics\_autoscaling | A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances. | `list(string)` | `null` | no |
316316
| overrides | This maps provides the possibility to override some defaults. The following attributes are supported: `name_sg` overwrite the `Name` tag for all security groups created by this module. `name_runner_agent_instance` override the `Name` tag for the ec2 instance defined in the auto launch configuration. `name_docker_machine_runners` ovverrid the `Name` tag spot instances created by the runner agent. | `map(string)` | <pre>{<br> "name_docker_machine_runners": "",<br> "name_runner_agent_instance": "",<br> "name_sg": ""<br>}</pre> | no |
317317
| permissions\_boundary | Name of permissions boundary policy to attach to AWS IAM roles | `string` | `""` | no |
318-
| runner\_ami\_filter | List of maps used to create the AMI filter for the Gitlab runner docker-machine AMI. | `map(list(string))` | <pre>{<br> "name": [<br> "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"<br> ]<br>}</pre> | no |
318+
| runner\_ami\_filter | List of maps used to create the AMI filter for the Gitlab runner docker-machine AMI. | `map(list(string))` | <pre>{<br> "name": [<br> "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"<br> ]<br>}</pre> | no |
319319
| runner\_ami\_owners | The list of owners used to select the AMI of Gitlab runner docker-machine instances. | `list(string)` | <pre>[<br> "099720109477"<br>]</pre> | no |
320320
| runner\_iam\_policy\_arns | List of policy ARNs to be added to the instance profile of the gitlab runner agent ec2 instance. | `list(string)` | `[]` | no |
321321
| runner\_instance\_ebs\_optimized | Enable the GitLab runner instance to be EBS-optimized. | `bool` | `true` | no |

‎ci/bin/terraform.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

3-
TARGET_DIR=/opt
4-
PATH=${PATH}:${TARGET_DIR}
3+
export TARGET_DIR=/opt
4+
export PATH=${TARGET_DIR}:${PATH}
55

66
TERRAFORM_VERSION=${1:-"0.12.29"}
77
OS=${2:-"linux"}

‎modules/cache/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module "runner" {
3636
| Name | Version |
3737
|------|---------|
3838
| aws | n/a |
39+
| random | n/a |
3940

4041
## Inputs
4142

@@ -44,7 +45,7 @@ module "runner" {
4445
| arn\_format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | `string` | `"arn:aws"` | no |
4546
| cache\_bucket\_name\_include\_account\_id | Boolean to add current account ID to cache bucket name. | `bool` | `true` | no |
4647
| cache\_bucket\_prefix | Prefix for s3 cache bucket name. | `string` | `""` | no |
47-
| cache\_bucket\_set\_suffix | `bool` | `false` | no |
48+
| cache\_bucket\_set\_random\_suffix | Random string suffix for s3 cache bucket | `bool` | `false` | no |
4849
| cache\_bucket\_versioning | Boolean used to enable versioning on the cache bucket, false by default. | `string` | `"false"` | no |
4950
| cache\_expiration\_days | Number of days before cache objects expires. | `number` | `1` | no |
5051
| cache\_lifecycle\_clear | Enable the rule to cleanup the cache for expired objects. | `bool` | `true` | no |

‎variables.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ variable "docker_machine_spot_price_bid" {
8686
variable "docker_machine_download_url" {
8787
description = "Full url pointing to a linux x64 distribution of docker machine. Once set `docker_machine_version` will be ingored. For example the GitLab version, https://gitlab-docker-machine-downloads.s3.amazonaws.com/v0.16.2-gitlab.2/docker-machine."
8888
type = string
89-
default = ""
89+
default = "https://gitlab-docker-machine-downloads.s3.amazonaws.com/v0.16.2-gitlab.10/docker-machine-Linux-aarch64"
9090
}
9191

9292
variable "docker_machine_version" {
93-
description = "Version of docker-machine. The version will be ingored once `docker_machine_download_url` is set."
93+
description = "By default docker_machine_download_url is used to set the docker machine version. Version of docker-machine. The version will be ingored once `docker_machine_download_url` is set."
9494
type = string
95-
default = "0.16.2"
95+
default = ""
9696
}
9797

9898
variable "runners_name" {
@@ -341,7 +341,7 @@ variable "cache_shared" {
341341
variable "gitlab_runner_version" {
342342
description = "Version of the GitLab runner."
343343
type = string
344-
default = "13.4.0"
344+
default = "13.7.0"
345345
}
346346

347347
variable "enable_ping" {
@@ -468,7 +468,7 @@ variable "runner_ami_filter" {
468468
type = map(list(string))
469469

470470
default = {
471-
name = ["ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"]
471+
name = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
472472
}
473473
}
474474

0 commit comments

Comments
 (0)
Please sign in to comment.