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

[enhancement] Add OCB docker image release #671

Merged
merged 18 commits into from
Oct 21, 2024

Conversation

jackgopack4
Copy link
Contributor

@jackgopack4 jackgopack4 commented Sep 20, 2024

Per open-telemetry/opentelemetry-collector#5712, we wish to release a docker image to allow users to more easily build their own custom collectors.

This PR adds a Dockerfile as well as steps in the Github Actions and GoReleaser workflows to build and publish a default ocb image that will allow users to pull the image, mount their local directory (and manifest/builder-config file), and use the binary without worrying about installing dependencies locally.

This docker image also respects environment variables such as GOOS and GOARCH, allowing users to build binaries for different platforms, as well as other commands such as --skip-compilation and --skip-generate

This PR also adds signing to the ocb binaries and docker images, similar to the signing for the distribution docker images/binaries. This should give a "green check" that makes everything look nice and verified.

update-version.yaml workflow was moved to PR #684 Additionally, this PR adds an update-version.yaml Github Action workflow to simplify updating the manifests in this repo as quality of life enhancement for the collector release process. My opentelemetry-collector core PR will update the documentation to add documentation about this as well.

Corresponding PR for documentation update: open-telemetry/opentelemetry-collector#11234

Notably, this PR does not remove any binaries or change any existing user flows, only adds more options to how ocb can be used.

Edit: See the docker images built and pushed automatically to my personal dockerhub repo: https://hub.docker.com/r/johnpeterson785/opentelemetry-collector-builder/tags

As well as a successful release in my repo:
https://github.com/jackgopack4/opentelemetry-collector-releases/releases/tag/cmd%2Fbuilder%2Fv0.108.0

@jackgopack4 jackgopack4 marked this pull request as ready for review September 20, 2024 16:53
@jackgopack4 jackgopack4 requested a review from a team as a code owner September 20, 2024 16:53
@jackgopack4 jackgopack4 marked this pull request as draft September 20, 2024 17:13
bogdandrutu pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Sep 28, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adding documentation for corresponding [PR #671 in
opentelemetry-collector-releases](open-telemetry/opentelemetry-collector-releases#671)

<!-- Issue number if applicable -->
#### Link to tracking issue
Closes #5712 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Github Actions and releases in personal fork,
github.com/jackgopack4/opentelemetry-collector-releases

<!--Describe the documentation added.-->
#### Documentation
updates to cmd/builder/README.md for OCB instructions and
docs/release.md for an automation that I also added in the releases PR
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
@mx-psi
Copy link
Member

mx-psi commented Oct 3, 2024

I originally added release:blocker since it had the bits on #684 but now that they are separate this is not a blocker.

@jackgopack4 jackgopack4 changed the title [feature] Add OCB docker image release [enhancement] Add OCB docker image release Oct 3, 2024
cmd/builder/Dockerfile Outdated Show resolved Hide resolved
cmd/builder/Dockerfile Outdated Show resolved Hide resolved
cmd/builder/Dockerfile Outdated Show resolved Hide resolved
jackgopack4 added a commit to jackgopack4/opentelemetry-collector that referenced this pull request Oct 8, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adding documentation for corresponding [PR open-telemetry#671 in
opentelemetry-collector-releases](open-telemetry/opentelemetry-collector-releases#671)

<!-- Issue number if applicable -->
#### Link to tracking issue
Closes open-telemetry#5712 

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Github Actions and releases in personal fork,
github.com/jackgopack4/opentelemetry-collector-releases

<!--Describe the documentation added.-->
#### Documentation
updates to cmd/builder/README.md for OCB instructions and
docs/release.md for an automation that I also added in the releases PR
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Makefile Show resolved Hide resolved
Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

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

Should this already be part of v0.111.0?
Since its mentioned in the collector release notes:


💡 Enhancements 💡

ocb: create docker images for OCB, per https://github.com/open-telemetry/opentelemetry-collector-releases/pull/671 (https://github.com/open-telemetry/opentelemetry-collector/issues/5712)
Adds standard Docker images for OCB to Dockerhub and GitHub, see hub.docker.com/r/otel/opentelemetry-collector-builder

@jackgopack4
Copy link
Contributor Author

Should this already be part of v0.111.0? Since its mentioned in the collector release notes:

Unfortunately that PR which was supposed to go along with this one got merged prematurely. This is the actual change that will build and push the docker images on scheduled releases.

Copy link
Member

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

Thanks Jack! 🎉 🚀

@mx-psi mx-psi merged commit 226dd5d into open-telemetry:main Oct 21, 2024
48 checks passed
mx-psi pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Oct 21, 2024
…1480)

since
open-telemetry/opentelemetry-collector-releases#671
was merged into releases repository, docker images will be published
starting with ocb version 0.112.0

This reverts commit 8c4cfe5.

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
update documentation for cmd/builder to include docker release
information
<!-- Issue number if applicable -->
#### Link to tracking issue
Relates to
#5712
Documentation for
open-telemetry/opentelemetry-collector-releases#671

<!--Describe what testing was performed and which tests were added.-->
#### Testing
n/a
<!--Describe the documentation added.-->
#### Documentation
README.md and release.md
<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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