Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

docs: Document release process - tools. #209

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

jcvenegas
Copy link
Member

Document flow to create a release based in the tools
from this repository.

Fixes: #207

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

This is looking pretty good. I learnt a lot, and it looks nicely scripted.
Most feedback is stylistic and wording.
I'm thinking @klynnrif and @intelkevinputnam will have some feedback.

release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved

https://github.com/kata-containers/documentation/blob/master/Release-Checklist.md

In order to simplify the process of do the Release Checklist we have semi-automated most of the process.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/In order to simplify the process of do the Release Checklist/To simplify the Release Checklist process/

release/release.md Outdated Show resolved Hide resolved
```
- OBS account with permissions on /home:katacontainers (https://build.opensuse.org/project/subprojects/home:katacontainers)

- Github permissions to push tags an creates Releases in Kata repositories.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/an creates Releases/and create Releases/

release/release.md Outdated Show resolved Hide resolved
The commands from above will create a github pull request in the Kata projects.
Work with the Kata approvers to verify that the CI works and the PR are merged.

2. Create Github tags
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note - you can use '1' over and over again in a number list and it should sequentially number itself. This helps a lot later on if you need to add or delete an entry, as all entries are labelled '1' in the source.

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 tried but I did not work, I wonder if gihub does not detect for the different paragraphs between list.


```bash
cd ${GOPATH}/src/github.com/kata-containers/packaging/obs-packaging
#./create-pkg-branch.sh ${BRANCH}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the commented out line intentional? If so, please document :-)

Copy link
Member Author

@jcvenegas jcvenegas Feb 5, 2019

Choose a reason for hiding this comment

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

Fixed, yes is optional depending if is a new stable branch.

7. Create release notes.
```bash
cd ${GOPATH}/src/github.com/kata-containers/packaging/release
./runtime-release-notes.sh 1.2.0 1.2.1 > notes.md
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably these version numbers will change ;-) - can we script that with ENV vars, or make a comment note that these need setting appropriately etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree added ENV Var and information about it.

cd ${GOPATH}/src/github.com/kata-containers/packaging/release
./runtime-release-notes.sh 1.2.0 1.2.1 > notes.md
```
Add release notes in github runtime.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this 'add release notes' is not scripted - in which case can we expand it. It also feels like it should have its own number point section ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a hub command to push new release notes.

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together @jcvenegas!

@bergwolf - could you take a look when you are back off holidays as I'm sure you will have input? :)


So lets get started.

## Requeriments
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Typo: "Requirements".

  • I think it would be useful to state somewhere whether it is "safe" to run this process on any machine - does it create all assets, etc in a sub-directory or is it going to modify the entire system? Related to this, are there any particular space requirements for running the process?

  • Testing: Is it possible to do a "test run" / "dry run" of some/all of these steps?

  • Problems: Related to the above, I think it would be worth stating somewhere whether particular steps can be repeated safely or not. Imagine you started running through the process and your machine died / ran of out space / etc. How easy is it to recover from those sorts of issues?

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, it is safe to use in your system, most of the task are done in containers.

  • I'd love to add some tests for the steps, as last release we broken some of this scripts.
  • I have an azure pipeline to create static tarballs from master @chavafg I am not sure if is fine to add it, we depend all our jobs in jenkins, but was really easy to use.
  • Added a note that the steps can be repeated in case something fails, not needed to start over.

release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved
release/release.md Show resolved Hide resolved
Copy link

@klynnrif klynnrif left a comment

Choose a reason for hiding this comment

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

Scrubbed for grammar, structure, and flow. Hopefully I haven't changed the meaning on anything :) Thanks!

@@ -0,0 +1,112 @@
# How to do a Kata Containers Release

Hi if you are reading this document you may also want to create a kata Containers Release.
Copy link

Choose a reason for hiding this comment

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

If you are reading this document, you might want to create a Kata Containers Release.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!


https://github.com/kata-containers/documentation/blob/master/Releases.md

To simply the process of read each release we have created a checklist for it.
Copy link

Choose a reason for hiding this comment

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

My two cents :) Lines 5-9:
The Kata Containers Release Process is defined in the following documents:
https://github.com/kata-containers/documentation/blob/master/Releases.md
To simplify this process, we have created a Release Checklist.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks better and I combined to add markdown links to make more easy to read.


https://github.com/kata-containers/documentation/blob/master/Release-Checklist.md

In order to simplify the process of do the Release Checklist we have semi-automated most of the process.
Copy link

Choose a reason for hiding this comment

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

Adding on to @grahamwhaley's suggestion:
To simplify the Release Checklist process we have automated most of the process.

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!


In order to simplify the process of do the Release Checklist we have semi-automated most of the process.

So lets get started.
Copy link

Choose a reason for hiding this comment

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

I suggest removing this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed :)

