diff --git a/README.md b/README.md index f7f6249..11d5cbd 100644 --- a/README.md +++ b/README.md @@ -54,14 +54,20 @@ are: ### Running Tenks -Currently, Tenks does not have a CLI or wrapper. It can be run by calling -`ansible-playbook --inventory ansible/inventory ansible/run.yml --extra-vars=@override.yml`, -where `override.yml` is the path to your override file. The `run.yml` playbook -includes various constituent playbooks which perform different parts of the -deployment. An individual section of Tenks can be run separately by -substituting `ansible/run.yml` in the command above with the path to the -playbook you want to run. The current playbooks can be seen in the Ansible -structure diagram in the *Development* section. +Currently, Tenks does not have a CLI or wrapper. Deployment can be run by +calling `ansible-playbook --inventory ansible/inventory ansible/deploy.yml +--extra-vars=@override.yml`, where `override.yml` is the path to your override +file. + +The `deploy.yml` playbook will run deployment from start to finish; +`teardown.yml` is `deploy.yml`'s "mirror image" to tear down a cluster. These +playbooks automatically set `cmd` appropriately, and they contain various +constituent playbooks which perform different parts of the deployment. An +individual section of Tenks can be run separately by substituting +`ansible/deploy.yml` in the command above with the path to the playbook(s) you +want to run. The current playbooks can be seen in the Ansible structure diagram +in the *Development* section. Bear in mind that you will have to set `cmd` in +your override file if you are running any of the sub-playbooks individually. ## Development diff --git a/ansible/run.yml b/ansible/deploy.yml similarity index 89% rename from ansible/run.yml rename to ansible/deploy.yml index 1868a07..433fa84 100644 --- a/ansible/run.yml +++ b/ansible/deploy.yml @@ -1,10 +1,15 @@ --- -- name: Perform deployment host configuration - import_playbook: host_setup.yml +- hosts: all + tasks: + - set_fact: + cmd: deploy - name: Schedule nodes import_playbook: schedule.yml +- name: Perform deployment host configuration + import_playbook: host_setup.yml + - name: Configure node networking import_playbook: node_networking.yml diff --git a/ansible/teardown.yml b/ansible/teardown.yml new file mode 100644 index 0000000..a94c9ce --- /dev/null +++ b/ansible/teardown.yml @@ -0,0 +1,26 @@ +--- +- hosts: all + tasks: + - set_fact: + cmd: teardown + +- name: Schedule removal of nodes + import_playbook: schedule.yml + +- name: Deregister flavors in Nova + import_playbook: flavor_registration.yml + +- name: Perform Ironic node deconfiguration + import_playbook: node_enrolment.yml + +- name: Deconfigure virtual node BMCs + import_playbook: node_bmc.yml + +- name: De-instantiate nodes + import_playbook: node_instantiation.yml + +- name: Deconfigure node networking + import_playbook: node_networking.yml + +- name: Perform deployment host deconfiguration + import_playbook: host_setup.yml diff --git a/assets/tenks_ansible_structure.png b/assets/tenks_ansible_structure.png index f5e6758..00bf582 100644 Binary files a/assets/tenks_ansible_structure.png and b/assets/tenks_ansible_structure.png differ