Skip to content

Commit

Permalink
fix: More target -> resource refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Dec 10, 2024
1 parent 3b4b198 commit 5b23bf6
Show file tree
Hide file tree
Showing 158 changed files with 1,190 additions and 1,204 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you would like to self-host Plane, please see our [deployment guide](https://

- **Unified Control:** Centralize management of multi-stage deployment pipelines
across diverse environments.
- **Flexible Target Support:** Deploy to Kubernetes, cloud functions, VMs, or
- **Flexible Resource Support:** Deploy to Kubernetes, cloud functions, VMs, or
custom infrastructure from a single platform.
- **Advanced Workflow Orchestration:** Automate sophisticated deployment
processes including testing, code analysis, security scans, and approval
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/pages/core-concepts/deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Ctrlplane uses a hierarchical structure to manage deployments:
4. **Policy Enforcement**: Inter-environment policies determine when jobs can
run, allowing for controlled progression through environments.

5. **Job Execution**: Jobs are executed on the identified resources, applying the
release changes.
5. **Job Execution**: Jobs are executed on the identified resources, applying
the release changes.

## Creating and Managing Deployments

Expand Down
16 changes: 8 additions & 8 deletions apps/docs/pages/core-concepts/deployments/releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ set of resources.
## Release Dependencies

Since Ctrlplane is meant for solving the way releases are deployed across
resources, it's very common to have version dependencies on other deployments. In
the world of software, this could mean a microservice depends on a specific
resources, it's very common to have version dependencies on other deployments.
In the world of software, this could mean a microservice depends on a specific
version of another microservice to ensure it has the required APIs.

In the case of software and infrastructure interactions, this could require a
Expand Down Expand Up @@ -73,13 +73,13 @@ other deployments is required.
In most cases, a resource has multiple deployments associated with it, making it
easy to verify if a specific version is deployed on that resource as required by
another deployment. However, complexities arise when dependencies involve other
resources, where the deployment version might be present on any of these dependent
resources.
resources, where the deployment version might be present on any of these
dependent resources.

To address this, Ctrlplane uses resource metadata grouping. This mechanism allows
you to logically group resources based on their metadata attributes. By doing so,
Ctrlplane can accurately determine which resources to inspect to verify if the
software has been deployed.
To address this, Ctrlplane uses resource metadata grouping. This mechanism
allows you to logically group resources based on their metadata attributes. By
doing so, Ctrlplane can accurately determine which resources to inspect to
verify if the software has been deployed.

The idea is to create logical associations between resources that share common
characteristics, such as being part of the same kubernetes cluster. This is
Expand Down
7 changes: 4 additions & 3 deletions apps/docs/pages/core-concepts/deployments/variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Ctrlplane offers three variable scopes:

1. **System Level**: Global variables applicable to all resources across all
deployments within a system.
2. **Deployment Level (Wildcard Selector)**: Variables applicable to all resources
within a specific deployment.
2. **Deployment Level (Wildcard Selector)**: Variables applicable to all
resources within a specific deployment.
3. **Deployment Level (Custom Selector)**: Variables applicable to a subset of
resources within a deployment, based on defined selectors (e.g., metadata,
environment, type).
Expand Down Expand Up @@ -56,7 +56,8 @@ Variables can be used in:
endpoints, common timeouts)
- Leverage deployment-level variables for environment-specific settings (e.g.,
staging vs. production configs)
- Utilize custom selectors for fine-grained control over specific resource groups
- Utilize custom selectors for fine-grained control over specific resource
groups
- Regularly audit and rotate sensitive variables, especially secrets

By mastering Ctrlplane's variable system, DevOps engineers can create flexible,
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/pages/core-concepts/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ resources to the next. These policies can include:

### Resource Filters

Each environment uses resource filters to dynamically determine which resources are
associated with it. This feature allows for flexible and automatic assignment of
resources to environments based on their characteristics.
Each environment uses resource filters to dynamically determine which resources
are associated with it. This feature allows for flexible and automatic
assignment of resources to environments based on their characteristics.

## Dynamic Resource Association

The use of resource filters enables dynamic addition and removal of resources from
environments. As a result:
The use of resource filters enables dynamic addition and removal of resources
from environments. As a result:

