Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb029d9a

Browse files
committed
Add environment dashboard and deployment environment topics
Added missing topics: env dashboard to K8s deployment, and deployment envs to pipelines
1 parent6249860 commitb029d9a

File tree

8 files changed

+386
-0
lines changed

8 files changed

+386
-0
lines changed

‎_data/nav.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@
319319
sub-pages:
320320
-title:Deployment options for Kubernetes
321321
url:"/deployment-options-to-kubernetes"
322+
-title:Environment dashboard
323+
url:"/environment-dashboard"
322324
-title:Managing Kubernetes clusters
323325
url:"/manage-kubernetes"
324326
-title:Custom kubectl commands
@@ -416,6 +418,8 @@
416418
url:"/monitoring-pipelines"
417419
-title:Advanced workflows
418420
url:"/advanced-workflows"
421+
-title:Deployment environments
422+
url:"/deployment-environments"
419423
-title:Running pipelines locally
420424
url:"/running-pipelines-locally"
421425
-title:Configuration for pipelines
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title:"Environment dashboard"
3+
description:"Viewing your deployment environments"
4+
group:deployments
5+
sub_group:kubernetes
6+
toc:true
7+
---
8+
9+
The[Kubernetes Services dashboard]({{site.baseurl}}/docs/deployments/kubernetes/manage-kubernetes/) is a good way to see what your clusters are doing but it is mostly focused on low level constructs such as pods and docker images. The[Helm environment dashboard]({{site.baseurl}}/docs/deployments/helm/helm-environment-promotion/) on the other hand offers an application level view of your cluster, but it only applies to Helm deployments.
10+
11+
To bridge this gap, Codefresh also offers a Environment Dashboard for both Kubernetes and Helm releases that allows you to see cluster status in addition to what the pipelines are doing.
12+
13+
{% include
14+
image.html
15+
lightbox="true"
16+
file="/images/pipeline/codefresh-yaml/environments/environments.png"
17+
url="/images/pipeline/codefresh-yaml/environments/environments.png"
18+
alt="Codefresh Environment Dashboard"
19+
caption="Codefresh Environment Dashboard"
20+
max-width="70%"
21+
%}
22+
23+
The environment dashboard is configurable and each environment can represent a plain Kubernetes deployment or a Helm release.
24+
25+
##Access the Environment dashboard
26+
* In the Codefresh UI, from Ops in the sidebar,[**Environments**](https://g.codefresh.io/environments){:target="\_blank"}.
27+
28+
29+
##How environments work
30+
31+
The purpose of an environment is to give you an overview of both the cluster status as well as the builds that affect it. The environment acts as a link between the status of builds and the status of the cluster.
32+
33+
34+
{% include
35+
image.html
36+
lightbox="true"
37+
file="/images/deployments/kubernetes/dashboard/environment-info.png"
38+
url="/images/deployments/kubernetes/dashboard/environment-info.png"
39+
alt="Components of an environment"
40+
caption="Components of an environment"
41+
max-width="100%"
42+
%}
43+
44+
A Codefresh environment is based on two components:
45+
* A cluster namespace that holds a deployment/service (or a Helm release in the case of Helm)
46+
* An association between builds and this cluster
47+
48+
When you visit the environment screen you can see consolidated information on what your environment is doing. Codefresh will pull live data from the cluster to populate the status bar of each environment entry and will automatically show the status of the last 3 builds that affected this environment.
49+
50+
The overall status of the environment (shown as a green or red label at the top of the environment card) is the exit result of the last build that affected that environment.
51+
52+
The URL shown at the environment is just a shortcut link that allows you to quickly visit the user application exposed by the environment (if this is applicable). It is not used by Codefresh for anything else (i.e. Codefresh does*not* check it to actually decide if an environment is healthy).
53+
54+
55+
##Creating an environment
56+
57+
You can create an environment in two ways:
58+
59+
* Describe the environment details in the any pipeline that affects it using the[special env syntax]({{site.baseurl}}/docs/pipelines/deployment-environments/). The first time the pipeline runs, the environment GUI entry will be created automatically in the dashboard.
60+
* Create the environment details yourself straight from the Codefresh UI
61+
62+
To create an environment while in the dashboard screen, click the*New environment* button on the top right corner and fill in the required details:
63+
64+
{% include
65+
image.html
66+
lightbox="true"
67+
file="/images/deployments/kubernetes/dashboard/create-environment.png"
68+
url="/images/deployments/kubernetes/dashboard/create-environment.png"
69+
alt="Creating an environment from the GUI"
70+
caption="Creating an environment from the GUI"
71+
max-width="50%"
72+
%}
73+
74+
When you create an environment for your application, you can define the following:
75+
* Helm boards: Namespace, Cluster, and Release. Namespace is useful when you have more than one Helm release per namespace, or you have the same Helm release in more than one namespace.
76+
* Kubernetes boards: Release, Cluster, and Namespace.
77+
78+
Once you create the environment, Codefresh will pull automatically the status of pods/deployments/services from the cluster and show it at the environment status bar. To link specific pipelines to that environment follow the[env syntax guide]({{site.baseurl}}/docs/pipelines/deployment-environments/).
79+
80+
You can also combine the two ways by first creating an environment in the GUI and then associating it with a pipeline. But notice that in that case the environment details you selected in the GUI must**EXACTLY** match those defined in the pipeline (so that the pipeline can detect which environment entry it should update).
81+
82+
##Understanding cluster issues
83+
84+
There is no restriction to the number of pipelines linked to an environment (and the number of environments affected by a single pipeline). In fact the true power of the environment dashboard becomes evident when you link multiple pipelines to a single environment.
85+
86+
One of the most common deployment issues are errors in configuration. Instead of just linking pipelines that deploy applications, you should instead link*all* types of pipelines that affect a cluster. These pipelines can contains
87+
88+
* application deployments
89+
* cluster component changes
90+
* configuration changes (e.g. configmaps or secrets)
91+
* database changesets
92+
93+
This means that the environment entry will have a history of*all* changes that happened on the cluster and not just application deployments. Ideally no manual change should happen to the cluster outside of a pipeline.
94+
95+
{% include
96+
image.html
97+
lightbox="true"
98+
file="/images/deployments/kubernetes/dashboard/error-detection.png"
99+
url="/images/deployments/kubernetes/dashboard/error-detection.png"
100+
alt="Looking at the history of an environment"
101+
caption="Looking at the history of an environment"
102+
max-width="100%"
103+
%}
104+
105+
Here we have a classic deployment issue where an application is deployed on the cluster and fails, even thought the exact same application tag was previously successful.
106+
107+
Because that team that created this dashboard also linked the pipeline that does configuration changes to the cluster, it is clear that there was a configmap change between the two application deployments. Even though the configuration change itself was successful, the application deployment failed the second time because of it.
108+
109+
With the environment dashboard it is very easy to understand that the configuration change was responsible for breaking the next deployment. An operator can now look at the configuration change and talk with a developer that knows what the application needs and why it failed.
110+
111+
Therefore make sure to link all pipelines that affect a cluster in the environment dashboard and not just application deployments.
112+
113+
114+
115+
116+
##Related articles
117+
[Update environment status from builds]({{site.baseurl}}/docs/pipelines/deployment-environments/)
118+
[Connect a Kubernetes cluster]({{site.baseurl}}/docs/integrations/kubernetes/#connect-a-kubernetes-cluster)
119+
[Managing Kubernetes clusters]({{site.baseurl}}/docs/deployments/kubernetes/manage-kubernetes/)
120+
[Promoting Helm environments]({{site.baseurl}}/docs/deployments/helm/helm-environment-promotion/)
121+
122+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp