Skip to content

Commit

Permalink
fix(upgrade): upgrade procedure & add MacOS platform
Browse files Browse the repository at this point in the history
  • Loading branch information
rbjorklin committed Mar 30, 2019
1 parent d0ed5e5 commit b7b0d1d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ suites:
- vault
vault.sls:
vault:
# version: 0.11.1 # test upgrades by doing a double-converge, changing the version pillar between each one
version: 0.11.2
# version: 1.0.3 # test upgrades by doing a double-converge, changing the version pillar between each one
version: 1.1.0
verify_download: False

- name: dev_server
Expand Down
3 changes: 1 addition & 2 deletions vault/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent

vault:
version: 1.1.0
platform: linux_amd64
version: 1.0.3
dev_mode: False
verify_download: True
self_signed_cert:
Expand Down
5 changes: 5 additions & 0 deletions vault/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
# vim: ft=sls syntax=yaml softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent

RedHat:
platform: linux_amd64
gpg_pkg: gnupg2

Debian:
gpg_pkg: gnupg2
platform: linux_amd64

MacOS:
platform: darwin_amd64
9 changes: 1 addition & 8 deletions vault/package/gpg/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ vault-package-gpg-cmd-run-import:
- name: gpg --import /opt/vault/hashicorp.asc
- unless: gpg --list-keys {{ vault.hashicorp_key_id }}

vault-package-gpg-file-managed-checksum:
file.managed:
- name: /opt/vault/{{ vault.version }}_SHA256SUMS
- source: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_SHA256SUMS
- skip_verify: True
- makedirs: True

vault-package-gpg-file-managed-signature:
file.managed:
- name: /opt/vault/{{ vault.version }}_SHA256SUMS.sig
Expand All @@ -37,5 +30,5 @@ vault-package-gpg-cmd-run-verify:
cmd.run:
- name: gpg --verify /opt/vault/{{ vault.version }}_SHA256SUMS.sig /opt/vault/{{ vault.version }}_SHA256SUMS
- onchanges:
- file: vault-package-gpg-file-managed-checksum
- file: vault-package-install-file-managed
- file: vault-package-gpg-file-managed-signature
18 changes: 17 additions & 1 deletion vault/package/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,29 @@ vault-package-install-file-directory:
- name: /opt/vault/bin
- makedirs: True

vault-package-install-file-managed:
file.managed:
- name: /opt/vault/{{ vault.version }}_SHA256SUMS
- source: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_SHA256SUMS
- skip_verify: True
- makedirs: True

vault-package-install-service-dead:
service.dead:
- name: vault
- onchanges:
- file: vault-package-install-file-managed

vault-package-install-archive-extracted:
archive.extracted:
- name: /opt/vault/bin
- source: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_{{ vault.platform }}.zip
- source_hash: https://releases.hashicorp.com/vault/{{ vault.version }}/vault_{{ vault.version }}_SHA256SUMS
- source_hash_name: vault_{{ vault.version }}_{{ vault.platform }}.zip
- enforce_toplevel: false
- enforce_toplevel: False
- overwrite: True
- onchanges:
- file: vault-package-install-file-managed

vault-package-install-file-symlink:
file.symlink:
Expand Down

0 comments on commit b7b0d1d

Please sign in to comment.