Commit fcb5d857 authored by jtevnan's avatar jtevnan

added environment settings to chef bootstrap template and machines

parent 0d291d43
......@@ -39,6 +39,7 @@ data "template_file" "chef-bootstrap-api" {
chef_repo_dir = "${var.chef_repo_dir}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
hostname = "${format("api-%02d.%v.%v.gitlab.com", count.index + 1, var.tier, var.environment == "prod" ? "prd" : var.environment)}"
ip_address = "${azurerm_network_interface.api.*.private_ip_address[count.index]}"
ssh_private_key = "${var.ssh_private_key}"
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-git" {
ssh_user = "${var.ssh_user}"
ssh_private_key = "${var.ssh_key}"
chef_vaults = "${var.chef_vaults}"
environment = "${var.environment}"
}
}
......
......@@ -39,6 +39,7 @@ data "template_file" "chef-bootstrap-git" {
chef_repo_dir = "${var.chef_repo_dir}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
hostname = "${format("git-%02d.%v.%v.gitlab.com", count.index + 1, var.tier, var.environment == "prod" ? "prd" : var.environment)}"
ip_address = "${azurerm_network_interface.git.*.private_ip_address[count.index]}"
ssh_private_key = "${var.ssh_private_key}"
......
......@@ -39,6 +39,7 @@ data "template_file" "chef-bootstrap-mailroom" {
chef_repo_dir = "${var.chef_repo_dir}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
hostname = "${format("mailroom-%02d.%v.%v.gitlab.com", count.index + 1, var.tier, var.environment == "prod" ? "prd" : var.environment)}"
ip_address = "${azurerm_network_interface.mailroom.*.private_ip_address[count.index]}"
ssh_private_key = "${var.ssh_private_key}"
......
......@@ -39,6 +39,7 @@ data "template_file" "chef-bootstrap-redis" {
chef_repo_dir = "${var.chef_repo_dir}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
hostname = "${format("redis-%v-%02d.%v.%v.gitlab.com", var.persistence, count.index + 1, var.tier, var.environment == "prod" ? "prd" : var.environment)}"
ip_address = "${azurerm_network_interface.redis.*.private_ip_address[count.index]}"
ssh_private_key = "${var.ssh_private_key}"
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-sentinel" {
ssh_private_key = "${var.ssh_private_key}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
}
}
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-sidekiq-asap" {
first_user_password = "${var.first_user_password}"
chef_vaults = "${var.chef_vaults}"
chef_vault_env = "${var.chef_vault_env}"
environment = "${var.environment}"
}
}
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-sidekiq-besteffort" {
first_user_password = "${var.first_user_password}"
chef_vaults = "${var.chef_vaults}"
chef_vault_env = "${var.chef_vault_env}"
environment = "${var.environment}"
}
}
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-sidekiq-elasticsearch" {
first_user_password = "${var.first_user_password}"
chef_vaults = "${var.chef_vaults}"
chef_vault_env = "${var.chef_vault_env}"
environment = "${var.environment}"
}
}
......
......@@ -39,6 +39,7 @@ data "template_file" "chef-bootstrap-sidekiq-pipeline" {
chef_repo_dir = "${var.chef_repo_dir}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
hostname = "${format("sidekiq-pipeline-%02d.%v.%v.gitlab.com", count.index + 1, var.tier, var.environment == "prod" ? "prd" : var.environment)}"
ip_address = "${azurerm_network_interface.sidekiq-pipeline.*.private_ip_address[count.index]}"
ssh_private_key = "${var.ssh_private_key}"
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-sidekiq-pullmirror" {
first_user_password = "${var.first_user_password}"
chef_vaults = "${var.chef_vaults}"
chef_vault_env = "${var.chef_vault_env}"
environment = "${var.environment}"
}
}
......
......@@ -43,6 +43,7 @@ data "template_file" "chef-bootstrap-sidekiq-realtime" {
first_user_password = "${var.first_user_password}"
chef_vaults = "${var.chef_vaults}"
chef_vault_env = "${var.chef_vault_env}"
environment = "${var.environment}"
}
}
......
......@@ -39,6 +39,7 @@ data "template_file" "chef-bootstrap-web" {
chef_repo_dir = "${var.chef_repo_dir}"
chef_vaults = "${var.chef_vaults}"
chef_version = "${var.chef_version}"
environment = "${var.environment}"
hostname = "${format("web-%02d.%v.%v.gitlab.com", count.index + 1, var.tier, var.environment == "prod" ? "prd" : var.environment)}"
ip_address = "${azurerm_network_interface.web.*.private_ip_address[count.index]}"
ssh_private_key = "${var.ssh_private_key}"
......
......@@ -6,6 +6,7 @@ bundle exec knife bootstrap ${ssh_user}@${ip_address} \
--ssh-identity-file ${ssh_private_key} \
--no-host-key-verify \
--sudo \
--environment ${environment} \
--node-name ${hostname} \
--bootstrap-version "${chef_version}" \
--run-list 'role[gitlab]' \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment