Skip to content

Commit

Permalink
Merge pull request #18 from mengesb/system_cookbook_pin
Browse files Browse the repository at this point in the history
v0.2.7
  • Loading branch information
mengesb authored Sep 20, 2016
2 parents d4ce764 + 9ca4377 commit 6698672
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ tf_hachef CHANGELOG

This file is used to list changes made in each version of the tf_hachef Terraform plan.

v0.2.7 (2016-09-20)
-------------------
- Updated chef-cookbook script to pin system cookbook to `0.11.0`: xhost-cookbooks/system#49
- Update syntax; `template_file` resource is deprecated, updated to `data` source

v0.2.6 (2016-08-11)
-------------------
- Updated root device to use gp2 on backends
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ the requirements are extensive
* Route53 internal and external zones
* Uploaded to AWS a SSL certificate (wildcard preferred)
* SSL certificate/key for created instance (local files to upload to instances)
* Terraform >= 0.6.14
* Terraform >= 0.7.3
* Uses public IPs and public DNS
* Creates default security group as follows:
* Frontend:
Expand Down
4 changes: 3 additions & 1 deletion files/chef-cookbooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ for DEP in chef_handler chef-ingredient ; do curl -sL https://supermarket.chef.i
for DEP in chef-server chef-sugar ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in compat_resource cron ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in firewall hostsfile logrotate ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in packagecloud system yum ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in packagecloud yum ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in yum-chef windows ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done

curl -sL https://supermarket.chef.io/cookbooks/system/versions/0.11.0/download | sudo tar xzC /var/chef/cookbooks

sudo chown -R root:root /var/chef

exit 0
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ resource "null_resource" "chef-prep" {
}
}
# Chef provisiong backend attributes_json and dna.json templating
resource "template_file" "backend-attributes-json" {
data "template_file" "backend-attributes-json" {
count = "${var.chef_backend["count"]}"
template = "${file("${path.module}/files/backend-attributes-json.tpl")}"
vars {
Expand Down Expand Up @@ -276,7 +276,7 @@ resource "aws_instance" "chef-backends" {
provisioner "remote-exec" {
inline = [
"cat > /tmp/dna.json <<EOF",
"${element(template_file.backend-attributes-json.*.rendered, count.index)}",
"${element(data.template_file.backend-attributes-json.*.rendered, count.index)}",
"EOF",
]
}
Expand Down Expand Up @@ -377,7 +377,7 @@ resource "aws_route53_record" "chef-backends-public" {
#
# Frontend: chef-server-core
# Chef provisiong frontend attributes_json and dna.json templating
resource "template_file" "frontend-attributes-json" {
data "template_file" "frontend-attributes-json" {
count = "${var.chef_server["count"]}"
template = "${file("${path.module}/files/frontend-attributes-json.tpl")}"
vars {
Expand Down Expand Up @@ -431,7 +431,7 @@ resource "aws_instance" "chef-frontends" {
provisioner "remote-exec" {
inline = [
"cat > /tmp/dna.json <<EOF",
"${element(template_file.frontend-attributes-json.*.rendered, count.index)}",
"${element(data.template_file.frontend-attributes-json.*.rendered, count.index)}",
"EOF",
]
}
Expand Down

0 comments on commit 6698672

Please sign in to comment.