If you‘re a committer on an Apache project, it means that you can commit directly to the project’s repository. For instance, with Apache CloudStack committers are allowed to directly push commits into the git repository.
Non-committers, however, have to submit patches for review. Apache CloudStack accepts GitHub pull requests. If you are new to Git and GitHub, check these two links:
The Apache CloudStack repository is on GitHub that is kept in sync with the canonical Git repo maintained by the Apache Software Foundation. Submitting GitHub pull requests is the easiest way to get your contribution upstream.
For detailed instructions see the link below: CloudStack GitHub Contribution Guidelines.
While we encourage you to submit your contribution through GitHub pull requests, you can also attach a patch in a GitHub issue/ticket. For the purpose of these instructions, we‘ll assume that you already have a system with Git and have found a bug to fix or have a feature that you’d like to submit, and you're willing to contribute that code or documentation under the Apache License 2.0.
Further, if you‘re fixing a bug we’ll assume that you‘ve either filed a bug report (where you will attach your patch) or are submitting a fix for a known bug. If you find a bug and would like to fix it, that’s awesome! Please be sure to file the bug too, though.
If you want to add a feature, you should bring it up for discussion on the dev@cloudstack.apache.org mailing list before implementing it. This ensures that it meshes with the plans that other contributors have for Apache CloudStack, and that you're not doing redundant work. Other developers may also have ideas for the feature or suggestions that will help you land the feature without having to re-do the work. More information about our mailing lists can be found here.
In short, communication is a vital part of making a contribution to an Apache project.
In your browser, navigate to: https://github.com/apache/cloudstack.
Fork the repository by clicking on the ‘Fork’ button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under ‘HTTPS clone URL’.
You will paste this URL when doing the following git clone command.
On your computer, follow these steps to setup a local repository for working on ACS:
$ git clone https://github.com/YOUR_ACCOUNT/cloudstack.git $ cd cloudstack $ git remote add upstream https://github.com/apache/cloudstack.git $ git checkout main $ git fetch upstream $ git rebase upstream/main
It is important that you create a new branch to make changes on and that you do not change the main branch (other than to rebase in changes from upstream/main). In this example I will assume you will be making your changes to a branch called feature_x. This feature_x branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the ACS project.
It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
$ git checkout -b feature_x (make your changes) $ git status $ git add . $ git commit -a -m "descriptive commit message for your changes"
It is important that you maintain an up-to-date main branch in your local repository. This is done by rebasing in the code changes from upstream/main (the official ACS project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. We recommend you do this process periodically while you work to make sure you are working off the most recent project code.
This process will do the following:
$ git checkout main $ git fetch upstream $ git rebase upstream/main $ git checkout feature_x $ git rebase main
$ git push origin main $ git push origin feature_x
$ git checkout main $ git branch -D feature_x $ git push origin :feature_x
The git repositories are hosted on Apache infrastructure, and can be found here:
To get the most recent source for Apache CloudStack, use:
git clone https://github.com/apache/cloudstack.git
Similarly, clone the cloudstack-cloudmonkey repository or the other repositories to get access to the most recent source of all CloudStack subprojects.
For projects related to Apache CloudStack but not under ASF governance, see the CloudStack-extras repositories on GitHub.