Skip to content

Conversation

@estroz
Copy link
Member

@estroz estroz commented Sep 25, 2018

This PR contains documentation outlining how releases will be done, release semantics, and versioning. The release and versioning documentation is a now in final draft form.

Resolves: #166, #476

Note: discussion of PGP key signing process has been moved to #588

@estroz estroz added needs discussion docs do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 25, 2018
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 25, 2018
@robszumski
Copy link
Contributor

This is off to a great start. Brainstorming other topics we might want to cover that are less about the mechanics and more about how it affects an Operator developer:

  • releases will generally support a range of Kubernetes versions. Should we document this? Is there any expectation that we can set?
  • info about taking an existing codebase and adding a new version of the SDK to it. What do you do, in broad strokes?

@AlexNPavel
Copy link
Contributor

@estroz Can you rebase these commits? Due to the way travis works, there's some dependency issues that should be fixed by simply rebasing.

@estroz estroz force-pushed the version-release-doc branch from 3cdb811 to 43e5b24 Compare September 25, 2018 22:29
Copy link
Contributor

@AlexNPavel AlexNPavel left a comment

Choose a reason for hiding this comment

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

Overall, the release process seems pretty reasonable, but we need to make sure we build for all supported platforms, and we should probably automate some of these steps to reduce the chance of mistakes.


## Binaries

Release binaries will be built for the `x86_64` architecture. Binaries will be signed using a maintainers' [PGP key][doc-maintainer-pgp-keys], and signatures will be uploaded to the release along with its accompanying tarball-ed binary. Ensure you import maintainer keys to verify release binaries. Note: `gpg` and `gpg2` can be used interchangeably to sign and verify binaries; substitute `gpg2` for `gpg` below.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we tarballing the binary (and the build directory as a whole)? Most projects I've seen just upload the raw binary as their release (and most exceptions include more than 1 file, such as openshift/origin which also includes a license and readme). Uploading just a raw binary makes it easier to download and use the binary as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense to me.


Creating a release binary tarball:
```bash
$ make build
Copy link
Contributor

Choose a reason for hiding this comment

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

make build just builds the binary for architecture and os of the current machine. We should have a make release function that cross-compiles for all supported platforms (linux and macos x86_64). I built a release for ct last year, which has a pretty well designed release process. This is their makefile (they support many more platforms than us, but still a good reference): https://github.com/coreos/container-linux-config-transpiler/blob/master/Makefile

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah excellent. I wasn't sure which architectures were supported so I assumed only linux x86_64 was. I will make updates to the Makefile.

```bash
$ git tag \
-s "v${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}" \
"$GIT_COMMIT_HASH"
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a lot of different steps to perform to do a release and that leaves a lot of room for error. A script might make sense to help simplify this. As I mentioned in an above comment, ct has a pretty nice release process. They have a script that does various checks, creates and verifies a signed tag, and then runs make release. I feel that this would work well for our release process as well: https://github.com/coreos/container-linux-config-transpiler/blob/master/release.sh

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 fully agree. I'll take a look at that script and make adaptions.

@AlexNPavel
Copy link
Contributor

Something I forgot to mention in my first lookthrough of this: we need to update the version we are pointing to in pkg/generator/templates.go and update the version in version.go. See PR #457.

Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

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

In general lgtm, but agree with @AlexNPavel it should be more automated.