1. Pipelines and deployments automatically run against newly added resources.
2. New software releases or upgrades are automatically applied to relevant
Expand Down
18 changes: 9 additions & 9 deletions apps/docs/pages/core-concepts/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import Youtube from "react-youtube";
<Youtube videoId="72_6ZtDzmZo" />
</div>

**Resources** are entities such as Kubernetes clusters, virtual machines, or other
logical resources, that the system interacts with. These resources can be added
manually or through **Resource Providers**, which automate the process by
continuously monitoring infrastructure, updating resource statuses, and providing
real-time visibility. Resources are organized into **Environments**, which
dynamically update based on resource filters, ensuring the right infrastructure is
always in place for deployments.
**Resources** are entities such as Kubernetes clusters, virtual machines, or
other logical resources, that the system interacts with. These resources can be
added manually or through **Resource Providers**, which automate the process by
continuously monitoring infrastructure, updating resource statuses, and
providing real-time visibility. Resources are organized into **Environments**,
which dynamically update based on resource filters, ensuring the right
infrastructure is always in place for deployments.

Once resources and environments are established, **Deployments** come into play. A
deployment is the process of releasing a specific version of a system into an
Once resources and environments are established, **Deployments** come into play.
A deployment is the process of releasing a specific version of a system into an
environment. Each deployment is governed by **Environment Policies**, which
manage how software transitions between environments. When a release is created,
it generates a **Job**, which is executed by **Job Agents** that handle tasks
Expand Down
7 changes: 4 additions & 3 deletions apps/docs/pages/core-concepts/resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import Youtube from "react-youtube";
1. **Creation:**

- API-driven: Programmatically create Resources with custom configurations.
- Resource Providers: Automated discovery and registration based on predefined
criteria.
- Resource Providers: Automated discovery and registration based on
predefined criteria.

2. **Registration:** Link Resources to relevant Environments in Ctrlplane.

Expand Down Expand Up @@ -58,7 +58,8 @@ import Youtube from "react-youtube";

## Advanced Concepts

- **Dynamic Workflows:** Customize actions based on Resource type and Environment.
- **Dynamic Workflows:** Customize actions based on Resource type and
Environment.
- **Complex Filtering:** Combine labels for granular workflow control.

## Resource Registration Details
Expand Down
34 changes: 17 additions & 17 deletions apps/docs/pages/core-concepts/resources/managing-resources.mdx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# 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
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
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.
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:
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.
Expand Down Expand Up @@ -59,8 +59,8 @@ Resource Groups can be incredibly versatile. Here are some common use cases:

### Benefits of Using Resource Groups

1. **Improved Organization**: Easily manage large numbers of resources by grouping
them logically.
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
Expand Down Expand Up @@ -126,16 +126,16 @@ You can edit or delete existing views as your infrastructure evolves:
- 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.
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.
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

Expand Down
74 changes: 38 additions & 36 deletions apps/docs/pages/core-concepts/resources/metadata.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Resource Metadata

Resource metadata in Ctrlplane are key-value pairs that provide a flexible way to
categorize and organize your deployment resources. They play a crucial role in
defining deployment strategies, filtering resources, and applying configurations
selectively.
Resource metadata in Ctrlplane are key-value pairs that provide a flexible way
to categorize and organize your deployment resources. They play a crucial role
in defining deployment strategies, filtering resources, and applying
configurations selectively.

## Configs vs Metadata

Expand All @@ -14,20 +14,20 @@ sections in Kubernetes.

### Configs

Configs are essential for interacting with the resource and should be standardized
across all types of resources. This standardization ensures that if the same
pipeline is given two different resources of the same kind, it can use the
properties in the config to interact with them consistently.
Configs are essential for interacting with the resource and should be
standardized across all types of resources. This standardization ensures that if
the same pipeline is given two different resources of the same kind, it can use
the properties in the config to interact with them consistently.

In some cases, you might need additional data outside the standard context to
determine how to interact with the resource. In such scenarios, it is acceptable
to include this extra data in the config, but it should be limited to variants
of a given resource and should not impact the primary configuration or behavior.

