From 237acd00f6a1540af022dfa22059e6b46af55600 2015-03-08 11:21:44 From: Branko Majic Date: 2015-03-08 11:21:44 Subject: [PATCH] MAR-7: Added initial documentation about the test site. --- diff --git a/docs/index.rst b/docs/index.rst index d8d555bb17d287bbb7060f1099689c98162ca4e5..977f54bd00cff0f99713defad889d14a279858b1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -59,6 +59,7 @@ Contents about usage rolereference + testsite releasenotes Indices and tables diff --git a/docs/testsite.rst b/docs/testsite.rst new file mode 100644 index 0000000000000000000000000000000000000000..5edde5e28f5bed78efff2096f577b8d37f7cc5a0 --- /dev/null +++ b/docs/testsite.rst @@ -0,0 +1,59 @@ +.. _testsite: + +Test Site +========= + +*Majic Ansible Roles* comes with a small sample test site configuration which +demonstrates use of every role. This test site also serves as starting point for +developing new roles etc, and can be used for testing regressions/breakages. + +The test site covers everything, starting from generating the Debian preseed +files, through bootstrap process for new nodes, and onto deployment of all +remaining roles. + +A number of playbooks is provided out of the box: + +bootstrap.yml (for bootstrapping a new node) + This playbook can be used for bootstrapping a new node. This playbook expects + that a server name is passed via extra variables in CLI. The server name has + to be included in the hosts file, of course. For example: + + .. code-block:: shell + + ansible-playbook -k -e server=ldap.example.com playbooks/bootstrap.yml + +ldap.yml + This playbook sets-up the LDAP servers. It is included in ``site.yml``. + +preseed.yml + This playbook sets-up the Debian preseed files. It is included in + ``site.yml``. + +site.yml + This playbook sets-up all servers, including preseed files on local host. + +In order to deploy the test site, the following steps would normally be taken: + +1. Generate the preseed files: + + .. code-block:: shell + + ansible-playbook playbooks/preseed.yml + +2. Install all servers using the generated preseed files. + +3. Invoke the ``bootstrap.yml`` playbook for every server, one by on. For + example: + + .. code-block:: shell + + ansible-playbook -k -e server=ldap.example.com playbooks/bootstrap.yml + +4. Finally, apply configuration on all servers: + + .. code-block:: shell + + ansible-playbook playbooks/site.yml + +For details on how the playbooks and configuration have been implemented, feel +free to browse the test site files (in directory ``testsite``).