Skip to content

Commit

Permalink
Release updates (#119)
Browse files Browse the repository at this point in the history
* updates per my release process

* expand and clarify a few steps in the release process

Signed-off-by: Anthony Floeder <[email protected]>

* - move discussion of nnf-mfu to the top of the table to emphasize that its version
  is used in other dependent submodules.
- clarify the nnf-deploy `master` branch steps and merge

* Add section for cloning a release

Signed-off-by: Anthony Floeder <[email protected]>

* Removed reference to update.sh script

Signed-off-by: Anthony Floeder <[email protected]>

---------

Signed-off-by: Anthony Floeder <[email protected]>
  • Loading branch information
ajfloeder authored Jan 17, 2024
1 parent 56897d6 commit d9a6bfe
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 40 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# NearNodeFlash Pages

## Retrieve the submodules

There are references to files in other repos, so update the submodules for them.

```bash
git submodule update external/nnf-dm
```

## Create mkdocs Environment

```bash
Expand Down
106 changes: 66 additions & 40 deletions docs/repo-guides/release-nnf-sw/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ part of `nnf-deploy`, but it should match the version number of `nnf-deploy`. Re
other components.

- [NearNodeFlash/nnf-deploy](https://github.com/NearNodeFlash/nnf-deploy)

- [DataWorkflowServices/dws](https://github.com/DataWorkflowServices/dws)
- [NearNodeFlash/lustre-fs-operator](https://github.com/NearNodeFlash/lustre-fs-operator)
- [HewlettPackard/lustre-csi-driver](https://github.com/HewlettPackard/lustre-csi-driver)
- [NearNodeFlash/lustre-fs-operator](https://github.com/NearNodeFlash/lustre-fs-operator)
- [NearNodeFlash/nnf-mfu](https://github.com/NearNodeFlash/nnf-mfu)
- [NearNodeFlash/nnf-sos](https://github.com/NearNodeFlash/nnf-sos)
- [NearNodeFlash/nnf-dm](https://github.com/NearNodeFlash/nnf-dm)
- [NearNodeFlash/nnf-integration-test](https://github.com/NearNodeFlash/nnf-integration-test)

- [NearNodeFlash/NearNodeFlash.github.io](https://github.com/NearNodeFlash/NearNodeFlash.github.io)

[nnf-ec](https://github.com/NearNodeFlash/nnf-ec) is vendored in as part of `nnf-sos` and does not
Expand Down Expand Up @@ -89,93 +91,117 @@ just an example.
1. For `lustre-csi-driver`, `lustre-fs-operator`, `dws`, `nnf-sos`, and `nnf-dm` there are additional files that need to
track the version number as well, which allow them to be installed with `kubectl apply -k`.
1. For `lustre-fs-operator`, `dws`, `nnf-sos`, and `nnf-dm` update `config/manager/kustomization.yaml` with the correct version.
2. For `lustre-csi-driver`, update `deploy/kubernetes/base/kustomization.yaml` and
`charts/lustre-csi-driver/values.yaml` with the correct version.
2. If `nnf-mfu` was updated, multiple references in `nnf-dm` will need to be updated with the
new version number for the `nnf-mfu` image:
1. In `Dockerfile` and `Makefile`, replace `NNFMU_VERSION` with the new version
2. In `config/manager/kustomization.yaml`, replace `nnf-mfu`'s `newTag: <X.Y.Z>`
|Repo |Update|
|---------------------|------|
|`nnf-mfu` |The new version of `nnf-mfu` is referenced by the `NNFMFU` variable in several places:<br><br>`nnf-sos`<br>1. `Makefile` replace `NNFMFU` with `nnf-mfu's` tag.<br><br>`nnf-dm`<br>1. In `Dockerfile` and `Makefile`, replace `NNFMU_VERSION` with the new version.<br>2. In `config/manager/kustomization.yaml`, replace `nnf-mfu`'s `newTag: <X.Y.Z>.`|
|`lustre-fs-operator` |update `config/manager/kustomization.yaml` with the correct version.|
|`dws` |update `config/manager/kustomization.yaml` with the correct version.|
|`nnf-sos` |update `config/manager/kustomization.yaml` with the correct version.|
|`nnf-dm` |update `config/manager/kustomization.yaml` with the correct version.|
|`lustre-csi-driver` |update `deploy/kubernetes/base/kustomization.yaml` and `charts/lustre-csi-driver/values.yaml` with the correct version.|
6. Create a Pull Request from your branch and **target the release branch**. When merging the Pull
6. **Target the `releases/v0` branch** with a Pull Request from your branch. When merging the Pull
Request, **you must use a Merge Commit.**
!!! note

**Do not** Rebase or Squash! Those actions will remove the records that Git uses to
**Do not** Rebase or Squash! Those actions remove the records that Git uses to
determine which commits have been merged, and then when the next release is created Git will
treat everything like a conflict. Additionally, this will cause auto-generated release notes
to include the previous release.
7. Once merged, update the release branch locally and then create an annotated tag:
7. Once merged, update the release branch locally and create an annotated tag:
```shell
git checkout releases/v0
git pull
git tag -a v0.0.3 -m "Release v0.0.3"
git push origin --tags
```
8. Now that there is a tag, a release can be created via the [GitHub CLI](https://cli.github.com/).
8. Now that a tag exists, a release can be created via the [GitHub CLI](https://cli.github.com/).
Alternatively, use the [Web UI](https://github.com/NearNodeFlash/nnf-dm/releases/new).
```bash
gh release create --generate-notes --verify-tag -p v0.0.3 -t "Release v0.0.3"
```
9. Repeat this process for each remaining component.
9. GOTO Step 1 and repeat this process for each remaining component.
## Release `nnf-deploy`
Once the individual components are released, we need to update the submodules and
`config/repositories.yaml` in the **master** branch before we start on the release branch. This
makes sure that everything is now current on master.
Once the individual components are released, we need to update the submodules
in `nnf-deploy's` `master` branch before we create the release branch. This ensures
that everything is current on `master` for `nnf-deploy`.

1. Update the submodules on master:
1. Update the submodules for `nnf-deploy` on master:

```shell
cd nnf-deploy
git checkout master
git pull
./update.sh
git submodule foreach git checkout master
git submodule foreach git pull
```

2. Update `config/repositories.yaml` and update the referenced versions for:

1. `lustre-csi-driver`
2. Create a branch to capture the submodule changes for the PR to `master`

2. `lustre-fs-operator`

3. `nnf-mfu`
```shell
git checkout -b update-submodules
```

3. Commit the changes and open a Pull Request against the `master` branch.

4. Once merged, follow steps 1-3 from the previous section to update the release branch with master.
4. Once merged, follow steps 1-3 from the previous section to create a release branch off of `releases/v0` and
update it with changes from `master`.

5. There will be conflicts on the submodules after step 3. This is expected. We will update the
5. There will be conflicts for the submodules after step 3. **This is expected.** Update the
submodules to the new tags and then commit the changes. If each tag was committed properly, the
following command can do this for you:

```shell
git submodule foreach 'git checkout `git describe --match="v*" HEAD`'
```

Verify that each submodule is now at the proper tagged version.
6. Verify that each submodule is now at the proper tagged version.

```shell
git submodule
```

7. Do a `git add` for each of the submodules.

8. Update `config/repositories.yaml` with the referenced versions for:

1. `lustre-csi-driver`
2. `lustre-fs-operator`
3. `nnf-mfu` (Search for NNFMFU_VERSION)

9. Tidy and make `nnf-deploy` to avoid embarrassment.

```shell
git submodule status
go mod tidy
make
```

6. Do a `git add` for each of the submodules.
10. Do another `git add` for any changes, particularly `go.mod` and/or `go.sum`.

11. Verify that `git status` is happy with `nnf-deploy` and then finalize the merge
from master by with a `git commit`.

12. Follow steps 6-8 from the previous section to finalize the release of `nnf-deploy`.

**The software is now released!**

## Clone a release

7. Run `go mod tidy` and then `make`. Do another `git add` for any changes, particularly`go.mod`
and/or `go.sum`.
The follow commands clone release `v0.0.7` into `nnf-deploy-v0.0.7`

8. Verify that `git status` is happy with `nnf-deploy` and then finalize the merge from master by
doing a `git commit`.
```shell
export NNF_VERSION=v0.0.7
9. Follow steps 6-8 from the previous section to finalize the release of `nnf-deploy`.
git clone --recurse-submodules [email protected]:NearNodeFlash/nnf-deploy nnf-deploy-$NNF_VERSION
cd nnf-deploy-$NNF_VERSION
git -c advice.detachedHead=false checkout $NNF_VERSION --recurse-submodules
The software is now released!
git submodule status
```

0 comments on commit d9a6bfe

Please sign in to comment.