In Ctrlplane, configs are used within CI/CD pipelines to interact with resources.
They define how to deploy or provision the resource. It is crucial that values in
the config are used to guide these interactions and not to store arbitrary
metadata.
In Ctrlplane, configs are used within CI/CD pipelines to interact with
resources. They define how to deploy or provision the resource. It is crucial
that values in the config are used to guide these interactions and not to store
arbitrary metadata.

**Examples of Configs:**

Expand All @@ -48,10 +48,10 @@ authenticating with the cluster.
### Metadata
Metadata in Ctrlplane is used to provide additional information about a resource.
It consists of key-value pairs that help categorize and organize resources.
Metadata is not used to define the behavior or configuration of the resource but
rather to describe it.
Metadata in Ctrlplane is used to provide additional information about a
resource. It consists of key-value pairs that help categorize and organize
resources. Metadata is not used to define the behavior or configuration of the
resource but rather to describe it.
**Examples of Metadata:**
Expand Down Expand Up @@ -82,8 +82,8 @@ requirements.

## Understanding Resource Metadata

Metadata is attached to resources, allowing you to group and select resources based
on various criteria. They are particularly useful for:
Metadata is attached to resources, allowing you to group and select resources
based on various criteria. They are particularly useful for:

- Organizing resources by environment, region, or purpose
- Applying configurations to specific groups of resources
Expand All @@ -94,9 +94,10 @@ on various criteria. They are particularly useful for:

1. **Definition**: Metadata are defined as key-value pairs on individual
resources.
2. **Flexibility**: You can assign multiple key-value pairs to a single resource.
3. **Querying**: Ctrlplane allows you to query and filter resources based on their
metadata.
2. **Flexibility**: You can assign multiple key-value pairs to a single
resource.
3. **Querying**: Ctrlplane allows you to query and filter resources based on
their metadata.
4. **Selective Application**: Use metadata to apply configurations or run
deployments on specific subsets of resources.

Expand Down Expand Up @@ -128,21 +129,22 @@ tier: backend
5. **Regular Review**: Periodically review and update your metadata strategy as
your infrastructure evolves.

By effectively using resource metadata in Ctrlplane, you can create more flexible,
manageable, and scalable deployment strategies that adapt to your organization's
evolving needs.
By effectively using resource metadata in Ctrlplane, you can create more
flexible, manageable, and scalable deployment strategies that adapt to your
organization's evolving needs.

## Special Labels

In Ctrlplane, we have special labels that can be added to resources to enhance the
user experience in the UI. These labels do not change the core functionality of
Ctrlplane but provide additional features and visual cues for better usability.

| Label | Description |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctrlplane/links` | Provides a set of links related to the resource. The value should be a JSON object where the keys are the link names and the values are the URLs. |
| `ctrlplane/created-by-job-id` | UUID of the Ctrlplane Job that created the resource. |
| `ctrlplane/external-id` | An external identifier for the resource, which can be used to correlate the resource with resources in other systems. |
| `ctrlplane/cloud-platform` | The cloud platform the resource is running on (e.g., AWS, GCP, Azure). |
| `ctrlplane/region` | The geographical region or data center location where the resource is deployed. |
| `ctrlplane/parent-resource-id` | The UUID of the parent resource, if the resource is a child resource of another resource. |
In Ctrlplane, we have special labels that can be added to resources to enhance
the user experience in the UI. These labels do not change the core functionality
of Ctrlplane but provide additional features and visual cues for better
usability.

| Label | Description |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctrlplane/links` | Provides a set of links related to the resource. The value should be a JSON object where the keys are the link names and the values are the URLs. |
| `ctrlplane/created-by-job-id` | UUID of the Ctrlplane Job that created the resource. |
| `ctrlplane/external-id` | An external identifier for the resource, which can be used to correlate the resource with resources in other systems. |
| `ctrlplane/cloud-platform` | The cloud platform the resource is running on (e.g., AWS, GCP, Azure). |
| `ctrlplane/region` | The geographical region or data center location where the resource is deployed. |
| `ctrlplane/parent-resource-id` | The UUID of the parent resource, if the resource is a child resource of another resource. |
Loading

0 comments on commit 5b23bf6

Please sign in to comment.