Jump to: navigation, search

Difference between revisions of "Getting The Code"

(Hacking on your laptop and running unit tests)
 
(14 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 +
== Git source code repositories ==
  
= Getting the source code =
+
OpenStack manages source code in git using a code review tool called Gerrit. The workflow for working with Gerrit is described at [http://docs.openstack.org/infra/manual/developers.html#development-workflow Development Workflow]. Git repositories are mirrored to [http://git.openstack.org/ git.openstack.org] and [https://github.com/openstack GitHub]. Installing git varies by platform, and if you're a developer is probably something you already have - but if it isn't, [[InstallingGit]] may help.
  
OpenStack manages source code in git using a code review tool called Gerrit. The workflow for working with Gerrit is described at [[GerritWorkflow]]. Git repositories are mirrored to [http://git.openstack.org/ git.openstack.org] and [https://github.com/openstack Github].
+
To get a copy of an OpenStack project, you can clone a repo from [https://opendev.org/ opendev.org] and browse the source code at [https://opendev.org/explore/repos opendev.org/explore/repos].  For instance, to clone the Swift repo:
 
 
To get a copy of an OpenStack project, you can clone a repo from [http://git.openstack.org/ git.openstack.org] and browse the source code at [http://git.openstack.org/cgit git.openstack.org/cgit].  For instance, to clone the Swift repo:
 
  
 
<pre><nowiki>
 
<pre><nowiki>
git clone git://git.openstack.org/openstack/swift
+
git clone https://opendev.org/openstack/swift
 
</nowiki></pre>
 
</nowiki></pre>
  
Alternatively, you can use the [https://github.com/openstack Github mirror] to clone repos and browse code.  The git.openstack.org and GitHub mirrors are maintained the same way and contain the same code, so you can use either one, with the difference being that git.openstack.org is hosted by the OpenStack organization.
+
Alternatively, you can use the [https://github.com/openstack GitHub mirror] to clone repos and browse code.  The opendev.org and GitHub mirrors are maintained the same way and contain the same code, so you can use either one, with the difference being that opendev.org is hosted by the OpenDev infrastructure team.
 +
 
 +
== Source code tarballs ==
 +
 
 +
You can find all source code tarballs of OpenStack projects on https://releases.openstack.org .
 +
 
 +
Alternatively, you can find all source code tarballs generated for OpenStack projects at [http://tarballs.openstack.org tarballs.openstack.org].
 +
 
 +
 
 +
== Getting dependencies ==
 +
 
 +
Python runtime and test dependencies are described in requirements.txt in each project. Some dependencies are not Python dependencies, though. See [[DevStack]] for more information on setting up the required dependencies.
 +
 
 +
 
 +
== Hacking on your laptop and running unit tests ==
  
You can also get stable releases of the code from the OpenStack projects on Launchpad, for example:
+
Questions about running unit tests locally are fairly common.  While all of the projects are pretty similar in how this works, it's best to consult each projects documentation for things like setting up a dev environment and running unit tests.
  
* [https://launchpad.net/nova/icehouse/2014.1 Compute (Nova)]
+
Each project should publish this info to [http://docs.openstack.org/ docs.openstack.org].
* [https://launchpad.net/swift/icehouse/1.13.1 Object Storage (Swift)]
 
* [https://launchpad.net/glance/icehouse/2014.1 Image Service (Glance)]
 
* [https://launchpad.net/neutron/icehouse/2014.1 Networking (Neutron)]
 
* [https://launchpad.net/cinder/icehouse/2014.1 Block Storage (Cinder)]
 
* [https://launchpad.net/keystone/icehouse/2014.1 Identity (Keystone)]
 
* [https://launchpad.net/horizon/icehouse/2014.1 Dashboard (Horizon)]
 
* [https://launchpad.net/ceilometer/icehouse/2014.1 Telemetry (Ceilometer)]
 
* [https://launchpad.net/heat/icehouse/2014.1 Orchestration (Heat)]
 
* [https://launchpad.net/trove/icehouse/2014.1 Database Service (Trove)]
 
  
= Getting dependencies =
+
For example:
  
See [[DevStack]].
+
https://docs.openstack.org/cinder/latest/contributor/index.html
  
----
+
[[Category:Contribute]]
[[Category:Nova]]
 
[[Category:Swift]] [[Category:HowTo]]
 

Latest revision as of 21:36, 23 April 2019

Git source code repositories

OpenStack manages source code in git using a code review tool called Gerrit. The workflow for working with Gerrit is described at Development Workflow. Git repositories are mirrored to git.openstack.org and GitHub. Installing git varies by platform, and if you're a developer is probably something you already have - but if it isn't, InstallingGit may help.

To get a copy of an OpenStack project, you can clone a repo from opendev.org and browse the source code at opendev.org/explore/repos. For instance, to clone the Swift repo:

git clone https://opendev.org/openstack/swift

Alternatively, you can use the GitHub mirror to clone repos and browse code. The opendev.org and GitHub mirrors are maintained the same way and contain the same code, so you can use either one, with the difference being that opendev.org is hosted by the OpenDev infrastructure team.

Source code tarballs

You can find all source code tarballs of OpenStack projects on https://releases.openstack.org .

Alternatively, you can find all source code tarballs generated for OpenStack projects at tarballs.openstack.org.


Getting dependencies

Python runtime and test dependencies are described in requirements.txt in each project. Some dependencies are not Python dependencies, though. See DevStack for more information on setting up the required dependencies.


Hacking on your laptop and running unit tests

Questions about running unit tests locally are fairly common. While all of the projects are pretty similar in how this works, it's best to consult each projects documentation for things like setting up a dev environment and running unit tests.

Each project should publish this info to docs.openstack.org.

For example:

https://docs.openstack.org/cinder/latest/contributor/index.html