-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support for LPAR as compute nodes for HCP (#358)
Support for LPAR as compute nodes for HCP 1. Network types - OSA - RoCE 2. Disk types - FCP - DASD - NVMe Updated Documentation --------- Signed-off-by: DAMISETTI-VEERABHADRARAO <[email protected]>
- Loading branch information
1 parent
46e6ebb
commit d530b2b
Showing
11 changed files
with
157 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
- name: Creating agents | ||
block: | ||
- name: Getting script for booting | ||
template: | ||
src: "{{ playbook_dir }}/../roles/boot_LPAR/templates/boot_lpar.py" | ||
dest: /root/ansible_workdir/boot_lpar.py | ||
|
||
- name: Debug | ||
debug: | ||
msg: "Booting agent-{{ item }}" | ||
|
||
- name: Booting LPAR | ||
shell: | | ||
python /root/ansible_workdir/boot_lpar.py \ | ||
--cpcname "{{ hcp.data_plane.lpar.nodes[item].name.split('lp')[0] }}" \ | ||
--lparname "{{ hcp.data_plane.lpar.nodes[item].name }}" \ | ||
--hmchost "{{ hcp.data_plane.lpar.nodes[item].hmc_host }}" \ | ||
--hmcuser "{{ hmca_username }}" \ | ||
--hmcpass "{{ hmca_password }}" \ | ||
--cpu "{{ hcp.data_plane.vcpus }}" \ | ||
--memory "{{ hcp.data_plane.memory }}" \ | ||
--kernel http://"{{ hcp.bastion_params.ip }}":8080/kernel.img \ | ||
--initrd http://"{{ hcp.bastion_params.ip }}":8080/initrd.img \ | ||
--livedisktype "{{ hcp.data_plane.lpar.nodes[item].live_disk.disk_type }}" \ | ||
--devicenr "{{ hcp.data_plane.lpar.nodes[item].live_disk.devicenr }}" \ | ||
--livedisklun "{{ hcp.data_plane.lpar.nodes[item].live_disk.lun }}" \ | ||
--livediskwwpn "{{ hcp.data_plane.lpar.nodes[item].live_disk.wwpn }}" \ | ||
--netset_ip "{{ hcp.data_plane.zvm.nodes[item].interface.ip }}" \ | ||
--netset_gateway "{{ hcp.data_plane.zvm.gateway }}" \ | ||
--netset_network_type "osa" \ | ||
--netset_network_device "{{ hcp.data_plane.zvm.nodes[item].interface.subchannels }}" \ | ||
--netset_password "{{ hcp.data_plane.lpar.nodes[item].live_disk.password }}" \ | ||
--netset_dns "{{ hcp.bastion_params.ip }}" \ | ||
--log_level DEBUG \ | ||
--cmdline "$(cat /root/ansible_workdir/agent-{{ item }}.parm)" | ||
- name: Wait for the agent to come up | ||
shell: oc get agents -n "{{ hcp.control_plane.clusters_namespace }}-{{ hcp.control_plane.hosted_cluster_name }}" --no-headers -o custom-columns=NAME:.metadata.name,APPROVED:.spec.approved | awk '$2 == "false"' | wc -l | ||
register: agent_count | ||
until: agent_count.stdout | int == 1 | ||
retries: 40 | ||
delay: 10 | ||
|
||
- name: Get the name of agent | ||
shell: oc get agents -n {{ hcp.control_plane.clusters_namespace }}-{{ hcp.control_plane.hosted_cluster_name }} --no-headers -o custom-columns=NAME:.metadata.name,APPROVED:.spec.approved | awk '$2 == "false"' | ||
register: agent_name | ||
|
||
- name: Approve agents | ||
shell: oc -n {{ hcp.control_plane.clusters_namespace }}-{{ hcp.control_plane.hosted_cluster_name }} patch agent {{ agent_name.stdout.split(' ')[0] }} -p '{"spec":{"approved":true,"hostname":"compute-{{ item }}.{{hcp.control_plane.hosted_cluster_name }}.{{ hcp.control_plane.basedomain }}"}}' --type merge |
2 changes: 1 addition & 1 deletion
2
roles/create_inventory_setup_hcp/templates/inventory_template.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
rd.neednet=1 ai.ip_cfg_override=1 console=ttysclp0 coreos.live.rootfs_url=http://{{ hcp.bastion_params.ip }}:8080/rootfs.img ip={{ hcp.data_plane.zvm.nodes[item].interface.ip }}::{{ hcp.data_plane.zvm.gateway }}:{{ hcp.data_plane.zvm.subnetmask }}{% if hcp.data_plane.zvm.network_mode | lower != 'roce' %}::{{ hcp.data_plane.zvm.nodes[item].interface.ifname }}:none{% endif %} nameserver={{ hcp.bastion_params.ip }} zfcp.allow_lun_scan=0 {% if hcp.data_plane.zvm.network_mode | lower != 'roce' %}rd.znet={{ hcp.data_plane.zvm.nodes[item].interface.nettype }},{{ hcp.data_plane.zvm.nodes[item].interface.subchannels }},{{ hcp.data_plane.zvm.nodes[item].interface.options }}{% endif %} {% if hcp.data_plane.zvm.disk_type | lower != 'fcp' %}rd.dasd=0.0.{{ hcp.data_plane.zvm.nodes[item].dasd.disk_id }}{% else %}rd.zfcp={{ hcp.data_plane.zvm.nodes[item].lun[0].paths[0].fcp}},{{ hcp.data_plane.zvm.nodes[item].lun[0].paths[0].wwpn }},{{ hcp.data_plane.zvm.nodes[item].lun[0].id }} {% endif %} random.trust_cpu=on rd.luks.options=discard ignition.firstboot ignition.platform.id=metal console=tty1 console=ttyS1,115200n8 coreos.inst.persistent-kargs="console=tty1 console=ttyS1,115200n8" | ||
{% if hcp.compute_node_type | lower == 'zvm' %} | ||
rd.neednet=1 ai.ip_cfg_override=1 console=ttysclp0 coreos.live.rootfs_url=http://{{ hcp.bastion_params.ip }}:8080/rootfs.img ip={{ hcp.data_plane.zvm.nodes[item].interface.ip }}::{{ hcp.data_plane.zvm.gateway }}:{{ hcp.data_plane.zvm.subnetmask }}{% if hcp.data_plane.zvm.network_mode | lower != 'roce' %}::{{ hcp.data_plane.zvm.nodes[item].interface.ifname }}:none{% endif %} nameserver={{ hcp.bastion_params.ip }} zfcp.allow_lun_scan=0 {% if hcp.data_plane.zvm.network_mode | lower != 'roce' %}rd.znet={{ hcp.data_plane.zvm.nodes[item].interface.nettype }},{{ hcp.data_plane.zvm.nodes[item].interface.subchannels }},{{ hcp.data_plane.zvm.nodes[item].interface.options }}{% endif %} {% if hcp.data_plane.zvm.disk_type | lower != 'fcp' %}rd.dasd=0.0.{{ hcp.data_plane.zvm.nodes[item].dasd.disk_id }}{% else %}rd.zfcp={{ hcp.data_plane.zvm.nodes[item].lun[0].paths[0].fcp}},{{ hcp.data_plane.zvm.nodes[item].lun[0].paths[0].wwpn }},{{ hcp.data_plane.zvm.nodes[item].lun[0].id }} {% endif %} random.trust_cpu=on rd.luks.options=discard ignition.firstboot ignition.platform.id=metal console=tty1 console=ttyS1,115200n8 coreos.inst.persistent-kargs="console=tty1 console=ttyS1,115200n8" | ||
{% else %} | ||
rd.neednet=1 ai.ip_cfg_override=1 console=ttysclp0 coreos.live.rootfs_url=http://{{ hcp.bastion_params.ip }}:8080/rootfs.img ip={{ hcp.data_plane.lpar.nodes[item].interface.ip }}::{{ hcp.data_plane.lpar.gateway }}:{{ hcp.data_plane.lpar.subnetmask }}{% if hcp.data_plane.lpar.network_mode | lower != 'roce' %}::{{ hcp.data_plane.lpar.nodes[item].interface.ifname }}:none{% endif %} nameserver={{ hcp.bastion_params.ip }} zfcp.allow_lun_scan=0 {% if hcp.data_plane.lpar.network_mode | lower != 'roce' %}rd.znet={{ hcp.data_plane.lpar.nodes[item].interface.nettype }},{{ hcp.data_plane.lpar.nodes[item].interface.subchannels }},{{ hcp.data_plane.lpar.nodes[item].interface.options }}{% endif %} {% if hcp.data_plane.lpar.disk_type | lower != 'nvme' %}{% if hcp.data_plane.lpar.disk_type | lower != 'fcp' %}rd.dasd=0.0.{{ hcp.data_plane.lpar.nodes[item].dasd.disk_id }}{% else %}rd.zfcp={{ hcp.data_plane.lpar.nodes[item].lun[0].paths[0].fcp}},{{ hcp.data_plane.lpar.nodes[item].lun[0].paths[0].wwpn }},{{ hcp.data_plane.lpar.nodes[item].lun[0].id }} {% endif %} {% endif %} random.trust_cpu=on rd.luks.options=discard ignition.firstboot ignition.platform.id=metal console=tty1 console=ttyS1,115200n8 coreos.inst.persistent-kargs="console=tty1 console=ttyS1,115200n8" | ||
{% endif %} |