From 8682fcf7c42766d823f36d7cfee3506cc9fa151e Mon Sep 17 00:00:00 2001 From: Bryan Monsalvatge Date: Tue, 9 Apr 2019 15:48:08 -0400 Subject: [PATCH 1/2] Added variable for shm_size in the runner config.toml. Default set to 0 (#53) --- main.tf | 1 + template/runner-config.tpl | 2 +- variables.tf | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index cdb3c6ac2..0319f9a13 100644 --- a/main.tf +++ b/main.tf @@ -149,6 +149,7 @@ data "template_file" "runners" { runners_concurrent = "${var.runners_concurrent}" runners_image = "${var.runners_image}" runners_privileged = "${var.runners_privileged}" + runners_shm_size = "${var.runners_shm_size}" runners_idle_count = "${var.runners_idle_count}" runners_idle_time = "${var.runners_idle_time}" runners_off_peak_timezone = "${var.runners_off_peak_timezone}" diff --git a/template/runner-config.tpl b/template/runner-config.tpl index 3ff52dbe3..dd3310b17 100644 --- a/template/runner-config.tpl +++ b/template/runner-config.tpl @@ -19,7 +19,7 @@ check_interval = 0 privileged = ${runners_privileged} disable_cache = false volumes = ["/cache"] - shm_size = 0 + shm_size = ${runners_shm_size} [runners.cache] Type = "s3" Shared = ${shared_cache} diff --git a/variables.tf b/variables.tf index cc5588c32..6f7f494ff 100644 --- a/variables.tf +++ b/variables.tf @@ -109,6 +109,11 @@ variable "runners_privileged" { default = "true" } +variable "runners_shm_size" { + description = "shm_size for the runners. will be used in the runner config.toml" + default = 0 +} + variable "runners_monitoring" { description = "Enable detailed cloudwatch monitoring for spot instances." default = false From 7bdcd4956468d7ddae6a218c80f40a0d4877b9a3 Mon Sep 17 00:00:00 2001 From: Niek Palm Date: Tue, 9 Apr 2019 14:13:56 -0700 Subject: [PATCH 2/2] Release 3.2.0 --- CHANGELOG.md | 9 +++++++-- README.md | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef2693cc..6f0c0f52b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] + +## [3.2.0] - 2019-03-09 +- Added: Option to set shm_size for the runners, default remains 0. + ## [3.1.0] - 2019-03-09 -- Added: Option to set environment variables for the runners, see the variable `runners_environment_vars`. An example added to the `public-runner` example. +- Added: Option to set environment variables for the runners, see the variable `runners_environment_vars`. An example added to the `public-runner` example. ## [3.0.0] - 2019-03-29 - Changed: The runner will register itself based on the registration token. No need to preregister the runner before running terraform. See the [README](README.md) for configuration and migration. #33 @@ -107,7 +111,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Update default AMI's to The latest Amazon Linux AMI 2017.09.1 - released on 2018-01-17. - Minor updates in the example -[Unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.1.0...HEAD +[Unreleased]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.2.0...HEAD +[3.2.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.1.0...3.2.0 [3.1.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/3.0.0...3.1.0 [3.0.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/2.3.0...3.0.0 [2.3.0]: https://github.com/npalm/terraform-aws-gitlab-runner/compare/2.2.1...2.3.0 diff --git a/README.md b/README.md index 89570933f..5d1701317 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ module "runner" { | runners_privileged | Runners will run in privileged mode, will be used in the runner config.toml | string | `true` | no | | runners_request_concurrency | Limit number of concurrent requests for new jobs from GitLab (default 1) | string | `1` | no | | runners_root_size | Runner instance root size in GB. | string | `16` | no | +| runners_shm_size | shm_size for the runners. will be used in the runner config.toml | string | `0` | no | | runners_token | Token for the runner, will be used in the runner config.toml. | string | `__REPLACED_BY_USER_DATA__` | no | | runners_use_private_address | Restrict runners to the use of a private IP address | string | `true` | no | | secure_parameter_store_runner_token_key | The key name used store the Gitlab runner token in Secure Parameter Store | string | `runner-token` | no |