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

Commit7af9384

Browse files
authored
Nima cap quick start updates (#29)
* Update create CI pipelineSeparated sections common to Git and UI, and added new section for UI pipeline creation* Update quick startChanged title of verify requirements to prepare for runtime install* wip* Update requirements for runtime and troubleshootingCompleted quick start ci pipeline, and updated runtime requirements, added new troubleshooting topic* Update troubleshooting.md
1 parentc1cf1d2 commit7af9384

File tree

8 files changed

+207
-38
lines changed

8 files changed

+207
-38
lines changed

‎_data/nav.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@
4949
-title:Runtime
5050
url:"/runtime"
5151
pages:
52-
-title:System requirements
52+
-title:Requirements
5353
url:"/requirements"
5454
-title:Installation
5555
url:"/installation"
5656
-title:Management
5757
url:"/monitor-manage-runtimes"
5858
-title:Git Source management
5959
url:"/git-sources"
60+
-title:Troubleshooting
61+
url:"/troubleshooting"
6062

6163

6264
-title:CI/CD Guides

‎_docs/getting-started/quick-start/create-ci-pipeline.md‎

Lines changed: 96 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ Some tasks are common to both methods of creating pipelines.
2121
###Create a Personal Access Token (PAT)
2222
Required for: Git and CSDP UI.
2323

24-
Create your personal token with a valid expiration date and scope.
24+
1.Create your personal token with a valid`expiration` date and`scope` with`base64` encoding.
2525

26-
For CSDP pipelines, you need`repo` and`admin-repo.hook`:
26+
For CSDP pipelines, you need`repo` and`admin-repo.hook`:
27+
2728
{% include
2829
image.html
2930
lightbox="true"
@@ -34,9 +35,7 @@ Create your personal token with a valid expiration date and scope.
3435
max-width="30%"
3536
%}
3637

37-
38-
39-
1. Create a PAT.
38+
{:start="2"}
4039
1. Create a new file`github_access.yaml`.
4140
1. Paste the content into the file:
4241
```yaml
@@ -61,7 +60,28 @@ Create your personal token with a valid expiration date and scope.
6160
value: <paste-your-pat-token-here>
6261
...
6362
```
63+
64+
### Set up `dockerconfig.json`
65+
Required for:Git and CSDP UI
66+
67+
Create a secret to use with Docker registry in `dockerconfig.json`.
68+
69+
1. Do one of the following:
70+
* Follow the instructions in this [link](​​https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_create_secret_docker-registry/)
71+
* Run this command:
72+
`kubectl create secret docker-registry <docker-registry-name> --docker-username=<docker-registry-username> --docker-password=<docker-registry-password> --docker-email=<docker-registry-email> [--docker-server=string] [--from-literal=key1=value1] [--dry-run]`
73+
where:
74+
* `<docker-registry-name>` is the Docker Registry for which to create the secret.
75+
* `<docker-registry-username>` and <docker-registry-password> are your username and password authentication credentials.
76+
* `<docker-registry-email>` is the ???.
77+
6478
### Git: Create CI pipeline
79+
Create a CI pipeline via Git. Make sure you have your personal Git token and the secret for the Docker Registry before you start.
80+
81+
#### Before you begin
82+
1. Create a personal Git token
83+
1. Create the Docker Registry secret
84+
1. Fork the repo, `<repo_name>` to work with the quick start micro service application
6585

6686
#### Download and commit CI pipeline resource files
6787
The basic CI pipeline comprises resource files that you must download and then commit to the Git repository. For the purposes of the quick start, you will commit them to the Git repo you selected or created during runtime installation.
@@ -70,16 +90,10 @@ The basic CI pipeline comprises resource files that you must download and then c
7090
* Github-ci EventSource (`event-source.git-ci-source.yaml`). Download
7191
* Express-ci Sensor (`sensor.express-ci.yaml`). Download
7292
* ci-simple WorkflowTemplate (`workflow-template.ci-simple.yaml`) Download
73-
1. Save and commit to the `resource_<runtime-name>` folder in the `<runtime-name>-gitsource` repo that was created during runtime installation.
93+
1. Save and commit to the `resource_<runtime-name>` folder in the `<runtime-name>_git.source` repo that was created during runtime installation.
7494
CSDP syncs these resource definitions to your cluster, and create the resources in the cluster.
7595
1. In the CSDP UI, view the newly created pipeline in [Pipelines]((https://g.codefresh.io/2.0/pipelines){:target="\_blank"}).
7696

77-
78-
79-
80-
#### Set up `dockerconfig.json`
81-
TBD
82-
8397
#### Configure pipeline with demo micro service application
8498

8599
1. Fork the repository:??
@@ -116,7 +130,7 @@ TBD
116130

117131

118132
#### Trigger an event for the CI pipeline
119-
To complete the CI pipeline, trigger an event that runs the pipeline.
133+
To complete the CI pipeline, trigger an event that runs the pipeline.
120134

121135
1. Update the `readme.md` file in the root of the Git repo and commit the changes.
122136
1. Now navigate to the simple-ci pipeline and see that new workflow has been created.
@@ -126,7 +140,75 @@ To complete the CI pipeline, trigger an event that runs the pipeline.
126140
* Builds the image
127141
* Pushes the image to your Docker Hub
128142
* Updates CSDP with the image information
129-
1. In the CSDP UI, go to Images to view the image.
143+
1. In the CSDP UI, go to[Images]((https://g.codefresh.io/2.0/images){:target="\_blank"}).
130144

131145

146+
### CSDP: Create a CI pipeline with Create Pipeline wizard
147+
Use our pipeline creation wizard to create the CI pipeline. Make sure you have your personal Git token and the secret for the Docker Registry before you start.
132148

149+
#### Before you begin
150+
1. Create a personal Git token
151+
1. Create the Docker Registry secret
152+
153+
#### Create the pipeline
154+
1. In the CSDP UI, go to [Pipelines]((https://g.codefresh.io/2.0/pipelines){:target="\_blank"}).
155+
1. Select **+ Add Pipeline**.
156+
157+
{% include
158+
image.html
159+
lightbox="true"
160+
file="/images/getting-started/quick-start/quick-start-new-pipeline.png"
161+
url="/images/getting-started/quick-start/quick-start-new-pipeline.png"
162+
alt="Add Pipeline panel in CSDP"
163+
caption="Add Pipeline panel in CSDP"
164+
max-width="30%"
165+
%}
166+
167+
{:start="3"}
168+
1. Enter a name for the pipeline.
169+
The name is created from the names of the sensor and the trigger event for the pipeline.
170+
* **Sensor Name**: The name of the sensor resource, for example, `sensor-csdp-ci`.
171+
* **Trigger Name**: The event configured in the sensor to trigger the Workflow Template, for example, `trigger-csdp-ci`.
172+
1. Select **Codefresh Starter Workflow Template**.
173+
1. From the list of Git Sources, select the Git Source to which to commit the resources for this pipeline.
174+
For the quick start, you can select ???
175+
1. Your workflow template is now set. Select **Next** to define the trigger conditions.
176+
1. In the **Configuration** tab, select **Trigger Conditions**.
177+
1. From the **Add** dropdown, select **Git Events**.
178+
1. In the **Arguments** field, enter the arguments required by the Workflow Template:
179+
These arguments are populated with the required values from the event payload.
180+
Type `$` and from the list of predefined variables, select each of these in turn:
181+
* `GIT_REPO_NAME`
182+
* `IMAGE_NAME`
183+
* `TAG`
184+
* `GIT_REVISION`
185+
* `GIT_BRANCH`
186+
* `GIT_COMMIT_URL`
187+
* `GIT_COMMIT_MESSAGE`
188+
189+
Your Git pipeline is now set up to run with parameters from the commit event.
190+
1. Add a filter on the payload to trigger this pipeline _only_ when there is a commit to the `main` branch:
191+
* In the Event filter select `BRANCH`, and click **Add**.
192+
* Make sure you select the `=` operator and in the value field enter `master`.
193+
1. Select **Apply** and then **Commit** to preview the resources you are committing.
194+
1. Enter the commit message and then select **Commit**.
195+
1. In the **Pipelines** page to which you are redirected, verify that your pipeline is displayed.
196+
It may take a few seconds while the pipeline is synced from Git to the cluster.
197+
198+
#### Trigger the pipeline with a Git commit event
199+
Make a change to a file in the Git repository to trigger the pipeline.
200+
201+
1. Go to the Git repository you defined or selected for the trigger condition.
202+
1. Make a change to any file to get a commit event.
203+
1. In the CSDP UI, go back to o [Pipelines]((https://g.codefresh.io/2.0/pipelines){:target="\_blank"})) to see the new workflow for the pipeline.
204+
1. Select the workflow to see detailed
205+
206+
207+
Continue to tweak the pipeline and add more capabilities.
208+
209+
210+
211+
212+
213+
214+
Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
---
2-
title:"WIP: 1.Verifyruntimerequirements"
2+
title:"WIP: 1.Prepare forruntimeinstallation"
33
description:""
44
group:getting-started
55
sub-group:quick-start
66
toc:true
77
---
88

99

10-
Review and confirm that your deployment conforms to the minimum requirements for installing CSDP. See[system requirements]({{site.baseurl}}/docs/runtime/requirements).
10+
**New installation**
11+
If this is your first CSDP installation, review and confirm that your deployment conforms to the minimum requirements for installing CSDP. See[system requirements]({{site.baseurl}}/docs/runtime/requirements).
12+
13+
**Existing installation**
14+
15+
If you already have a runtime installation on your cluster, you have two options:
16+
1. To install on the same cluster, first uninstall the existing runtime. Currently, you can install a single runtime per cluster.
17+
1. Install on a different cluster, verifying that you meet minimum requirements.
18+
19+
**Uninstallation tips for existing runtimes**
20+
* Before you run uninstall from the CSDP UI or`cf runtime <name> uninstall` from the CLI, delete all CSDP-related namespaces.
21+
* If the namespace is frozen in the Terminating status, it could be that the namespace has resources with finalizers that prevents them from being deleted.
22+
Here's how you to remove finalizers using`k9s`:
23+
* In the`applications` view, do the following for each application:
24+
* Hit`e` to edit the YAML.
25+
* Scroll down to the section entitled`finalizers`.
26+
* Move cursor to the line with the finalizer definition, and then hit`dd` to delete the line.
27+
* Delete also the`finalizers` key.
28+
* Hit`escape``wq:``enter` to save and exit.
29+
* Try deleting the namespace again.
1130

1231
###What to do next
1332
[Install runtime]({{site.baseurl}}/docs/getting-started/quick-start/runtime)

‎_docs/runtime/installation.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ To install a CSDP runtime, you can either pass the flags in the runtime install
5757

5858
**Ingress host**
5959

60-
The IP address/host name/FQDN of the ingress controller component.
60+
The IP address orhost name of the ingress controller component.
6161

6262

6363
**Codefresh demo resources**
6464

65-
Optional. Install demo pipelines to use as a starting point to create your own pipelines.
65+
Optional. Install demo pipelines to use as a starting point to create your own pipelines. We recommend installing the demo resources as these are used in our quick start tutorials.
6666

6767
####Runtime components
6868

‎_docs/runtime/requirements.md‎

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title:"System requirements"
2+
title:"Requirements"
33
description:""
44
group:runtime
55
toc:true
@@ -8,29 +8,21 @@ toc: true
88

99
The requirements listed are the**_minimum_** requirements for CSDP (Codefresh Software Developement Platform).
1010

11-
###Kubernetes cluster
11+
###Kubernetes cluster requirements
12+
This section lists cluster requirements.
13+
14+
####Cluster version
1215
Kubernetes cluster version 1.20, without Argo Project components
1316
>In the documentation, Kubernetes and K8s are used interchangeably.
1417
15-
###Ingress controller
18+
####Ingress controller
1619
Configure your Kubernetes cluster with an Ingress controller component that is exposed from the cluster. For detailed information, see the[Kubernetes documentation on ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
1720

18-
Here are quick tips to configure ingress controllers in common cluster deployments:
19-
20-
**Eks**:`kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/aws/deploy.yaml`
21-
22-
Non-production:
23-
**K3d**: A K3d cluster comes with a built-in Traefik ingress controller.
24-
**Docker desktop**:`kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/cloud/deploy.yaml`
25-
2621
>Tip:
2722
Verify that the ingress controller has a valid external IP address:
23+
2824

29-
**Eks**: Should show a valid external IP when running`kubectl get svc ingress-nginx-controller -n ingress-nginx`. Note this down as you will need this when you install the runtime.
30-
**K3d**: Should show a valid external IP when running`kubectl get svc traefik -n kube-system`
31-
**Docker desktop**: Should show`localhost` as the external IP when running`kubectl get svc ingress-nginx-controller -n ingress-nginx`
32-
33-
###Default`IngressClass`
25+
####Default`IngressClass`
3426
The`IngressClass` resource, or any one of them if you have more than one, must be tagged as the default.
3527

3628
To tag an`IngressClass` resource as the default, add this`ingressclass.kubernetes.io/is-default-class` annotation with the value of`true` to the resource.
@@ -43,11 +35,11 @@ To tag an `IngressClass` resource as the default, add this `ingressclass.kuberne
4335
ingressclass.kubernetes.io/is-default-class:"true"
4436
```
4537
46-
### Node requirements
38+
#### Node requirements
4739
* Memory: 3000 MB
4840
* CPU: 2
4941
50-
### Runtime namespace permissions for resources
42+
#### Runtime namespace permissions for resources
5143
5244
{: .table .table-bordered .table-hover}
5345
| Resource | Permissions Required|
@@ -60,6 +52,31 @@ To tag an `IngressClass` resource as the default, add this `ingressclass.kuberne
6052
| `persistentvolumeclaims` | Create, Update, Delete |
6153
| `pods` | Creat, Update, Delete |
6254

55+
### Git repository requirements
56+
This section lists the requirements for Git installation repositories.
57+
58+
#### Git installation repo
59+
If you are using an existing repo, make sure it is empty.
60+
61+
#### Git token
62+
CSDP requires a GitHub Personal Access Token for runtime installation.
63+
To create a Git token, see [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
64+
65+
The token must have:
66+
* `base64` encoding
67+
* Valid expiration: Default is `30 days`
68+
* Scope: `repo` and `admin-repo.hook`:
69+
70+
{% include
71+
image.html
72+
lightbox="true"
73+
file="/images/getting-started/quick-start/quick-start-git-event-permissions.png"
74+
url="/images/getting-started/quick-start/quick-start-git-event-permissions.png"
75+
alt="GitHub PAT permissions for CI pipeline"
76+
caption="GitHub PAT permissions for CI pipeline"
77+
max-width="30%"
78+
%}
79+
6380

6481
### What to read next
65-
[Runtime installation]({{site.baseurl}}/docs/runtime/requirements/)
82+
[Runtime installation]({{site.baseurl}}/docs/runtime/installation/)

‎_docs/runtime/troubleshooting.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title:"WIP: Troubleshooting"
3+
description:""
4+
group:runtime
5+
toc:true
6+
---
7+
8+
###Runtime installation
9+
10+
####Pre-installation checks or runtime collision check failed
11+
12+
**Possible cause**
13+
You have Argo Project components from other installations in your cluster.
14+
15+
**Possible actions**
16+
1. Uninstall the CSDP runtime.
17+
1. Remove the Argo Project components from your cluster.
18+
1. Reinstall the CSDP runtime.
19+
20+
####Pre installation error: please upgrade to the latest cli version: v<number>
21+
22+
23+
####Failed to bootstrap repository: authentication required
24+
25+
####Failed adding git integration <...> 404 not found
26+
27+
**Possible cause**
28+
Another process is probably occupying the address you provided as your`ingress-host`.
29+
30+
**Possible actions**
31+
* Terminate the process to free up the address.
32+
33+
####Timeout error, either for applications or while waiting for the installation to complete
34+
**Possible cause**
35+
Cron-executer has identified that not all your applications are synced and healthy.
36+
CSDP runtime installation syncs app status at 10-minute intervals. The timeout occurs if after the last status check, at least one application is either not synced or healthy.
37+
38+
**Possible actions**
39+
Without terminating the runtime install, do the following steps:
40+
41+
1. In the Argo CD UI, check the status of your apps:
42+
* Port forward your argo-cd server pod (use default 8080 ports).
43+
* Access it via`localhost:8080` with the Username`admin`, and Password which is the decoded`argocd-initial-admin-secret` in your cluster.
44+
With`k9s`, in the`secrets` view, press`x`.
45+
1. If all apps are perfectly synced and healthy, check the logs of the cron-executor service.
46+
1. If the logs don't show a cause for the error, try freeing up resources:
47+
* Free up memory with` docker system prune -a --volumes`.
48+
* Increase the resources allocated to your cluster.
49+
190 KB
Loading
136 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp