Skip to content

Commit

Permalink
Convert Google credentials file to single line environment variable (…
Browse files Browse the repository at this point in the history
…rather than pushing the file itself to Atlas)
  • Loading branch information
rcgenova committed Sep 13, 2016
1 parent cd9de66 commit 8746351
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions packer/google/ubuntu/base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"variables": {
"atlas_username": "{{env `ATLAS_USERNAME`}}",
"gce_credentials": "{{env `GCE_CREDENTIALS`}}",
"gce_project_id": "{{env `GCE_PROJECT_ID`}}",
"gce_zone": "{{env `GCE_DEFAULT_ZONE`}}",
"gce_source_image": "{{env `GCE_SOURCE_IMAGE`}}",
Expand All @@ -14,7 +15,6 @@
"name": "{{user `atlas_username`}}/{{user `name`}}",
"base_dir": "../../../packer",
"include": [
"google/account.json",
"{{user `scripts_dir`}}/*",
"{{user `scripts_dir`}}/ubuntu/*",
"{{user `scripts_dir`}}/ubuntu/upstart/*",
Expand All @@ -33,7 +33,7 @@
{
"type": "googlecompute",
"project_id": "{{user `gce_project_id`}}",
"account_file": "google/account.json",
"account_file": "{{user `gce_credentials`}}",
"zone": "{{user `gce_zone`}}",
"network": "default",
"source_image": "{{user `gce_source_image`}}",
Expand Down Expand Up @@ -91,4 +91,4 @@
}
}
]
}
}
6 changes: 3 additions & 3 deletions packer/google/ubuntu/consul.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"gce_project_id": "{{env `GCE_PROJECT_ID`}}",
"gce_zone": "{{env `GCE_DEFAULT_ZONE`}}",
"gce_source_image": "{{env `GCE_SOURCE_IMAGE`}}",
"gce_credentials": "{{env `GCE_CREDENTIALS`}}",
"name": "google-ubuntu-consul",
"scripts_dir": "scripts",
"config_dir": "config",
Expand All @@ -14,7 +15,6 @@
"name": "{{user `atlas_username`}}/{{user `name`}}",
"base_dir": "../../../packer",
"include": [
"google/account.json",
"{{user `scripts_dir`}}/*",
"{{user `scripts_dir`}}/ubuntu/*",
"{{user `scripts_dir`}}/ubuntu/upstart/*",
Expand All @@ -33,7 +33,7 @@
{
"type": "googlecompute",
"project_id": "{{user `gce_project_id`}}",
"account_file": "google/account.json",
"account_file": "{{user `gce_credentials`}}",
"zone": "{{user `gce_zone`}}",
"network": "default",
"source_image": "{{user `gce_source_image`}}",
Expand Down Expand Up @@ -88,4 +88,4 @@
}
}
]
}
}
4 changes: 2 additions & 2 deletions packer/google/ubuntu/haproxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"gce_project_id": "{{env `GCE_PROJECT_ID`}}",
"gce_zone": "{{env `GCE_DEFAULT_ZONE`}}",
"gce_source_image": "{{env `GCE_SOURCE_IMAGE`}}",
"gce_credentials": "{{env `GCE_CREDENTIALS`}}",
"name": "google-ubuntu-haproxy",
"scripts_dir": "scripts",
"config_dir": "config",
Expand All @@ -14,7 +15,6 @@
"name": "{{user `atlas_username`}}/{{user `name`}}",
"base_dir": "../../../packer",
"include": [
"google/account.json",
"{{user `scripts_dir`}}/*",
"{{user `scripts_dir`}}/ubuntu/*",
"{{user `scripts_dir`}}/ubuntu/upstart/*",
Expand All @@ -33,7 +33,7 @@
{
"type": "googlecompute",
"project_id": "{{user `gce_project_id`}}",
"account_file": "google/account.json",
"account_file": "{{user `gce_credentials`}}",
"zone": "{{user `gce_zone`}}",
"network": "default",
"source_image": "{{user `gce_source_image`}}",
Expand Down
6 changes: 3 additions & 3 deletions packer/google/ubuntu/nodejs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"gce_project_id": "{{env `GCE_PROJECT_ID`}}",
"gce_zone": "{{env `GCE_DEFAULT_ZONE`}}",
"gce_source_image": "{{env `GCE_SOURCE_IMAGE`}}",
"gce_credentials": "{{env `GCE_CREDENTIALS`}}",
"name": "google-ubuntu-nodejs",
"scripts_dir": "scripts",
"config_dir": "config",
Expand All @@ -14,7 +15,6 @@
"name": "{{user `atlas_username`}}/{{user `name`}}",
"base_dir": "../../../packer",
"include": [
"google/account.json",
"{{user `scripts_dir`}}/*",
"{{user `scripts_dir`}}/ubuntu/*",
"{{user `scripts_dir`}}/ubuntu/upstart/*",
Expand All @@ -34,7 +34,7 @@
{
"type": "googlecompute",
"project_id": "{{user `gce_project_id`}}",
"account_file": "google/account.json",
"account_file": "{{user `gce_credentials`}}",
"zone": "{{user `gce_zone`}}",
"network": "default",
"source_image": "{{user `gce_source_image`}}",
Expand Down Expand Up @@ -101,4 +101,4 @@
}
}
]
}
}
4 changes: 2 additions & 2 deletions packer/google/ubuntu/vault.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"gce_project_id": "{{env `GCE_PROJECT_ID`}}",
"gce_zone": "{{env `GCE_DEFAULT_ZONE`}}",
"gce_source_image": "{{env `GCE_SOURCE_IMAGE`}}",
"gce_credentials": "{{env `GCE_CREDENTIALS`}}",
"name": "google-ubuntu-vault",
"scripts_dir": "scripts",
"config_dir": "config",
Expand All @@ -14,7 +15,6 @@
"name": "{{user `atlas_username`}}/{{user `name`}}",
"base_dir": "../../../packer",
"include": [
"google/account.json",
"{{user `scripts_dir`}}/*",
"{{user `scripts_dir`}}/ubuntu/*",
"{{user `scripts_dir`}}/ubuntu/upstart/*",
Expand All @@ -33,7 +33,7 @@
{
"type": "googlecompute",
"project_id": "{{user `gce_project_id`}}",
"account_file": "google/account.json",
"account_file": "{{user `gce_credentials`}}",
"zone": "{{user `gce_zone`}}",
"network": "default",
"source_image": "{{user `gce_source_image`}}",
Expand Down

0 comments on commit 8746351

Please sign in to comment.