Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
48 changes: 0 additions & 48 deletions _docs/clients/csdp-cli.md

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: "Creating applications"
title: "Creating GitOps applications"
description: ""
group: deployment
group: deployments
sub_group: gitops
toc: true
---

Expand All @@ -19,7 +20,7 @@ Codefresh provides all the options and functionality to create and manage Argo C

* Edit and delete applications
Once the application is created and synced to the cluster, it is displayed in the Applications dashboard. Here, you can select an application to update the application's configuration settings, or delete it.
To monitor the health and sync status, deployments, and resources for the application, see [Monitoring applications]({{site.baseurl}}/docs/deployment/applications-dashboard/).
To monitor the health and sync status, deployments, and resources for the application, see [Monitoring GitOps applications]({{site.baseurl}}/docs/deployments/gitops/applications-dashboard/).

### Application: Definitions
Application definitions include the name, runtime, and the name of the YAML manifest. By default, the YAML manifest has the same name as that of the application.
Expand Down Expand Up @@ -225,7 +226,7 @@ Track the application in the [Applications dashboard](https://g.codefresh.io/2.0


### Related articles
[Monitoring applications]({{site.baseurl}})/docs/deployment/applications-dashboard)
[Managing applications]({{site.baseurl}})/docs/deployment/manage-applications)
[Home dashboard]({{site.baseurl}})docs/reporting/home-dashboard)
[DORA metrics]({{site.baseurl}}/docs/reporting/dora-metrics/)
[Monitoring GitOps applications]({{site.baseurl}})/docs/deployments/gitops/applications-dashboard)
[Managing GitOps applications]({{site.baseurl}})/docs/deployments/gitops/manage-applications)
[Home dashboard]({{site.baseurl}}/docs/reporting/home-dashboard)
[DORA metrics]({{site.baseurl}}/docs/reporting/dora-metrics/)
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: "Images in Codefresh"
description: ""
group: deployment
group: deployments
sub_group: gitops
toc: true
---

Expand All @@ -18,7 +19,7 @@ Complete the mandatory steps to see your Images in the Codefresh UI. Each step h
1. (Mandatory) Report image information to Codefresh.
See the [report-image-info](https://github.com/codefresh-io/argo-hub/blob/main/workflows/codefresh-csdp/versions/0.0.6/docs/report-image-info.md){:target="\_blank"} example.

> If you are using an external GitHub Actions-based pipeline, we have a new template that combines image reporting and enrichment. See [Image enrichment with integrations]({{site.baseurl}}/docs/integrations/image-enrichment-overview/).
> If you are using an external GitHub Actions-based pipeline, we have a new template that combines image reporting and enrichment. See [Image enrichment with integrations]({{site.baseurl}}/docs/integrations/gitops/image-enrichment-overview/).

### Image views in Codefresh
* In the Codefresh UI, go to [Images](https://g.codefresh.io/2.0/images){:target="\_blank"}.
Expand Down Expand Up @@ -111,3 +112,9 @@ Selecting **more details** for an image tag.
| **3** | The Git details for this image tag, such as the Git hash, the Jira issue number, Git Pull Request, commit information, the name of the user who performed the commit. |
| **4** | The workflow for the image step. Select to go to the Workflow.|
| **5** | The log information for the build image step in the relevant workflow. Select to view Logs panel. |

## Related articles
[Creating GitOps applications]({{site.baseurl}})/docs/deployments/gitops/create-application)
[Managing GitOps applications]({{site.baseurl}})/docs/deployments/gitops/manage-applications)
[Image enrichment with integrations]({{site.baseurl}}/integrations/image-enrichment-overview)
[Home dashboard]({{site.baseurl}}/docs/reporting/home-dashboard)
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: "Install Argo Rollouts"
title: "Progressive delivery with GitOps"
description: ""
group: deployment
group: deployments
sub_group: gitops
toc: true
---


