Skip to content

Conversation

@ammolitor
Copy link
Contributor

  • make release images ALL based from centos:7
  • keep eks images that are based from amazonlinux:2, but create strong alignment with release (centos7) images
  • use multi-stage Dockerfile(s)
  • have a single build-images script
  • remove per image directories (which would only contain scripts that are copied into images)
  • remove empty requirements.txt file for sidecar.py (the pip command, package and version are in the Dockerfile)

Put description here...

Code-Reviewer Section

The general guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • The PR has a description, explaining both the problem and the solution.
  • The description mentions which forms of testing were done and the testing seems reasonable.
  • Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or master if this is the youngest branch)
  • There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

@ammolitor
Copy link
Contributor Author

ammolitor commented Nov 16, 2021

This will fail the linux CI build as the Dockerfile(s) were drastically altered. I'll update the CI builds after this is reviewed and merged.

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for macOS Catalina 10.15

  • CodeBuild project: foundationdb-pr-macos
  • Commit ID: 4e3f1ef
  • Result: FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 4e3f1ef
  • Result: FAILED
  • Error: Error while executing command: docker build --build-arg FDB_WEBSITE=file:///mnt/website --build-arg FDB_VERSION="${FDB_VERSION}" --build-arg FDB_ADDITIONAL_VERSIONS="${FDB_VERSION}" -t foundationdb/foundationdb:${TAG} -f release/Dockerfile .. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for macOS Catalina 10.15

  • CodeBuild project: foundationdb-pr-macos
  • Commit ID: 48bf6ea
  • Result: FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 48bf6ea
  • Result: FAILED
  • Error: Error while executing command: docker build --build-arg FDB_WEBSITE=file:///mnt/website --build-arg FDB_VERSION="${FDB_VERSION}" --build-arg FDB_ADDITIONAL_VERSIONS="${FDB_VERSION}" -t foundationdb/foundationdb:${TAG} -f release/Dockerfile .. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for macOS Catalina 10.15

  • CodeBuild project: foundationdb-pr-macos
  • Commit ID: 230091d
  • Result: FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 230091d
  • Result: FAILED
  • Error: Error while executing command: cd /root/src/${BUILD_DIR}/packages/docker. Reason: exit status 1
  • Build Logs (available for 30 days)

USER fdb
VOLUME /var/input-files
VOLUME /var/output-files
ENV ADDITIONAL_ENV_FILE "/opt/rh/rh-python38/enable"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to enable python38 in a centos7 image.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break when a user injects a different ADDITIONAL_ENV_FILE into that container. If that is required that should be part of the start script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, just pushed a change for this.

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 230091d
  • Result: FAILED
  • Error: Error while executing command: cmake -S . -B ${BUILD_OUTPUT} -D USE_CCACHE=ON -D USE_WERROR=ON -D RocksDB_ROOT=/opt/rocksdb-6.22.1 -D RUN_JUNIT_TESTS=ON -D RUN_JAVA_INTEGRATION_TESTS=ON -G Ninja. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 230091d
  • Result: FAILED
  • Error: Error while executing command: ninja -v -C ${BUILD_OUTPUT} -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 230091d
  • Result: FAILED
  • Error: Error while executing command: xsltproc /opt/ctest2junit.xsl Testing/**/Test.xml > /root/src/junit.xml. Reason: exit status 1
  • Build Logs (available for 30 days)

Copy link
Contributor

@johscheuer johscheuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change the sidecar python env setup. Otherwise the changes LGTM.

