From badb24770f36c6754bed053239c94636a75e3ff3 Mon Sep 17 00:00:00 2001 From: Stephen Atwell Date: Thu, 28 Sep 2023 14:44:24 -0700 Subject: [PATCH 1/2] reset.sh now also points the lambda function to a different version --- reset.sh | 1 + reset/lambda-reset.yml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 reset/lambda-reset.yml diff --git a/reset.sh b/reset.sh index 0614270..7a8378a 100755 --- a/reset.sh +++ b/reset.sh @@ -10,6 +10,7 @@ cd reset #kubectl -n=borealis-prod delete rs --all #kubectl -n=borealis-prod2 delete rs --all #sleep 60 +armory deploy start -f lambda-reset.yml -w armory deploy start -f deploy3.yml -w diff --git a/reset/lambda-reset.yml b/reset/lambda-reset.yml new file mode 100644 index 0000000..99992f5 --- /dev/null +++ b/reset/lambda-reset.yml @@ -0,0 +1,39 @@ +version: v1 +kind: lambda +application: potatolessFacts +targets: #This section defines the targets to which you are deploying, and their constraints. + armory-product-demos: + account: arn:aws:iam::957626022434:role/ArmoryRole + deployAsIamRole: arn:aws:iam::957626022434:role/ArmoryRole + region: us-east-2 + strategy: allAtOnce +artifacts: #This section defines the artifacts you are deploying, by default they reach all targets, but you can specify certain targets if needed. + - functionName: potatolessFacts-satwell + path: s3://cdk-hnb659fds-assets-957626022434-us-east-2/041b7d0740aa6ba1622ce5b3a9307829a21c1f0e5246bacc653ed458e885f5b5.zip + type: zipFile + - functionName: potatolessLies-satwell + path: s3://cdk-hnb659fds-assets-957626022434-us-east-2/041b7d0740aa6ba1622ce5b3a9307829a21c1f0e5246bacc653ed458e885f5b5.zip + type: zipFile +providerOptions: #This section defines options specific to the cloud provider to which we are deploying. + lambda: + - handler: index.handler + name: potatolessFacts-satwell + runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q + runtime: nodejs18.x + target: armory-product-demos + - handler: index.handler + name: potatolessLies-satwell + runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q + runtime: nodejs18.x + target: armory-product-demos +strategies: #This section defines the strategies environments can use to deploy. + allAtOnce: + canary: + steps: + - setWeight: + weight: 100 +deploymentConfig: + keepDeploymentObject: true + timeout: + duration: 30 + unit: minutes From f5bc97622091e2dbde1f5601552a16d7e7d59836 Mon Sep 17 00:00:00 2001 From: Stephen Atwell Date: Wed, 1 Nov 2023 13:55:50 -0700 Subject: [PATCH 2/2] updated s3 images to be in buckets that should have company-wide access --- configuration/deploy-lambda/baseDeploy.yml | 68 ++++++++++++++++++---- lambda-deploy.yml | 60 +++++++++++++++++-- 2 files changed, 112 insertions(+), 16 deletions(-) diff --git a/configuration/deploy-lambda/baseDeploy.yml b/configuration/deploy-lambda/baseDeploy.yml index 7bbd55a..2e717ea 100644 --- a/configuration/deploy-lambda/baseDeploy.yml +++ b/configuration/deploy-lambda/baseDeploy.yml @@ -11,11 +11,11 @@ deploymentConfig: unit: minutes duration: 30 targets: - armory-product-demos: + staging: account: arn:aws:iam::957626022434:role/ArmoryRole strategy: allAtOnce deployAsIamRole: "arn:aws:iam::957626022434:role/ArmoryRole" - region: us-east-2 + region: us-east-1 constraints: afterDeployment: - runWebhook: @@ -23,6 +23,22 @@ targets: beforeDeployment: - runWebhook: name: Send_Slack_Deployment_Approval_Required + Production-1: + account: arn:aws:iam::957626022434:role/ArmoryRole + strategy: allAtOnce + deployAsIamRole: "arn:aws:iam::957626022434:role/ArmoryRole" + region: us-east-2 + constraints: + dependsOn: + - staging + Production-2: + account: arn:aws:iam::957626022434:role/ArmoryRole + strategy: allAtOnce + deployAsIamRole: "arn:aws:iam::957626022434:role/ArmoryRole" + region: us-west-1 + constraints: + dependsOn: + - staging strategies: allAtOnce: canary: @@ -32,22 +48,54 @@ strategies: - runWebhook: name: Send_Slack_Deployment_Approval_Required artifacts: -- functionName: potatolessFacts- #WidgetsWidgetHandler1BC9DB34 - path: s3://cdk-hnb659fds-assets-957626022434-us-east-2/71dec8493297ae732c123fb4aea7dae0 +- functionName: potatolessFacts- + path: s3://armory-product-demos-potatoless-facts-us-east-2/71dec8493297ae732c123fb4aea7dae0.zip + type: zipFile +- functionName: potatolessLies- + path: s3://armory-product-demos-potatoless-facts-us-east-2/71dec8493297ae732c123fb4aea7dae0.zip + type: zipFile +- functionName: potatolessFacts-staging- + path: s3://armory-product-demos-potatoless-facts-us-east-1/71dec8493297ae732c123fb4aea7dae0.zip + type: zipFile +- functionName: potatolessLies-staging- + path: s3://armory-product-demos-potatoless-facts-us-east-1/71dec8493297ae732c123fb4aea7dae0.zip type: zipFile -- functionName: potatolessLies- #WidgetsWidgetHandler1BC9DB34 - path: s3://cdk-hnb659fds-assets-957626022434-us-east-2/71dec8493297ae732c123fb4aea7dae0 +- functionName: potatolessFacts-prod2- + path: s3://armory-product-demos-potatoless-facts-us-west-1/71dec8493297ae732c123fb4aea7dae0.zip + type: zipFile +- functionName: potatolessLies-prod2- + path: s3://armory-product-demos-potatoless-facts-us-west-1/71dec8493297ae732c123fb4aea7dae0.zip type: zipFile webhooks: [] providerOptions: lambda: - - name: potatolessFacts- #WidgetsWidgetHandler1BC9DB34 - target: armory-product-demos + - name: potatolessFacts- + target: Production-1 + runAsIamRole: "arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q" + handler: index.handler + runtime: nodejs18.x + - name: potatolessLies- + target: Production-1 + runAsIamRole: "arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q" + handler: index.handler + runtime: nodejs18.x + - name: potatolessFacts-prod2- + target: Production-2 + runAsIamRole: "arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q" + handler: index.handler + runtime: nodejs18.x + - name: potatolessLies-prod2- + target: Production-2 + runAsIamRole: "arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q" + handler: index.handler + runtime: nodejs18.x + - name: potatolessFacts-staging- + target: staging runAsIamRole: "arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q" handler: index.handler runtime: nodejs18.x - - name: potatolessLies- #WidgetsWidgetHandler1BC9DB34 - target: armory-product-demos + - name: potatolessLies-staging- + target: staging runAsIamRole: "arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q" handler: index.handler runtime: nodejs18.x diff --git a/lambda-deploy.yml b/lambda-deploy.yml index f9fd059..6818434 100644 --- a/lambda-deploy.yml +++ b/lambda-deploy.yml @@ -2,7 +2,23 @@ version: v1 kind: lambda application: potatolessFacts targets: #This section defines the targets to which you are deploying, and their constraints. - armory-product-demos: + Production-1: + account: arn:aws:iam::957626022434:role/ArmoryRole + constraints: + dependsOn: + - staging + deployAsIamRole: arn:aws:iam::957626022434:role/ArmoryRole + region: us-east-2 + strategy: allAtOnce + Production-2: + account: arn:aws:iam::957626022434:role/ArmoryRole + constraints: + dependsOn: + - staging + deployAsIamRole: arn:aws:iam::957626022434:role/ArmoryRole + region: us-west-1 + strategy: allAtOnce + staging: account: arn:aws:iam::957626022434:role/ArmoryRole constraints: afterDeployment: @@ -12,14 +28,26 @@ targets: #This section defines the targets to which you are deploying, and their - runWebhook: name: Send_Slack_Deployment_Approval_Required deployAsIamRole: arn:aws:iam::957626022434:role/ArmoryRole - region: us-east-2 + region: us-east-1 strategy: allAtOnce artifacts: #This section defines the artifacts you are deploying, by default they reach all targets, but you can specify certain targets if needed. - functionName: potatolessFacts-satwell - path: s3://cdk-hnb659fds-assets-957626022434-us-east-2/71dec8493297ae732c123fb4aea7dae0 + path: s3://armory-product-demos-potatoless-facts-us-east-2/potatolessfacts-justsweetpotatoes.zip type: zipFile - functionName: potatolessLies-satwell - path: s3://cdk-hnb659fds-assets-957626022434-us-east-2/71dec8493297ae732c123fb4aea7dae0 + path: s3://armory-product-demos-potatoless-facts-us-east-2/potatolessfacts-justsweetpotatoes.zip + type: zipFile + - functionName: potatolessFacts-staging-satwell + path: s3://armory-product-demos-potatoless-facts-us-east-1/potatolessfacts-justsweetpotatoes.zip + type: zipFile + - functionName: potatolessLies-staging-satwell + path: s3://armory-product-demos-potatoless-facts-us-east-1/potatolessfacts-justsweetpotatoes.zip + type: zipFile + - functionName: potatolessFacts-prod2-satwell + path: s3://armory-product-demos-potatoless-facts-us-west-1/potatolessfacts-justsweetpotatoes.zip + type: zipFile + - functionName: potatolessLies-prod2-satwell + path: s3://armory-product-demos-potatoless-facts-us-west-1/potatolessfacts-justsweetpotatoes.zip type: zipFile providerOptions: #This section defines options specific to the cloud provider to which we are deploying. lambda: @@ -27,12 +55,32 @@ providerOptions: #This section defines options specific to the cloud provider to name: potatolessFacts-satwell runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q runtime: nodejs18.x - target: armory-product-demos + target: Production-1 - handler: index.handler name: potatolessLies-satwell runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q runtime: nodejs18.x - target: armory-product-demos + target: Production-1 + - handler: index.handler + name: potatolessFacts-prod2-satwell + runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q + runtime: nodejs18.x + target: Production-2 + - handler: index.handler + name: potatolessLies-prod2-satwell + runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q + runtime: nodejs18.x + target: Production-2 + - handler: index.handler + name: potatolessFacts-staging-satwell + runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q + runtime: nodejs18.x + target: staging + - handler: index.handler + name: potatolessLies-staging-satwell + runAsIamRole: arn:aws:iam::957626022434:role/CdkSandboxStack-WidgetsWidgetHandlerServiceRole8C2-14A5P01L3VA1Q + runtime: nodejs18.x + target: staging strategies: #This section defines the strategies environments can use to deploy. allAtOnce: canary: