diff --git a/_data/nav.yml b/_data/nav.yml index de372766..2bfef560 100644 --- a/_data/nav.yml +++ b/_data/nav.yml @@ -12,11 +12,11 @@ url: "/verify-requirements" - title: Install a hybrid runtime url: "/runtime" - - title: Create resources for the codefresh-guestbook application + - title: Create an application + url: "/create-app-ui" + - title: Create and commit resources for application url: "/create-app-specs" - - title: Create the codefresh-guestbook application - url: "/create-app-ui" - - title: Update the image tag for the codefresh-guestbook application + - title: Update the image tag for application url: "/create-rollout" - title: Trigger the Hello World example pipeline url: "/hello-world" diff --git a/_docs/getting-started/quick-start.md b/_docs/getting-started/quick-start.md index 1ce705a7..203c03d0 100644 --- a/_docs/getting-started/quick-start.md +++ b/_docs/getting-started/quick-start.md @@ -17,14 +17,10 @@ Each section indicates the runtime environment it is relevant to. ### Provision runtimes Based on your deployment model, start by provisioning the hosted or hybrid runtime. Hosted and hybrid runtimes can co-exist with each other. -* Hosted runtimes: Hosted on a Codefresh cluster and managed by Codefresh. You need to provision your hosted runtime once for your account. -* Hybrid runtimes: Hosted on a customer cluster and managed by the customer. You can provision multiple hybrid runtimes in the same account. - -{::nomarkdown} -
-{:/} #### Hosted +Hosted runtimes are hosted on a Codefresh cluster and managed by Codefresh. You need to provision your hosted runtime once for your account. + 1. [Provision a hosted runtime]({{site.baseurl}}/docs/getting-started/quick-start/install-hosted) Provision the hosted runtime with a single click, and complete the setup for your hosted environment. @@ -33,6 +29,8 @@ Based on your deployment model, start by provisioning the hosted or hybrid runti {:/} #### Hybrid +Hybrid runtimes: Hosted on a customer cluster and managed by the customer. You can provision multiple hybrid runtimes in the same account. + 1. [Prepare for hosted runtime installation]({{site.baseurl}}/docs/getting-started/quick-start/verify-requirements) Verify your environment matches the requirements for installing Codefresh runtime. 1. [Install hybrid runtime]({{site.baseurl}}/docs/getting-started/quick-start/runtime) @@ -40,11 +38,11 @@ Based on your deployment model, start by provisioning the hosted or hybrid runti ### Deploy an application -1. [Create resources for codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-specs) - Create rollout, service, and analysis template resources prior to creating the `codefresh-guestbook` application. -1. [Create the codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-ui) +1. [Create an application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-ui) Create the `codefresh-guestbook` application in the Codefresh UI. -1. [Update the image tag for codefresh-guestbook]({{site.baseurl}}/docs/getting-started/quick-start/create-rollout) +1. [Create and commit resources for application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-specs) + Create rollout and service resources, and commit these resources to deploy the `codefresh-guestbook` application. +1. [Update the image tag for application]({{site.baseurl}}/docs/getting-started/quick-start/create-rollout) Update the image for the `codefresh-guestbook` application to trigger a rollout. ### Trigger/create a Delivery Pipeline diff --git a/_docs/getting-started/quick-start/create-app-specs.md b/_docs/getting-started/quick-start/create-app-specs.md index 95333379..1c44be1f 100644 --- a/_docs/getting-started/quick-start/create-app-specs.md +++ b/_docs/getting-started/quick-start/create-app-specs.md @@ -1,40 +1,25 @@ --- -title: "Create resources for codefresh-guestbook" +title: "Create and commit resources for application" description: "" group: getting-started sub-group: quick-start toc: true --- -Before you can create an application in Codefresh, you need to create the resources used by the application: - -1. Install Argo Rollouts on the target cluster to which you will deploy the application +Now that you have created an application, you need to deploy the application. Let's deploy the `codefresh-guestbook` application by creating and commiting resources. +You will create and commit the following resources: +1. A folder in Git to save resources for the application 1. `Rollout` resource defining the deployment strategy -1. Service resource to expose the application to external traffic -1. Analysis Template resource defining the validation requirements before deployment - -### Install Argo Rollouts on the target cluster -To apply the `Rollout` resource for the application, you must have Argo Rollouts installed on the target cluster. If not installed, follow the steps to install Argo Rollouts. - -1. In the Codefresh UI, go to [Runtimes](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}. -1. Select **Topology View**. -1. Select the target cluster, and then select **+ Install Argo Rollouts**. +1. `Service` resource to expose the application to external traffic -{% include - image.html - lightbox="true" - file="/images/getting-started/quick-start/cdops-app-install-rollout.png" - url="/images/getting-started/quick-start/cdops-app-install-rollout.png" - alt="Install Argo Rollouts on target cluster" - caption="Install Argo Rollouts on target cluster" - max-width="50%" - %} +### Before you begin +* [Create an application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-ui) +* Make sure [Argo Rollouts is installed]({{site.baseurl}}/docs/deployment/install-argo-rollouts) on the target cluster ### Create folder in Git for application resources -Create a folder in the Git repo in which to save all the resources. +Create a folder in the Git repo in which to save all the resources for the `codefresh-guestbook` application. * In your Git repo, create a folder to store the resources needed to deploy the application. - For example, `/quick-start/` ### Create rollout.yaml @@ -42,7 +27,7 @@ Create a folder in the Git repo in which to save all the resources. Create a rollout resource for the application you want to deploy. -To leverage Argo Rollout's deployment capabilities, we are using the Argo's Rollout resource instead of the native Kubernetes Deployment object. +To leverage Argo Rollouts' deployment capabilities, we are using the Argo's `rollout` resource instead of the native Kubernetes Deployment object. For detailed information on the fields you can define, see [Argo Rollout specification](https://argoproj.github.io/argo-rollouts/features/specification/){:target="\_blank"}. @@ -75,10 +60,6 @@ spec: minReadySeconds: 30 strategy: canary: - analysis: - templates: - - templateName: background-analysis - startingStep: 1 steps: - setWeight: 25 - pause: {duration: 20s} @@ -128,48 +109,23 @@ spec: | `spec.ports` | The internal `port`, 8080 in our example, and external `targetPort`, 80 in our example.| | `selector.app` | The pods to select, and MUST be identical to that defined in `rollouts.yaml`, `codefresh-guestbook` in our example.| -### Create an AnalysisTemplate for rollout validation -Create an `AnalysisTemplate` resource to validate that your changes conform to the requirements before deployment. This is the final resource you need before you can create the application. - -The name of the `AnalysisTemplate` in the quick start example is `background-analysis`. The template interfaces with Prometheus as the third-party metric provider to validate metrics. - -You can use any third-party metric provider supported by Argo Rollouts, such as Prometheus, Datadog, Wavefront, and more. Read the official documentation on [Analysis section in Argo Rollouts](https://argoproj.github.io/argo-rollouts/){:target="\_blank"}. - - -* In the Git repository create the `analysisTemplate.yaml` file, as in the example below. - +### View application resources in Codefresh +Once you create and commit the `rollout` and `service` resources, return to the Applications dashboard. The Current State to see these resources. -```yaml -apiVersion: argoproj.io/v1alpha1 -kind: AnalysisTemplate -metadata: - name: background-analysis -spec: - metrics: - - name: prometheus-metric - count: 4 - interval: 5s - successCondition: result[0] >= 100 - failureLimit: 1 - provider: - prometheus: - address: http://a95910c83807a4089a2458554bf5c21e-1864259807.us-east-1.elb.amazonaws.com:9090 - query: | - sum(argocd_app_reconcile_sum) -``` - -#### Fields in `analysisTemplate.yaml` +1. In the Codefresh UI, go to the [Applications dashboard](https://g.codefresh.io/2.0/applications-dashboard?sort=desc-lastUpdated){:target="\_blank"}. +1. Select the application. + The Current State tab is now populated with the `rollout` and `service` resources you added. -{: .table .table-bordered .table-hover} -| Analysis Template field | Notes | -| -------------- | -------------- | -| `count` | The total number of measurements taken, `4` in our example.| -| `interval` | The interval between measurement samplings, `5s` in our example.| -| `successCondition` | The requirement for the rollout to be considered a success. In our example, the resulting metric value must be equal to or greater than 100.| -| `failureLimit` | The maximum number of failures permitted, `1` in our example. If the metric value is below 100 more than once, the rollout is aborted.| -| `query` | The query submitted to the Prometheus server.| - -You are now ready to create the application in Codefresh. + {% include + image.html + lightbox="true" + file="/images/getting-started/quick-start/cdops-app-current-state.png" + url="/images/getting-started/quick-start/cdops-app-current-state.png" + alt="Current State with resources for application" + caption="Current State with resources for application" + max-width="70%" + %} ### What to do next -[Create the codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-ui) \ No newline at end of file + +[(Optional) Update image tag for application]({{site.baseurl}}/docs/getting-started/quick-start/create-rollout) \ No newline at end of file diff --git a/_docs/getting-started/quick-start/create-app-ui.md b/_docs/getting-started/quick-start/create-app-ui.md index 23d4df43..b2fdff6b 100644 --- a/_docs/getting-started/quick-start/create-app-ui.md +++ b/_docs/getting-started/quick-start/create-app-ui.md @@ -1,19 +1,17 @@ --- -title: "Create the codefresh-guestbook application" +title: "Create an application" description: "" group: getting-started sub-group: quick-start toc: true --- -Now that you have created all the resources for the application, you can create the application in Codefresh. -For the quick start, you will create the `codefresh-guestbook` application. +Let's start by creating a simple application, the `codefresh-guestbook` application in the Codefresh UI. +We'll create the application without resources and then define/add resources in the next step. -For detailed information, see [Create an application]({{site.baseurl}}/docs/deployment/create-application). -**Before you begin** +For detailed information, see [Create an application]({{site.baseurl}}/docs/deployment/create-application). -[Create resources for codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-specs) **How to** @@ -23,9 +21,10 @@ For detailed information, see [Create an application]({{site.baseurl}}/docs/depl 1. In the Add Application panel, add definitions for the application: * **Application name**: `codefresh-guestbook` for the quick start. * **Runtime**: The runtime to associate with the application, `hosted-runtime` for the quick start. - * **YAML filename**: The name of the application's configuration manifest, assigned on commit to Git. By default, the manifest is assigned the application name. + * **Name for YAML file**: The name of the application's configuration manifest, assigned on commit to Git. By default, the manifest is assigned the application name. + You can click the Edit icon and change the name, if needed. - >The application definitions cannot be changed after you continue to the Configuration settings. + >You cannot change the application definitions once you continue to the Configuration settings. {% include image.html @@ -44,7 +43,7 @@ For detailed information, see [Create an application]({{site.baseurl}}/docs/depl * **Repository URL**: The URL to the repo in Git where you created the YAML resource files for the application. * **Revision**: The branch in Git with the resource files. * **Path**: The folder in Git with the resource files. - * **Namespace**: Optional. For the quick start, we'll create a namespace for the application, `quick-start`. + * **Namespace**: Optional. For the quick start, we'll create a namespace for the application, entitled `quick-start`. * **Sync Policy**: Change to **Automatic**, and select **Prune resources** to automatically remove unused resources. * **Sync Options**: If you defined a namespace, select **Auto-create namespace** to ensure that the namespace is created if it doesn't exist. @@ -62,7 +61,7 @@ For detailed information, see [Create an application]({{site.baseurl}}/docs/depl {:start="6"} 1. Retain the default **Advanced Settings**. 1. To commit all your changes, select **Commit**. - The Commit form is displayed with the application's definition on the left, and the read-only version of the manifest with the configuration settings you defined on the right. + The Commit form is displayed with the application's definitions on the left, and the read-only version of the manifest with the configuration settings you defined on the right. 1. Select the **Git Source** to which to commit. {% include @@ -91,20 +90,21 @@ For detailed information, see [Create an application]({{site.baseurl}}/docs/depl %} {:start="10"} -1. Select the application, and then click the **Current State** tab to see all the resources created for the application. +1. Select the application. The Current State tab does not display any resources as we have not created any resources for the application. {% include image.html lightbox="true" - file="/images/getting-started/quick-start/cdops-app-current-state.png" - url="/images/getting-started/quick-start/cdops-app-current-state.png" - alt="Current State for codefresh-guestbook application" - caption="Current State for codefresh-guestbook application" + file="/images/getting-started/quick-start/cdops-app-empty-current-state.png" + url="/images/getting-started/quick-start/cdops-app-empty-current-state.png" + alt="Empty Current State for new application" + caption="Empty Current State for new application" max-width="70%" - %} + %} + +In the next task, you will create and commit resources for the `codefresh-guestbook` application and deploy the application. -The final step is to make a change in the application manifest to enforce a rollout. ### What to do next -[Update image tag for codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-rollout) \ No newline at end of file +[Create and commit resources for application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-specs/) diff --git a/_docs/getting-started/quick-start/create-github-action-ci.md b/_docs/getting-started/quick-start/create-github-action-ci.md new file mode 100644 index 00000000..b95544b6 --- /dev/null +++ b/_docs/getting-started/quick-start/create-github-action-ci.md @@ -0,0 +1,7 @@ +--- +title: "Connect a GitHub Action CI to enrich image" +description: "" +group: getting-started +sub-group: quick-start +toc: true +--- \ No newline at end of file diff --git a/_docs/getting-started/quick-start/create-rollout.md b/_docs/getting-started/quick-start/create-rollout.md index ad4f2e1f..763df47a 100644 --- a/_docs/getting-started/quick-start/create-rollout.md +++ b/_docs/getting-started/quick-start/create-rollout.md @@ -1,16 +1,17 @@ --- -title: "Update image tag for the codefresh-guestbook application" +title: "Update image tag for application" description: "" group: getting-started sub-group: quick-start toc: true --- -You will now make a change in the application manifest, and update the image tag. Because we selected auto-sync in the application settings, Argo CD detects that the live state in the cluster is out of sync with the desired state in Git, and initiates the new rollout. The rollout runs the analysis template you defined (`background-analysis` in the quick start). +You will now make a change in the application manifest, and update the image tag. Because we selected auto-sync in the application settings, Argo CD detects that the live state in the cluster is out of sync with the desired state in Git, and triggers the new rollout. ### Before you begin -[Create the codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-ui) +* [Create resources for application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-specs/) + ### Update image tag in rollout.yaml Update the image tag in the `codefresh-guestbook` application. diff --git a/_docs/getting-started/quick-start/install-hosted.md b/_docs/getting-started/quick-start/install-hosted.md index c78f8930..8d3c6fbf 100644 --- a/_docs/getting-started/quick-start/install-hosted.md +++ b/_docs/getting-started/quick-start/install-hosted.md @@ -10,7 +10,8 @@ If you have Hosted GitOps, set up your hosted runtime environment: 1. Provision the hosted runtime with a single click 1. Authorize access through your OAuth token to the organization where Codefresh creates the Git runtime repo and the shared configuration repo -1. Connect to an external K8s cluster with access to the internet, to which you can deploy applications +1. Connect to an external K8s cluster with access to the internet, to which you can deploy applications +1. Install Argo Rollouts on the cluster Read our [blog on Hosted GitOps](https://codefresh.io/blog/codefresh-upends-continuous-delivery-with-hosted-gitops-platform-featuring-dora-dashboards-and-first-class-integrations-for-ci/). For detailed information on each of the steps below, see [Set up a hosted runtime environment]({{site.baseurl}}/docs/runtime/hosted-runtime/). @@ -88,6 +89,21 @@ caption="Connect a K8s cluster for hosted runtime" max-width="70%" %} +1. Install Argo Rollouts on the cluster you added. You'll need this to apply the `rollout` resource we will create for the application in the next task. + * Go to [Runtimes](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}. + * Select **Topology View**. + * Select the target cluster, and then select **+ Install Argo Rollouts**. + +{% include + image.html + lightbox="true" + file="/images/getting-started/quick-start/cdops-app-install-rollout.png" + url="/images/getting-started/quick-start/cdops-app-install-rollout.png" + alt="Install Argo Rollouts on managed cluster" + caption="Install Argo Rollouts on managed cluster" + max-width="50%" + %} + ### What to do next [Create resources for codefresh-guestbook application]({{site.baseurl}}/docs/getting-started/quick-start/create-app-specs) diff --git a/images/getting-started/quick-start/cdops-app-current-state.png b/images/getting-started/quick-start/cdops-app-current-state.png index 61c6e004..d718a8f7 100644 Binary files a/images/getting-started/quick-start/cdops-app-current-state.png and b/images/getting-started/quick-start/cdops-app-current-state.png differ diff --git a/images/getting-started/quick-start/cdops-app-empty-current-state.png b/images/getting-started/quick-start/cdops-app-empty-current-state.png new file mode 100644 index 00000000..6d9181d4 Binary files /dev/null and b/images/getting-started/quick-start/cdops-app-empty-current-state.png differ diff --git a/images/getting-started/quick-start/cdops-ci-docker-hub.png b/images/getting-started/quick-start/cdops-ci-docker-hub.png new file mode 100644 index 00000000..2c50dd0a Binary files /dev/null and b/images/getting-started/quick-start/cdops-ci-docker-hub.png differ