From 2987f224f6b51907a6d0fd708f9817221fa89239 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 17 Oct 2019 12:01:14 -0400 Subject: [PATCH 1/3] Template docs and stanzas fixes --- .../ppc64le/discovery/manually_define.rst | 19 ++++++++----------- .../discovery/schedule_environment.rst | 2 +- .../objects/node/ppc64le-ipmi.stanza | 4 ++-- .../objects/node/ppc64le-openbmc.stanza | 4 ++-- .../objects/node/ppc64lekvmguest.stanza | 4 ++-- xCAT/templates/objects/node/x86_64.stanza | 4 ++-- .../objects/node/x86_64kvmguest.stanza | 4 ++-- 7 files changed, 19 insertions(+), 22 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst index c0e7a156c..f0a7ff7ee 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst @@ -14,7 +14,6 @@ Execute ``mkdef`` command to define the node: :: The manually defined node will be like this:: - # lsdef cn1 Object name: cn1 bmc=50.0.101.1 bmcpassword=admin @@ -33,28 +32,26 @@ The manually defined node will be like this:: ``mkdef --template`` can be used to create node definitions easily from the typical node definition templates or existing node definitions, some examples: -* creating node definition "cn2" with an existing node definition "cn1" :: +* creating node definition "cn2" from an existing node definition "cn1" :: - # mkdef -t node -o cn2 --template cn1 mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 - 1 object definitions have been created or modified. + mkdef -t node -o cn2 --template cn1 mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 - except the attributes specified(``mac``, ``ip`` and ``bmc`` attribute here), other attibutes of the newly created node "cn2" inherit the values of template node "cn1" + except for the attributes specified (``mac``, ``ip`` and ``bmc``), other attributes of the newly created node "cn2" inherit the values of template node "cn1" -* creating a node definition "cn2" with the template "ppc64le-openbmc-template"(openbmc controlled ppc64le node) shipped by xCAT :: +* creating a node definition "cn2" with the template "ppc64le-openbmc-template" (openbmc controlled ppc64le node) shipped by xCAT :: - # mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcpassword=USERID bmcusername=PASSW0RD - 1 object definitions have been created or modified. + mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcusername=USERID bmcpassword=PASSW0RD the unspecified attributes of newly created node "cn2" will be assigned with the default values in the template to list all the node definition templates available in xCAT, run :: - # lsdef -t node --template + lsdef -t node --template to display the full definition of template "ppc64le-openbmc-template", run :: - # lsdef -t node --template ppc64le-openbmc-template + lsdef -t node --template ppc64le-openbmc-template - the mandatory attributes, which must be specified while creating definitions with templates, are denoted with the value ``MANDATORY:`` in template definition. + the mandatory attributes, which must be specified while creating definitions with templates, are denoted with the value ``MANDATORY:`` in template definition. the optional attributes, which can be specified optionally, are denoted with the value ``OPTIONAL:`` in template definition diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/schedule_environment.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/schedule_environment.rst index a1a0eb8f6..a556870b1 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/schedule_environment.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/schedule_environment.rst @@ -5,7 +5,7 @@ Management Node info:: MN Hostname: xcat1 MN NIC info for Management Network(Host network): eth1, 10.0.1.1/16 - MN NIC info for Service Network(FSP/BMC nework): eth2, 50.0.1.1/16 + MN NIC info for Service Network(FSP/BMC network): eth2, 50.0.1.1/16 Dynamic IP range for Hosts: 10.0.100.1-10.0.100.100 Dynamic IP range for FSP/BMC: 50.0.100.1-50.0.100.100 diff --git a/xCAT/templates/objects/node/ppc64le-ipmi.stanza b/xCAT/templates/objects/node/ppc64le-ipmi.stanza index 3b134926d..706e6edf6 100644 --- a/xCAT/templates/objects/node/ppc64le-ipmi.stanza +++ b/xCAT/templates/objects/node/ppc64le-ipmi.stanza @@ -8,8 +8,8 @@ ppc64le-template: bmcusername="MANDATORY:the username of the BMC" cons=ipmi groups=all - ip=OPTIONAL:the ip address of the node - mac=OPTIONAL:the mac of the node + ip="MANDATORY:the ip address of the node" + mac="MANDATORY:the mac of the node" mgt=ipmi netboot=petitboot nodetype=mp diff --git a/xCAT/templates/objects/node/ppc64le-openbmc.stanza b/xCAT/templates/objects/node/ppc64le-openbmc.stanza index 43af130a9..e4418f9a1 100644 --- a/xCAT/templates/objects/node/ppc64le-openbmc.stanza +++ b/xCAT/templates/objects/node/ppc64le-openbmc.stanza @@ -8,8 +8,8 @@ ppc64le-openbmc-template: bmcusername="MANDATORY:the username of the BMC" cons=openbmc groups=all - ip=OPTIONAL:the ip address of the node - mac=OPTIONAL:the mac of the node + ip="MANDATORY:the ip address of the node" + mac="MANDATORY:the mac of the node" mgt=openbmc netboot=petitboot nodetype=mp diff --git a/xCAT/templates/objects/node/ppc64lekvmguest.stanza b/xCAT/templates/objects/node/ppc64lekvmguest.stanza index b6e28d1f2..afa31e27e 100644 --- a/xCAT/templates/objects/node/ppc64lekvmguest.stanza +++ b/xCAT/templates/objects/node/ppc64lekvmguest.stanza @@ -4,8 +4,8 @@ ppc64lekvmguest-template: objtype=node arch=ppc64le groups=all - ip="OPTIONAL:the ip address of the kvm guest" - mac="OPTIONAL:the mac of the kvm guest" + ip="MANDATORY:the ip address of the kvm guest" + mac="MANDATORY:the mac of the kvm guest" mgt=kvm netboot=grub2 vmcpus=2 diff --git a/xCAT/templates/objects/node/x86_64.stanza b/xCAT/templates/objects/node/x86_64.stanza index b59a46066..a2ad508d8 100644 --- a/xCAT/templates/objects/node/x86_64.stanza +++ b/xCAT/templates/objects/node/x86_64.stanza @@ -10,8 +10,8 @@ x86_64-template: getmac=ipmi groups=all hcp= - ip="OPTIONAL:the ip address of the node" - mac="OPTIONAL:the mac of the node" + ip="MANDATORY:the ip address of the node" + mac="MANDATORY:the mac of the node" mgt=ipmi netboot=xnba serialport=0 diff --git a/xCAT/templates/objects/node/x86_64kvmguest.stanza b/xCAT/templates/objects/node/x86_64kvmguest.stanza index 52d8efb5c..5b2329477 100644 --- a/xCAT/templates/objects/node/x86_64kvmguest.stanza +++ b/xCAT/templates/objects/node/x86_64kvmguest.stanza @@ -4,8 +4,8 @@ x86_64kvmguest-template: objtype=node arch=x86_64 groups=all - ip="OPTIONAL:the ip address of the kvm guest" - mac="OPTIONAL:the mac of the kvm guest" + ip="MANDATORY:the ip address of the kvm guest" + mac="MANDATORY:the mac of the kvm guest" mgt=kvm netboot=xnba serialport=0 From f32620c86577709394842d1672ba2f2d30dda8fe Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Thu, 17 Oct 2019 16:39:35 -0400 Subject: [PATCH 2/3] Use the openbmc is and pw in the example --- .../manage_clusters/ppc64le/discovery/manually_define.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst index f0a7ff7ee..1e7ba95f0 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/manually_define.rst @@ -40,7 +40,7 @@ The manually defined node will be like this:: * creating a node definition "cn2" with the template "ppc64le-openbmc-template" (openbmc controlled ppc64le node) shipped by xCAT :: - mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcusername=USERID bmcpassword=PASSW0RD + mkdef -t node -o cn2 --template ppc64le-openbmc-template mac=66:55:44:33:22:11 ip=172.12.139.2 bmc=172.11.139.2 bmcusername=root bmcpassword=0penBmc the unspecified attributes of newly created node "cn2" will be assigned with the default values in the template From 159942dc9b10a7d93b5bd233ccc4ed0150c1363f Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 21 Oct 2019 16:48:44 -0400 Subject: [PATCH 3/3] Make bmcuser, bmcpassword and mac optional, but ip mandatory in template --- xCAT/templates/objects/node/ppc64le-ipmi.stanza | 6 +++--- xCAT/templates/objects/node/ppc64le-openbmc.stanza | 6 +++--- xCAT/templates/objects/node/ppc64lekvmguest.stanza | 2 +- xCAT/templates/objects/node/x86_64.stanza | 6 +++--- xCAT/templates/objects/node/x86_64kvmguest.stanza | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xCAT/templates/objects/node/ppc64le-ipmi.stanza b/xCAT/templates/objects/node/ppc64le-ipmi.stanza index 706e6edf6..476b45dd8 100644 --- a/xCAT/templates/objects/node/ppc64le-ipmi.stanza +++ b/xCAT/templates/objects/node/ppc64le-ipmi.stanza @@ -4,12 +4,12 @@ ppc64le-template: objtype=node arch=ppc64le bmc="MANDATORY:The hostname or ip address of the BMC adapater" - bmcpassword="MANDATORY:the password of the BMC" - bmcusername="MANDATORY:the username of the BMC" + bmcpassword="OPTIONAL:the password of the BMC" + bmcusername="OPTIONAL:the username of the BMC" cons=ipmi groups=all ip="MANDATORY:the ip address of the node" - mac="MANDATORY:the mac of the node" + mac="OPTIONAL:the mac of the node" mgt=ipmi netboot=petitboot nodetype=mp diff --git a/xCAT/templates/objects/node/ppc64le-openbmc.stanza b/xCAT/templates/objects/node/ppc64le-openbmc.stanza index e4418f9a1..927331c0c 100644 --- a/xCAT/templates/objects/node/ppc64le-openbmc.stanza +++ b/xCAT/templates/objects/node/ppc64le-openbmc.stanza @@ -4,12 +4,12 @@ ppc64le-openbmc-template: objtype=node arch=ppc64le bmc="MANDATORY:The hostname or ip address of the BMC adapater" - bmcpassword="MANDATORY:the password of the BMC" - bmcusername="MANDATORY:the username of the BMC" + bmcpassword="OPTIONAL:the password of the BMC" + bmcusername="OPTIONAL:the username of the BMC" cons=openbmc groups=all ip="MANDATORY:the ip address of the node" - mac="MANDATORY:the mac of the node" + mac="OPTIONAL:the mac of the node" mgt=openbmc netboot=petitboot nodetype=mp diff --git a/xCAT/templates/objects/node/ppc64lekvmguest.stanza b/xCAT/templates/objects/node/ppc64lekvmguest.stanza index afa31e27e..2610d38b3 100644 --- a/xCAT/templates/objects/node/ppc64lekvmguest.stanza +++ b/xCAT/templates/objects/node/ppc64lekvmguest.stanza @@ -5,7 +5,7 @@ ppc64lekvmguest-template: arch=ppc64le groups=all ip="MANDATORY:the ip address of the kvm guest" - mac="MANDATORY:the mac of the kvm guest" + mac="OPTIONAL:the mac of the kvm guest" mgt=kvm netboot=grub2 vmcpus=2 diff --git a/xCAT/templates/objects/node/x86_64.stanza b/xCAT/templates/objects/node/x86_64.stanza index a2ad508d8..085ccc17e 100644 --- a/xCAT/templates/objects/node/x86_64.stanza +++ b/xCAT/templates/objects/node/x86_64.stanza @@ -4,14 +4,14 @@ x86_64-template: objtype=node arch=x86_64 bmc="MANDATORY:The hostname or ip address of the BMC adapater" - bmcpassword="MANDATORY:the password of the BMC" - bmcusername="MANDATORY:the username of the BMC" + bmcpassword="OPTIONAL:the password of the BMC" + bmcusername="OPTIONAL:the username of the BMC" cons=ipmi getmac=ipmi groups=all hcp= ip="MANDATORY:the ip address of the node" - mac="MANDATORY:the mac of the node" + mac="OPTIONAL:the mac of the node" mgt=ipmi netboot=xnba serialport=0 diff --git a/xCAT/templates/objects/node/x86_64kvmguest.stanza b/xCAT/templates/objects/node/x86_64kvmguest.stanza index 5b2329477..16494de27 100644 --- a/xCAT/templates/objects/node/x86_64kvmguest.stanza +++ b/xCAT/templates/objects/node/x86_64kvmguest.stanza @@ -5,7 +5,7 @@ x86_64kvmguest-template: arch=x86_64 groups=all ip="MANDATORY:the ip address of the kvm guest" - mac="MANDATORY:the mac of the kvm guest" + mac="OPTIONAL:the mac of the kvm guest" mgt=kvm netboot=xnba serialport=0