Skip to content

Commit

Permalink
Merge pull request #28 from armory-io/lambdaconfig
Browse files Browse the repository at this point in the history
feat(demo): several updates to lambda demo.
  • Loading branch information
stephenatwell authored Nov 2, 2023
2 parents 6471fa7 + f5bc976 commit 802af02
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 16 deletions.
68 changes: 58 additions & 10 deletions configuration/deploy-lambda/baseDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,34 @@ 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:
name: Integration_Tests
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:
Expand All @@ -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
Expand Down
60 changes: 54 additions & 6 deletions lambda-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -12,27 +28,59 @@ 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:
- handler: index.handler
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:
Expand Down
1 change: 1 addition & 0 deletions reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


39 changes: 39 additions & 0 deletions reset/lambda-reset.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 802af02

Please sign in to comment.