Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Feb 8, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

This adds a new derivation to build statically linked binaries for
arm64.

Which issue(s) this PR fixes:

Refers to #4551

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Added arm64 variant to static binary bundle. The bundle is now available via the URL
`https://storage.googleapis.com/k8s-conform-cri-o/artifacts/cri-o.$ARCH.$VERSION.tar.gz`,
where `$ARCH` can be `amd64` or `arm64` and `$VERSION` a tag or full length git SHA.
Beside that, we provide a new installation script
`curl https://raw.githubusercontent.com/cri-o/cri-o/master/scripts/get | bash`.
For this script, it is also possible to pass the architecture and version as arguments:
`get [amd64|arm64] [VERSION|SHA]`.
The static binary bundle now uses crun as default container runtime for CRI-O.

@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Feb 8, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2021
@saschagrunert
Copy link
Member Author

Works ✔️

There is a slack conversation ongoing where we could do some manual external testing: https://kubernetes.slack.com/archives/CAZH62UR1/p1612626775090600

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 8, 2021
@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #4552 (65d2410) into master (8d2de74) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4552   +/-   ##
=======================================
  Coverage   40.53%   40.53%           
=======================================
  Files         115      115           
  Lines        9442     9442           
=======================================
  Hits         3827     3827           
  Misses       5182     5182           
  Partials      433      433           

@saschagrunert
Copy link
Member Author

I have to update the PR once crun 0.18 is available: containers/crun#604

@saschagrunert saschagrunert changed the title Add arm64 static build to GitHub actions Add arm64 static build to GitHub actions and bundle Feb 18, 2021
@saschagrunert
Copy link
Member Author

/retest

@saschagrunert saschagrunert force-pushed the arm-static branch 5 times, most recently from 2037067 to 58014de Compare February 18, 2021 14:11
@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests

@openshift-ci-robot
Copy link

@harche: GitHub didn't allow me to request PR reviews from the following users: odinuge.

Note that only cri-o members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

Cool.

/cc @odinuge

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

README.md Outdated

```shell
> curl -f https://storage.googleapis.com/k8s-conform-cri-o/artifacts/crio-$(git ls-remote https://github.com/cri-o/cri-o master | cut -c1-9).tar.gz -o crio.tar.gz
> curl https://raw.githubusercontent.com/cri-o/cri-o/master/get | bash
Copy link
Contributor

Choose a reason for hiding this comment

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

The url mentioned in #4587 (comment) is still valid right? Because that's what I am using in kubernetes/test-infra#20898

Would it be a good idea to have a complete URL, say as an example only for amd64, mentioned here? Just for someone who might not want to pipe a script from web into bash or someone like me who end up using complete URL in a systemd service file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that still applies. I changed the README.md to mention that URL path, too. But we have to be aware that this could cause a race (CI not finished or failed) in comparison to the script which will always succeed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, ok, then in my case, I will change the systemd service file to first download the script and execute it locally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this is way more safe and decouples our CI from the consumer of the script.

Copy link
Contributor

@harche harche Feb 19, 2021

Choose a reason for hiding this comment

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

Thanks. I was wondering, if it's possible to keep the old url around for sometime. It would take me sometime to get this tested and added in test-infra. Until then the periodic job, will keep failing :(

Just checking if it's possible, hate to see the prow dashboard in red :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I really like this approach @saschagrunert! The old one was kinda fragile, so thanks!

Copy link
Contributor

@harche harche left a comment

Choose a reason for hiding this comment

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

Looks cool @saschagrunert. Just a couple of queries, but otherwise LGTM. :)

@saschagrunert
Copy link
Member Author

Looks cool @saschagrunert. Just a couple of queries, but otherwise LGTM. :)

Thank you! Please also note:

The static binary bundle now uses crun as default container runtime for CRI-O.

get Outdated
#!/usr/bin/env bash
set -euo pipefail

ARCH=${1:-amd64}
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to just default to empty, and use uname to detec the correct arch.

$ uname -m #x86
x86_64 
$ uname -m #arm64 
aarch64

Copy link
Member Author

Choose a reason for hiding this comment

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

I reworked the script to now accept parsed CLI arguments as well as a help output. We now fallback to uname -m (converted to amd64/arm64), too. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome!! 😄

README.md Outdated

```shell
> curl -f https://storage.googleapis.com/k8s-conform-cri-o/artifacts/crio-$(git ls-remote https://github.com/cri-o/cri-o master | cut -c1-9).tar.gz -o crio.tar.gz
> curl https://raw.githubusercontent.com/cri-o/cri-o/master/get | bash
Copy link
Contributor

Choose a reason for hiding this comment

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

I really like this approach @saschagrunert! The old one was kinda fragile, so thanks!

@saschagrunert saschagrunert force-pushed the arm-static branch 3 times, most recently from 668c772 to d6f6b5a Compare February 19, 2021 10:42
@saschagrunert
Copy link
Member Author

/test kata-containers

@saschagrunert
Copy link
Member Author

@haircommander do you think we can get this one in?

@haircommander
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2021
@haircommander
Copy link
Member

haircommander commented Mar 1, 2021

I know I just gave this lgtm, but I've realized I'm hesitant to introduce a script to the top level of the tree

/lgtm cancel

can we move it to the scripts/ directory? or is there a reason to keep it top-level?

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2021
This adds a new derivation to build statically linked binaries for
arm64.

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert
Copy link
Member Author

can we move it to the scripts/ directory? or is there a reason to keep it top-level?

Yes sure, moved the script into the scripts directory. 👍

@haircommander
Copy link
Member

/lgtm

thanks @saschagrunert 😃

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2021
@saschagrunert
Copy link
Member Author

/test integration_fedora

2 similar comments
@saschagrunert
Copy link
Member Author

/test integration_fedora

@saschagrunert
Copy link
Member Author

/test integration_fedora

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 1, 2021

@saschagrunert: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic 4ff8662 link /test e2e-agnostic
ci/openshift-jenkins/integration_crun_cgroupv2 4ff8662 link /test integration_cgroupv2
ci/prow/e2e-gcp 4ff8662 link /test e2e-gcp

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@saschagrunert
Copy link
Member Author

/test kata-containers

@openshift-merge-robot openshift-merge-robot merged commit c49f180 into cri-o:master Mar 1, 2021
@saschagrunert saschagrunert deleted the arm-static branch March 1, 2021 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants