|
71 | 71 | "EmailAddress": { |
72 | 72 | "Type": "String", |
73 | 73 | "Description": "Email Address for SNS Topic. Alarms for Vault instance memory utilzation", |
74 | | - |
| 74 | + |
75 | 75 | }, |
76 | 76 | "PrivateSubnet1ID": { |
77 | 77 | "Description": "ID of the private subnet 1 in Availability Zone 1 (e.g., subnet-xxxxxxxx)", |
|
343 | 343 | "/usr/local/bin": "https://releases.hashicorp.com/vault/0.6.1/vault_0.6.1_linux_amd64.zip" |
344 | 344 | }, |
345 | 345 | "files": { |
346 | | - "/tmp/vault.hcl.template": { |
347 | | - "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/vault/vault.hcl", |
| 346 | + "/etc/vault.d/vault.hcl": { |
| 347 | + "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/vault.hcl", |
348 | 348 | "mode": "000700", |
349 | 349 | "owner": "root", |
350 | 350 | "group": "root" |
351 | 351 | }, |
352 | 352 | "/etc/init/vault-upstart.conf": { |
353 | | - "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/vault/vault-upstart.conf", |
| 353 | + "source": "https://s3.amazonaws.com/quickstart-reference/hashicorp/vault/latest/scripts/vault-upstart.conf", |
354 | 354 | "mode": "000700", |
355 | 355 | "owner": "root", |
356 | 356 | "group": "root" |
|
364 | 364 | }, |
365 | 365 | "run_vault": { |
366 | 366 | "commands": { |
367 | | - "01_run_vault_binary": { |
368 | | - "command": "vault server -config /etc/vault.d/vault.hcl", |
369 | | - "cwd": "/usr/local/bin/" |
| 367 | + "01_register_vault_binary": { |
| 368 | + "command": "chmod 755 vault", |
| 369 | + "command": "update-rc.d vault defaults", |
| 370 | + "command": "update-rc.d vault enable", |
| 371 | + "cwd": "/etc/init.d/" |
370 | 372 | } |
371 | 373 | } |
372 | 374 | } |
|
430 | 432 | { |
431 | 433 | "Ref": "ConsulMasterPrivateIP" |
432 | 434 | },"\"\n", |
433 | | - "sed -e /tmp/vault.hcl.template sed -e s/__CONSULMASTER__/${CONSULMASTER}/ >/etc/vault.d/vault.hcl", |
| 435 | + "sed -i -e s/__CONSULMASTER__/${CONSULMASTER}/ /etc/vault.d/vault.hcl", |
| 436 | + "\n", |
| 437 | + "echo \"Starting Vault Server \" \n", |
| 438 | + "vault server -config /etc/vault.d/vault.hcl", |
434 | 439 | "\n", |
435 | 440 | "/usr/local/bin/cfn-signal -e $? ", |
436 | 441 | " --stack ", { |
|
565 | 570 | }, |
566 | 571 | "run_vault": { |
567 | 572 | "commands": { |
568 | | - "01_run_vault_binary": { |
569 | | - "command": "vault server -config /etc/vault.d/vault.hcl", |
570 | | - "cwd": "/usr/local/bin/" |
571 | | - } |
| 573 | + "01_register_vault_binary": { |
| 574 | + "command": "chmod 755 vault", |
| 575 | + "command": "update-rc.d vault defaults", |
| 576 | + "command": "update-rc.d vault enable", |
| 577 | + "cwd": "/etc/init.d/" } |
572 | 578 | } |
573 | 579 | } |
574 | 580 | } |
|
631 | 637 | { |
632 | 638 | "Ref": "ConsulMasterPrivateIP" |
633 | 639 | },"\"\n", |
634 | | - "sed -e /tmp/vault.hcl.template sed -e s/__CONSULMASTER__/${CONSULMASTER}/ >/etc/vault.d/vault.hcl", |
| 640 | + "sed -i -e s/__CONSULMASTER__/${CONSULMASTER}/ /etc/vault.d/vault.hcl", |
| 641 | + "\n", |
| 642 | + "echo \"Starting Vault Server \" \n", |
| 643 | + "vault server -config /etc/vault.d/vault.hcl", |
635 | 644 | "\n", |
636 | 645 | "/usr/local/bin/cfn-signal -e $? ", |
637 | 646 | " --stack ", { |
|
0 commit comments