From 5b088b4bfb2ad1d3234b72e8e465755f926f2f5f Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Wed, 3 Jul 2019 18:42:12 -0400 Subject: [PATCH 01/15] add aws-cli to hermes image --- 1.X/scripts/install-hermes-deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.X/scripts/install-hermes-deps b/1.X/scripts/install-hermes-deps index 1723ba6..de78df1 100755 --- a/1.X/scripts/install-hermes-deps +++ b/1.X/scripts/install-hermes-deps @@ -5,7 +5,7 @@ set -e set -o pipefail # Package to install with apk -APK_PKGS="git bash openssh curl jq" +APK_PKGS="git bash openssh curl jq aws-cli" if [ -e /sbin/apk ]; then /sbin/apk add --update --no-cache $APK_PKGS From d46fa074fca17f0364e343efce8a9cef805cc33c Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Wed, 3 Jul 2019 18:47:54 -0400 Subject: [PATCH 02/15] 3.8 doesnt have awscli as a package --- 1.X/scripts/install-hermes-deps | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/1.X/scripts/install-hermes-deps b/1.X/scripts/install-hermes-deps index de78df1..fc0f3cd 100755 --- a/1.X/scripts/install-hermes-deps +++ b/1.X/scripts/install-hermes-deps @@ -5,8 +5,10 @@ set -e set -o pipefail # Package to install with apk -APK_PKGS="git bash openssh curl jq aws-cli" +APK_PKGS="git bash openssh curl jq" if [ -e /sbin/apk ]; then /sbin/apk add --update --no-cache $APK_PKGS fi + +pip install awscli From a839c662f703ed7b14bb2da79185be66ac139847 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:10:44 -0400 Subject: [PATCH 03/15] i think i finally got it --- 1.X/scripts/install-hermes-deps | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/1.X/scripts/install-hermes-deps b/1.X/scripts/install-hermes-deps index fc0f3cd..0093bba 100755 --- a/1.X/scripts/install-hermes-deps +++ b/1.X/scripts/install-hermes-deps @@ -5,10 +5,6 @@ set -e set -o pipefail # Package to install with apk -APK_PKGS="git bash openssh curl jq" - -if [ -e /sbin/apk ]; then - /sbin/apk add --update --no-cache $APK_PKGS -fi +APK_PKGS="git bash openssh curl jq python3" pip install awscli From f6a9e58f1fdedd69bdf66189df2f628e0d11055f Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:12:01 -0400 Subject: [PATCH 04/15] well i was wrong --- 1.X/scripts/install-hermes-deps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.X/scripts/install-hermes-deps b/1.X/scripts/install-hermes-deps index 0093bba..466af38 100755 --- a/1.X/scripts/install-hermes-deps +++ b/1.X/scripts/install-hermes-deps @@ -7,4 +7,4 @@ set -o pipefail # Package to install with apk APK_PKGS="git bash openssh curl jq python3" -pip install awscli +pip3 install awscli From 5a3cdebb286eeee185fe6af580908fd9bc469c73 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:14:43 -0400 Subject: [PATCH 05/15] mistakenly deleted some lines --- 1.X/scripts/install-hermes-deps | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/1.X/scripts/install-hermes-deps b/1.X/scripts/install-hermes-deps index 466af38..ffaf570 100755 --- a/1.X/scripts/install-hermes-deps +++ b/1.X/scripts/install-hermes-deps @@ -7,4 +7,8 @@ set -o pipefail # Package to install with apk APK_PKGS="git bash openssh curl jq python3" +if [ -e /sbin/apk ]; then + /sbin/apk add --update --no-cache $APK_PKGS +fi + pip3 install awscli From b655d2cb54f8f38d2f4b9d1025a4ad3eafe8b492 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:21:01 -0400 Subject: [PATCH 06/15] update goss-tests --- 1.X/tests/goss.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 9528fa1..aa6709f 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -39,7 +39,7 @@ file: /opt/hermes/bin/install-hermes-deps: exists: true mode: "0755" - size: 267 + size: 274 owner: root group: root filetype: file @@ -106,3 +106,7 @@ package: installed: true openssh: installed: true + python3: + installed: true + aws: + installed: true From 2c241f142ca19fa028a11b1b05a779bf32c7fafb Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:22:59 -0400 Subject: [PATCH 07/15] make goss test more lenient --- 1.X/tests/goss.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index aa6709f..7e9e8a2 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -106,7 +106,3 @@ package: installed: true openssh: installed: true - python3: - installed: true - aws: - installed: true From 116f39d5e64c750261504191101e9f3af044b0e3 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:35:47 -0400 Subject: [PATCH 08/15] lets try limiting the test even more -_- --- 1.X/tests/goss.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 7e9e8a2..5a05dfe 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -36,14 +36,6 @@ file: group: root filetype: file contains: [] - /opt/hermes/bin/install-hermes-deps: - exists: true - mode: "0755" - size: 274 - owner: root - group: root - filetype: file - contains: [] /opt/hermes/bin/lease-revoke: exists: true mode: "0755" From b6cee08544f68d472414f049ca78cc2cce693ecd Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:37:43 -0400 Subject: [PATCH 09/15] only have size limitation --- 1.X/tests/goss.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 5a05dfe..4b84e7b 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -36,6 +36,13 @@ file: group: root filetype: file contains: [] + /opt/hermes/bin/install-hermes-deps: + exists: true + mode: "0755" + owner: root + group: root + filetype: file + contains: [] /opt/hermes/bin/lease-revoke: exists: true mode: "0755" From 297cf2cdc964f4681e7499293b1b55b2fc52d898 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:40:23 -0400 Subject: [PATCH 10/15] did i have the size wrong all along :| --- 1.X/tests/goss.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 4b84e7b..ba1e8da 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -39,6 +39,7 @@ file: /opt/hermes/bin/install-hermes-deps: exists: true mode: "0755" + size: 296 owner: root group: root filetype: file From 6169c4d797af09d402d8ffb9b976bb5baf58145c Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:47:47 -0400 Subject: [PATCH 11/15] make the test more expansive now --- 1.X/tests/goss.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index ba1e8da..9996f36 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -106,3 +106,7 @@ package: installed: true openssh: installed: true + python3: + installed: true + awscli: + installed: true From 028a7ca252cb80edaed90d03c5dd362256d6698f Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:50:16 -0400 Subject: [PATCH 12/15] maybe i can't check for awscli underpackages in goss --- 1.X/tests/goss.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 9996f36..03cca49 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -108,5 +108,3 @@ package: installed: true python3: installed: true - awscli: - installed: true From 27dabf95aebfc1fe09151a882777d44bd7d4a116 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:54:40 -0400 Subject: [PATCH 13/15] I think this should work , awscli is aws --- 1.X/tests/goss.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 03cca49..2c4de29 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -108,3 +108,5 @@ package: installed: true python3: installed: true + aws: + installed: From 798abb19f41d6fe7063e1816c2d9fd093f8efec9 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 19:59:23 -0400 Subject: [PATCH 14/15] check for pip3 as a package, then we'll add a cmd --- 1.X/tests/goss.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index 2c4de29..f07bb9a 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -108,5 +108,5 @@ package: installed: true python3: installed: true - aws: - installed: + pip3: + installed: true From 05957628d4541c1927831aead7ea14ed488d39b9 Mon Sep 17 00:00:00 2001 From: Haris Khan Date: Fri, 12 Jul 2019 20:03:53 -0400 Subject: [PATCH 15/15] I don't think i can check for pip3 either, just python3 thats fine tho --- 1.X/tests/goss.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/1.X/tests/goss.yaml b/1.X/tests/goss.yaml index f07bb9a..eb64db1 100644 --- a/1.X/tests/goss.yaml +++ b/1.X/tests/goss.yaml @@ -108,5 +108,8 @@ package: installed: true python3: installed: true - pip3: - installed: true +command: + aws --version: + exit-status: 0 + stderr: [] + timeout: 10000