Skip to content

Instantly share code, notes, and snippets.

@rynowak
Last active October 10, 2023 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rynowak/51c022468639e3d0cafa628138e5e6ed to your computer and use it in GitHub Desktop.
Save rynowak/51c022468639e3d0cafa628138e5e6ed to your computer and use it in GitHub Desktop.
Design notes on Radius resource group

Resource Groups

Radius endeavors to provide rich resource audit and lifecycle management features for all kinds of resources. Radius can help the whole organization reason about their applications, the architectures and dependencies of those applications, and the cloud infrastructure that runs those applications.

In particular we're inspired by the capabilities of ARM (Azure Resource Manager) and we're generalizing those features to apply to all clouds. The ARM feature that users consistently rate as valuable is resource groups. Resource groups provide a way to list related resources, and to perform operations like RBAC assignment on the list rather than individual resources. Users can use resource groups to organize, audit and bulk-delete resources with a related lifecycle. While we often market Radius with statements like "graphs are better than list", it doesn't mean that the list is obsolete - they serve an important mechanical purpose.

Our vision for resource groups in Radius/UCP is that they provide the same capabilities as Azure resource groups, but that they can "contain" both Radius resources (like Applications.Core/containers) and cloud infrastructure resources (like an S3 bucket).

Resource groups as a concept

Every additional concept in Radius needs to fight for its life...

Due to the ARM lineage of Radius we're deeply entangled with the existance of resource groups. The design of Radius requires a user-defined scoping-construct for namespacing.


Resource groups in Radius exist today and they mostly operate in the background. Our tutorial content does not introduce Resource Groups as a concept, nor does it extoll their virtues.

To a new user, understanding and begeting resource groups is one more decision they will feel unprepared to make.

However resource groups are necessary for users once they need to:

    1. Explicitly manage RBAC assignments.
    1. "Bulk delete" of resources created by Bicep.
    1. Deploy more than one application to an environment.
    1. Deploy the same application to multiple environments.

The gap is that we don't prepare users for the jump in concept count they will experience when they need to do one of these actions. In the worst case our defaults will surprise them and put users on the back foot when their scenario becomes more complex.

We could solve all of these challenges with better defaults....

Proposal

We need to create a resource group per-application per-environment:

  • Assumption: Each deployment needs to be isolated.

  • Assumption: Users will need to do more complex things and they should be able to override our defaults.

  • Each Radius tenant should support multiple environments.

  • Each Radius tenant should support deploying the same application to multiple environments.

  • Therefore we need to isolate each deployment per-application and per-environment.

What if Radius chose the resource group for you when you deploy?

  • If we know the environment name and application name before deployment, we can generate the resouce group name.
    • rad deploy -e contoso-prod-east-us-2 -a icecreamstore -> contoso-prod-east-us-2-icecreamstore
    • The environment and application name are usually required to deploy when an app is being deployed.
    • Headache: we don't know whether a bicep file contains an app or not.

What if all of our list commands listed resources across all groups?

  • rad resource list would be agnostic of resource groups

What about singular commands?

@willtsai
Copy link

willtsai commented Oct 4, 2023

Some thoughts:

  • I think a Resource Groups that span across clouds would be a killer feature for Radius
  • Do we currently have any commands that allow users to view a list of their resource groups?

@rynowak
Copy link
Author

rynowak commented Oct 5, 2023

Some thoughts:

* I think a Resource Groups that span across clouds would be a killer feature for Radius

YES

* Do we currently have any commands that allow users to view a list of their resource groups?

YES rad group list

@ytimocin
Copy link

Can we get some information about different concepts in Radius like workspace, group, etc.? How is a resource group going to be different than these?

  • "Bulk delete" of resources created by Bicep.
    How is this different than deleting the application and/or environments and all of their resources?

  • Deploy more than one application to an environment.
    Can we not deploy more than one application to an environment today?

  • Deploy the same application to multiple environments.
    Can't we do that today?

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