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

Product settings #1031

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
322 changes: 311 additions & 11 deletions _docs/dashboards/gitops-products.md

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions _docs/products/about-products.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@




>**NOTE**
This feature is currently in Beta.

Explore the power of Products for Argo CD applications in Codefresh GitOps.

Managing complex applications across multiple environments is a common challenge faced by developers and platform engineers. The diverse nature of applications and the variety of environments they deploy to can lead to fragmented management and deployment processes.

In Codefresh GitOps, Products serve as a strategic layer that bridges this gap. Products group different yet interconnected applications based on their similarities and dependencies.
By grouping applications, Products enhance Environments, allowing complete visibility for efficient management across Environments.

{% include
image.html
lightbox="true"
file="/images/gitops-products/expanded-view.png"
url="/images/gitops-products/expanded-view.png"
alt="GitOps Products dashboard (expanded view)"
caption="GitOps Products dashboard (expanded view)"
max-width="70%"
%}

Read more on the world's first dashboard for GitOps Environments and Products in this [blog](https://codefresh.io/blog/introducing-the-worlds-first-dashboard-for-gitops-environments/){:target="\_blank"}.


##### What is a Product in Codefresh GitOps?
In Codefresh GitOps, a Product is a custom entity that allows you to group interconnected Argo CD applications, providing a cohesive view as the applications progress through the development and deployment lifecyle.

Consider a practical scenario of numerous applications connected to billing or payment. Instead of monitoring each application separately, creating a Product enables you to track and manage them collectively.

The diagram illustrates how Argo CD applications connected to a Product are grouped by that Product and organized by Environments. It also shows applications not assigned to any Product.

{% include
image.html
lightbox="true"
file="/images/gitops-products/apps-grouped-by-product.png"
url="/images/gitops-products/apps-grouped-by-product.png"
alt="Argo CD applications grouped by Products and organized by Environments"
caption="Argo CD applications grouped by Products and organized by Environments"
max-width="70%"
%}

##### Benefits of Products
* **Unified application management**
Managing complex Argo CD applications across multiple Environments can be challenging.
By grouping similar Argo CD applications into a unit, Products allow you to also efficiently manage them cohesively.

* **Bridging applications and Environments**
Products act as a bridge between applications and their respective Environments. By linking applications to Products, you can easily track their deployment across different environments, providing clarity and control over your deployment pipelines.

* **Effortless creation**
As with Environments, creating a Product is equally straightforward. You can create Products from the UI, or declaratively through annotations in your application manifests.

* **Real-time insights with integrated views**
The Products dashboard offers three distinct views - Pods, Git, and Features. These views provide real-time insights into the changes in the application repo, deployment details, code changes, and feature tracking. Whether you're a developer tracking the latest commits or a project manager monitoring feature releases, these integrated views offer valuable insights tailored to your role.


##### How do you view applications by Product?
In two simple steps:

