You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-65
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,62 @@
1
1
# aws4embeddedlinux-ci-examples
2
-
This repo is a showcase for the capabilities of [aws4embeddedlinux-ci](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci.git) cdk library.
2
+
3
+
## Getting Started
4
+
This repository shows ways to use the [aws4embeddedlinux-ci](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci.git) library.
5
+
6
+
In order to use these examples, you must setup [CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) including installing the CDK tool and bootstrapping the account you wish to deploy to. Additionally, you must have [Node](https://nodejs.org/en/) installed.
Note that while often CDK projects do not require separately invoking the build command, this will ensure various assets in the library are packaged correctly.
17
+
18
+
### Deploying
19
+
20
+
To deploy _all_ the pipeline examples, you can use the CDK deploy command:
21
+
22
+
```bash
23
+
cdk deploy --all
24
+
```
25
+
26
+
The pipelines can be found in the `Developer Tools > Code Pipeline > Pipelines` Console page. The newly created pipeline `ubuntu_22_04BuildImagePipeline` should start automatically. If not, it will need to be run before other pipelines will work correctly. Once it is complete, the DemoPipeline in the CodePipeline console page is ready to run.
27
+
28
+
### Removing Pipelines
29
+
The `cdk destroy` command can be used to remove individual pipelines and their related resources. This can also be done in the CloudFormation Console Page.
30
+
31
+
To remove all the resources associated with this application:
32
+
```bash
33
+
cdk destroy --all
34
+
```
3
35
4
36
## Examples
5
-
After a sucessful setup you will have those example pipelines ready to run.
37
+
Several example pipelines are provided. Each one demonstrates a different aspect of how to build a Yocto image with AWS.
6
38
7
39
### A Simple Poky Based Pipeline
8
-
This example will build a Yocto core-image-minimal based on a manifest.xml using the repo tool. Also enable CVE checking for it.
40
+
This example will build the `core-image-minimal` image from Poky using the repo tool to manage layers. CVE checking is also enabled in the buildspec file.
41
+
42
+
The recommended place to view this is from the `Developer Tools > Code Pipeline > Pipelines` page. The pipeline will start with `PokyPipeline-` followed by some unique identifier. From the pipeline page, you can find the CodeCommit source repository, CodeBuild Project (with build logs), and the S3 bucket that the image is uploaded to at the end.
9
43
10
-
See AWS CodeBuild pipeline: PokyPipeline-DemoPipeline*
44
+
#### Using Kas
45
+
The Kas example shows how to use a [Kas Config](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci/blob/main/source-repo/kas/kas.yml) to manage layers. This tool can help programatically manage layers and config with tighter Yocto integration than Git Submodules or the Repo tool.
11
46
12
-
#### A slightly modified version using KAS tool instead of repo:
13
47
See AWS CodeBuild pipeline: KasPipeline-DemoPipeline*
14
48
15
49
#### A slightly modified version building a qemu pipeline:
16
-
See AWS CodeBuild pipeline: QemuDemoPipeline-DemoPipeline*
17
-
18
-
### A Simple Poky Based Pipeline
19
-
This example will build a Yocto core-image-minimal based on a manifest.xml using the repo tool. Also enable CVE checking for it.
20
-
21
-
See AWS CodeBuild pipeline: PokyPipeline-DemoPipeline*
50
+
This example builds a Qemu based image using [meta-aws-demos](https://github.com/aws4embeddedlinux/meta-aws-demos). The Qemu image can be run in the CodeBuild environment. Using SLIRP networking, [OEQA testing](https://docs.yoctoproject.org/singleindex.html#performing-automated-runtime-testing) such as ptest can be run in the pipeline.
22
51
52
+
See AWS CodeBuild pipeline: QemuDemoPipeline-DemoPipeline*
23
53
24
54
### A Poky Based EC2 AMI Pipeline
25
-
Yocto can be used to create an EC2 AMI. This example demonstrates using this library to create a pipeline which builds an AMI and registers it in your account.
55
+
Yocto can be used to create an EC2 AMI. This example builds an AMI based on Poky and meta-aws and exports it to your AMI registry using the [VM Import/Export Service](https://docs.aws.amazon.com/vm-import/latest/userguide/what-is-vmimport.html).
26
56
27
-
See AWS CodeBuild pipeline: PokyAmiPipeline-DemoPipeline*
57
+
The pipeline name starts with `PokyAmiPipeline-` in the CodePipeline page.
28
58
29
-
### Using pre-build, proprietary artifacts in a Pipeline
59
+
### Using pre-built, proprietary artifacts in a Pipeline
30
60
31
61
This example is based on this [work](https://elinux.org/R-Car/Boards/Yocto-Gen3/v5.9.0) to build an image for Renesas R-Car-H3 Starter Kit Premier (unofficial name - H3ULCB) board including the proprietary graphics and multimedia drivers from Renesas.
32
62
@@ -50,57 +80,7 @@ See AWS CodeBuild pipeline: RenesasPipeline-DemoPipeline*
Only if you had already packages installed before or the aws4embeddedlinux-ci library changed.
69
-
```bash
70
-
npm update
71
-
```
72
-
73
-
### build:
74
-
75
-
```bash
76
-
npm run build
77
-
```
78
-
79
-
### deploy cloud resources for all demo pipelines:
80
-
#### pre-requisites: follow the [cdk guide on bootstrapping](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html#bootstrapping-customizing:~:text=the%20legacy%20bucket.-,Customizing%20bootstrapping,-There%20are%20two) your resources
81
-
82
-
e.g.
83
-
```bash
84
-
cdk bootstrap
85
-
```
86
-
87
-
#### deploy
88
-
89
-
```bash
90
-
cdk deploy --all
91
-
```
92
-
93
-
The newly created pipeline `ubuntu_22_04BuildImagePipeline` from the CodePipeline console will start automatically.
94
-
95
-
After that completes, the DemoPipeline in the CodePipeline console page is ready to run.
96
-
97
-
98
-
### destroy cloud resources for all demo pipelines:
99
-
```bash
100
-
cdk destroy --all
101
-
```
102
-
103
-
## Useful commands
83
+
## Useful NPM and CDK commands
104
84
105
85
-`npm run build` compile typescript to js
106
86
-`npm run watch` watch for changes and compile
@@ -115,6 +95,10 @@ Project Specific:
115
95
-`npm run check` checks for lint and format issues
116
96
-`npm run docs` to generate documentation
117
97
98
+
## Security
99
+
100
+
See [SECURITY](SECURITY.md) for more information.
101
+
118
102
## Contributing
119
103
120
104
See [CONTRIBUTING](CONTRIBUTING.md) for more information.
0 commit comments