Install Argo Rollouts on managed clusters with a single click. With Argo Rollouts installed on your cluster, you can visualize rollout progress for deployed applications in the [Applications dashboard]({{site.baseurl}}/docs/deployment/applications-dashboard/#rollout-progress-visualization).
Install Argo Rollouts on managed clusters with a single click. With Argo Rollouts installed on your cluster, you can visualize rollout progress for deployed applications in the [Applications dashboard]({{site.baseurl}}/docs/deployments/gitops/applications-dashboard/#rollout-progress-visualization).
If Argo Rollouts has not been installed, an **Install Argo Rollouts** button is displayed on selecting the managed cluster.

1. In the Codefresh UI, go to [Runtimes](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}.
Expand All @@ -24,4 +25,4 @@ If Argo Rollouts has not been installed, an **Install Argo Rollouts** button is
%}

### Related articles
[Add external clusters to runtimes]({{site.baseurl}}/docs/runtime/managed-cluster/)
[Add external clusters to runtimes]({{site.baseurl}}/docs/installation/managed-cluster/)
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: "Managing applications"
title: "Managing GitOps applications"
description: ""
group: deployment
group: deployments
sub_group: gitops
toc: true
---

Expand Down Expand Up @@ -49,8 +50,8 @@ Update General or Advanced configuration settings for a deployed application thr

{:start="3"}
1. Update the **General** or **Advanced** configuration settings as needed:
[General configuration]({{site.baseurl}}/docs/deployment/create-application/#application-general-configuration-settings)
[Advanced configuration]({{site.baseurl}}/docs/deployment/create-application/#application-advanced-configuration-settings)
[General configuration]({{site.baseurl}}/docs/deployments/gitops/create-application/#application-general-configuration-settings)
[Advanced configuration]({{site.baseurl}}/docs/deployments/gitops/create-application/#application-advanced-configuration-settings)
When you change a setting, the Commit and Discard Changes buttons are displayed.

{% include
Expand Down Expand Up @@ -218,7 +219,7 @@ For example, if you made changes to `api` resources or `audit` resources, type `
Delete an application from Codefresh. Deleting an application deletes the manifest from the Git repository, and then from the cluster where it is deployed. When deleted from the cluster, the application is removed from the Applications dashboard in Codefresh.

>**Prune resources** in the application's General settings determines the scope of the delete action.
When selected, both the application and its resources are deleted. When cleared, only the application is deleted. For more information, review [Sync settings]({{site.baseurl}}/docs/deployment/create-application/#sync-settings).
When selected, both the application and its resources are deleted. When cleared, only the application is deleted. For more information, review [Sync settings]({{site.baseurl}}/docs/deployments/gitops/create-application/#sync-settings).
Codefresh warns you of the implication of deleting the selected application in the Delete form.

1. In the Codefresh UI, go to the [Applications dashboard](https://g.codefresh.io/2.0/applications-dashboard/list){:target="\_blank"}.
Expand Down Expand Up @@ -351,10 +352,9 @@ The table describes the options for the `Rollout` resource.


### Related articles
[Creating applications]({{site.baseurl}}/docs/deployment/create-application)
[Creating GitOps applications]({{site.baseurl}}/docs/deployments/gitops/create-application)
[Home dashboard]({{site.baseurl}}/docs/reporting/home-dashboard)
[DORA metrics]({{site.baseurl}}/docs/reporting/dora-metrics)

[DORA metrics]({{site.baseurl}}/docs/reporting/dora-metrics)



125 changes: 125 additions & 0 deletions _docs/deployments/helm/custom-helm-uploads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: "Creating and uploading Helm packages"
description: "Manually create and upload Helm packages"
group: deployments
sub_group: helm
redirect_from:
- /docs/create-helm-artifacts-using-codefresh-pipeline/
toc: true
---

Helm packages are just TAR files. Helm repositories are simple file hierarchies with an extra [index.yaml](https://helm.sh/docs/developing_charts/#the-chart-repository-structure){:target="\_blank"}.
You can run custom commands and manually upload indexes and packages to a Helm repo.

>This articles shows some non-standard Helm examples.
For the basic use cases, or if you are just getting started with Helm, see our [Helm quick start guide]({{site.baseurl}}/docs/getting-started/helm-quick-start-guide/) and [Using Helm in CI pipelines]({{site.baseurl}}/docs/deployments/helm/using-helm-in-codefresh-pipeline/).

## Package a Helm chart
Below is an example of a freestyle step in a Codefresh pipeline that packages the Helm chart and then extracts the chart name from the command output. It also saves that package name in an environment variable for later use.

`YAML`
{% highlight yaml %}
{% raw %}
helm_package:
image: devth/helm
commands:
- cf_export PACKAGE=$(helm package <mychart> | cut -d " " -f 8)
{% endraw %}
{% endhighlight %}

The `helm package` command expects a path to an unpacked chart. Replace `<mychart>` in the example with the directory that holds your chart files. Note that this directory must have the same name as the chart name, as per Helm requirements.<br>
See [Helm package docs](https://github.com/kubernetes/helm/blob/master/docs/helm/helm_package.md){:target="_blank"} and [Helm charts overview](https://github.com/kubernetes/helm/blob/master/docs/charts.md){:target="_blank"} for more information.

{{site.data.callout.callout_info}}
To use `cf_export`and make the variable available to other steps in the pipeline, see [Variables in pipelines]({{site.baseurl}}/docs/pipelines/variables).
{{site.data.callout.end}}

## Example 1: Push the chart to GCS based Helm Repository
The first example pushes the packaged chart into a public cloud storage service, like AWS S3, Azure Storage, or Google Cloud Storage. We chose Google Cloud Storage (GCS) for this example.
Our pipeline has three steps:

{:start="1"}
1. download_index: download the Helm `index.yaml` file from GCS, or create one of it's not there.

{:start="2"}
2. helm_package_merge: package the chart as described earlier, and also merge the new package into the downloaded `index.yaml` file, using the `helm repo index --merge` command.

{:start="3"}
3. push_gcs: upload the updated `index.yaml` file and the newly created package to GCS.

`YAML`
{% highlight yaml %}
{% raw %}
steps:
download_index:
image: appropriate/curl:latest
commands:
- 'curl https://storage.googleapis.com/$GOOGLE_BUCKET_NAME/index.yaml --output ./index.yaml --fail || :'
- '[ ! -f ./index.yaml ] && echo "apiVersion: v1">./index.yaml'
helm_package_merge:
image: devth/helm
commands:
- cf_export PACKAGE=$(helm package <mychart> | cut -d " " -f 8)
- helm repo index --merge ./index.yaml .
push_gcs:
image: camil/gsutil
commands:
- echo -E $GOOGLE_CREDENTIALS > /gcs-creds.json
- echo -e "[Credentials]\ngs_service_key_file = /gcs-creds.json\n[GSUtil]\ndefault_project_id = $GOOGLE_PROJECT_ID" > /root/.boto
- gsutil cp ./index.yaml gs://$GOOGLE_BUCKET_NAME
- gsutil cp $PACKAGE gs://$GOOGLE_BUCKET_NAME
{% endraw %}
{% endhighlight %}


### Environment setup

This pipeline references some predefined environment variables such as `GOOGLE_BUCKET_NAME`, `GOOGLE_PROJECT_ID` and `GOOGLE_CREDENTIALS`.
For this example, we created a service account with appropriate permissions in Google Cloud, and saved the credentials into `GOOGLE_CREDENTIALS` as a Codefresh Secret. <br>
For more information, see:
[Authenticating with Google services](https://cloud.google.com/storage/docs/authentication#service_accounts){:target="_blank"}. <br>
[Codefresh pipeline configuration and secrets](https://codefresh.io/docs/docs/codefresh-yaml/variables/#user-provided-variables){:target="_blank"}.

## Example 2: Push the chart to Chart Museum
Chart Museum is a Helm repository *server* that has an HTTP API, pluggable backends, authentication, and more.
Read more about [Chart Museum](https://github.com/kubernetes-helm/chartmuseum){:target="_blank"}.

In this example, we already have a Chart Museum server running, so we'll push the packaged chart to it.

The steps will be:

{:start="1"}
1. helm_package: package the chart as described earlier.

{:start="2"}
2. get_repo_url: In order to avoid hard-coding the repository URL into the pipeline, we will retrieve it from the Codefresh Helm integration.
In this case, we have added our repository with Codefresh as described in [Using external Helml repos in Codefresh pipelines]({{site.baseurl}}/docs/deployments/helm/helm-charts-and-repositories).
Replace `<reponame>` in the example with the name you gave to your repository when you added it to Codefresh.

{:start="3"}
3. helm_push: call the Chart Museum HTTP api to just upload the package. Chart Museum will take care of the rest.

`YAML`
{% highlight yaml %}
{% raw %}
steps:
helm_package:
image: devth/helm
commands:
- cf_export PACKAGE=$(helm package <mychart> | cut -d " " -f 8)
get_repo_url:
image: codefresh/cli:latest
commands:
- cf_export HELM_URL=$(codefresh get ctx <reponame> -o=yaml | grep repositoryUrl | cut -d "'" -f 2)
helm_push:
image: appropriate/curl
commands:
- curl --data-binary "@$PACKAGE" $HELM_URL/api/charts
{% endraw %}
{% endhighlight %}


## Related articles
[Using Helm in a Codefresh pipeline]({{site.baseurl}}/docs/deployments/helm/using-helm-in-codefresh-pipeline/)
[Using a managed Helm repository]({{site.baseurl}}/docs/deployments/helm/managed-helm-repository/)
[Helm environment promotion]({{site.baseurl}}/docs/deployments/helm/helm-environment-promotion)
Loading