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

[1.1] Build rocksdb and arm images in amd64 hosts #5987

Conversation

darobs
Copy link
Contributor

@darobs darobs commented Jan 12, 2022

cherry pick into 1.1 for #5954
When this project was started, we used base images to run some commands in the native execution environment (for example: create a user in the container). Now with cross-platform docker builds, we can use runtime emulation to do this work, and not maintain the base images.

We also had an inconsistent way to house the RocksDB library files. This PR builds the libraries in parallel with the project executables, and collects the libraries with the other artifacts for the image build to use. I also updated the container images build to ubuntu 20.04 to remove all references to qemu-static container.

This PR reduces (but does not completely eliminate) dependency on docker hub for the project.

Tested by running E2E tests on images built on the PR branch.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • I have read the contribution guidelines.
  • Title of the pull request is clear and informative.
  • Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • concise summary of tests added/modified
    • local testing done.

cherry pick into 1.2 for Azure#5947 and Azure#5950.
When this project was started, we used base images to run some commands in the native execution environment (for example: create a user in the container). Now with cross-platform docker builds, we can use runtime emulation to do this work, and not maintain the base images.

We also had an inconsistent way to house the RocksDB library files. This PR builds the libraries in parallel with the project executables, and collects the libraries with the other artifacts for the image build to use. I also updated the container images build to ubuntu 20.04 to remove all references to qemu-static container.

This PR reduces (but does not completely eliminate) dependency on docker hub for the project.

Tested by running E2E tests on images built on the PR branch.

This checklist is used to make sure that common guidelines for a pull request are followed.
- [x] I have read the [contribution guidelines](https://github.com/azure/iotedge#contributing).
- [x] Title of the pull request is clear and informative.
- [x] Description of the pull request includes a concise summary of the enhancement or bug fix.
- [x] Pull request includes test coverage for the included changes.
- Description of the pull request includes
	- [x] concise summary of tests added/modified
	- [ ] local testing done.
- Open the PR in `Draft` mode if it is:
	- Work in progress or not intended to be merged.
	- Encountering multiple pipeline failures and working on fixes.

_Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned [here](https://chris.beams.io/posts/git-commit/#:~:text=The%20seven%20rules%20of%20a%20great%20Git%20commit,what%20and%20why%20vs.%20how%20For%20example%3A%20) for the PR title and description_

1.2 build is slightly different, need to get published RocksDb files

Place rocksdb lib in a directory.

Make sure destination and source are the same.

no consolidated artifacts in 1.1

Processing buildx args got lost in the merge.

Update to 20.04 for build image stage.
@darobs darobs force-pushed the origin/darobs/build-arm-rocksdb-in-amd64-hosts-1.1 branch from 8b22346 to 942e1b0 Compare January 15, 2022 01:16
@darobs darobs marked this pull request as ready for review January 15, 2022 01:18
@darobs darobs changed the title Origin/darobs/build arm rocksdb in amd64 hosts 1.1 [1.2] Build rocksdb and arm images in amd64 hosts Jan 15, 2022
@darobs darobs changed the title [1.2] Build rocksdb and arm images in amd64 hosts [1.1] Build rocksdb and arm images in amd64 hosts Jan 15, 2022
@yophilav
Copy link
Contributor

Please don't forget to remove edge-modules/SimulatedTemperatureSensor/docker/linux/arm64v8/base/Dockerfile and update the edge-modules/SimulatedTemperatureSensor/docker/linux/arm64v8/Dockerfile. Thank you!

gauravIoTEdge
gauravIoTEdge previously approved these changes Jan 18, 2022
builds/misc/images-release.yaml Outdated Show resolved Hide resolved
@darobs darobs merged commit 5a793bf into Azure:release/1.1 Jan 20, 2022
@darobs darobs deleted the origin/darobs/build-arm-rocksdb-in-amd64-hosts-1.1 branch January 20, 2022 01:48
kodiakhq bot pushed a commit that referenced this pull request Jan 21, 2022
Per #5987, the build pipelines should be updated to be using Ubuntu20.04 to keep OS dependency consistence.

## Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

### General Guidelines and Best Practices
- [x] I have read the [contribution guidelines](https://github.com/azure/iotedge#contributing).
- [x] Title of the pull request is clear and informative.
- [x] Description of the pull request includes a concise summary of the enhancement or bug fix.

### Testing Guidelines
- [x] Pull request includes test coverage for the included changes.
- Description of the pull request includes 
	- [x] concise summary of tests added/modified
	- [x] local testing done.  

### Draft PRs
- Open the PR in `Draft` mode if it is:
	- Work in progress or not intended to be merged.
	- Encountering multiple pipeline failures and working on fixes.

_Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned [here](https://chris.beams.io/posts/git-commit/#:~:text=The%20seven%20rules%20of%20a%20great%20Git%20commit,what%20and%20why%20vs.%20how%20For%20example%3A%20) for the PR title and description_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants