VScaler: Add/Remove nodes from the environment with Kolla
Jump to navigation
Jump to search
Prereqs
- Nodes to add should be pre-configured with docker etc.
- Dave has a playbook for this, but kolla has a command for this as well, which is kolla-ansible bootstrap-servers. This command will configure all the existing nodes as well, so needs more investigation to limit it to specific nodes.
- Upgrade/Downgrade ansible to 2.2:
pip install ansible==2.2Note: ansible 2.3 has a bug as far as I've read and won't work with the "--limit" option we are going to use below
- Add the following at line 15 of file /usr/share/kolla/ansible/site.yml:
line 15:
# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The
# # limit arg will cause the first play to gather facts only about that node,
# # meaning facts such as IP addresses for rabbitmq nodes etc. will be undefined
# # in the case of adding a single compute node.
# # We don't want to add the delegate parameters to the above play as it will
# # result in ((num_nodes-1)^2) number of SSHs when running for all nodes
# # which can be very inefficient.
- name: Gather facts for all hosts (if using --limit)
hosts: all
serial: '{{ serial|default("0") }}'
gather_facts: false
tasks:
- setup:
delegate_facts: True
delegate_to: "{{ item }}"
with_items: "{{ groups['all'] }}"
when:
- (play_hosts | length) != (groups['all'] | length)Destroy a configured node
Note: Change gpu07 in the following command to any node that you want to destroy. This node has to be in the inventory file.
ansible-playbook -i vScaler/deploy/multinode --limit=gpu07 -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e action=destroy /usr/share/kolla/ansible/destroy.ymlAdd a node
- Add the hostname of the node in the inventory file, under any category that you need it to be
- Change gpu01 in the following command to the node you want to add and run it:
ansible-playbook -i vScaler/deploy/multinode --limit=gpu01 -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e action=deploy /usr/share/kolla/ansible/site.yml