1. [Create the Product](#create-products)
Begin by creating a Product, and assigning a meaningful name based on your use case. You can do this in the UI, or through annotations in app manifests.

1. [Connect applications to the Product](#assigning-applications-to-products)
Bring your applications into the picture. Link applications to the Products you've created to create the associations you need.

Codefresh seamlessly identifies and organizes the applications in the correct [Environments]({{site.baseurl}}/docs/dashboards/gitops-environments/).
You can then [work with Products](#working-with-products), and with [applications in Products](#working-with-applications-in-products).
Empty file.
49 changes: 49 additions & 0 deletions _docs/products/create-product.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@




Create a Product with a unique name and define the annotations through which to connect related Argo CD applications to it.



## Understanding the role of Environments for Products

When you drill down into specific products in the Product dashboard, application visibility is closely tied to the definition and mapping of Environments.

Note that Products will not display any applications in these scenarios:

* No Environments defined
If you have not created Environments in Codefresh, the Products dashboard will not display any applications, even when applications are assigned to Products.

* Unmapped cluster-namespace
Even if Environments are defined, applications are not displayed within Products if the corresponding clusters or namespaces are not mapped to any existing Environment.


## Create Products

##### Before you begin
* Create one or more [Environments]({{site.baseurl}}/docs/dashboards/gitops-environments/#create-gitops-environments) for applications

##### How to
1. In the Codefresh UI, from the Ops in the sidebar, select **Products**.
1. Click **Add Product**.
1. Define the following:
1. **Name**: A unique name for your Product, which is also unique in the cluster.
1. **Connect Applications**: The applications to associate with this Product by adding the default or custom annotation to the application manifest.
* To use the default annotation, copy and paste it into the application's manifest.
* To use a custom annotation, click **Add custom annotation**, and then define the Key-Value for the annotation. Copy and paste it into the manifest.
1. **Tags**: Any metadata providing additional context and information about the Product, used for filtering and organization purposes.

{% include
image.html
lightbox="true"
file="/images/gitops-products/create-product.png"
url="/images/gitops-products/create-product.png"
alt="Add Product"
caption="Add Product"
max-width="60%"
%}

{:start="4"}
1. Click **Add**.
The Product is displayed in the Products dashboard.
Empty file.
170 changes: 170 additions & 0 deletions _docs/products/manage-products/assign-applications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@






### Assigning applications to Products
There are two methods of assigning applications to a Product:

* Manual assignment from the Products dashboard
A one-click action, this method is for quick assignment from the UI. Unlike other UI actions, manual assignment does not require a commit action.
Recommended for testing and not as the preferred method.

* Declarative assignment through annotations
This method defines an annotation with the Product name in the application manifest. If the Product doesn’t exist, Codefresh automatically creates it for you.
Recommended method which is fully GitOps-compatible.

#### Manually assign applications to Products
Manually assign an application to a Product directly from the Product dashboard.

This is one of two methods for assigning applications to Products. The other method involves adding annotations to the application's manifest, as described in [Use annotations to connect applications to Products](#use-annotations-to-connect-applications-to-products).


1. In the Codefresh UI, from the sidebar, select **Products**.
1. If needed, search for the application, or use the Application and Environment filters.
1. Do one of the following:
* Click the name of the Product for which to assign applications, and then click **Manage Apps** on the right.
* Mouse over the row with the Product to which to assign the application, and click {::nomarkdown}<img src="../../../images/icons/settings.png?display=inline-block">{:/}.

{% include
image.html
lightbox="true"
file="/images/gitops-products/assign-apps-option.png"
url="/images/gitops-products/assign-apps-option.png"
alt="Options to manually assign applications to Product"
caption="Options to manually assign applications to Product"
max-width="60%"
%}

{:start="3"}
1. In the list of **Unassigned apps** on the left, if you have created Environments, select the **Environment** by which to filter unassigned applications, or in the search field, type a part of the application name.

{% include
image.html
lightbox="true"
file="/images/gitops-products/unassigned-apps-in-product.png"
url="/images/gitops-products/unassigned-apps-in-product.png"
alt="Unassigned applications in Product"
caption="Unassigned applications in Product"
max-width="60%"
%}

{:start="4"}
1. To assign the application, click {::nomarkdown}<img src="../../../images/icons/runtime-topology-add-cluster.png?display=inline-block">{:/}.
1. To confirm the assignment, click **Save**.
If you have defined an Environment for the application, Codefresh adds it to the Environment defined for it.

{% include
image.html
lightbox="true"
file="/images/gitops-products/assign-app-to-env.png"
url="/images/gitops-products/assign-app-to-env.png"
alt="Application assigned to Product in defined Environment"
caption="Application assigned to Product in defined Environment"
max-width="60%"
%}


#### Use annotations to connect applications to Products
Connect an application to a Product declaratively by adding the default annotation to the application's manifest.
The annotation is defined as part of the Product's settings.

This is one of two methods for assigning applications to Products. The other method is to manually assign them from the Products dashboard, as described in [Manually assigning applications to Prodcuts](#manually-assign-applications-to-products).

1. Copy the Product's annotation:
1. In the Codefresh UI, from the sidebar, select **Products**.

1. Click the Product for which to add applications, and then click **Settings**.
1. In the General section, below Connect Applications , copy the annotation to add to the application's manifest.

1. Mouse over the row with the Product name, and then select **Edit** {::nomarkdown}<img src="../../../images/icons/edit.png?display=inline-block">{:/}.
1. In the Edit Product form, copy the annotation to add to the application's manifest and close the form.


{% include
image.html
lightbox="true"
file="/images/gitops-products/copy-annotation.png"
url="/images/gitops-products/copy-annotation.png"
alt="Copy annotation for Product"
caption="Copy annotation for Product"
max-width="60%"
%}

{:start="2"}
1. Add the annotation to the application's manifest:
1. From the sidebar, select **GitOps Apps**.
1. Select the application to which to add the annotation.
1. Click the **Configuration** tab and switch to **YAML** format.
1. Add the annotation as in the example below.

{% include
image.html
lightbox="true"
file="/images/gitops-products/add-annotation-app-manifest.png"
url="/images/gitops-products/add-annotation-app-manifest.png"
alt="Add annotation to application manifest"
caption="Add annotation to application manifest"
max-width="60%"
%}

{:start="7"}
1. Commit to save the changes.

If you return to the GitOps Products dashboard and expand the Product, you'll now see that the application is part of the Product.

{% include
image.html
lightbox="true"
file="/images/gitops-products/assign-app-with-annotation.png"
url="/images/gitops-products/assign-app-with-annotation.png"
alt="Application assigned to Product through annotation"
caption="Application assigned to Product through annotation"
max-width="60%"
%}

### Unassigning applications from Products
Depending on how you assigned the application to the Product, unassign it either directly from the Products dashboard or by removing the annotation from its manifest.


#### Unassign application from the GitOps Product dashboard
Unassign an application manually assigned to a Product directly from the GitOps Product dashboard.

A disabled icon indicates that the application is connected through an annotation.

1. In the Codefresh UI, from the sidebar, select **Products**.
1. Mouse over the row with the Product from which to unassign the application, and click **Manage Apps**.
1. In the card with the application to unassign, click {::nomarkdown}<img src="../../../images/icons/unassign-app.png?display=inline-block">{:/}.
You can see that the Unassign icon is dsiabled for the `guestbook-app-prod`.

{% include
image.html
lightbox="true"
file="/images/gitops-products/unassign-app-from-product.png"
url="/images/gitops-products/unassign-app-from-product.png"
alt="Unassign application from Product"
caption="Unassign application from Product"
max-width="60%"
%}

{:start="4"}
1. To confirm, click **Save**.
The application reappears in the list of Unassigned applications.

{% include
image.html
lightbox="true"
file="/images/gitops-products/unassigned-app-example.png"
url="/images/gitops-products/unassigned-app-example.png"
alt="Unassigned application in list"
caption="Unassigned application in list"
max-width="60%"
%}

#### Unassign application by removing annotation
1. In the Codefresh UI, from the sidebar, select **Products**.
1. Select the Product with the application to unassign.
1. In the card with the application to unassign, click the application name, and then click **Go to Full View**.
1. Click the **Configuration** tab and switch to YAML view.
1. Remove the annotation from the application's manifest.
Loading