-
-
Notifications
You must be signed in to change notification settings - Fork 650
Developer guide
- Clone the repository:
git clone git@github.com:cobbler/cobbler.git
- Install the development dependencies (see the individual distros)
- Install the runtime dependencies (see the individual distros)
- Install the
pre-commit
commit hocks viapre-commit install
(Install viapip install pre-commit
) - Optional: Configure your preferred IDE
You can develop and test Cobbler in our Docker container. See Developing and testing inside a container for more information on that.
$ zypper in git make python3-devel python3-pyflakes python3-Sphinx python3-sphinx_rtd_theme rpm-build
Create a virtualenv, activate it and run pip install .
in the project root folder.
The preferred development platform is CentOS 7, you will also need the EPEL repository. Get the latest epel-release RPM from
http://download.fedoraproject.org/pub/epel/7/x86_64/repoview/epel-release.html
Install development dependencies:
# yum install git make python-devel pyflakes python-pep8 python-sphinx rpm-build
Install runtime dependencies:
# yum install python-netaddr python-simplejson PyYAML python-cheetah httpd mod_wsgi
Initially, to run Cobbler without using packages:
# make install
For each successive run, do not run make install
again, to avoid blowing away your configuration.
Instead run make clean
and make devinstall
.
This will install Cobbler and restart apache/cobblerd, but move your configuration files and settings aside and restore them, rather than blindly overwriting them.
Just open the project and wait for PyCharm to initialize everything. The defaults should in most cases do the trick.
There are several good Python plugins available (e.g. Python, Pylance, Python Indent, Python Test Explorer).
If you need to debug a remote process, rpdb provides some very nice capabilities beyond the standard python debugger, just insert an import rpdb; rpdb.set_trace()
in your command line, and from the console:
nc localhost 4444
to connect to the debugger.
Cobbler has a development branch called "master" (where the action is), and branches for all releases that are in maintenance mode. All work on new features should be done against the master branch. If you want to address bugs then please target the latest release branch, also please submit the fix against master. If your fix is specific for a specific release version the submission against master is not needed.
git branch -r
git checkout <branch>
git checkout -b <new branch name>
The website should contain promotional material and more complex guides. More information about how to contribute there, can be found here.
Website: https://cobbler.github.io - Dokumentation: https://cobbler.readthedocs.io