USER fdb
VOLUME /var/input-files
VOLUME /var/output-files
ENV ADDITIONAL_ENV_FILE "/opt/rh/rh-python38/enable"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break when a user injects a different ADDITIONAL_ENV_FILE into that container. If that is required that should be part of the start script.

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 963e6f5
  • Result: FAILED
  • Error: Error while executing command: popd. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for macOS Catalina 10.15

  • CodeBuild project: foundationdb-pr-macos
  • Commit ID: e91549b
  • Result: FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: pushd ${BUILD_OUTPUT}/packages/docker. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: mvn -pl --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn site.ycsb:foundationdb-binding -am clean package. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: tar -czf "${CODEBUILD_SRC_DIR}/packaging/docker/website/downloads/${fdb_version}/linux/fdb_${FDB_VERSION}.tar.gz" --directory "${CODEBUILD_SRC_DIR}/packaging/docker/website/downloads/${fdb_version}/linux/bin" .. Reason: exit status 2
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: docker build --label "org.foundationdb.version=${FDB_VERSION}" --label "org.foundationdb.build_date=${BUILD_DATE}" --label "org.foundationdb.commit=${COMMIT_SHA}" --progress plain --build-arg FDB_VERSION="${FDB_VERSION}" --build-arg FDB_LIBRARY_VERSIONS="${FDB_VERSION}" --build-arg FDB_WEBSITE="${FDB_WEBSITE}" --tag foundationdb/foundationdb-base:${FDB_VERSION}-${COMMIT_SHA}-debug --file Dockerfile.eks --target foundationdb-base .. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: docker build --label "org.foundationdb.version=${FDB_VERSION}" --label "org.foundationdb.build_date=${BUILD_DATE}" --label "org.foundationdb.commit=${COMMIT_SHA}" --progress plain --build-arg FDB_VERSION="${FDB_VERSION}" --build-arg FDB_LIBRARY_VERSIONS="${FDB_VERSION}" --build-arg FDB_WEBSITE="${FDB_WEBSITE}" --tag foundationdb/foundationdb-base:${FDB_VERSION}-${COMMIT_SHA}-debug --file Dockerfile.eks --target foundationdb-base .. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: docker build --label "org.foundationdb.version=${FDB_VERSION}" --label "org.foundationdb.build_date=${BUILD_DATE}" --label "org.foundationdb.commit=${COMMIT_SHA}" --progress plain --build-arg FDB_VERSION="${FDB_VERSION}" --build-arg FDB_LIBRARY_VERSIONS="${FDB_VERSION}" --build-arg FDB_WEBSITE="${FDB_WEBSITE}" --tag foundationdb/foundationdb-base:${FDB_VERSION}-${COMMIT_SHA}-debug --file Dockerfile.eks --target foundationdb-base .. Reason: exit status 1
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 6da98dd
  • Result: FAILED
  • Error: Error while executing command: cd /root/src/${BUILD_DIR}/packages/docker. Reason: exit status 1
  • Build Logs (available for 30 days)

@ltsampros ltsampros self-requested a review November 17, 2021 10:26
ltsampros
ltsampros previously approved these changes Nov 17, 2021
johscheuer
johscheuer previously approved these changes Nov 17, 2021
Copy link
Contributor

@johscheuer johscheuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

brownleej
brownleej previously approved these changes Nov 17, 2021
Copy link
Contributor

@brownleej brownleej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- make release images ALL based from centos:7
- keep eks images that are based from amazonlinux:2, but create strong alignment with release (centos7) images
- use multi-stage Dockerfile(s)
- have a single build-images script
- remove per image directories (which would only contain scripts that are copied into images)
- remove empty requirements.txt file for sidecar.py (the pip command, package and version are in the Dockerfile)
- don't copy docker into PROJECT_BINARY_DIR
@ammolitor
Copy link
Contributor Author

CodeBuild has been update to build these changes correctly, merging.

@ammolitor ammolitor dismissed stale reviews from brownleej, johscheuer, and ltsampros via 9e59fda November 17, 2021 23:24
@ammolitor ammolitor merged commit 218a2ce into release-6.3 Nov 17, 2021
@ammolitor ammolitor deleted the docker_refactor branch November 17, 2021 23:25
@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for macOS Catalina 10.15

  • CodeBuild project: foundationdb-pr-macos
  • Commit ID: 9e59fda
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: foundationdb-pr
  • Commit ID: 9e59fda
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

ammolitor added a commit that referenced this pull request Dec 14, 2021
fetch commit_sha from source_code_directory (don't assume we're in the source tree anymore),
allow custom tag (if a parameter is passed in as $1)
update README.md
ammolitor added a commit that referenced this pull request Dec 14, 2021
fetch commit_sha from source_code_directory (don't assume we're in the source tree anymore),
allow custom tag (if a parameter is passed in as $1)
update README.md
ammolitor added a commit that referenced this pull request Dec 15, 2021
fetch commit_sha from source_code_directory (don't assume we're in the source tree anymore),
allow custom tag (if a parameter is passed in as $1)
update README.md
ammolitor added a commit that referenced this pull request Dec 16, 2021
copy packaging/docker to PROJECT_BINARY_DIR (undoing part of #5994),
fetch commit_sha from source_code_directory (don't assume we're in the source tree anymore),
allow custom tag (if a parameter is passed in as $1)
update README.md
ammolitor added a commit that referenced this pull request Dec 16, 2021
copy packaging/docker to PROJECT_BINARY_DIR (undoing part of #5994),
fetch commit_sha from source_code_directory (don't assume we're in the source tree anymore),
allow custom tag (if a parameter is passed in as $1)
update README.md
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.

5 participants