-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a new pattern Resilience Backup Restore using Native AWS Services #156
Conversation
@elamaran11 please review at your convenience. |
Sounds good! |
@prabaksa Is the PR fully ready to review. Last time we spoke, i thought you were working on Architectural changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prabaksa AWSome work. Some high level feedback:
- How are we simulating failure and demonstrate the same? We should simulate failure and show the restore process.
- Are you planning to run sample workload as we discussed? We need show a workload like yelb, wordpress with some state in EBS restored
package.json
should be updated with latest blueprints version, cdk and all other dependencies- I think you should have single documentation demonstrating the complete DR flow.
- Also the diagram in restore process is not correct, it should DR region running the workload.
destroy "*"
should destroy all stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prabaksa Overall looks great. AWSome work. I have some minor tactical feedback please fix this and i can run it once and merge. Also please see GH actions failing due to doc links. Please fix it all and i can run and merge.
@@ -0,0 +1,9 @@ | |||
import { configureApp } from '../lib/common/construct-utils'; | |||
import ResilienceBRAWSConstruct from '../lib/resilience/backup_restore/backup/aws'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResilienceBRAWSConstruct
doesnt look like standard convention. What is BRAWS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backup/Restore AWS
@@ -0,0 +1,9 @@ | |||
import { configureApp } from '../lib/common/construct-utils'; | |||
import ResilienceBRAWSConstruct from '../lib/resilience/backup_restore/restore/aws'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResilienceBRAWSConstruct
doesnt look like standard convention. What is BRAWS
?
@@ -1,3 +1,10 @@ | |||
{ | |||
"app": "npx ts-node dist/lib/common/default-main.js" | |||
"app": "npx ts-node dist/lib/common/default-main.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove cdk.json
changes. This should go in the doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
export interface backupStackProps extends cdk.StackProps { | ||
primaryKeyArn: string, | ||
drbackupVault: backup.IBackupVault | ||
//drbackupVault: { "backupVaultArn": string, backupVaultName: string, env: {"account": string , region: string}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this, It is not required anymore.
super(scope, id, props ); | ||
const account = process.env.CDK_DEFAULT_ACCOUNT!; | ||
const region = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.primary.region", undefined); | ||
//const drregion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.dr.region", undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used in this construct, will remove this earlier since everything was on a single file i had defined all the variables in the file.
super(scope, id, props ); | ||
const account = process.env.CDK_DEFAULT_ACCOUNT!; | ||
const region = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.primary.region", undefined); | ||
//const drregion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.dr.region", undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this.
|
||
const backupStackProps = { | ||
primaryKeyArn: props.primaryKeyArn, | ||
//drbackupVault: { "backupVaultArn": drbackupVault.attrArn, backupVaultName: drbackupVault.attrName, env: {"account": process.env.CDK_DEFAULT_ACCOUNT! , region: drregion}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
|
||
|
||
export default class ResilienceBRAWSConstruct { | ||
constructor(scope: Construct, id: string, props?: cdk.StackProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'id' is defined but never used. Allowed unused args must match /^_/u
|
||
|
||
export default class ResilienceBRAWSConstruct { | ||
constructor(scope: Construct, id: string, props?: cdk.StackProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'props' is defined but never used. Allowed unused args must match /^_/u
pendingWindowInDays: 30 | ||
}); | ||
|
||
const kmsAlias = new kms.CfnAlias(stack, 'KMSAlias', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'kmsAlias'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more Comment. We need to Bootstrap the Argo right. We need an env and env maps to teams and we will have separate ArgoConfig. Check this example -
function createArgoAddonConfig(environment: string, repoUrl: string): blueprints.ArgoCDAddOn { |
new blueprints.addons.KubeProxyAddOn(), | ||
new blueprints.addons.AwsLoadBalancerControllerAddOn(), | ||
new blueprints.addons.ArgoCDAddOn({ | ||
bootstrapRepo: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont bootstrap Argo like this. We need an env and env maps to teams and we will have separate ArgoConfig. Check this example -
function createArgoAddonConfig(environment: string, repoUrl: string): blueprints.ArgoCDAddOn { |
new blueprints.addons.KubeProxyAddOn(), | ||
new blueprints.addons.AwsLoadBalancerControllerAddOn(), | ||
new blueprints.addons.ArgoCDAddOn({ | ||
bootstrapRepo: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont bootstrap Argo like this. We need an env and env maps to teams and we will have separate ArgoConfig. Check this example -
function createArgoAddonConfig(environment: string, repoUrl: string): blueprints.ArgoCDAddOn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prabaksa do you mind throwing a 30 min meeting to discuss the design here? I see a bunch of CDK stacks outside of the blueprints and also shell scripts. The objective of the meeting is to review the design and find the opps to improve customer experience.
This PR has been automatically marked as stale because it has been open 60 days |
Pull request closed due to inactivity. |
This PR has been automatically marked as stale because it has been open 60 days |
Pull request closed due to inactivity. |
Issue #, if available:
Description of changes: Added a new pattern Resilience Backup Restore using Native AWS Services . Added files under bin, docs and lib folders. Changed CDK Version from 2.99.1 to 2.107.0 in package.json
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.