Skip to content
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

Generate the list of required CLI commands to deploy the infrastructure at build time #1176

Open
mauroservienti opened this issue Dec 14, 2021 · 3 comments

Comments

@mauroservienti
Copy link
Member

The SQS transport comes with a CLI that helps in creating the required resources.

An improvement to the CLI experience would be that, when compiling the source code of an endpoint using the SQS transport, an artifact containing the list of the required commands to deploy the infrastructure is output in the build directory. Similarly to what SQL Persistence does for SQL scripts.

@DavidBoike
Copy link
Member

DavidBoike commented Sep 14, 2022

While SQL Persistence is generating SQL tables, it might be quite a bit more difficult to generate metadata such as what message types to subscribe to at compile time.

An alternative would be for installers in the package to generate log statements that contain the required CLI commands for what the Installers are doing at that moment.

Then a developer would be able to debug locally, but then copy the log statements into a script.

A slightly more complex solution would write these commands out to a file to create a ready-made script.

@twonder
Copy link

twonder commented Sep 15, 2022

I would agree that after looking at the CLI commands, it wasn't super obvious what ones I would need to run in order to set it up properly.

One thing I would point out is it is generally best practice to use CloudFormation to deploy and manage resources together in "stacks", instead of managing them individually. Since the construction of these commands in manual at the moment, I was planning on using the CDK to create a CloudFormation templates/stacks with the required resources.

That being said, I wonder if a better approach to provisioning these resources is to use a .NET CDK app to dynamically create a CloudFormation stack and all of the required queues, topics and permissions by scanning the necessary assemblies.

@danielmarbach
Copy link
Contributor

One other thing we briefly discussed today was that 8.1 will introduce a dedicated installer API. With that, it would also be possible to run the endpoint in sort of installer mode in which we could dump out a metamodel of the topology that can be transformed into CloudFormation or CLI scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants