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

Commite9a1fc3

Browse files
authored
Nima cap quick start (#22)
* Update getting-started-quickly.mdAdded content for create user account and runtime install* Update quick start topicsSeparated quick start into different topics; added content and images* Update quick-start-runtime.mdFixed incorrect image path and step number syntax* Updated quick start topicsRemoved add users, added hello world content* Create quick-start-create-ci-pipeline.mdNew topic for CI pipeline* Update create basic CI pipelineAdded initial content as per quick start outline doc* Update quick start pipeline topicsUpdated Hello World and CI pipeline topics* Update structuremoved quick start topics to subfolder* UpdatedAdded missing URL link* Update all quick start topicsAdded content and new images
1 parent1c1cdd3 commite9a1fc3

File tree

27 files changed

+364
-88
lines changed

27 files changed

+364
-88
lines changed

‎_data/home-content.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
-title:Frequently asked questions
1818
localurl:/docs/getting-started/faq/
1919

20+
2021
-title:Deployment
2122
icon:images/home-icons/deployment.svg
2223
url:''
@@ -46,7 +47,7 @@
4647
-title:Runtime requirements
4748
localurl:/docs/runtime/requirements/
4849
-title:Installation
49-
localurl:/docs/runtime/installation/
50+
localurl:/docs/runtime/installation
5051
-title:Management
5152
localurl:/docs/runtime/monitor-manage-runtimes/
5253
-title:Git Source management

‎_data/nav.yml‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
-title:Getting started
2+
url:"/getting-started"
23
pages:
34
-title:Introducing CSDP
4-
url:"/getting-started/csdp-introduction"
5+
url:"/csdp-introduction"
56
-title:Quick start
6-
url:"/getting-started/quick-start"
7+
url:"/quick-start"
78
sub-pages:
89
-title:Verify runtime requirements
9-
url:"/getting-started/verify-requirements"
10+
url:"/verify-requirements"
1011
-title:Install runtime
11-
url:"/getting-started/quick-start-runtime"
12+
url:"/runtime"
1213
-title:Trigger the Hello World example pipeline
13-
url:"/getting-started/quick-start-hello-world"
14-
-title:Createa basic CI pipeline
15-
url:"/getting-started/quick-start-create-ci-pipeline"
14+
url:"/hello-world"
15+
-title:Createyour first CI pipeline
16+
url:"/create-ci-pipeline"
1617
-title:Main concepts
1718
url:"/main-concepts"
1819
-title:Entity model

‎_docs/getting-started/getting-started-quickly.md‎

Lines changed: 0 additions & 78 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title:"WIP: Quick start"
3+
description:""
4+
group:getting-started
5+
toc:true
6+
---
7+
8+
Check out our quick start tutorial to get up and running in CSDP (Codefresh Software Development Platform). The tutorial guides you through installing the runtime, working with the demo pipeline to trigger an event, and creating a basic CI pipeline.
9+
10+
1.[Verify runtime requirements]({{site.baseurl}}/docs/getting-started/quick-start/verify-requirements)
11+
Verify your environment matches the requirements for CSDP runtime installation.
12+
1.[Install runtime]({{site.baseurl}}/docs/getting-started/quick-start-runtime)
13+
Install the CSDP runtime by downloading the CLI, installing the runtime, and validate successful installation in the CSDP UI.
14+
1.[Trigger the Hello World example pipeline]({{site.baseurl}}/docs/getting-started/quick-start/hello-world)
15+
Configure the Git event to trigger the demo pipeline.
16+
1.[Create a basic CI pipeline]({{site.baseurl}}/docs/getting-started/quick-start/create-ci-pipeline)
17+
Create a new CI pipeline via Git and in the CSDP UI.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
title:"WIP: 4. Create a basic CI pipeline"
3+
description:""
4+
group:getting-started
5+
sub-group:quick-start
6+
toc:true
7+
---
8+
9+
Now that you have configured and run the Hello World demo pipeline, let's create a more advanced pipeline.
10+
11+
You will create a basic CI pipeline, via Git, and from the CSDP UI, that:
12+
13+
* Clones a Git repository
14+
* Builds a docker image using`kaniko`
15+
* Pushes the built image to Docker Hub
16+
* Sends the image information to CSDP
17+
* Runs an example testing step
18+
19+
Some tasks are common to both methods of creating pipelines.
20+
21+
###Create a Personal Access Token (PAT)
22+
Required for: Git and CSDP UI.
23+
24+
Create your personal token with a valid expiration date and scope.
25+
26+
For CSDP pipelines, you need`repo` and`admin-repo.hook`:
27+
{% include
28+
image.html
29+
lightbox="true"
30+
file="/images/getting-started/quick-start/quick-start-git-event-permissions.png"
31+
url="/images/getting-started/quick-start/quick-start-git-event-permissions.png"
32+
alt="GitHub PAT permissions for CI pipeline"
33+
caption="GitHub PAT permissions for CI pipeline"
34+
max-width="30%"
35+
%}
36+
37+
38+
39+
1. Create a PAT.
40+
1. Create a new file`github_access.yaml`.
41+
1. Paste the content into the file:
42+
```yaml
43+
apiVersion:v1
44+
kind:Secret
45+
metadata:
46+
name:github-access
47+
type:Opaque
48+
data:
49+
token:<paste-your-pat-token-here>
50+
```
51+
1. Replace the placeholder for the`token` field value with your PAT token.
52+
1. Save and apply the file to your cluster:
53+
54+
`kubectl apply -n <csdp-runtime-namespace> -f github_access.yaml`
55+
where:
56+
`<csdp-runtime-namespace>`is the namespace created during runtime installation.
57+
1. Open `workflow-template.ci-simple.yaml`, and update the `value` for `GIT_TOKEN_SECRET`:
58+
```yaml
59+
...
60+
name: GIT_TOKEN_SECRET
61+
value: <paste-your-pat-token-here>
62+
...
63+
```
64+
### Git: Create CI pipeline
65+
66+
#### Download and commit CI pipeline resource files
67+
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.
68+
69+
1. Download the following resource files:
70+
* Github-ci EventSource (`event-source.git-ci-source.yaml`). Download
71+
* Express-ci Sensor (`sensor.express-ci.yaml`). Download
72+
* 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.
74+
CSDP syncs these resource definitions to your cluster, and create the resources in the cluster.
75+
1. In the CSDP UI, view the newly created pipeline in [Pipelines]((https://g.codefresh.io/2.0/pipelines){:target="\_blank"}).
76+
77+
78+
79+
80+
#### Set up `dockerconfig.json`
81+
TBD
82+
83+
#### Configure pipeline with demo micro service application
84+
85+
1. Fork the repository:??
86+
2. Update the event source to listen to events from the forked repository.
87+
* Open `eventSource.git-ci-source.yaml`.
88+
* In line **22**, update `names` and `owner` for `repositories`:
89+
For `names`, verify that `express-microservice`, the name of the forked demo service is displayed.
90+
For `owner`, add your GitHub username.
91+
92+
```yaml
93+
...
94+
repositories:
95+
- names:
96+
- express-microservice
97+
owner: <github-user-name>
98+
...
99+
```
100+
* In line **32**, paste the public URL with access to your cluster to enable the Webhook.
101+
102+
> Remember not to add the trailing `/`.
103+
104+
```yaml
105+
...
106+
webhook:
107+
url: <your-public-url>
108+
...
109+
```
110+
1. Commit the file.
111+
1. Confirm the file has been updated:
112+
* In the CSDP UI, go to [Pipelines]((https://g.codefresh.io/2.0/pipelines){:target="\_blank"}).
113+
* Select the **Manifests** tab, and then select the `eventsource` resource. It may take a few seconds to update.
114+
* Verify that you see your changes.
115+
1. On the toolbar, select open the Notifications on sync event start and completion.
116+
117+
118+
#### Trigger an event for the CI pipeline
119+
To complete the CI pipeline, trigger an event that runs the pipeline.
120+
121+
1. Update the `readme.md` file in the root of the Git repo and commit the changes.
122+
1. Now navigate to the simple-ci pipeline and see that new workflow has been created.
123+
1. Click on the workflow to view it’s execution details.
124+
This pipeline:
125+
* Clones the `express-microserivce` repo
126+
* Builds the image
127+
* Pushes the image to your Docker Hub
128+
* Updates CSDP with the image information
129+
1. In the CSDP UI, go to Images to view the image.
130+
131+
132+
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title:"WIP: 3. Trigger the Hello World example pipeline"
3+
description:""
4+
group:getting-started
5+
sub-group:quick-start
6+
toc:true
7+
---
8+
9+
Now that you have successfully installed the CSDP runtime, you can trigger one of the Hello World demo pipelines included in the runtime package.
10+
The two Hello World example pipelines are triggered by different event conditions:
11+
* Git (GitHub) event
12+
* Calendar (cron) event
13+
14+
Let's focus for now on the`github/hello-world` pipeline.
15+
16+
###View pipelines
17+
View the pipelines in CSDP.
18+
1. In the CSDP UI, go to[Pipelines]((https://g.codefresh.io/2.0/pipelines){:target="\_blank"}).
19+
20+
{% include
21+
image.html
22+
lightbox="true"
23+
file="/images/getting-started/quick-start/quick-start-pipelines.png"
24+
url="/images/getting-started/quick-start/quick-start-pipelines.png"
25+
alt="Demo pipelines in the Pipelines page"
26+
caption="Demo pipelines in the Pipelines page"
27+
max-width="30%"
28+
%}
29+
30+
* The`githb/hello-world` pipeline has not been triggered as it requires a Git event to trigger it.
31+
* The`cron/hello-world` pipeline shows statistics as it has already been triggered based on the`cron` interval.
32+
33+
###View and update manifest
34+
Because we don't have a workflow for this pipeline, you will configure the git Source resource in the pipeline's**Manifest**.
35+
1. To drill down, select the pipeline name.
36+
1. Select the**Manifest** tab, and click the arrowhead to expand the resource view.
37+
38+
{% include
39+
image.html
40+
lightbox="true"
41+
file="/images/getting-started/quick-start/quick-start-manifest-expand.png"
42+
url="/images/getting-started/quick-start/quick-start-manifest-expand.png"
43+
alt="Expand resource view in Mainfests tab"
44+
caption="Expand resource view in Mainfests tab"
45+
max-width="30%"
46+
%}
47+
48+
You can see these resources:
49+
50+
* Event Source (`event-source.git-source.yaml`)
51+
* Sensor (`sensor.git-source.yaml`)
52+
* Workflow Template (`workflow-template.hellow-world.yaml`)
53+
54+
55+
>The pipeline is configured to run on a`PUSH` event in the Git repository.
56+
57+
{:start="3"}
58+
1. Update the public URL for the Webhook event:
59+
* From the expanded resource manifest, select`event-source.git-source.yaml`.
60+
* Select**Edit** and scroll to**line 29** in the resource file.
61+
* Replace the placeholder with a valid URL to which to send Webhooks and can be accessed by the cluster.
62+
* Select**Commit** to commit your changes.
63+
64+
{% include
65+
image.html
66+
lightbox="true"
67+
file="/images/getting-started/quick-start/quick-start-git-source-manifest-edit.png"
68+
url="/images/getting-started/quick-start/quick-start-git-source-manifest-edit.png"
69+
alt="Edit`event-source.git-source.yaml` in Manifests tab"
70+
caption="Edit`event-source.git-source.yaml` in Manifests tab"
71+
max-width="30%"
72+
%}
73+
74+
CSDP does the following:
75+
* Commits the changes to your Git repository.
76+
* Synchronizes the changes in Git back to your cluster, and updates the`event-source.git-source` resource.
77+
* Triggers this pipeline after the`PUSH` event to your repository.
78+
* Creates a workflow. View it in the CSDP UI, in the[Workflows]((https://g.codefresh.io/2.0/workflows){:target="\_blank"}) dashboard.
79+
Select view workflow details to see the workflow log.
80+
81+
###What to do next
82+
[Create a basic CI pipeline]({{site.baseurl}}/docs/getting-started/quick-start/create-ci-pipeline)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp