Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023 11 21 doc + rename EmbeddedLinuxPipeline #53

Merged
merged 7 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cdk init app --language typescript
```
2. Add the cdk library with `npm install aws4embeddedlinux/aws4embeddedlinux-ci`
3. Create your application using the library. Refer to the [API Documentation](https://aws4embeddedlinux.github.io/aws4embeddedlinux-ci) and the [Examples](github.com/aws4embeddedlinux/aws4embeddedlinux-ci-examples) for more details.
4. Deploy your application using `cdk deploy`.
4. Deploy your application using `cdk deploy --require-approval never`.
5. After the application is deployed, the 'Build Image' Pipeline needs to be run. This will create an Ubuntu based container for building Yocto. This container is used by the other pipelines. If the other pipelines are run before this container is created and pushed to [ECR](https://aws.amazon.com/ecr/), they will fail. This Build Image Pipeline will run weekly by default to keep this container patched.
6. Now the application pipeline is able to be run. This will push contents of the Yocto deploy directory into S3.

Expand All @@ -33,18 +33,19 @@ You can use [`npm link`](https://docs.npmjs.com/cli/v10/commands/npm-link) to de

### In this library repo:
```bash
$ npm link
$ cd your-project
npm install
```

### In your-project folder:
```bash
$ npm link aws4embeddedlinux-ci
npm install
npm link ../aws4embeddedlinux-ci
```

This will link through the system `node_modules` install. When using a system node install on Linux, this can require sudo access. To avoid this, use a [node version manager](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm#using-a-node-version-manager-to-install-nodejs-and-npm) or [set a node prefix](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).


## Known issues
- Windows is not supported currently

## Security

Expand Down
18 changes: 9 additions & 9 deletions lib/demo-pipeline.ts → lib/embedded-linux-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { RemovalPolicy } from 'aws-cdk-lib';
/**
* Properties to allow customizing the build.
*/
export interface DemoPipelineProps extends cdk.StackProps {
export interface EmbeddedLinuxPipelineProps extends cdk.StackProps {
/** ECR Repository where the Build Host Image resides. */
readonly imageRepo: IRepository;
/** Tag for the Build Host Image */
Expand All @@ -53,8 +53,8 @@ export interface DemoPipelineProps extends cdk.StackProps {
/**
* The stack demonstrating how to build a pipeline for meta-aws-demos
*/
export class DemoPipelineStack extends cdk.Stack {
constructor(scope: Construct, id: string, props: DemoPipelineProps) {
export class EmbeddedLinuxPipelineStack extends cdk.Stack {
constructor(scope: Construct, id: string, props: EmbeddedLinuxPipelineProps) {
super(scope, id, props);

/** Set up networking access and EFS FileSystems. */
Expand Down Expand Up @@ -96,7 +96,7 @@ export class DemoPipelineStack extends cdk.Stack {
}
);

outputBucket = new VMImportBucket(this, 'DemoArtifact', {
outputBucket = new VMImportBucket(this, 'PipelineOutput', {
versioned: true,
enforceSSL: true,
encryptionKey: outputBucketEncryptionKey,
Expand Down Expand Up @@ -157,7 +157,7 @@ export class DemoPipelineStack extends cdk.Stack {
codeBuildCloneOutput: true,
});

const project = new PipelineProject(this, 'DemoBuildProject', {
const project = new PipelineProject(this, 'EmbeddedLinuxBuildProject', {
buildSpec: BuildSpec.fromSourceFilename('build.buildspec.yml'),
environment: {
computeType: ComputeType.X2_LARGE,
Expand Down Expand Up @@ -223,13 +223,13 @@ export class DemoPipelineStack extends cdk.Stack {
const buildOutput = new codepipeline.Artifact();
const buildAction = new codepipeline_actions.CodeBuildAction({
input: sourceOutput,
actionName: 'Demo-Build',
actionName: 'Build',
outputs: [buildOutput],
project,
});

const artifactAction = new codepipeline_actions.S3DeployAction({
actionName: 'Demo-Artifact',
actionName: 'Artifact',
input: buildOutput,
bucket: outputBucket,
});
Expand Down Expand Up @@ -284,7 +284,7 @@ def handler(event, context):
);

/** Now create the actual Pipeline */
const pipeline = new codepipeline.Pipeline(this, 'DemoPipeline', {
const pipeline = new codepipeline.Pipeline(this, 'EmbeddedLinuxPipeline', {
artifactBucket,
restartExecutionOnUpdate: true,
stages: [
Expand Down Expand Up @@ -338,7 +338,7 @@ def handler(event, context):
vpc: IVpc,
securityGroup: ISecurityGroup
): string {
const fs = new efs.FileSystem(this, `DemoPipeline${name}Filesystem`, {
const fs = new efs.FileSystem(this, `EmbeddedLinuxPipeline${name}Filesystem`, {
vpc,
removalPolicy: cdk.RemovalPolicy.DESTROY,
});
Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export * from './network';
export * from './build-image-data';
export * from './build-image-repo';
export * from './build-image-pipeline';
export * from './demo-pipeline';
export * from './embedded-linux-pipeline';
export * from './constructs/source-repo';
Loading
Loading