aws4embeddedlinux / meta-aws-ci Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The folder is required to build the docker container that is used to build images:
https://github.com/aws/meta-aws-ci/blob/master/buildspec/ci_image.yml#L13
Also, the customised Dockerfile has Yocto-specific modifications:
https://github.com/aws/meta-aws-ci/blob/51436380ede729b62d68c966a4acff3f9c3a05e5/ci_image/Dockerfile#L183
The README defined cdk to be under core. Please move cdk to under core.
Since this is greengrass specific, ideally rename to core/cdk-greengrass
.
It seems that my account is hitting a limit on the number of running vCPUs. The reference implementation uses the largest instance available (145 GB , 72 vCPUs). Using a smaller instance allows me to build the project.
Suggested modifications to: ‘cdk/lib/stacks/yocto-image-builder-stack.ts’ so that the process will not fail on accounts which may be hitting a limit.
...
import { Construct, SecretValue, Stack, StackProps, RemovalPolicy, Duration } from '@aws-cdk/core';
...
const buildProject = new codebuild.PipelineProject(this, `YoctoBuild-${machineType}-${projectType}-${yoctoProjectRelease}`, {
...
timeout: Duration.hours(8)
...
environment: {
...
computeType: codebuild.ComputeType.LARGE,
...
},
...
});
The issue goes away when I manually add the permission “ec2:DescribeAvailabilityZones” to the ” IAM role that starts with ‘GreengrassDeviceImageBuil-PipelineBuildSynthCdk’
There is some information about similar behaviour here:
The default package.json uses "^1.96.0" for the AWS CDK packages, in my case resolved to the latest: 1.117.0.
By forcing packages.json to use a specific (older) version of the AWS CDK like “1.111.0" avoided the error.
Latest action execution message
Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: K1Q3JQ7GZH2CY678; S3 Extended Request ID: JBwOCgs0/uA0C2ha4z3M0nBVAYaHiYD7UeEkW/pxdJFwnQggNktk+B332tSm9evUQjXxt5HzW8w=; Proxy: null)
Contents of the assumed role:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
Example: Setting dependencies to use a specific version - ‘cdk/packages.json’
{
...
"dependencies": {
"@aws-cdk/aws-codebuild": "1.111.0",
"@aws-cdk/aws-codecommit": "1.111.0",
"@aws-cdk/aws-codepipeline": "1.111.0",
"@aws-cdk/aws-codepipeline-actions": "1.111.0",
"@aws-cdk/aws-efs": "1.111.0",
"@aws-cdk/aws-iam": "1.111.0",
"@aws-cdk/aws-s3": "1.111.0",
"@aws-cdk/core": "1.111.0",
"@aws-cdk/pipelines": "1.111.0",
"source-map-support": "^0.5.16"
}
...
}
In "Step 3 - Integrate layers and your application layer" where there's the clone of the repositories step, yocto's meta-java still doesn't have a hardknott branch ( https://git.yoctoproject.org/cgit/cgit.cgi/meta-java/refs/ ).
It works, but it is currently referencing a master's specific commit.
Reference: https://github.com/aws/meta-aws-ci/blob/master/workshop/content/03_modules/01_hello_yocto/_index.md#step-3---integrate-layers-and-your-application-layer
To-do: fix as soon as they create the branch
Error logs from CodeBuild
[Container] 2021/08/09 20:39:45 Running command git config --global user.email "[email protected]"
43 |
44 | [Container] 2021/08/09 20:39:45 Phase complete: PRE_BUILD State: SUCCEEDED
45 | [Container] 2021/08/09 20:39:45 Phase context status code: Message:
46 | [Container] 2021/08/09 20:39:45 Entering phase BUILD
47 | [Container] 2021/08/09 20:39:45 Running command curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/repo
48 | % Total % Received % Xferd Average Speed Time Time Time Current
49 | Dload Upload Total Spent Left Speed
50 |
51 | 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
52 | 100 44704 100 44704 0 0 1984k 0 --:--:-- --:--:-- --:--:-- 1984k
53 |
54 | [Container] 2021/08/09 20:39:45 Running command chmod +x $HOME/repo
55 |
56 | [Container] 2021/08/09 20:39:45 Running command mkdir $HOME/dist
57 |
58 | [Container] 2021/08/09 20:39:45 Running command cd $HOME/dist
59 |
60 | [Container] 2021/08/09 20:39:45 Running command $HOME/repo init -u https://github.com/aws-samples/meta-aws-demos -m raspberrypi4-64/aws-iot-greengrass-v2/hardknott/repo.xml
61 | Downloading manifest from https://github.com/aws-samples/meta-aws-demos
62 | fatal: manifest 'raspberrypi4-64/aws-iot-greengrass-v2/hardknott/repo.xml' not available
63 | fatal: manifest raspberrypi4-64/aws-iot-greengrass-v2/hardknott/repo.xml not found
64
<br class="Apple-interchange-newline">
Files that need to be reviewed:
Reference file that works ok:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.