Skip to content

Commit 4b85921

Browse files
committed
Merge branch 'release/2.2.0'
2 parents 56cf1ae + 9696d27 commit 4b85921

File tree

6 files changed

+26
-10
lines changed

6 files changed

+26
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
88

9+
## [2.2.0] - 2019-03-08
10+
- Changed: Upgrade default runner agent to 11.8.0 and docker machine to 0.16.1
11+
- Bugfix: Correct example for docker_machine_options #36 (@declension)
12+
- Added: AWS Zone variable #35 (@declension)
13+
914
## [2.1.0] - 2019-02-28
1015
- Bugfix: Shared cache is not working #33
1116
- Bugfix: Missing documentation makes setup fail #31
@@ -89,7 +94,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
8994
- Update default AMI's to The latest Amazon Linux AMI 2017.09.1 - released on 2018-01-17.
9095
- Minor updates in the example
9196

92-
[Unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/2.1.0...HEAD
97+
[Unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/2.2.0...HEAD
98+
[2.2.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/2.1.0...2.2.0
9399
[2.1.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/2.0.0...2.1.0
94100
[2.0.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/1.8.0...2.0.0
95101
[1.8.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/1.7.0...1.8.0

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,29 +115,30 @@ module "gitlab-runner" {
115115
| ami_filter | AMI filter to select the AMI used to host the gitlab runner agent. By default the pattern `amzn-ami-hvm-2018.03*-x86_64-ebs` is used for the name. Currently Amazon Linux 2 `amzn2-ami-hvm-2.0.????????-x86_64-ebs` looks *not* working for this configuration. | list | `<list>` | no |
116116
| ami_owners | A list of owners used to select the AMI for the instance. | list | `<list>` | no |
117117
| aws_region | AWS region. | string | - | yes |
118+
| aws_zone | AWS availability zone (typically 'a', 'b', or 'c'). | string | `a` | no |
118119
| cache_bucket_prefix | Prefix for s3 cache bucket name. | string | `` | no |
119120
| cache_expiration_days | Number of days before cache objects expires. | string | `1` | no |
120121
| cache_shared | Enables cache sharing between runners, false by default. | string | `false` | no |
121122
| create_runners_iam_instance_profile | | string | `true` | no |
122123
| docker_machine_instance_type | Instance type used for the instances hosting docker-machine. | string | `m4.large` | no |
123-
| docker_machine_options | Additional to set options for docker machien. Each element of the list should be key and value. E.g. '["--amazonec2-zone=a"]' | list | `<list>` | no |
124+
| docker_machine_options | Additional to set options for docker machine. Each element of the list should be key and value. E.g. '["amazonec2-zone=a"]' | list | `<list>` | no |
124125
| docker_machine_spot_price_bid | Spot price bid. | string | `0.04` | no |
125126
| docker_machine_user | User name for the user to create spot instances to host docker-machine. | string | `docker-machine` | no |
126-
| docker_machine_version | Version of docker-machine. | string | `0.16.0` | no |
127+
| docker_machine_version | Version of docker-machine. | string | `0.16.1` | no |
127128
| enable_cloudwatch_logging | Enable or disable the CloudWatch logging. | string | `1` | no |
128129
| environment | A name that identifies the environment, will used as prefix and for tagging. | string | - | yes |
129-
| gitlab_runner_version | Version for the gitlab runner. | string | `11.6.0` | no |
130+
| gitlab_runner_version | Version for the gitlab runner. | string | `11.8.0` | no |
130131
| instance_role_json | Instance role json for the runner agent ec2 instance to override the default. | string | `` | no |
131132
| instance_role_runner_json | Instance role json for the docker machine runners to override the default. | string | `` | no |
132133
| instance_type | Instance type used for the gitlab-runner. | string | `t2.micro` | no |
133134
| runners_concurrent | Concurrent value for the runners, will be used in the runner config.toml | string | `10` | no |
135+
| runners_executor | The executor to use. Currently supports docker+machine or docker | string | `docker+machine` | no |
134136
| runners_gitlab_url | URL of the gitlab instance to connect to. | string | - | yes |
135137
| runners_iam_instance_profile_name | IAM instance profile name of the runners, will be used in the runner config.toml | string | `` | no |
136138
| runners_idle_count | Idle count of the runners, will be used in the runner config.toml | string | `0` | no |
137139
| runners_idle_time | Idle time of the runners, will be used in the runner config.toml | string | `600` | no |
138140
| runners_image | Image to run builds, will be used in the runner config.toml | string | `docker:18.03.1-ce` | no |
139141
| runners_limit | Limit for the runners, will be used in the runner config.toml | string | `0` | no |
140-
| runners_machine_iam_instance_profile_name | IAM instance profile name to assign to the spot instance which runs the build. | string | `` | no |
141142
| runners_monitoring | Enable detailed cloudwatch monitoring for spot instances. | string | `false` | no |
142143
| runners_name | Name of the runner, will be used in the runner config.toml | string | - | yes |
143144
| runners_off_peak_idle_count | Off peak idle count of the runners, will be used in the runner config.toml. | string | `0` | no |
@@ -154,8 +155,8 @@ module "gitlab-runner" {
154155
| runners_token | Token for the runner, will be used in the runner config.toml | string | - | yes |
155156
| runners_use_private_address | Restrict runners to use only private address | string | `true` | no |
156157
| ssh_public_key | Public SSH key used for the gitlab-runner ec2 instance. | string | - | yes |
157-
| subnet_ids_gitlab_runner | Subnets used for hosting the gitlab-runner. | list | - | yes |
158158
| subnet_id_runners | Subnet used to hosts the docker-machine runners. | string | - | yes |
159+
| subnet_ids_gitlab_runner | Subnet used for hosting the gitlab-runner. | list | - | yes |
159160
| tags | Map of tags that will be added to created resources. By default resources will be taggen with name and environemnt. | map | `<map>` | no |
160161
| userdata_post_install | User-data script snippet to insert after gitlab-runner install | string | `` | no |
161162
| userdata_pre_install | User-data script snippet to insert before gitlab-runner install | string | `` | no |

examples/runner-public/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module "vpc" {
55
name = "vpc-${var.environment}"
66
cidr = "10.1.0.0/16"
77

8-
azs = ["eu-west-1a"]
8+
azs = ["eu-west-1b"]
99
public_subnets = ["10.1.101.0/24"]
1010

1111
tags = {
@@ -26,6 +26,7 @@ module "runner" {
2626
vpc_id = "${module.vpc.vpc_id}"
2727
subnet_ids_gitlab_runner = "${module.vpc.public_subnets}"
2828
subnet_id_runners = "${element(module.vpc.public_subnets, 0)}"
29+
aws_zone = "b"
2930

3031
runners_name = "${var.runner_name}"
3132
runners_gitlab_url = "${var.gitlab_url}"

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ data "template_file" "runners" {
107107

108108
runners_vpc_id = "${var.vpc_id}"
109109
runners_subnet_id = "${var.subnet_id_runners}"
110+
runners_aws_zone = "${var.aws_zone}"
110111
runners_instance_type = "${var.docker_machine_instance_type}"
111112
runners_spot_price_bid = "${var.docker_machine_spot_price_bid}"
112113
runners_security_group_name = "${aws_security_group.docker_machine.name}"

template/runner-config.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ check_interval = 0
3535
MachineOptions = [
3636
"amazonec2-instance-type=${runners_instance_type}",
3737
"amazonec2-region=${aws_region}",
38+
"amazonec2-zone=${runners_aws_zone}",
3839
"amazonec2-vpc-id=${runners_vpc_id}",
3940
"amazonec2-subnet-id=${runners_subnet_id}",
4041
"amazonec2-private-address-only=${runners_use_private_address}",

variables.tf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ variable "aws_region" {
33
type = "string"
44
}
55

6+
variable "aws_zone" {
7+
description = "AWS availability zone (typically 'a', 'b', or 'c')."
8+
type = "string"
9+
default = "a"
10+
}
11+
612
variable "environment" {
713
description = "A name that identifies the environment, will used as prefix and for tagging."
814
type = "string"
@@ -46,7 +52,7 @@ variable "docker_machine_spot_price_bid" {
4652

4753
variable "docker_machine_version" {
4854
description = "Version of docker-machine."
49-
default = "0.16.0"
55+
default = "0.16.1"
5056
}
5157

5258
variable "runners_name" {
@@ -214,7 +220,7 @@ variable "cache_shared" {
214220
variable "gitlab_runner_version" {
215221
description = "Version for the gitlab runner."
216222
type = "string"
217-
default = "11.6.0"
223+
default = "11.8.0"
218224
}
219225

220226
variable "enable_cloudwatch_logging" {
@@ -234,7 +240,7 @@ variable "allow_iam_service_linked_role_creation" {
234240
}
235241

236242
variable "docker_machine_options" {
237-
description = "Additional to set options for docker machien. Each element of the list should be key and value. E.g. '[\"--amazonec2-zone=a\"]'"
243+
description = "Additional to set options for docker machine. Each element of the list should be key and value. E.g. '[\"amazonec2-zone=a\"]'"
238244
type = "list"
239245
default = []
240246
}

0 commit comments

Comments
 (0)