Skip to content

Commit 4565d62

Browse files
committed
Update readme, explain the different examples.
1 parent 56e967d commit 4565d62

File tree

2 files changed

+60
-65
lines changed

2 files changed

+60
-65
lines changed

Diff for: README.md

+49-65
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,62 @@
11
# 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.
7+
8+
### Clone and Setup NPM Project
9+
```bash
10+
git clone https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci-examples.git
11+
cd aws4embeddedlinux-ci-examples
12+
npm install .
13+
npm run build
14+
```
15+
16+
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+
```
335

436
## 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.
638

739
### 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.
943

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.
1146

12-
#### A slightly modified version using KAS tool instead of repo:
1347
See AWS CodeBuild pipeline: KasPipeline-DemoPipeline*
1448

1549
#### 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.
2251

52+
See AWS CodeBuild pipeline: QemuDemoPipeline-DemoPipeline*
2353

2454
### 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).
2656

27-
See AWS CodeBuild pipeline: PokyAmiPipeline-DemoPipeline*
57+
The pipeline name starts with `PokyAmiPipeline-` in the CodePipeline page.
2858

29-
### Using pre-build, proprietary artifacts in a Pipeline
59+
### Using pre-built, proprietary artifacts in a Pipeline
3060

3161
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.
3262

@@ -50,57 +80,7 @@ See AWS CodeBuild pipeline: RenesasPipeline-DemoPipeline*
5080

5181
##
5282

53-
## How to get started?
54-
55-
### clone repo
56-
```bash
57-
git clone https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci-examples.git
58-
```
59-
60-
### install npm packages:
61-
62-
```bash
63-
cd aws4embeddedlinux-ci-examples
64-
npm install .
65-
```
66-
67-
### updating
68-
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
10484

10585
- `npm run build` compile typescript to js
10686
- `npm run watch` watch for changes and compile
@@ -115,6 +95,10 @@ Project Specific:
11595
- `npm run check` checks for lint and format issues
11696
- `npm run docs` to generate documentation
11797

98+
## Security
99+
100+
See [SECURITY](SECURITY.md) for more information.
101+
118102
## Contributing
119103

120104
See [CONTRIBUTING](CONTRIBUTING.md) for more information.

Diff for: SECURITY.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Reporting Security Issues
2+
3+
We take all security reports seriously.
4+
When we receive such reports,
5+
we will investigate and subsequently address
6+
any potential vulnerabilities as quickly as possible.
7+
If you discover a potential security issue in this project,
8+
please notify AWS/Amazon Security via our
9+
[vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/)
10+
or directly via email to [AWS Security](mailto:[email protected]).
11+
Please do *not* create a public GitHub issue in this project.

0 commit comments

Comments
 (0)