From 6f6d6c166daab043cc5d6a6c7f195dcd853e61e1 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:46:18 -0400 Subject: [PATCH 01/27] first test --- .github/hello-world-shelby.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/hello-world-shelby.yml diff --git a/.github/hello-world-shelby.yml b/.github/hello-world-shelby.yml new file mode 100644 index 0000000..c09a12f --- /dev/null +++ b/.github/hello-world-shelby.yml @@ -0,0 +1,21 @@ +name: Python Package + +on: + - push + - pull_request + +jobs: + Run-Tox: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - name: Setup python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Test with tox + run: echo "Hello Shelby" From 5e54a63a0dd3c8670229b0b42fcbdcbb290de782 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:46:50 -0400 Subject: [PATCH 02/27] oops --- .github/{ => workflows}/hello-world-shelby.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/hello-world-shelby.yml (100%) diff --git a/.github/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml similarity index 100% rename from .github/hello-world-shelby.yml rename to .github/workflows/hello-world-shelby.yml From 3ec8741ce96a7881cc755ebb0b639a9d7d1ebe90 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:50:29 -0400 Subject: [PATCH 03/27] oops i did it yet again --- .github/hello-world-shelby.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/hello-world-shelby.yml diff --git a/.github/hello-world-shelby.yml b/.github/hello-world-shelby.yml new file mode 100644 index 0000000..35d5d49 --- /dev/null +++ b/.github/hello-world-shelby.yml @@ -0,0 +1,21 @@ +name: Python Package + +on: + - push + - pull_request + +jobs: + Run-Tox: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11"] + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - name: Setup python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Test with tox + run: echo "Hello Shelby" From 532c9dfd9a480f40bb833149ea6e0ff62be2bd0c Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:52:04 -0400 Subject: [PATCH 04/27] oooppppppesss --- .github/hello-world-shelby.yml | 21 --------------------- .github/workflows/hello-world-shelby.yml | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 .github/hello-world-shelby.yml diff --git a/.github/hello-world-shelby.yml b/.github/hello-world-shelby.yml deleted file mode 100644 index 35d5d49..0000000 --- a/.github/hello-world-shelby.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Python Package - -on: - - push - - pull_request - -jobs: - Run-Tox: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10", "3.11"] - steps: - - name: Check out repository code - uses: actions/checkout@v2 - - name: Setup python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Test with tox - run: echo "Hello Shelby" diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index c09a12f..35d5d49 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: ["3.10", "3.11"] steps: - name: Check out repository code uses: actions/checkout@v2 From 715f09c389a391329dd51204b0f9de3c2c52384a Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:13:05 -0400 Subject: [PATCH 05/27] testy --- .github/workflows/hello-world-shelby.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 35d5d49..c32be1f 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -1,15 +1,13 @@ name: Python Package on: - - push - - pull_request + push: + branches: + - "action_test" jobs: Run-Tox: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10", "3.11"] steps: - name: Check out repository code uses: actions/checkout@v2 @@ -18,4 +16,12 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Test with tox - run: echo "Hello Shelby" + run: date > some_file.txt + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Development Build" + files: | + some_file.txt From 70813159a1a31da11120a7ee247ca1e6aa3a0d2e Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:21:34 -0400 Subject: [PATCH 06/27] this won't work haha ha ha --- .github/workflows/hello-world-shelby.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index c32be1f..67b9f8e 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -14,9 +14,19 @@ jobs: - name: Setup python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + python-version: "3.9" - name: Test with tox - run: date > some_file.txt + run: | + python -V + mkdir -p layer + virtualenv ./layer/ + source ./layer/bin/activate + python -m pip install pycryptodome==3.17.0 paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + echo "Copy from ./layer directory to ./python\n" + mkdir -p ./python/ + cp -r ./layer/lib/python3.9/site-packages/* ./python/ + zip -r cluster_layer.zip ./python + deactivate - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" @@ -24,4 +34,4 @@ jobs: prerelease: true title: "Development Build" files: | - some_file.txt + cluster_layer.zip From 5475e5063d74ae8cf77e1124cefe0f65579b987c Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:24:00 -0400 Subject: [PATCH 07/27] blah --- .github/workflows/hello-world-shelby.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 67b9f8e..dc3b21a 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -15,8 +15,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.9" - - name: Test with tox - run: | + - run: | python -V mkdir -p layer virtualenv ./layer/ From 4f90fa49da8f678dd06a6044d8bceec515fad000 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:26:55 -0400 Subject: [PATCH 08/27] blah --- .github/workflows/hello-world-shelby.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index dc3b21a..50b96c1 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -16,16 +16,16 @@ jobs: with: python-version: "3.9" - run: | - python -V - mkdir -p layer - virtualenv ./layer/ - source ./layer/bin/activate - python -m pip install pycryptodome==3.17.0 paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 - echo "Copy from ./layer directory to ./python\n" - mkdir -p ./python/ - cp -r ./layer/lib/python3.9/site-packages/* ./python/ - zip -r cluster_layer.zip ./python - deactivate + python -V + mkdir -p layer + virtualenv ./layer/ + source ./layer/bin/activate + python -m pip install pycryptodome==3.17.0 paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + echo "Copy from ./layer directory to ./python\n" + mkdir -p ./python/ + cp -r ./layer/lib/python3.9/site-packages/* ./python/ + zip -r cluster_layer.zip ./python + deactivate - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" From 24d4a37c16cacee33a7c3f0f56e2e4ee4c06ae76 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:29:30 -0400 Subject: [PATCH 09/27] blah --- .github/workflows/hello-world-shelby.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 50b96c1..4905015 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -15,7 +15,13 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.9" - - run: | + - name: "Install virtualenv" + run: | + python -V + python -m pip install --upgrade pip + python -m pip install virtualenv + - name: "Build the cluster_layer.zip" + run: | python -V mkdir -p layer virtualenv ./layer/ From 374a0743a7dfd1dbdbc6cb7f85585c1ba2bc61ea Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:41:41 -0400 Subject: [PATCH 10/27] blah --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 4905015..0d07fbc 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -7,7 +7,7 @@ on: jobs: Run-Tox: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - name: Check out repository code uses: actions/checkout@v2 From a761a01e7a1e6fb713f930e515668a9242079c51 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:43:00 -0400 Subject: [PATCH 11/27] blah --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 0d07fbc..51b5ce1 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -7,7 +7,7 @@ on: jobs: Run-Tox: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check out repository code uses: actions/checkout@v2 From 338242d0a26ec23059996284bef59e37ed7b9464 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:51:32 -0400 Subject: [PATCH 12/27] whole shebang --- .github/workflows/hello-world-shelby.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 51b5ce1..2368941 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -32,6 +32,8 @@ jobs: cp -r ./layer/lib/python3.9/site-packages/* ./python/ zip -r cluster_layer.zip ./python deactivate + cp cluster_layer.zip target/ + python make.py - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" @@ -40,3 +42,5 @@ jobs: title: "Development Build" files: | cluster_layer.zip + cluster_manager.zip + cluster_lifecycle.zip From 94753793f42abc50e57fa4c52a8baaf25e9c8f67 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:53:18 -0400 Subject: [PATCH 13/27] whole shebang --- .github/workflows/hello-world-shelby.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 2368941..e971d23 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -32,8 +32,9 @@ jobs: cp -r ./layer/lib/python3.9/site-packages/* ./python/ zip -r cluster_layer.zip ./python deactivate - cp cluster_layer.zip target/ + cp cluster_layer.zip lambda-python-files/ python make.py + - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" From 38630e41f60111bf86c7cdf3f1ddb0a04607a919 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:55:00 -0400 Subject: [PATCH 14/27] whole shebang --- .github/workflows/hello-world-shelby.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index e971d23..6bf6517 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -22,6 +22,9 @@ jobs: python -m pip install virtualenv - name: "Build the cluster_layer.zip" run: | + pwd + cd cluster/aws + pwd python -V mkdir -p layer virtualenv ./layer/ From 9cc59c95137882b6d6484ba7db8b36ca05f28960 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:56:00 -0400 Subject: [PATCH 15/27] whole shebang --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 6bf6517..34fddf0 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -36,7 +36,7 @@ jobs: zip -r cluster_layer.zip ./python deactivate cp cluster_layer.zip lambda-python-files/ - python make.py + python make.py build - uses: "marvinpinto/action-automatic-releases@latest" with: From 2423b6236e4733382486f01c9181c985a49243ae Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:57:44 -0400 Subject: [PATCH 16/27] whole shebang --- .github/workflows/hello-world-shelby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 34fddf0..3e75d5d 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -45,6 +45,6 @@ jobs: prerelease: true title: "Development Build" files: | - cluster_layer.zip - cluster_manager.zip - cluster_lifecycle.zip + target/cluster_layer.zip + target/cluster_manager.zip + target/cluster_lifecycle.zip From f241658aa38b23c0dc3ad8672b5d352324453e68 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:00:20 -0400 Subject: [PATCH 17/27] whole shebang --- .github/workflows/hello-world-shelby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 3e75d5d..5186d31 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -45,6 +45,6 @@ jobs: prerelease: true title: "Development Build" files: | - target/cluster_layer.zip - target/cluster_manager.zip - target/cluster_lifecycle.zip + cluster/aws/target/cluster_layer.zip + cluster/aws/target/cluster_manager.zip + cluster/aws/target/cluster_lifecycle.zip From 8b016d330155dda05ee6a50e6e86421637938fe2 Mon Sep 17 00:00:00 2001 From: snitzcode <166633746+snitzcode@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:51:30 -0400 Subject: [PATCH 18/27] Update hello-world-shelby.yml changed pycryptodome --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 5186d31..610b111 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install pycryptodome==3.17.0 paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From fc612fabf4afa4fdb920029a0d652532796ea2e6 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:21:50 -0400 Subject: [PATCH 19/27] fix glibc issues --- .github/workflows/hello-world-shelby.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 610b111..e449030 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v2 - - name: Setup python ${{ matrix.python-version }} + - name: Setup python 3.9 uses: actions/setup-python@v2 with: python-version: "3.9" @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install --platform manylinux2010_x86_64 pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From 91f967651c7a0bd87553e04ad0e2bd14a9d67e42 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:22:48 -0400 Subject: [PATCH 20/27] fix glibc issues --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index e449030..aed653c 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install --platform manylinux2010_x86_64 pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From 40039db0f83cdb22714df0a09fe2dcc1e580f4be Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:29:53 -0400 Subject: [PATCH 21/27] fix glibc issues --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index aed653c..15ba7ae 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pipenv --venv)/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From 346a72b2703cee5e1c74c269da14999e5f0121bb Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:36:57 -0400 Subject: [PATCH 22/27] fix glibc issues --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 15ba7ae..ac67781 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pipenv --venv)/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pwd)/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From 418c659f52621b74d6c412fbca76670e17e188e6 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:37:34 -0400 Subject: [PATCH 23/27] fix glibc issues --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index ac67781..2436a6d 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pwd)/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi==1.15.1 zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pwd)/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From 710f02efdf544f4f475435980bf06e97a19e791c Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:41:43 -0400 Subject: [PATCH 24/27] try again --- .github/workflows/hello-world-shelby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/hello-world-shelby.yml index 2436a6d..7aaaea5 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/hello-world-shelby.yml @@ -29,7 +29,7 @@ jobs: mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate - python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pwd)/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi zipp==3.1.0 importlib-metadata==1.6.0 + python -m pip install --platform manylinux2010_x86_64 --only-binary=:all: --target=$(pwd)/layer/lib/python3.9/site-packages pycryptodomex paramiko==2.7.1 requests==2.23.0 scp==0.13.2 jsonschema==3.2.0 cffi zipp==3.1.0 importlib-metadata==1.6.0 echo "Copy from ./layer directory to ./python\n" mkdir -p ./python/ cp -r ./layer/lib/python3.9/site-packages/* ./python/ From 289dd7123b64d2ee6d409e9263262859d181f2b3 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:25:42 -0400 Subject: [PATCH 25/27] Updated readme for cluster/aws and build workflow --- ...llo-world-shelby.yml => build-release.yml} | 18 ++-- cluster/aws/README.md | 98 ++++++++++++------- 2 files changed, 73 insertions(+), 43 deletions(-) rename .github/workflows/{hello-world-shelby.yml => build-release.yml} (80%) diff --git a/.github/workflows/hello-world-shelby.yml b/.github/workflows/build-release.yml similarity index 80% rename from .github/workflows/hello-world-shelby.yml rename to .github/workflows/build-release.yml index 7aaaea5..1e6e859 100644 --- a/.github/workflows/hello-world-shelby.yml +++ b/.github/workflows/build-release.yml @@ -4,9 +4,10 @@ on: push: branches: - "action_test" + - "master" jobs: - Run-Tox: + Build-And-Release: runs-on: ubuntu-20.04 steps: - name: Check out repository code @@ -20,12 +21,9 @@ jobs: python -V python -m pip install --upgrade pip python -m pip install virtualenv - - name: "Build the cluster_layer.zip" + - name: "Build the cluster AWS artifacts" run: | - pwd cd cluster/aws - pwd - python -V mkdir -p layer virtualenv ./layer/ source ./layer/bin/activate @@ -37,14 +35,14 @@ jobs: deactivate cp cluster_layer.zip lambda-python-files/ python make.py build + cd target + zip cluster_aws.zip cluster_layer.zip cluster_manager.zip cluster_life_cycle.zip - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "latest" - prerelease: true - title: "Development Build" + prerelease: false + title: "Release ${{ github.sha }}" files: | - cluster/aws/target/cluster_layer.zip - cluster/aws/target/cluster_manager.zip - cluster/aws/target/cluster_lifecycle.zip + cluster/aws/target/cluster_aws.zip diff --git a/cluster/aws/README.md b/cluster/aws/README.md index c26413d..d4b1858 100644 --- a/cluster/aws/README.md +++ b/cluster/aws/README.md @@ -1,4 +1,5 @@ # Clustering for the Threat Defense Virtual in a Public Cloud + Clustering lets you group multiple threat defense virtuals together as a single logical device. A cluster provides all the convenience of a single device (management, integration into a network) while achieving the increased throughput and redundancy of multiple devices. You can deploy threat defense virtual clusters in a public @@ -6,14 +7,41 @@ cloud using Amazon Web Services (AWS) or Google Cloud Platform (GCP). Only route supported.
# Prerequisites
-## Update FMCv Configuration -Modify cloud-clustering/ftdv-cluster/lambda-python-files/Configuration.json
-Login to FMCv,
-Create Access policy with same name provided in Configuration.json and create API user.
-Note FMCv IP, API username & password.
-If you are deploying FMCv & FTDv in same subnet then above process should be done after Infra & FMCv deployment.
- -## Create "cluster_layer.zip" + +## Option A: Use pre-built binaries + +1. Download the `cluster_aws.zip` file from the repository release [page](https://github.com/CiscoDevNet/cisco-ftdv/releases). +2. Extract the three files `cluster_layer.zip`, `cluster_manager.zip`, and `cluster_lifecycle.zip` from the `cluster_aws.zip` file. +3. Extract the `Configuration.json` file from the `cluster_manager.zip` file. +4. Adjust the configuration in the `Configuration.json` file as needed. + ```json + { + "licenseCaps": ["BASE", "MALWARE", "THREAT"], + "performanceTier": "FTDv50", + "fmcIpforDeviceReg": "DONTRESOLVE", + "RegistrationId": "cisco", + "NatId": "cisco", + "fmcAccessPolicyName": "AWS-ACL" + } + ``` + The `fmcAccessPolicyName` should match the name of an access policy in the FMC. `performanceTier` is the license tier of the FTDv devices. +5. If changes were made to the `Configuration.json` file add it back into the `cluster_manager.zip` file. +6. These files will be uploaded to an S3 bucket created after the infrastructure stack is deployed. + +## Option B: Custom build the deployment package + +### Update FMCv Configuration + +1. Adjust the `cluster/aws/lambda-python-files/Configuration.json` file with the values to match the enviroment. +2. Configure the FMC: + +- Login to FMCv +- Create an access policy (ACP) with same name provided in `Configuration.json` +- Create an API user (with administrative access)
+ **If you are deploying FMCv & FTDv in same subnet then above process should be done after Infra & FMCv deployment.** + +### Create "cluster_layer.zip" + The cluster_layer.zip can be created in a Linux environment, such as Ubuntu 18.04 with Python 3.9 installed.
```bash @@ -35,38 +63,42 @@ cp -r ./layer/lib/python3.9/site-packages/* ./python/ zip -r cluster_layer.zip ./python deactivate ``` -The resultant cluster_layer.zip file should be copied to the lambda-python-files folder.
-## Create "cluster_manager.zip" & "cluster_lifecycle.zip" -A make.py file can be found in the cloned repository top directory. This will Zip the python files into a Zip -file and copy to a target folder.
-In order to do these tasks, the Python 3 environment should be available.
+The resultant `cluster_layer.zip` file should be copied to the `lambda-python-files` folder.
-Run to create zip files
-python3 make.py build
+## Create `cluster_manager.zip` & `cluster_lifecycle.zip` -Run to clean
-python3 make.py clean
+1. Change into the `cluster/aws/` directory. +2. Execute the `make.py` script to create the `cluster_manager.zip` & `cluster_lifecycle.zip` files. + ```bash + python3 make.py build + ``` +3. The `cluster_manager.zip` & `cluster_lifecycle.zip` files will be created in the `target` folder. +4. The three files `cluster_layer.zip`, `cluster_manager.zip`, and `cluster_lifecycle.zip` will need to be uploaded to the S3 bucket created after the infrastructure stack is deployed. -All Zip needs to be uploaded on AWS S3 bucket.
+# AWS NGFWv Cluster Deployment Steps -# AWS NGFWv Cluster Deployment Steps
-## Deploy "infrastructure.yaml" -Go to "CloudFormation" on AWS Console.
-1. Click on "Create stack" and select "With new resources(standard)"
-2. Select "Upload a template file", Click on "Choose file" and select "infrastructure.yaml" from target folder.
-3. Click on "Next", Read all the Parameter's Label & instructions carefully. Add/Update Template parameters according to your requirement.
-4. Click "Next" and "Create stack"
-5. Once deployment is complete, go to "Outputs" and note S3 "BucketName".
-6. Go to S3, Open S3 bucket which is deployed using infra template. Upload "cluster_layer.zip, "cluster_manager.zip" & "cluster_lifecycle.zip". +## Step 1 - Deploy `infrastructure.yaml` + +Go to "CloudFormation" on AWS Console. + +1. Click on "Create stack" and select "With new resources (standard)" +2. Select "Upload a template file", Click on "Choose file" and select `infrastructure.yaml` from target folder +3. Click on "Next", Read all the Parameter's Label & instructions carefully. Add/Update Template parameters according to your requirement. +4. Click "Next" and "Create stack". +5. Once deployment is complete, go to "Outputs" and note S3 "BucketName" +6. Go to S3, Open the newly created S3 bucket and upload `cluster_layer.zip`, `cluster_manager.zip` & `cluster_lifecycle.zip`. ## Deploy "deploy_ngfw_cluster.yaml" -Go to "CloudFormation" on AWS Console.
-1. Click on "Create stack" and select "With new resources(standard)"
-2. Select "Upload a template file", Click on "Choose file" and select "deploy_ngfw_cluster.yaml" from target folder.
-3. Click on "Next", Read all the Parameter's Label & instructions carefully. Add/Update/Select Template parameters according to your requirement.
-4. Click "Next" and "Create stack"
-5. Lambda functions will manage further process and NGFWv devices will be Auto-Registered to FMCv. +Go to "CloudFormation" on AWS Console. + +1. Click on "Create stack" and select "With new resources (standard)" +2. Select "Upload a template file", Click on "Choose file" and upload `deploy_ngfw_cluster.yaml`. +3. Click on "Next", Read all the Parameter's Label & instructions carefully. Add/Update/Select Template parameters according to your requirement. +- **Note** Carefully validate the paramaters match Security Groups, Subnets and VPCs created in your AWS account. +4. Click "Next" and "Create stack". +5. As the FTDv devices boot, they should form a cluster. The Lambda functions will automatically log into the FTDv and the FMC to register the devices and create a cluster. It is _important_ that the FMC is reachable from both the FTDv management interfaces and from the Lamdba function subnets. This shouln't be an issue if the FMC is deployed on the same management subnet as the FTDv devices but if it is located else where (such as on-premise, over a VPN) then you will need to update the appropriate security groups and routing tables to allow the Lambda functions to reach the FMC. +6. If the devices do _not_ form a cluster, you can check the Lambda logs for the `-manager-lambda` function to understand what actions failed. From 5ac9817adf7bde4b2d5a1853e78667837eecbd09 Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:29:24 -0400 Subject: [PATCH 26/27] fixed file name --- .github/workflows/build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 1e6e859..0b52e63 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -36,7 +36,7 @@ jobs: cp cluster_layer.zip lambda-python-files/ python make.py build cd target - zip cluster_aws.zip cluster_layer.zip cluster_manager.zip cluster_life_cycle.zip + zip cluster_aws.zip cluster_layer.zip cluster_manager.zip cluster_lifecycle.zip - uses: "marvinpinto/action-automatic-releases@latest" with: From 750a66621d66fcad0058ad7fd02d3f1c9830203c Mon Sep 17 00:00:00 2001 From: Jay Young <80918493+ministryofjay-cisco@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:29:50 -0400 Subject: [PATCH 27/27] Only build on commits to masteR --- .github/workflows/build-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 0b52e63..617eb5b 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -3,7 +3,6 @@ name: Python Package on: push: branches: - - "action_test" - "master" jobs: