Core ConceptsResourcesManaging Resources

Managing Resources

As your adoption of Ctrlplane grows, you may find yourself managing hundreds or even thousands of resources. This scale of operation requires efficient tools and strategies to maintain visibility, control, and agility. Ctrlplane offers several features to help you manage large numbers of resources effectively.

Resource Groups

Resource Groups are a powerful feature that allow you to organize and manage your resources based on their metadata. This grouping mechanism makes it easy to categorize and find similar resources, providing a more efficient way to manage your infrastructure at scale.

How Resource Groups Work

Resource Groups use the metadata assigned to your resources to automatically group them together. Each unique combination of metadata can form a distinct group, allowing for flexible and dynamic categorization.

Creating Resource Groups

Resource Groups are created automatically based on the metadata you assign to your resources. To effectively use Resource Groups:

  1. Plan your metadata strategy to reflect meaningful categories for your infrastructure.
  2. Consistently apply metadata to your resources as you add them to your system.
  3. Use the Resource Groups view in the dashboard to see how your resources are organized.

Use Cases for Resource Groups

Resource Groups can be incredibly versatile. Here are some common use cases:

  1. Region-based Grouping: Group resources by geographical region or data center location.

    • Example metadata: region: us-west, region: eu-central
  2. Infrastructure Size: Categorize resources by their resource allocation or capacity.

    • Example metadata: size: small, size: medium, size: large
  3. Kubernetes Version: Group resources running different versions of Kubernetes.

    • Example metadata: kubernetes/version: 1.22, kubernetes/version: 1.23
  4. Customer Segmentation: For multi-tenant systems, group resources by customer or business size.

    • Example metadata: customer: acme-corp, business-size: enterprise
  5. Service Type: Group resources by the primary service they run.

    • Example metadata: service: web-server, service: database, service: cache

Benefits of Using Resource Groups

  1. Improved Organization: Easily manage large numbers of resources by grouping them logically.
  2. Efficient Operations: Quickly identify and work with specific subsets of your infrastructure.
  3. Consistent Management: Apply policies, updates, or actions to entire groups of similar resources.
  4. Enhanced Visibility: Gain better insights into your infrastructure composition and distribution.

Best Practices for Resource Groups

  1. Consistent Metadata: Develop and adhere to a consistent metadata strategy across your organization.
  2. Meaningful Metadata: Choose metadata keys that provide valuable information and aid in practical grouping.
  3. Avoid Over-Complexity: While metadata is powerful, too many keys can lead to overly complex groupings. Aim for a balance.
  4. Regular Review: Periodically review and update your metadata strategy as your infrastructure evolves.

By effectively using Resource Groups, you can significantly improve your ability to manage, monitor, and maintain your infrastructure, especially as it grows in size and complexity.

Resource Views

Resource Views are a powerful feature that allow you to create, save, and reuse filters for your resources. These views provide a convenient way to organize and manage large sets of resources, making it easier to focus on specific subsets of your infrastructure.

Creating a Resource View

To create a Resource View:

  1. Navigate to the Resources section in your dashboard.
  2. Apply the desired filters to your resources.
  3. Click on the “Save View” button.
  4. Give your view a name and description.

Using Resource Views

Once created, Resource Views can be accessed from the Resources page. You can:

  • Quickly switch between different views to focus on specific resource subsets.
  • Use views as a starting point for further filtering or actions.
  • Share views with team members to ensure consistent resource selection across your organization.

Example Use Cases

  1. Environment-based Views: Create views for different environments (e.g., Production, Staging, Development).
  2. Region-based Views: Organize resources by geographical regions or data centers.
  3. Service-based Views: Group resources by the services they run.
  4. Status-based Views: Filter resources based on their current status or health.

Updating and Managing Views

You can edit or delete existing views as your infrastructure evolves:

  • To update a view, apply new filters and save over the existing view.
  • To delete a view, select it and use the delete option in the view management interface.

Resource Views are a valuable tool for maintaining organization and efficiency in your resource management workflow, especially as your infrastructure grows in size and complexity.

Locking Resources

Resource locking is a crucial feature that allows you to temporarily prevent any pipelines from running against specific resources. This is particularly useful for maintenance, troubleshooting, or when you need to ensure that a resource remains in a stable state.

How Resource Locking Works

When you lock a resource:

  1. All scheduled and ongoing pipeline runs against that resource are immediately halted.
  2. New pipeline runs cannot be initiated for the locked resource.
  3. The resource remains locked until it is manually unlocked.

When to Use Resource Locking

Consider locking a resource in the following scenarios:

  • During critical maintenance periods
  • When investigating issues that require a stable environment
  • To prevent accidental deployments or changes
  • When preparing for major updates or migrations

Locking a Resource

To lock a resource:

  1. Navigate to the Resources section in your dashboard.
  2. Find the resource you want to lock.
  3. Click on the “Lock” button.
  4. Optionally, provide a reason for locking the resource.

Unlocking a Resource

To unlock a resource:

  1. Go to the Resources section and find the locked resource.
  2. Click on the “Unlock” button or toggle.
  3. Confirm the action to unlock the resource.

Best Practices

  • Always provide a reason when locking a resource to inform team members.
  • Regularly review locked resources to ensure they are unlocked when no longer needed.
  • Use resource locking in conjunction with your change management processes.

Permissions and Auditing

  • Typically, locking and unlocking resources requires elevated permissions.
  • All lock and unlock actions are logged for auditing purposes.

By using resource locking judiciously, you can maintain better control over your infrastructure and prevent unintended changes during critical periods.

Ctrlplane
© 2024 Ctrlplane. All rights reserved.