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

consider splitting infrastructure creation and place deployments into separate commands #134

Open
blake-mealey opened this issue Feb 17, 2022 · 3 comments
Labels
enhancement New feature or request next What to work on next
Milestone

Comments

@blake-mealey
Copy link
Owner

blake-mealey commented Feb 17, 2022

In order to enable projects to use the IDs from the outputs command in their Rojo bundles before deploying, we could split out place deployments into a separate command. The workflow would then look something like:

# Create the project's resources
mantle prepare

# Save the outputs in a JSON file
mantle outputs -o src/resources.json

# Build the Rojo project into a place file, including the outputs JSON file
rojo build -o game.rbxlx

# Deploy the place file
mantle deploy

What does this mean in terms of implementation? Do we create two resource graphs in each environment – one for prepare and one for deploy – and have the deploy graph depend on the deploy graph? This would be the second use case for having multiple graphs which can depend upon each other (see #63) so it seems like it would be a good idea to refactor this the resource graphs to support this.

I want to make sure I properly understand what is different between the prepare and deploy stages sufficiently here. Are there other operations that should be moved from prepare to deploy?

Also, does this affect the configuration format? Should deploy-related objects be defined separately from the prepare-related objects?

I titled this issue with "consider" because I'm still torn on this, but atm it seems like the right path forward.

@blake-mealey blake-mealey added the enhancement New feature or request label Feb 17, 2022
@blake-mealey blake-mealey added this to the v1.0.0 milestone Feb 17, 2022
@blake-mealey
Copy link
Owner Author

Adding to milestone v1.0.0 because this definitely needs to be figured out before then (this is a pretty major change to the way things work)

@blake-mealey
Copy link
Owner Author

Thinking more about this and I realized a more conceptual understanding of this is to split up creation of resources with updates of resources. One complication with this is resources which are re-created when updated. We may need to make this a known concept for the reconciler so that it can correctly split tasks between phases.

@blake-mealey
Copy link
Owner Author

Also: reference the Azure DevOps CLI for example of how we could structure this. IIRC, there are separate phases like "init", "provision", and "deploy". Each phase has its own command, or you can simply run the "up" command to run all three. "init" isn't really applicable for us, but the others are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next What to work on next
Projects
None yet
Development

No branches or pull requests

1 participant