Skip to content

Commit d340df7

Browse files
docs: enhance contributors development setup guide
Linted all the markdown files but noticed they have outdated content, example: installing openebs 3.X and operator lite Improve development setup guide, including the nixos-shell k3s docs Signed-off-by: Tiago Castro <[email protected]>
1 parent 72a0daa commit d340df7

File tree

20 files changed

+511
-303
lines changed

20 files changed

+511
-303
lines changed

.github/workflows/build_and_push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
run: |
9898
make bootstrap
9999
make helm-install
100-
CI_HACK_SUDO="true" make integration-test
100+
make integration-test
101101
102102
- name: Upload Integration Test Coverage Report
103103
uses: codecov/codecov-action@v4

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
run: |
113113
make bootstrap
114114
make helm-install
115-
CI_HACK_SUDO="true" make integration-test
115+
make integration-test
116116
117117
- name: Upload Integration Test Coverage Report
118118
uses: codecov/codecov-action@v4

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Code of Conduct
2+
23
<BR>
34

45
## Umbrella Project
6+
57
OpenEBS is an "umbrella project". Every project, repository and file in the OpenEBS organization adopts and follows the policies found in the Community repo umbrella project files.
68
<BR>
79

8-
This project follows the [OpenEBS Code of Conduct](https://github.com/openebs/community/blob/HEAD/CODE_OF_CONDUCT.md)
10+
This project follows the [OpenEBS Code of Conduct](https://github.com/openebs/community/blob/HEAD/CODE_OF_CONDUCT.md)

CONTRIBUTING.md

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,55 @@
11
# Contributing Guidelines
2-
<BR>
2+
3+
<br>
34

45
## Umbrella Project
6+
57
OpenEBS is an "umbrella project". Every project, repository and file in the OpenEBS organization adopts and follows the policies found in the Community repo umbrella project files.
6-
<BR>
8+
<br>
79

810
This project follows the [OpenEBS Contributor Guidelines](https://github.com/openebs/community/blob/HEAD/CONTRIBUTING.md)
911

10-
# Contributing to OpenEBS Dynamic Local PV Provisioner
12+
## Contributing to OpenEBS Dynamic Local PV Provisioner
1113

1214
OpenEBS uses the standard GitHub pull requests process to review and accept contributions. There are several areas that could use your help. For starters, you could help in improving the sections in this document by either creating a new issue describing the improvement or submitting a pull request to this repository. The issues for the various OpenEBS components (including this repository) are maintained in [openebs/openebs](https://github.com/openebs/openebs/issues) repository.
1315

1416
* If you are a first-time contributor, please see [Steps to Contribute](#steps-to-contribute).
1517
* If you have documentation improvement ideas, go ahead and create a pull request. See [Pull Request checklist](#pull-request-checklist).
1618
* If you would like to make code contributions, please start with [Setting up the Development Environment](#setting-up-your-development-environment).
17-
* If you would like to work on something more involved, please connect with the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/master/community).
19+
* If you would like to work on something more involved, please connect with the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/HEAD/community).
1820

19-
## Steps to Contribute
21+
### Steps to Contribute
2022

2123
OpenEBS is an Apache 2.0 Licensed project and all your commits should be signed with Developer Certificate of Origin. See [Sign your work](#sign-your-work).
2224

2325
* Find an issue to work on or create a new issue. The issues are maintained at [openebs/openebs](https://github.com/openebs/openebs/issues). You can pick up from a list of [good-first-issues](https://github.com/openebs/openebs/labels/good%20first%20issue).
2426
* Claim your issue by commenting your intent to work on it to avoid duplication of efforts.
2527
* Fork the repository on GitHub.
26-
* Create a branch from where you want to base your work (usually master).
28+
* Create a branch from where you want to base your work (usually `develop`).
2729
* Make your changes. If you are working on code contributions, please see [Setting up the Development Environment](#setting-up-your-development-environment).
2830
* Relevant coding style guidelines are the [Go Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) and the _Formatting and style_ section of Peter Bourgon's [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).
2931
* Commit your changes by making sure the commit messages convey the need and notes about the commit.
3032
* Push your changes to the branch in your fork of the repository.
3133
* Submit a pull request to the original repository. See [Pull Request checklist](#pull-request-checklist).
3234

33-
## Pull Request Checklist
35+
### Pull Request Checklist
3436

35-
* Rebase to the current master branch before submitting your pull request.
37+
* Rebase to the current `develop` branch before submitting your pull request.
3638
* Commits should be as small as possible. Each commit should follow the checklist below:
37-
- For code changes, add tests relevant to the fixed bug or new feature.
38-
- Pass the compile and tests - includes spell checks, formatting, etc.
39-
- Commit header (first line) should convey what changed.
40-
- Commit body should include details such as why the changes are required and how the proposed changes.
41-
- DCO Signed.
42-
* If your PR is not getting reviewed or you need a specific person to review it, please reach out to the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/master/community).
39+
* For code changes, add tests relevant to the fixed bug or new feature.
40+
* Pass the compile and tests - includes spell checks, formatting, etc.
41+
* Commit header (first line) should convey what changed.
42+
* Commit body should include details such as why the changes are required and how the proposed changes.
43+
* DCO Signed.
44+
* If your PR is not getting reviewed or you need a specific person to review it, please reach out to the OpenEBS Contributors. See [OpenEBS Community](https://github.com/openebs/openebs/tree/HEAD/community).
4345

44-
## Sign your work
46+
### Sign your work
4547

46-
We use the Developer Certificate of Origin (DCO) as an additional safeguard for the OpenEBS project. This is a well established and widely used mechanism to assure that contributors have confirmed their right to license their contribution under the project's license. Please read [dcofile](https://github.com/openebs/openebs/blob/master/contribute/developer-certificate-of-origin). If you can certify it, then just add a line to every git commit message:
48+
We use the Developer Certificate of Origin (DCO) as an additional safeguard for the OpenEBS project. This is a well established and widely used mechanism to assure that contributors have confirmed their right to license their contribution under the project's license. Please read [dcofile](https://github.com/openebs/openebs/blob/HEAD/contribute/developer-certificate-of-origin). If you can certify it, then just add a line to every git commit message:
4749

4850
Please certify it by just adding a line to every git commit message. Any PR with Commits which does not have DCO Signoff will not be accepted:
4951

50-
```
52+
```text
5153
Signed-off-by: Random J Developer <[email protected]>
5254
```
5355

@@ -56,38 +58,45 @@ If you set your `user.name` and `user.email` in git config, you can sign your co
5658

5759
You can also use git [aliases](https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases) like `git config --global alias.ci 'commit -s'`. Now you can commit with `git ci` and the commit will be signed.
5860

59-
## Setting up your Development Environment
61+
### Setting up your Development Environment
6062

6163
This project is implemented using Go and uses the standard golang tools for development and build. In addition, this project heavily relies on Docker and Kubernetes. It is expected that the contributors:
62-
- are familiar with working with Go;
63-
- are familiar with Docker containers;
64-
- are familiar with Kubernetes and have access to a Kubernetes cluster or Minikube to test the changes.
64+
65+
* are familiar with working with Go;
66+
* are familiar with Docker containers;
67+
* are familiar with Kubernetes and have access to a Kubernetes cluster or Minikube to test the changes.
6568

6669
For setting up a Development environment on your local host, see the detailed instructions [here](./docs/developer.md).
6770

68-
## Reviews against Pull Requests
71+
### Reviews against Pull Requests
6972

7073
A PR can be reviewed by both core as well as external contributors. Below can be referred to during reviews:
71-
- contributor should fix all the linting issues raised by the lint tools integrated with CI (`make test`)
72-
- contributor should try to implement relevant golang based unit tests for the fix/enhancement (`make test`)
73-
- contributor should try to rework on the review comments as much as possible
74-
- a review comment can be taken up later if it falls under any of the following categories
75-
- if the review comment talks about a new idiom or code pattern that is not currently in use by this repo
76-
- if the review comment talks about the need to implement integration test corresponding to the fix/enhancement
77-
- if contributor as well as reviewer agree that it can be addressed in a different PR
78-
- contributor should follow below pattern in code comments when some rework needs to be done at a later point:
74+
75+
* contributor should fix all the linting issues raised by the lint tools integrated with CI (`make test`)
76+
* contributor should try to implement relevant golang based unit tests for the fix/enhancement (`make test`)
77+
* contributor should try to rework on the review comments as much as possible
78+
* a review comment can be taken up later if it falls under any of the following categories
79+
* if the review comment talks about a new idiom or code pattern that is not currently in use by this repo
80+
* if the review comment talks about the need to implement integration test corresponding to the fix/enhancement
81+
* if contributor as well as reviewer agree that it can be addressed in a different PR
82+
* contributor should follow below pattern in code comments when some rework needs to be done at a later point:
83+
7984
```go
8085
// TD: -- indicates technical debt
8186
```
87+
8288
```go
8389
// NBDD: -- indicates needs integration tests in BDD format _(i.e. ginkgo tests)_
8490
```
91+
8592
```go
8693
// TD: SMALL -- indicates few/similar code changes & hence less impact
8794
```
95+
8896
```go
8997
// TD: MEDIUM -- indicates code changes at multiple files & may impact certain feature
9098
```
99+
91100
```go
92101
// TD: LARGE -- indicates code changes at multiple files & has impact on more than one features
93102
```

GOVERNANCE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Governance
2+
23
<BR>
34

45
## Umbrella Project
6+
57
OpenEBS is an "umbrella project". Every project, repository and file in the OpenEBS organization adopts and follows the policies found in the Community repo umbrella project files.
68
<BR>
79

8-
This project follows the [OpenEBS Governance](https://github.com/openebs/community/blob/HEAD/GOVERNANCE.md)
10+
This project follows the [OpenEBS Governance](https://github.com/openebs/community/blob/HEAD/GOVERNANCE.md)

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ bootstrap:
124124
clean:
125125
go clean -testcache
126126
rm -rf bin
127+
./ci/ci-test.sh clean
128+
chmod -R u+w ${GOPATH}/bin/${PROVISIONER_LOCALPV} 2>/dev/null || true
129+
chmod -R u+w ${GOPATH}/pkg/* 2>/dev/null || true
130+
rm -rf ${GOPATH}/bin/${PROVISIONER_LOCALPV}
131+
rm -rf ${GOPATH}/pkg/*
127132

128133
.PHONY: test
129134
test: format vet

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,25 @@
99
<img width="300" align="right" alt="OpenEBS Logo" src="https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/stacked/color/openebs-stacked-color.png" xmlns="http://www.w3.org/1999/html">
1010

1111
<p align="justify">
12-
<strong>OpenEBS Dynamic Local PV provisioner</strong> can be used to dynamically provision
13-
Kubernetes Local Volumes using different kinds of storage available on the Kubernetes nodes.
12+
<strong>OpenEBS Dynamic Local PV provisioner</strong> can be used to dynamically provision
13+
Kubernetes Local Volumes using different kinds of storage available on the Kubernetes nodes.
1414
<br>
1515
</p>
1616

1717
## Project Status: GA
1818

19-
Local Persistent Volumes are great for distributed cloud native data services that can handle resiliency and availability and expect low-latency access to the storage. Local Persistent Volumes can be provisioned using the hostpath, NVMe or PCIe based SSDs, Hard Disks or on top of other filesystems like ZFS, LVM.
19+
Local Persistent Volumes are great for distributed cloud native data services that can handle resiliency and availability and expect low-latency access to the storage. Local Persistent Volumes can be provisioned using the hostpath, NVMe or PCIe based SSDs, Hard Disks or on top of other filesystems like ZFS, LVM.
2020

2121
Some of the targetted applications are:
22+
2223
- Distributed SQL Databases like PostgreSQL
2324
- Distributed No-SQL Databases like MongoDB, Cassandra
2425
- Distributed Object Storages like MinIO (distributed mode)
25-
- Distributed Streaming services like Apache Kakfa,
26+
- Distributed Streaming services like Apache Kakfa,
2627
- Distributed Logging and search services like ElasticSearch, Solr
2728
- AI/ML workloads
2829

29-
## Overview
30+
## Overview
3031

3132
Kubernetes Local persistent volumes allows users to access local storage through the
3233
standard PVC interface in a simple and portable way. The PV contains node
@@ -56,21 +57,21 @@ Head over to the [CONTRIBUTING.md](./CONTRIBUTING.md) page.
5657

5758
## Roadmap
5859

59-
Find the Dynamic Local PV roadmap items at the [OpenEBS Roadmap page](https://github.com/openebs/openebs/blob/master/ROADMAP.md#dynamic-local-pvs).
60+
Find the Dynamic Local PV roadmap items at the [OpenEBS Roadmap page](https://github.com/openebs/openebs/blob/HEAD/ROADMAP.md#dynamic-local-pvs).
6061

6162
## OpenEBS Adopters
6263

63-
Check out the list of organizations and users who have chosen OpenEBS to run their stateful workloads, over at the [OpenEBS Adopters page](https://github.com/openebs/openebs/blob/master/ADOPTERS.md).
64+
Check out the list of organizations and users who have chosen OpenEBS to run their stateful workloads, over at the [OpenEBS Adopters page](https://github.com/openebs/openebs/blob/HEAD/ADOPTERS.md).
6465

6566
## Community, discussion, and support
6667

67-
Learn how to engage with the OpenEBS community on the [community page](https://github.com/openebs/openebs/tree/master/community).
68+
Learn how to engage with the OpenEBS community on the [community page](https://github.com/openebs/openebs/tree/HEAD/community).
6869

6970
You can reach the maintainers of this project at:
7071

71-
- [Kubernetes Slack](http://slack.k8s.io/) channels:
72-
* [#openebs](https://kubernetes.slack.com/messages/openebs/)
73-
* [#openebs-dev](https://kubernetes.slack.com/messages/openebs-dev/)
72+
- [Kubernetes Slack](http://slack.k8s.io/) channels:
73+
- [#openebs](https://kubernetes.slack.com/messages/openebs/)
74+
- [#openebs-dev](https://kubernetes.slack.com/messages/openebs-dev/)
7475
- [Mailing List](https://lists.cncf.io/g/cncf-openebs-users)
7576

7677
### Code of conduct
@@ -80,10 +81,11 @@ Participation in the OpenEBS community is governed by the [CNCF Code of Conduct]
8081
## Inspiration/Credit
8182

8283
OpenEBS Local PV has been inspired by the prior work done by the following the Kubernetes projects:
83-
- https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/tree/master/examples/hostpath-provisioner
84-
- https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner
85-
- https://github.com/rancher/local-path-provisioner
8684

85+
- <https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/tree/HEAD/examples/hostpath-provisioner>
86+
- <https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner>
87+
- <https://github.com/rancher/local-path-provisioner>
8788

8889
## License Compliance
90+
8991
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Fdynamic-localpv-provisioner.svg?type=large&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopenebs%2Fdynamic-localpv-provisioner?ref=badge_large&issueType=license)

RELEASE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Release Process
2+
23
OpenEBS Dynamic Local PV Provisioner follows a monthly release cadence. The scope of the release is determined by contributor availability. The scope is published in the [Release Tracker Projects](https://github.com/orgs/openebs/projects).
34

45
## Release Candidate Verification Checklist
56

67
Every release has release candidate builds that are created starting from the third week into the release. These release candidate builds help to freeze the scope and maintain the quality of the release. The release candidate builds will go through:
8+
79
- Platform Verification
810
- Regression and Feature Verification Automated tests.
911
- Exploratory testing by QA engineers
@@ -31,10 +33,11 @@ Once the release is triggered, Github Actions release workflow has to be monitor
3133
Images for the different components are published at the following location:
3234

3335
- Dynamic LocalPV Provisioner <br />
34-
https://quay.io/repository/openebs/provisioner-localpv?tab=tags <br />
35-
https://hub.docker.com/r/openebs/provisioner-localpv/tags <br />
36+
<https://quay.io/repository/openebs/provisioner-localpv?tab=tags> <br />
37+
<https://hub.docker.com/r/openebs/provisioner-localpv/tags> <br />
3638

3739
Once a release is created, update the release description with the changelog mentioned in `changelog/v1.9.x`. Once the changelogs are updated in the release, the repo owner needs to create a PR to `develop` with the following details:
40+
3841
1. update the changelog from `changelog/v1.9.x` to `CHANGELOG.md`
3942
2. If a release is not an RC tag then PR should include the changes to remove `changelog/v1.9.x` folder.
4043
3. If a release is an RC tag then PR should include the changes to remove the changelog from `changelog/v1.9.x` which are already mentioned in `CHANGELOG.md` as part of step number 1.

ci/ci-test.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,11 @@ run_test_suit() {
135135
echo "running ginkgo test case with coverage"
136136

137137
# --focus="TEST HOSTPATH EXT4 QUOTA LOCAL PV WITH UNSUPPORTED FILESYSTEM"
138-
if [ -n "${CI_HACK_SUDO:-}" ]; then
139-
if ! sudo -E env "PATH=${PATH}" ginkgo -v -coverprofile="integration_coverage.txt" -covermode=atomic; then
140-
return 0
141-
fi
142-
else
143-
if ginkgo -v -coverprofile="integration_coverage.txt" -covermode=atomic; then
144-
return 0
145-
fi
138+
if ! sudo -E env "PATH=${PATH}" ginkgo -v -coverprofile="integration_coverage.txt" -covermode=atomic; then
139+
dump_logs
140+
[ "$CLEAN_AFTER" = "true" ] && cleanup
141+
exit 1
146142
fi
147-
148-
dump_logs
149-
[ "$CLEAN_AFTER" = "true" ] && cleanup
150-
exit 1
151143
}
152144

153145
run() {

0 commit comments

Comments
 (0)