-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add CDK reference page #234
Conversation
A brief intro to using the Restate CDK constructs library.
Deploying with Cloudflare Pages
|
I'm wondering if we shouldn't completely replace https://docs.restate.dev/category/aws-lambda with this method of deploying Lambda handlers! It's so much more streamlined. |
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.
Great addition to simplifying deploying Restate, Pavel! :)
The page reads nice and easy. I would suggest to make the distinction of how to do things with the managed service vs self-hosted a bit more clear. Not sure how to do that most easily: just in words, tabs, different sections/paragraphs...
docs/services/deployment/cdk.md
Outdated
}); | ||
``` | ||
|
||
For TypeScript/JavaScript services, you can use the [`NodejsFunction`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs-readme.html) |
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.
Should we put this behind tabs? One for TS, one for Java?
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.
Hmm, on a second thought, the code itself is always Typescript... So not sure if tabs would make sense
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 think you're onto something though! I'll play with tabs - I hadn't thought of that in this context. Ditto for self-hosted / managed.
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.
It came out much nicer, thank you for the suggestion!
docs/services/deployment/cdk.md
Outdated
tracing: restate.TracingMode.AWS_XRAY, | ||
logGroup: new logs.LogGroup(scope, "RestateLogs", { | ||
logGroupName: "/restate/server-logs", | ||
retention: logs.RetentionDays.ONE_MONTH, |
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.
Should we also add how to define a specific VPC for deployment here?
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 left it out because I think it's a better default to deploy Restate in its own VPC. Advanced customers who know what they're doing can easily define their own or connect it to an existing VPC.
A related question is whether we should similarly auto-create a log group for Restate server logs if the user doesn't supply one. Right now that's a required property.
docs/services/deployment/cdk.md
Outdated
}); | ||
``` | ||
|
||
Automatically register service handlers with Restate on deployment: |
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 think this sentence might need a bit more context and explanation on how it differs from the normal registration practices.
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 think the primary way this differs is in the same way how Lambda deployments differ – they always refer to an explicit version of the function, and every function update generates a new deployment revision. Is that what you had in mind?
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've expanded the text to cover this - let me know if you can think of something more to add!
Co-authored-by: Giselle van Dongen <[email protected]>
A brief intro to using the Restate CDK constructs library.