Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstack UPI: soft-anti-affinity policy for CP #3128

Merged
merged 1 commit into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/user/openstack/install_upi.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ $ ansible-playbook -i inventory.yaml 04_control-plane.yaml

Our control plane will consist of three nodes. The servers will be passed the `master-?-ignition.json` files prepared earlier.

The playbook places the Control Plane in a Server Group with "soft anti-affinity" policy.

The master nodes should load the initial Ignition and then keep waiting until the bootstrap node stands up the Machine Config Server which will provide the rest of the configuration.

### Control Plane Trunks (Kuryr SDN)
Expand Down
9 changes: 9 additions & 0 deletions upi/openstack/04_control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
with_indexed_items: "{{ ports.results }}"
when: os_networking_type == "Kuryr"

- name: 'Create the Control Plane server group'
os_server_group:
name: "{{ os_cp_server_group_name }}"
policies:
- "soft-anti-affinity"
register: "cp_group"

- name: 'Create the Control Plane servers'
os_server:
name: "{{ item.1 }}-{{ item.0 }}"
Expand All @@ -50,4 +57,6 @@
userdata: "{{ lookup('file', [item.1, item.0, 'ignition.json'] | join('-')) | string }}"
nics:
- port-name: "{{ os_port_master }}-{{ item.0 }}"
scheduler_hints:
group: "{{ cp_group.id }}"
with_indexed_items: "{{ [os_cp_server_name] * os_cp_nodes_number }}"
1 change: 1 addition & 0 deletions upi/openstack/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Server names
os_bootstrap_server_name: "{{ infraID }}-bootstrap"
os_cp_server_name: "{{ infraID }}-master"
os_cp_server_group_name: "{{ infraID }}-master-group"
os_compute_server_name: "{{ infraID }}-worker"
# Trunk names
os_cp_trunk_name: "{{ infraID }}-master-trunk"
Expand Down
5 changes: 5 additions & 0 deletions upi/openstack/down-04_control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
state: absent
with_indexed_items: "{{ [os_cp_server_name] * os_cp_nodes_number }}"

- name: 'Remove the Control Plane server group'
os_server_group:
name: "{{ os_cp_server_group_name }}"
state: absent

- name: 'Remove the Control Plane trunks'
os_trunk:
name: "{{ item.1 }}-{{ item.0 }}"
Expand Down