Skip to content

Commit

Permalink
Create CONTRIBUTING.md (canonical#1881)
Browse files Browse the repository at this point in the history
* Create CONTRIBUTING.md

Add a contributing page. Will link from main readme when added

* Hide ISSUE template

* PR template fix

Co-authored-by: Konstantinos Tsakalozos <kos.tsakalozos@canonical.com>
  • Loading branch information
evilnick and ktsakalozos authored Jan 18, 2021
1 parent 3c905f2 commit f320fb8
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
File renamed without changes.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Thank you for making MicroK8s better

Please reference the issue this PR is fixing, or provide a description of the problem addressed.

*Also verify you have:*
* [ ] Read the [contributions](https://github.com/ubuntu/microk8s/CONTRIBUTING.md) page.
* [ ] Submitted the [CLA form](https://ubuntu.com/legal/contributors/agreement), if you are a first time contributor.
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributor Guide

MicroK8s is open source ([Apache License 2.0](./LICENSE)) and actively seeks any community contibutions for code, add-ons, suggestions and documentation.
Many of the features currently part of MicroK8s originated in the community, and we are very keen for that to continue. This page details a few notes,
workflows and suggestions for how to make contributions most effective and help us all build a better MicroK8s for everyone - please give them a read before
working on any contributions.

## Licensing

MicroK8s has been created under the [Apache License 2.0](./LICENSE), which will cover any contributions you may make to this project. Please familiarise
yourself with the terms of the license.

Additionally, MicroK8s uses the Harmony CLA agreement. It’s the easiest way for you to give us permission to use your contributions.
In effect, you’re giving us a licence, but you still own the copyright — so you retain the right to modify your code and use it in
other projects. Please [sign the CLA here](https://ubuntu.com/legal/contributors/agreement) before making any contributions.

## Code of conduct

MicroK8s has adopted the Ubuntu code of Conduct. You can read this in full [here](https://ubuntu.com/community/code-of-conduct).

## Contributing code

The workflow for contributing code is as follows:

1. **Create/choose an issue**: MicroK8s tracks issues at [https://github.com/ubuntu/microk8s/issues](https://github.com/ubuntu/microk8s/issues). If you
want to work on a new feature, create an issue first! This gives everyone a place to discuss scope and implementation.
2. **Create a fork of the MicroK8s repo**
3. **Make a new branch for your contribution**. Write your code there.
4. For details on how to **build and test MicroK8s**, see the [build instructions](./docs/build.md). Add new tests as needed,
and make sure the existing tests continue to pass when your changes are complete.
5. **Submit a pull request** to get changes from your branch into master. You can add "#Fixes xxx" where `xxx` is the issue number to
automatically link to the issue you chose or created earlier.
6. Someone will review your PR and may make suggestions or have comments, so **keep an eye on the PR status** in case there are changes to make
7. **Please make sure you have submitted your [CLA form](https://ubuntu.com/legal/contributors/agreement) if you are a first time contributor**.
8. Thanks!

## Documentation

Docs for MicroK8s are published online at [https://microk8s.io/docs](https://microk8s.io/docs). You can make suggestions and edit the pages themselves by joining
the Kubernetes discourse at [discuss.kubernetes.io](https://discuss.kubernetes.io/t/introduction-to-microk8s/11243) or follow the link at
the bottom of any of the pages published at [https://microk8s.io/docs](https://microk8s.io/docs)
There is a documentation page which describes how to write and edit docs, [published as part of the documentation](https://microk8s.io/docs/docs).

26 changes: 26 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,32 @@ At the time of the v3.13.2 release. The `calico.yaml` manifest is a slightly mod
value: "first-found"
```

## Running the tests locally

The `test-addons.py` and `test-upgrade.py` files under the `tests` directory are the two main files of out test suite.
Running the tests is done with pytest:
```
pytest -s test-addons.py
pytest -s test-upgrade.py
```

To successfully run the tests you need to install:
1. From your distribution's repository:
- python3
- pytest
- pip3
- docker.io
1. From pip3:
- requests
- pyyaml
- sh

For example on ubuntu 18.04 to get these dependencies you would:
```
apt-get install python3-pip docker.io -y
pip3 install -U pytest requests pyyaml sh
```

## References

- https://snapcraft.io/docs/snapcraft-overview
Expand Down

0 comments on commit f320fb8

Please sign in to comment.