- Go (https://golang.org/doc/install#)

- hub (https://github.com/github/hub)
If you are using github 2FA, configure hub manually creating a file `~/.config/hub`
Copy link

Choose a reason for hiding this comment

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

github => GitHub + rewrite: If you use GitHub 2FA, configure the hub manually to create a file ~/.config/hub

PUSH=1 OBS_SUBPROJECT="releases:$(uname -m):${BRANCH}" ./build_from_docker.sh ${NEW_VERSION}
```

7. Create release notes.
Copy link

Choose a reason for hiding this comment

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

Same comment regarding period vs colon here.

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 added colon to all numbered items.

Copy link
Contributor

Choose a reason for hiding this comment

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

side note - in markdown (or github markdown at least), if you label your number list as all '1.'s, then it auto-numbers them - which later makes it easier to insert/delete items. Here is an example...

  1. one
  2. another one
  3. a third one

release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved
@jodh-intel
Copy link
Contributor

Ping @jcvenegas :)

@caoruidong
Copy link
Member

Ping @jcvenegas

@sboeuf
Copy link

sboeuf commented Nov 13, 2018

@jcvenegas what's the status here? Any chance you could rework this PR?

@raravena80
Copy link
Member

@jcvenegas ping (from your weekly Kata herder)

@jodh-intel
Copy link
Contributor

Ping @jcvenegas

@jodh-intel
Copy link
Contributor

🔔 pingle bells, pingle bells... 🔔 @jcvenegas

@jodh-intel
Copy link
Contributor

@jcvenegas - could you tal at applying the review feedback here please?

@jodh-intel jodh-intel added the medium-priority Urgent issue (resolve before unprioritised issues) label Jan 24, 2019
@jodh-intel
Copy link
Contributor

Hi @jcvenegas - please could you tal at the feedback? I think this is an important PR which I'd really like to see landed.

@amshinde
Copy link
Member

ping @jcvenegas

@jcvenegas jcvenegas closed this Feb 5, 2019
@jcvenegas jcvenegas deleted the release-process-md branch February 5, 2019 20:42
@jcvenegas jcvenegas restored the release-process-md branch February 5, 2019 20:44
@jcvenegas jcvenegas reopened this Feb 5, 2019
@jcvenegas jcvenegas force-pushed the release-process-md branch 11 times, most recently from d77ef11 to 0cad671 Compare February 5, 2019 22:16
@jcvenegas
Copy link
Member Author

Very late update, added fixes suggested thanks all, ready for a second review (I promise to fix them in 4 months)

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks for updating @jcvenegas! I've got a few questions. Also, it would be great to get input from @bergwolf when he's back.

- [Go](https://golang.org/doc/install#)

- [hub](https://github.com/github/hub)
If you use GitHub 2FA, configure the hub manually to create a file ~/.config/hub
Copy link
Contributor

Choose a reason for hiding this comment

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

... configure hub by creating file ~/.config/hub:

Since this contains a secret, we should probably recommend users set strict perms on it:

$ chmod 400 ~/.config/hub

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed, I've seen that now supports ask for 2 step code, not needed to do this manually again. I just tested and is working.

```
- OBS account with permissions on /home:katacontainers (https://build.opensuse.org/project/subprojects/home:katacontainers)

- GitHub permissions to push tags and creates Releases in Kata repositories.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to be a github project "owner" for that? I suspect so. Might be worth stating if so.

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 am not sure about it, I think we need a group with push tag permissions, @jodh-intel can we create one for this? lets name it "release" if is possible to limit only to push tags better :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how to create a group that only has tag perms. Anyone else?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure you can. The groups don't have a very fine grained perm setting iirc. The tokens have a finer grain, but still not that fine grained I think.

oauth_token: TOKEN
protocol: https
```
- OBS account with permissions on /home:katacontainers (https://build.opensuse.org/project/subprojects/home:katacontainers)
Copy link
Contributor

Choose a reason for hiding this comment

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

@marcov - is there a way to describe these OBS permissions briefly do you know? I personally find the OBS website pretty difficult to use.

Copy link
Contributor

Choose a reason for hiding this comment

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

$ ./update-repository-version.sh -p shim "$NEW_VERSION" "$BRANCH"
$ ./update-repository-version.sh -p runtime "$NEW_VERSION" "$BRANCH"
$ ./update-repository-version.sh -p osbuilder "$NEW_VERSION" "$BRANCH"
$ ./update-repository-version.sh -p agent "$NEW_VERSION" "$BRANCH"
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the tests repo?

Copy link
Member Author

Choose a reason for hiding this comment

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

We dont have a control VERSION file for some repositories, like tests they are tagged with the version that was used to test kata but not versioned.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a note to make it clear


7. Announce release:

Publish in Slack and Kata mailing list (kata-dev@lists.katacontainers.io) that new release is ready.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remove the mailing list address here and instead add a link to https://github.com/kata-containers/community#join-us? That avoids duplication and also contains the details of the slack channel.

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

release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved

## Release process

The steps described here are safe to repeat more than one time, it is safe to
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd consider making all of this into a multi-bullet note to make it stand out:

Notes::

  • The steps described here are safe to repeat more than once: it is safe to repeat them in case of unexpected issues, and it is not necessary to start from the beginning.
  • It is safe to run this process on any machine. It creates all assets in sub-directories and should not modify the entire system.

- You should configure your GitHub to use your ssh keys (to push to branches). See https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/.
* As an alternative, configure hub to push and fork with https, `git config --global hub.protocol https` (Not tested yet) *

- [Docker](https://docs.docker.com/install/)
Copy link
Contributor

Choose a reason for hiding this comment

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

OOI, why is docker needed to perform a release?

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, some tools use docker to build assets

release/release.md Outdated Show resolved Hide resolved
release/release.md Outdated Show resolved Hide resolved
egernst
egernst previously approved these changes Feb 11, 2019
Copy link
Member

@egernst egernst left a comment

Choose a reason for hiding this comment

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

It looks good to me, and is a great starting point. I imagine the process will continue to be refined, and the docs will need to be updated accordingly. Thanks @jcvenegas

Document flow to create a release based in the tools
from this repository.

Fixes: kata-containers#207

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
@jcvenegas
Copy link
Member Author

/test

@jcvenegas
Copy link
Member Author

@jodh-intel ready to merge

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

with all the reviews this has had...
lgtm

@devimc devimc merged commit 2b382fd into kata-containers:master Feb 14, 2019
jcvenegas added a commit that referenced this pull request Jul 2, 2019
rootfs: Bump golang version to 1.11.1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
medium-priority Urgent issue (resolve before unprioritised issues)
Projects
None yet
Development

Successfully merging this pull request may close these issues.