This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable IBM Block Storage via SCBE as Ubiquity backend
- Loading branch information
Showing
513 changed files
with
50,152 additions
and
33,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,67 @@ | ||
# Contribution guide | ||
The Ubiquity team uses GitHub and accepts contributions via pull requests. | ||
Pushing to master is not allowed for any reason, any direct push to master might brake the CI/CD process that we are following. | ||
The Ubiquity team uses GitHub to accept contributions via pull requests. | ||
Pushing to master is not allowed. Any direct push to master might interfere with our CI process. | ||
|
||
If you wish to make a change to Ubiquity, create your own branch out of `dev` branch, make your changes, once you are done submit a pull request to the `dev` branche. Once accepted, those changes should make their way into `master` when we merge. | ||
If you want to make a change, create your own branch out of `dev` branch, make your changes. Once you are done, submit a pull request to the `dev` branch. When accepted, the changes will make their way into `master` after we merge. | ||
|
||
To verify your changes before submitting a pull request, run unit tests, the integration test suite, and the acceptance Tests. See the testing section for more detail. | ||
Verify your changes before submitting a pull request by running the unit, integration and acceptance tests. See the testing section for details. In addition, make sure that your changes are covered by existing or new unit testing. | ||
|
||
If your changes are related to a bug fix, it should be realtively easy to review since test coverage is submitted with the patch. Bug fixes don't usually require alot of extra testing: But please update the unit tests so that they catch the bug. | ||
# Build prerequisites | ||
* Install [golang](https://golang.org/) (>=1.6). | ||
* Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). | ||
* Install gcc. | ||
* Configure go. GOPATH environment variable must be set correctly before starting the build process. Create a new directory and set it as GOPATH. | ||
|
||
Testing Ubiquity: | ||
### Download and build source code | ||
* Configure ssh-keys for github.com. go tools require passwordless ssh access to github. If you have not set up ssh keys for your github profile, follow these [instructions](https://help.github.com/enterprise/2.7/user/articles/generating-an-ssh-key/) before you proceed. | ||
* Build Ubiquity service from source. | ||
```bash | ||
mkdir -p $HOME/workspace | ||
export GOPATH=$HOME/workspace | ||
mkdir -p $GOPATH/src/github.com/IBM | ||
cd $GOPATH/src/github.com/IBM | ||
git clone [email protected]:IBM/ubiquity.git | ||
cd ubiquity | ||
./scripts/build | ||
``` | ||
|
||
# Testing Ubiquity | ||
|
||
In order to be able to test ubiquity you need to install these go packages: | ||
Install these go packages to test Ubiquity: | ||
```bash | ||
# Install ginkgo | ||
go install github.com/onsi/ginkgo/ginkgo | ||
# Install gomega | ||
go install github.com/onsi/gomega | ||
``` | ||
Once you've followed the steps above to install ginkgo and omega needed for testing, execute the following script to run all unit tests in ubiquity: | ||
|
||
Run the tests: | ||
```bash | ||
./scripts/run-unit-tests | ||
``` | ||
|
||
# Running Ubiquity | ||
You can run Ubiquity as a [root](README.md) or non-root user. Follow the instructions below for running Ubiquity with non-root user: | ||
|
||
* Create user and group named 'ubiquity'. | ||
|
||
```bash | ||
adduser ubiquity | ||
``` | ||
|
||
* Modify the sudoers file to provide the user and group 'ubiquity' with sufficient privileges. | ||
|
||
```bash | ||
## Entries for Ubiquity | ||
ubiquity ALL= NOPASSWD: /usr/lpp/mmfs/bin/, /usr/bin/, /bin/ | ||
Defaults:%ubiquity !requiretty | ||
Defaults:%ubiquity secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/lpp/mmfs/bin | ||
``` | ||
|
||
# Integration tests (In progress) | ||
If you have a running kubernetes and/or docker environment set up, as well as a running storage backend, you can also run integration and acceptance tests that you can find in | ||
ubiquity-k8s and/or ubiquity-docker-plugin. | ||
# Integration tests | ||
If you have Kubernetes and/or Docker environment together with an active storage backend, you can run integration and acceptance tests, detailed in ubiquity-k8s and ubiquity-docker-plugin. | ||
|
||
|
||
# Squash and Merge | ||
# Squash and merge | ||
|
||
Upon merge (by either you or your reviewer), all commits left on the review branch should represent meaningful milestones or units of work. Use commits to add clarity to the development and review process. | ||
Upon the merge (by either you or your reviewer), all commits on the review branch must represent meaningful milestones or units of work. Use commit message to detail the development and review process. | ||
Before merging a PR, squash any fix review feedback, typo, and rebased sorts of commits. |
Oops, something went wrong.