diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst index a7dbc54ec..6de3688dd 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/create_img.rst @@ -3,7 +3,7 @@ Select or Create an osimage Definition Before creating an image on xCAT, the distro media should be prepared ahead. That can be ISOs or DVDs. -XCAT use 'copycds' command to create an image which will be available to install nodes. "copycds" will copy all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory, and create several relevant osimage definitions by default. +XCAT use 'copycds' command to create an image which will be available to install nodes. ``copycds`` will copy all contents of Distribution DVDs/ISOs or Service Pack DVDs/ISOs to a destination directory, and create several relevant osimage definitions by default. If using an ISO, copy it to (or NFS mount it on) the management node, and then run: :: @@ -81,15 +81,16 @@ In this way, if you need to install some additional RPMs into your MN later, you **[Tips 2]** -You can create/modify an osimage definition easily based on the default osimage definition. The general steps are: +You can create/modify an osimage definition easily with any existing osimage definition, the command is :: + + mkdef -t osimage -o --template [=, ...] -* lsdef -t osimage -z --install-compute > .stanza -* modify .stanza according to your requirements -* cat .stanza| mkdef -z +Except the specified attributes **, the attributes of ** will inherit the values of template osimage **. -For example, if you need to change the osimage name to your favorite name, this command may be helpful: :: +As an example, the following command creates a new osimage "myosimage.rh7.compute.netboot" based on the existing osimage "rhels7.4-ppc64le-netboot-compute" with some customized attributes :: + + mkdef -t osimage -o myosimage.rh7.compute.netboot --template rhels7.4-ppc64le-netboot-compute synclists=/tmp/synclist otherpkgdir=/install/custom/osimage/myosimage.rh7.compute.netboot/3rdpkgs/ otherpkglist=/install/custom/osimage/myosimage.rh7.compute.netboot/3rd.pkglist - chdef -t osimage rhels6.2-x86_64-install-compute -n rhels6.2_myimage 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 3d516d760..01150949d 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 @@ -29,3 +29,32 @@ The manually defined node will be like this:: postbootscripts=otherpkgs postscripts=syslog,remoteshell,syncfiles primarynic=mac + + +``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" :: + + # 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. + + 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" + +* 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. + + 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 + + to display the full definition of template "ppc64le-openbmc-template", run :: + + # 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 optional attributes, which can be specified optionally, are denoted with the value ``OPTIONAL:`` in template definition