apealive-cookbooks / gitzone

Chef cookbook for git-shell managed BIND zone files
Other
1 stars 0 forks source link

gitzone cookbook

Chef cookbook for git-shell managed BIND zone files. The gitzone scripts are developed by the dyne.org.

NOTE: This cookbook is in DRAFT stage. Even the best practices are applied some conceptual failures may exist.

NOTE: In the next version will be defined LWRPs to create gitzone_managed zones. There is no significant impact for the early users but for sure all of the recipies will be simplified (so consider any rewrite/rewind).

Pull requests & suggestions are welcome.

Supported Platforms

Tested on:

Acknowledgement:

Attributes

Key Type Description Default
['gitzone']['preffix'] String gitzone install preffix /usr
['gitzone']['home'] String where to create gitzone home dir /home
['gitzone']['bind_repos_dir'] String Path where are bind configuration files reffering to gitzone repo are stored /etc/bind/repo
['gitzone']['user'] String gitzone system user to be created gitzone
['gitzone']['group'] String gitzone system group for gitzone user g
['gitzone']['user_ssh_pub_keys'] String ssh keys to be stored in authorized_keys (for remote access or dyn DNS feature) nil
['gitzone']['admin'] String system account where the repo clone is first created nil, by default uses gitzone_user home dir
['gitzone']['domains'] Array 2nd level domain names to be created/searched
['gitzone']['repo_url'] String where to clone gitzone code https://github.com/dyne/gitzone.git"
['gitzone']['repo_dir'] String where to clone gitzone source code /srv/repos/git
['gitzone']['repos'] String extends gitzone.conf $repos configuration

Usage

gitzone::default

Include gitzone in your node's run_list:

{
  "run_list": [
    "recipe[gitzone::default]"
  ]
}

Managing zone files

su - bob
git clone gitzone@localhost:zones/gitzone gitzone-admin
cd gitzone-admin
#edit zone files
git checkout master
git commit -am "updates"
git pull --rebase origin master
git push origin master
git pull

Dynamic DNS feature

TBD: Not yet tested. See original gitzone repository for usage details.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Author:: Petr Michalec (epcim@apealive.net)