$ make build
```

Creating a release tarball:
Copy link
Member

Choose a reason for hiding this comment

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

Can we automate the following parts as well, we could have a script that does all these steps for us. You could pass in the needed args but it should be possible to automate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done as per @AlexNPavel 's comments.

@lilic
Copy link
Member

lilic commented Sep 26, 2018

releases will generally support a range of Kubernetes versions. Should we document this? Is there any expectation that we can set?

We should just document the minimum supported version of Kubernetes, which is already documented in https://github.com/operator-framework/operator-sdk#prerequisites, don't think it needs to be in the release notes as well.


Making an Operator SDK release involves:
- Tagging and signing a git commit and pushing the tag to GitHub.
- Building a release binary, signing the binary, and uploading both binary and signature to GitHub.
Copy link
Member

Choose a reason for hiding this comment

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

As part of this, I would like to see discussion about releasing ansible operator base image and helm operator along with the binary.

I think that we should start thinking about all of these things as 1 project and not separate entities with their own release timelines or procedures.

In this case, I believe that a tagged version of the ansible-operator base image (and maybe the binary as well?) should be built, and pushed to a shared quay.io repo. I would like this to happen at the exact same time that operator-sdk release is happening.

I believe the helm-operator should have a published binary and base-image. I don't know enough about how it is expected to be used to comment much further.

Copy link
Member Author

Choose a reason for hiding this comment

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

@spahl @AlexNPavel @robszumski can you comment on this? Not sure if ansible image packaging has been discussed outside of this PR. This suggestion sounds reasonable to me but needs its own PR.

Copy link
Contributor

@spahl spahl Oct 1, 2018

Choose a reason for hiding this comment

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

We should do this in a separate PR. I do agree that it should be tracked and released at the same time. Let's create an issue to not forget.

Copy link
Member Author

Choose a reason for hiding this comment

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

@estroz
Copy link
Member Author

estroz commented Sep 26, 2018

@AlexNPavel I've adopted the release.sh and Makefile targets you linked. Let me know if they look reasonable. Updates were made to the release sections to focus on using release.sh instead of manual command entry.

@AlexNPavel
Copy link
Contributor

When running make install, we now generate a operator sdk that says it was not built properly when you try to get the version, which isn't exactly true; we just built a dirty version. I feel that we should set the version to the git dirty number. Currently, the git describe --dirty shell is failing for me, but adding --tags fixes that. If we then enable LD_FLAGS for make install, we get versions like v0.0.5-307-g1752a92-dirty, which is a more reasonable and descriptive version number for dirty builds.

@estroz estroz force-pushed the version-release-doc branch from 1752a92 to f496a95 Compare September 28, 2018 18:46
@estroz
Copy link
Member Author

estroz commented Oct 1, 2018

@lilic @robszumski noted the location of Kubernetes version info.

Do we want to have a compatibility matrix for the SDK, as suggested in this issue comment?

@estroz estroz changed the title [WIP] Version and release documentation Version and release documentation Oct 1, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 1, 2018

## Binaries and signatures

Binaries will be signed using a maintainers' [PGP key][doc-maintainer-pgp-keys], and signatures will be uploaded to the release along with its accompanying binary. Ensure you import maintainer keys to verify release binaries.
Copy link
Member Author

Choose a reason for hiding this comment

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

Before this PR is merged we need to have a discussion about signing processes and handling maintainer PGP keys.

@estroz estroz added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 2, 2018
Copy link
Member

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

LGTM pending the discussion about signing and handling maintainer PGP keys.

estroz added 14 commits October 9, 2018 18:06
…within project context (in 'build' dir), and .gitignore clause
These Makefile updates allow the SDK to be built for multiple
platforms with one command, 'make release'
….sh' automates everything from building multi-arch to signing
@estroz estroz force-pushed the version-release-doc branch from 82b7bda to 54267d2 Compare October 10, 2018 01:06
@estroz estroz force-pushed the version-release-doc branch from 54267d2 to 8fd7047 Compare October 10, 2018 21:55
Copy link
Contributor

@AlexNPavel AlexNPavel left a comment

Choose a reason for hiding this comment

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

LGTM

@estroz estroz merged commit 913cbf7 into operator-framework:master Oct 11, 2018
@estroz estroz deleted the version-release-doc branch October 11, 2018 17:58
estroz added a commit to estroz/operator-sdk that referenced this pull request Oct 11, 2018
* .gitignore,Makefile: added 'build' Makefile target to build a binary within project context (in 'build' dir), and .gitignore clause

* doc/release-versioning.md: rough draft of release and versioning semantics and mechanics

* Makefile: add mutiple build targets and reformat 'all' make target

* release.sh: tag and build release with a few pre-build checks

* Makefile: added signature make targets to run under release target

* doc/release-versioning.md: revised release process such that 'release.sh' automates everything from building multi-arch to signing

* Makefile: add '--tags' flag when retrieving version so the current tag is retrieved regardless of signature

* Makefile: ensure git and gpg are configured to have the same signing key

* doc/release-versioning.md: document supported k8s versions, architectures, and platforms in their own section

* release.sh,Makefile,pkg/generator/templates.go: check versions before tagging on release
estroz added a commit to estroz/operator-sdk that referenced this pull request Oct 11, 2018
* .gitignore,Makefile: added 'build' Makefile target to build a binary within project context (in 'build' dir), and .gitignore clause

* doc/release-versioning.md: rough draft of release and versioning semantics and mechanics

* Makefile: add mutiple build targets and reformat 'all' make target

* release.sh: tag and build release with a few pre-build checks

* Makefile: added signature make targets to run under release target

* doc/release-versioning.md: revised release process such that 'release.sh' automates everything from building multi-arch to signing

* Makefile: add '--tags' flag when retrieving version so the current tag is retrieved regardless of signature

* Makefile: ensure git and gpg are configured to have the same signing key

* doc/release-versioning.md: document supported k8s versions, architectures, and platforms in their own section

* release.sh,Makefile,pkg/generator/templates.go: check versions before tagging on release
estroz added a commit to estroz/operator-sdk that referenced this pull request Oct 11, 2018
* .gitignore,Makefile: added 'build' Makefile target to build a binary within project context (in 'build' dir), and .gitignore clause

* doc/release-versioning.md: rough draft of release and versioning semantics and mechanics

* Makefile: add mutiple build targets and reformat 'all' make target

* release.sh: tag and build release with a few pre-build checks

* Makefile: added signature make targets to run under release target

* doc/release-versioning.md: revised release process such that 'release.sh' automates everything from building multi-arch to signing

* Makefile: add '--tags' flag when retrieving version so the current tag is retrieved regardless of signature

* Makefile: ensure git and gpg are configured to have the same signing key

* doc/release-versioning.md: document supported k8s versions, architectures, and platforms in their own section

* release.sh,Makefile,pkg/generator/templates.go: check versions before tagging on release
@estroz estroz mentioned this pull request Oct 11, 2018
estroz added a commit that referenced this pull request Oct 12, 2018
* .gitignore,Makefile: added 'build' Makefile target to build a binary within project context (in 'build' dir), and .gitignore clause

* Makefile: add mutiple build targets and reformat 'all' make target

* Makefile: added signature make targets to run under release target

* Makefile: ensure git and gpg are configured to have the same signing key

* doc/release-versioning.md: document supported k8s versions, architectures, and platforms in their own section

* release.sh,Makefile,pkg/generator/templates.go: check versions before tagging on release
shawn-hurley pushed a commit to shawn-hurley/operator-sdk that referenced this pull request Oct 12, 2018
… (operator-framework#604)

* .gitignore,Makefile: added 'build' Makefile target to build a binary within project context (in 'build' dir), and .gitignore clause

* Makefile: add mutiple build targets and reformat 'all' make target

* Makefile: added signature make targets to run under release target

* Makefile: ensure git and gpg are configured to have the same signing key

* doc/release-versioning.md: document supported k8s versions, architectures, and platforms in their own section

* release.sh,Makefile,pkg/generator/templates.go: check versions before tagging on release
shawn-hurley pushed a commit that referenced this pull request Oct 16, 2018
* .gitignore,Makefile: added 'build' Makefile target to build a binary within project context (in 'build' dir), and .gitignore clause

* Makefile: add mutiple build targets and reformat 'all' make target

* Makefile: added signature make targets to run under release target

* Makefile: ensure git and gpg are configured to have the same signing key

* doc/release-versioning.md: document supported k8s versions, architectures, and platforms in their own section

* release.sh,Makefile,pkg/generator/templates.go: check versions before tagging on release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs discussion size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants