<commit_before>Intro
+++++


This is an ansible playbook that makes deploying bacula easy. It has a role
for:

  - Bacula director
  - Bacula file daemon (director client)
  - Bacula storage daemon
  - Multiple file daemons (clients)


Features
--------

  - Built-in distribution detection (can be easily extended for RHEL or
    different versions of Ubuntu)
  - When client are installed the configuration that director needs is pushed
    to the director.
  - Support for encrypted backups (you have to generate keys manually with the
    script)
  - Special multiline var for each client is possible.


Limitations
-----------


  - It's only tested for the standard small setup with the director, storage,
    and director filedaemon setup. (with multiple standard clients)
  - Can't be installed on windows and no python boxes (limitations of ansible)
  

Plans
-----

  - Add Almir web interface
  - Add AWS script for testing
  - Register this project on Galaxy
  - Support for TLS communication
  - Multiple directors and stuff

How can you help
----------------

  - Test if it works
  - Talk to me (brodul [/.at/.] brodul.org)
  - Improve documentation

How to use for your environment
-------------------------------

I would recommend you that you to reuse the roles.

see this two links:

https://groups.google.com/forum/#!msg/ansible-project/vgc2bFQgzmE/0SDKwCniPjgJ
http://www.ansibleworks.com/docs/playbooks_roles.html#id7

If you have other design patterns about reusage of ansible configuration please
contact brodul on Freenode IRC server.

UPDATE:

http://galaxy.ansibleworks.com/ is released will port this playbook there

.. WARNING::

  This is still in development.



How to test
-----------

.. NOTE::

  Will be updated soon.

- Make a lxc or virtualbox with clean Ubuntu 12.04 install with sshd.
- Bind VM port 22 to localhost 2222 (or edit testing inventory).
- Add your key to sudo user.
- Run: ansible-playbook -i testing testing-director-storage.yml -K (on the
  director/storage)
- Run: ansible-playbook -i testing testing-clients.yml -K (on the clients)
<commit_msg>Updateded testing docs<commit_after>Intro
+++++


This is an ansible playbook that makes deploying bacula easy. It has a role
for:

  - Bacula director
  - Bacula file daemon (director client)
  - Bacula storage daemon
  - Multiple file daemons (clients)


Features
--------

  - Built-in distribution detection (can be easily extended for RHEL or
    different versions of Ubuntu)
  - When client are installed the configuration that director needs is pushed
    to the director.
  - Support for encrypted backups (you have to generate keys manually with the
    script)
  - Special multiline var for each client is possible.


Limitations
-----------


  - It's only tested for the standard small setup with the director, storage,
    and director filedaemon setup. (with multiple standard clients)
  - Can't be installed on windows and no python boxes (limitations of ansible)
  

Plans
-----

  - Add Almir web interface
  - Add AWS script for testing
  - Register this project on Galaxy
  - Support for TLS communication
  - Multiple directors and stuff

How can you help
----------------

  - Test if it works
  - Talk to me (brodul [/.at/.] brodul.org)
  - Improve documentation

How to use for your environment
-------------------------------

I would recommend you that you to reuse the roles.

see this two links:

https://groups.google.com/forum/#!msg/ansible-project/vgc2bFQgzmE/0SDKwCniPjgJ
http://www.ansibleworks.com/docs/playbooks_roles.html#id7

If you have other design patterns about reusage of ansible configuration please
contact brodul on Freenode IRC server.

UPDATE:

http://galaxy.ansibleworks.com/ is released will port this playbook there

.. WARNING::

  This is still in development.



How to test
-----------

I recommend you use a public cloud for testing anything other will go also.
You should easily adapt to your testing infrastructure.

Add at least 3 instances (2 clients and 1 director/storage). I use the micro
instances on Amazon Web services EC2.

On your computer start ssh-agent and add your key with ssh-add. Make sure that
the agent propegates the key to the connected host.

Connect to the director instance. Install::

  - python-dev
  - python-virtualenv
  - git
  - openssl

Clone this.

Change directory to the cloned dir. Make a virtual-env in the cloned dir with::

  virtualenv .

Activate virtualenv and install ansible::

  . bin/activate
  pip install ansible

Set the correct hostnames in the testing inventory file. See example in the EC2
you need to setup the internal hostnames and domains.

Then you need to generate the master key pair and the client pairs.

For the generation of master keys run make_key_pair.sh.

Then set the group_vars/testing file. See example.

Then you need to generate the key pairs for each client in the system.
The first argument needs to be the hostname of a client without the domain.
See example::
  
  sh make_fd_pair.sh ip-172-31-7-237

Then run::

  ansible-playbook   testing-director-storage.yml -i testing  -u ubuntu

This will configure the director/storage.

Then run::

  ansible-playbook   testing-clients.yml -i testing  -u ubuntu

This will configure the director/storage.
  
{'fraction_non_alphanumeric': 0.08555744841945864, 'fraction_numerical': 0.0056785917092561046, 'mean_word_length': 2.9879245283018867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2058607', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1446, 'n_words': 685}