mirror of
https://github.com/oskar456/dzonegit.git
synced 2024-05-11 05:55:41 +00:00
README update, first release to PyPi
This commit is contained in:
39
README.rst
39
README.rst
@ -1,29 +1,46 @@
|
|||||||
Git hooks to manage a repository of DNS zones
|
Git hooks to manage a repository of DNS zones
|
||||||
=============================================
|
=============================================
|
||||||
|
|
||||||
|
``dzonegit`` is a set of Git hooks allowing you to manage DNS zone files in a
|
||||||
|
git repository. First, zone file sanity checks are run by ``pre-commit`` hook
|
||||||
|
on your computer. After pushing changes to a bare repository on the DNS server,
|
||||||
|
the sanity checks are run again on the server and if everything is OK,
|
||||||
|
repository is checked out to a directory, DNS software configuration
|
||||||
|
snippets are re-generated from a simple template and finally reload command
|
||||||
|
is issued.
|
||||||
|
|
||||||
Main features
|
Main features
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
- check if zone file compiles properly using `named-compilezone(8)`_
|
- check if zone file compiles properly using `named-compilezone(8)`_
|
||||||
- autodetect zone name from file name or ``$ORIGIN`` directive
|
- autodetect zone name from file name or ``$ORIGIN`` directive
|
||||||
- enforce updating serial number when zone content is changed
|
- enforce updating serial number when zone content is changed
|
||||||
- both ``pre-commit`` and ``pre-receive``/``update`` hooks to enforce similar checks in the remote repository
|
- both ``pre-commit`` and ``pre-receive``/``update`` hooks to enforce similar checks in the remote repository
|
||||||
- ``post-receive`` hook to checkout the working copy from a bare repository, generate config snippets for various DNS server software and reload them
|
- ``post-receive`` hook to checkout the working copy from a bare repository, generate config snippets for various DNS server software and reload them
|
||||||
- only Python standard library is used
|
- only Python standard library is used
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Python 3.5+
|
- Python 3.5+
|
||||||
- `named-compilezone(8)`_ (part of BIND9 package)
|
- `named-compilezone(8)`_ (part of BIND9 package)
|
||||||
- git
|
- git
|
||||||
|
|
||||||
|
|
||||||
Instalation and usage
|
Instalation and usage
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Please note that this project is not finished yet. Detailed instructions will follow later.
|
- install required dependencies
|
||||||
|
- install ``dzonegit`` package using your favourite tool (``virtualenvwrapper``,
|
||||||
|
``venv``, ``pipenv``, etc.)
|
||||||
|
- in the local repository, create a symlink for the ``pre-commit`` hook:
|
||||||
|
|
||||||
|
``$ ln -s $(which dzonegit-pre-commit) /path/to/repo/.git/hooks/pre-commit``
|
||||||
|
- on the server, install some git repository management software, preferrably Gitolite_
|
||||||
|
- on the server, install either ``pre-receive`` or ``update`` hook (both do the same) as
|
||||||
|
well as ``post-receive`` hook. See `Gitolite documentation on how to add custom hooks`_
|
||||||
|
- on the server set up the configuration options for each repository
|
||||||
|
|
||||||
Configuration options
|
Configuration options
|
||||||
---------------------
|
---------------------
|
||||||
@ -144,3 +161,5 @@ Example JSON template for BIND
|
|||||||
|
|
||||||
.. _named-compilezone(8): https://linux.die.net/man/8/named-compilezone
|
.. _named-compilezone(8): https://linux.die.net/man/8/named-compilezone
|
||||||
.. _git-config(1): https://linux.die.net/man/1/git-config
|
.. _git-config(1): https://linux.die.net/man/1/git-config
|
||||||
|
.. _Gitolite: http://gitolite.com/gitolite/index.html
|
||||||
|
.. _Gitolite documentation on how to add custom hooks: http://gitolite.com/gitolite/cookbook/#hooks
|
||||||
|
7
setup.py
7
setup.py
@ -1,10 +1,15 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
readme = Path(__file__).with_name("README.rst").read_text()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="dzonegit",
|
name="dzonegit",
|
||||||
version="0.1",
|
version="0.1",
|
||||||
description="Git hooks to admin DNS zone files in git",
|
description="Git hooks to manage a repository of DNS zones",
|
||||||
|
long_description=readme,
|
||||||
|
long_description_content_type="text/x-rst",
|
||||||
|
url="https://github.com/oskar456/dzonegit",
|
||||||
author="Ondřej Caletka",
|
author="Ondřej Caletka",
|
||||||
author_email="ondrej@caletka.cz",
|
author_email="ondrej@caletka.cz",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
|
Reference in New Issue
Block a user