From 964e844b737ffdbaf3250478f7b17b0d4af2e283 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 19 Sep 2018 15:08:46 -0400 Subject: [PATCH 1/4] Improve flow and grammar for openbmc python installation doc --- .../scalability/python/install/rpm.rst | 113 ++++++++++-------- 1 file changed, 63 insertions(+), 50 deletions(-) diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst index 91763ceab..5c786dce4 100644 --- a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst @@ -1,117 +1,130 @@ Using RPM (recommended) ======================= -**Support is only for RHEL 7.5 for Power LE (Power 9)** +.. note:: Supported only on RHEL 7.5 for Power 9 LE -If you want to install ``xCAT-openbmc-py`` on SN manually, please accoring **install xCAT-openbmc-py on MN** part. But if you hope xCAT could install it automatically, please config as **Install xCAT-openbmc-py on SN** part. +.. note:: In a herarchical environment ``xCAT-openbmc-py`` must be installed on both Management and Service nodes. On Service node ``xCAT-openbmc-py`` can be installed directly by following instructions in **Install xCAT-openbmc-py on MN**, or ``xCAT-openbmc-py`` can be installed on Service node from Management node by following instructions in **Install xCAT-openbmc-py on SN from MN** Install xCAT-openbmc-py on MN ----------------------------- -The following repositories should be configured on your Management Node (and Service Nodes). +The following repositories should be configured on your Management Node. - * RHEL 7.5 OS Repository - * RHEL 7.5 Extras Repository - * RHEL 7 EPEL Repo (https://fedoraproject.org/wiki/EPEL) - * Fedora28 Repo (for ``gevent``, ``greenlet``) + * RHEL 7.5 OS repository + * RHEL 7.5 Extras repository + * RHEL 7 EPEL repository (https://fedoraproject.org/wiki/EPEL) + * Fedora28 reposotory (for ``gevent`` and ``greenlet``) -#. Configure the MN/SN to the RHEL 7.5 OS Repo +#. Configure RHEL 7.5 OS repository -#. Configure the MN/SN to the RHEL 7.5 Extras Repo +#. Configure RHEL 7.5 Extras repository -#. Configure the MN/SN to the EPEL Repo (https://fedoraproject.org/wiki/EPEL) :: +#. Configure EPEL repository :: yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -#. Create a local Fedora28 Repo and Configure the MN/SN to the FC28 Repo +#. Create a local Fedora28 repository and configure the MN to the FC28 Repo - Here's an example to configure the Fedora 28 repo at ``/install/repos/fc28`` + Here's an example to configure the Fedora 28 repository at ``/install/repos/fc28`` - #. Make the target repo directory on the MN: :: + #. Make the target repository directory on the MN: :: mkdir -p /install/repos/fc28/ppc64le/Packages - #. Download the rpms from the Internet: :: + #. Download the rpms: :: cd /install/repos/fc28/ppc64le/Packages wget https://www.rpmfind.net/linux/fedora-secondary/releases/28/Everything/ppc64le/os/Packages/p/python2-gevent-1.2.2-2.fc28.ppc64le.rpm wget https://www.rpmfind.net/linux/fedora-secondary/releases/28/Everything/ppc64le/os/Packages/p/python2-greenlet-0.4.13-2.fc28.ppc64le.rpm - #. Create a yum repo in that directory: :: + #. Create a repository in that directory: :: cd /install/repos/fc28/ppc64le/ createrepo . -#. Install ``xCAT-openbmc-py`` using ``yum``: :: + #. Create a repo file ``/etc/yum.repos.d/fc28.repo`` and set its contents: :: + + [fc28] + name=Fedora28 yum repository for gevent and greenlet + baseurl=file:///install/repos/fc28/ppc64le/ + enabled=1 + gpgcheck=0 + +#. Install ``xCAT-openbmc-py`` : :: yum install xCAT-openbmc-py - **Note**: The install will fail if the dependencies cannot be met. +Install xCAT-openbmc-py on SN from MN +------------------------------------- -Install xCAT-openbmc-py on SN ------------------------------ +#. Copy ``Packages`` directory containing ``gevent`` and ``greenlet`` rpms from ``/install/repos/fc28/ppc64le`` to the directory pointed to by ``otherpkgdir`` attribute of the osimage. :: -For all types of SN installation, need to create repo for ``gevent`` and ``greenlet`` and config ``otherpkglist`` of osimage on MN + # Display the directory of otherpkgdir + lsdef -t osimage rhels7.5-ppc64le-install-service -i otherpkgdir -c -#. Create the repo at ``otherpkgdir`` path as the example above, could run ``lsdef -t osimage ---service`` to get the path :: + # Create Packages directory + mkdir /install/post/otherpkgs/rhels7.5-alternate/ppc64le/xcat/Packages - # lsdef -t osimage rhels7.5-ppc64le-install-service | grep otherpkgdir - otherpkgdir=/install/post/otherpkgs/rhels7.5/ppc64le + # Copy rpms + cp /install/repos/fc28/ppc64le/Packages/*.rpm /install/post/otherpkgs/rhels7.5-alternate/ppc64le/xcat/Packages -#. Configure ``otherpkglist`` of the current osimage :: + - # lsdef -t osimage rhels7.5-ppc64le-install-service | grep otherpkglist - otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.otherpkgs.pkglist +#. Configure ``otherpkglist`` attribute of the osimage :: + + chdef -t osimage rhels7.5-ppc64le-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.otherpkgs.pkglist + +#. Add the following entries to the contents of ``/opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.otherpkgs.pkglist`` :: - # cat /opt/xcat/share/xcat/install/rh/service.rhels7.ppc64le.otherpkgs.pkglist ... xcat/Packages/python2-gevent xcat/Packages/python2-greenlet xcat/xcat-core/xCAT-openbmc-py -Install on diskful SN by updatenode -``````````````````````````````````` +#. Choose one of the 3 methods below to complete the installation -If you have installed SN without ``xCAT-openbmc-py package``, could run updatenode to install it. +Install on diskful SN using updatenode +`````````````````````````````````````` -#. Sync epel repo and key file :: +If SN was installed without ``xCAT-openbmc-py`` package, ``updatenode`` can be used to install that package. - # rsync -v /etc/yum.repos.d/epel.repo root@10.3.17.17:/etc/yum.repos.d/ - # rsync -v /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 root@10.3.17.17:/etc/pki/rpm-gpg/ +#. Sync EPEL repository and key file :: + + rsync -v /etc/yum.repos.d/epel.repo root@:/etc/yum.repos.d/ + rsync -v /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 root@:/etc/pki/rpm-gpg/ #. Update packages on SN :: - # updatenode service -S + updatenode -S -Install on diskful SN -````````````````````` +Install on diskful SN using rinstall +```````````````````````````````````` -#. Configure ``synclists`` of osimage :: +#. Configure ``synclists`` attribute of osimage :: - # lsdef -t osimage rhels7.5-ppc64le-install-service | grep synclists - synclists=/install/custom/netboot/compute.synclist + chdef -t osimage rhels7.5-ppc64le-install-service synclists=/install/custom/netboot/compute.synclist + +#. Add the following to the contents of ``/install/custom/netboot/compute.synclist`` :: - # cat /install/custom/netboot/compute.synclist ... /etc/yum.repos.d/epel.repo -> /etc/yum.repos.d/epel.repo /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 -> /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 #. Install SN :: - # rinstall service osimage=rhels7.5-ppc64le-install-service + rinstall osimage=rhels7.5-ppc64le-install-service -Install on diskless SN -`````````````````````` +Install on diskless SN using rinstall +````````````````````````````````````` -#. Add epel online repo https://dl.fedoraproject.org/pub/epel/7/ppc64le to ``pkgdir`` :: +#. Add EPEL online repository https://dl.fedoraproject.org/pub/epel/7/ppc64le to ``pkgdir`` attribute of osimage:: - # lsdef -t osimage -o rhels7.5-ppc64le-netboot-service | grep pkgdir - pkgdir=/install/rhels7.5/ppc64le,https://dl.fedoraproject.org/pub/epel/7/ppc64le + chdef -t osimage -o rhels7.5-ppc64le-netboot-service -p pkgdir=https://dl.fedoraproject.org/pub/epel/7/ppc64le -#. Install SN :: +#. Install diskless SN :: - # genimage rhels7.5-ppc64le-netboot-service - # packimage rhels7.5-ppc64le-netboot-service - # rinstall service osimage=rhels7.5-ppc64le-netboot-service + genimage rhels7.5-ppc64le-netboot-service + packimage rhels7.5-ppc64le-netboot-service + rinstall osimage=rhels7.5-ppc64le-netboot-service From 79aa6a5dc3a772e9dad81cbcccda1576c8712e9c Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 19 Sep 2018 15:13:45 -0400 Subject: [PATCH 2/4] Eliminate some formatting errors when building the docs --- docs/source/advanced/goconserver/index.rst | 1 - docs/source/advanced/restapi/restapi_setup/restapi_setup.rst | 2 +- .../guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst | 2 ++ .../common/deployment/syncfile/syncfile_synclist_file.rst | 2 +- docs/source/guides/admin-guides/references/man1/piflash.1.rst | 2 +- xCAT-client/pods/man1/piflash.1.pod | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/advanced/goconserver/index.rst b/docs/source/advanced/goconserver/index.rst index 39f3ff2cc..50116e9ed 100644 --- a/docs/source/advanced/goconserver/index.rst +++ b/docs/source/advanced/goconserver/index.rst @@ -5,7 +5,6 @@ Go Conserver programming language. For more information, see https://github.com/xcat2/goconserver/ .. toctree:: - :maxdepth: 2 quickstart.rst diff --git a/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst b/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst index c8fcc0dfb..73b452a42 100644 --- a/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst +++ b/docs/source/advanced/restapi/restapi_setup/restapi_setup.rst @@ -1,5 +1,5 @@ Enable the HTTPS protocol for REST API -===================================== +====================================== To improve the security between the REST API clients and server, enabling the secure transfer protocol (https) is the default configuration. diff --git a/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst b/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst index d1ff05af1..5d36de561 100644 --- a/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst +++ b/docs/source/guides/admin-guides/basic_concepts/xcat_db/regexp_db.rst @@ -120,6 +120,7 @@ xCAT provides several functions that can simplify regular expressions. +-----------+-----------+-----------+-----------+ | row2-col1 | row2-col2 | row2-col3 | row2-col4 | +-----------+-----------+-----------+-----------+ + To obtain the rack index, use ``|row(\d+)-col(\d+)|(dim2idx($1, 4, $2))|``. This maps the racks to: +---+---+---+---+ @@ -127,6 +128,7 @@ xCAT provides several functions that can simplify regular expressions. +---+---+---+---+ | 5 | 6 | 7 | 8 | +---+---+---+---+ + Note that the size of the highest dimension (2 rows) is not needed, and all values are one-indexed. If each rack contains 20 nodes, use ``|row(\d+)-col(\d+)-node(\d+)|(dim2idx($1, 4, $2, 20, $3)`` to determine a node index (useful for determining IP addresses). diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst index 13e599054..23a8175b4 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst @@ -19,7 +19,7 @@ The path_of_src_file* should be the full path of the source file on the Manageme The path_of_dst_file* should be the full path of the destination file on target node. Please make sure path_of_dst_file* is not a existing directory on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. -The path_of_dst_directory should be the full path of the destination directory. Please make sure *eth_of_dst_directory is not a existing file on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. +The path_of_dst_directory should be the full path of the destination directory. Please make sure path_of_dst_directory is not a existing file on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. Since the synclist file is for common purpose, the target node need not be configured in it. diff --git a/docs/source/guides/admin-guides/references/man1/piflash.1.rst b/docs/source/guides/admin-guides/references/man1/piflash.1.rst index 1959a893e..887cab7c3 100644 --- a/docs/source/guides/admin-guides/references/man1/piflash.1.rst +++ b/docs/source/guides/admin-guides/references/man1/piflash.1.rst @@ -11,7 +11,7 @@ SYNOPSIS ******** -\ **piflash**\ -**\ **-package +\ **piflash**\ \ *noderange*\ -**\ **-package \ *filename*\ *********** diff --git a/xCAT-client/pods/man1/piflash.1.pod b/xCAT-client/pods/man1/piflash.1.pod index 9d4752f5f..c689e024c 100644 --- a/xCAT-client/pods/man1/piflash.1.pod +++ b/xCAT-client/pods/man1/piflash.1.pod @@ -5,7 +5,7 @@ B - Remotely applies firmware updates to servers. =head1 SYNOPSIS -B --package +B I --package I =head1 DESCRIPTION From 7ba6f1a6f925f070c97193ed5b5bba98d6159813 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Wed, 19 Sep 2018 16:56:49 -0400 Subject: [PATCH 3/4] Add attention that service node needs internet access --- .../coral/cluster_mgmt/scalability/python/install/rpm.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst index 5c786dce4..6330e5dcc 100644 --- a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst @@ -57,6 +57,8 @@ The following repositories should be configured on your Management Node. Install xCAT-openbmc-py on SN from MN ------------------------------------- +.. attention:: Instructions below assume Service node has access to the Internet. If not, a local EPEL repository would need to be configured on the Management node, similar to the RHEL Extras repository. + #. Copy ``Packages`` directory containing ``gevent`` and ``greenlet`` rpms from ``/install/repos/fc28/ppc64le`` to the directory pointed to by ``otherpkgdir`` attribute of the osimage. :: # Display the directory of otherpkgdir From e80c7ca27063ae94c4f50a959811b591b6158266 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 25 Sep 2018 11:25:54 -0400 Subject: [PATCH 4/4] Review suggestions --- .../syncfile/syncfile_synclist_file.rst | 17 +++++++++-------- .../scalability/python/install/rpm.rst | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst index 23a8175b4..61cff2220 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/syncfile/syncfile_synclist_file.rst @@ -15,11 +15,11 @@ The basic entry format looks like following: :: path_of_src_file1 -> path_of_dst_directory path_of_src_file1 path_of_src_file2 ... -> path_of_dst_directory -The path_of_src_file* should be the full path of the source file on the Management Node. +The ``path_of_src_file*`` should be the full path of the source file on the Management Node. -The path_of_dst_file* should be the full path of the destination file on target node. Please make sure path_of_dst_file* is not a existing directory on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. +The ``path_of_dst_file*`` should be the full path of the destination file on target node. Make sure ``path_of_dst_file*`` is not a existing directory on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. -The path_of_dst_directory should be the full path of the destination directory. Please make sure path_of_dst_directory is not a existing file on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. +The ``path_of_dst_directory`` should be the full path of the destination directory. Make ``sure path_of_dst_directory`` is not a existing file on target node, otherwise, the file sync with ``updatenode -r /usr/bin/scp`` or ``xdcp -r /usr/bin/scp`` will fail. Since the synclist file is for common purpose, the target node need not be configured in it. @@ -37,7 +37,7 @@ sync file **/etc/file4** to the file **/etc/tmp/file5** on the node( different f /etc/file4 -> /etc/tmp/file5 -sync the multiple files **/etc/file1**, **/etc/file2**, **/etc/file3**, ... to the directory **/tmp/etc** (**/tmp/etc** must be a directory when multiple files are synced at one time). If the directory does not exist,**xdcp** will create it. :: +sync the multiple files **/etc/file1**, **/etc/file2**, **/etc/file3**, ... to the directory **/tmp/etc** (**/tmp/etc** must be a directory when multiple files are synced at one time). If the directory does not exist, **xdcp** will create it. :: /etc/file1 /etc/file2 /etc/file3 -> /tmp/etc @@ -116,7 +116,8 @@ Advanced synclist file features After you define the files to rsync in the syncfile, you can add an **EXECUTEALWAYS** clause in the syncfile. The **EXECUTEALWAYS** clause will list all the postscripts you would always like to run after the files are sync'd, whether or not any file is actually updated. The files in this list must be added to the list of files to rsync, if hierarchical. -For example, your rsyncfile may look like this. **Note: the path to the file to EXECUTE, is the location of the *.post file on the MN**. :: +For example, your rsyncfile may look like this. +.. note:: the path to the file to EXECUTE, is the location of the *.post file on the MN**. :: /tmp/share/file2 -> /tmp/file2 @@ -160,7 +161,7 @@ When you use the **APPEND** clause, the file (left) of the arrow is appended to The script creates a backup of the original file on the node in the directory defined by the site table nodesyncfiledir attribute, which is **/var/xcat/node/syncfiles** by default. To update the original file when using the function, you need to rsync a new original file to the node, removed the old original from the **/var/xcat/node/syncfiles/org** directory. If you want to cleanup all the files for the append function on the node, you can use the ``xdsh -c`` flag. See man page for ``xdsh``. -Note:no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS and APPEND** clause fall in the synclist file. +.. note:: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS and APPEND** clause fall in the synclist file. You can add an **MERGE** clause to your syncfile. This is only supported on Linux. @@ -184,9 +185,9 @@ For example, your synclist file may look like this :: /etc/mydir/mergeshadow -> /etc/shadow /etc/mydir/mergegroup -> /etc/group -When you use the **MERGE** clause, the file (left) of the arrow is merged into the file right of the arrow. It will replace any common userid's found in those files and add new userids. The /opt/xcat/share/xcat/scripts/xdcpmerge.sh is used to accomplish this. +When you use the **MERGE** clause, the file (left) of the arrow is merged into the file right of the arrow. It will replace any common userid's found in those files and add new userids. The **/opt/xcat/share/xcat/scripts/xdcpmerge.sh** is used to accomplish this. -Note: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS,APPEND and MERGE** clause fall in the synclist file. +.. note:: no order of execution may be assumed by the order that the **EXECUTE,EXECUTEALWAYS,APPEND and MERGE** clause fall in the synclist file. .. _the_localtion_of_synclist_file_for_updatenode_label: diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst index 6330e5dcc..f7a88d760 100644 --- a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst @@ -1,7 +1,7 @@ Using RPM (recommended) ======================= -.. note:: Supported only on RHEL 7.5 for Power 9 LE +.. note:: Supported only on RHEL 7.5 for POWER9 .. note:: In a herarchical environment ``xCAT-openbmc-py`` must be installed on both Management and Service nodes. On Service node ``xCAT-openbmc-py`` can be installed directly by following instructions in **Install xCAT-openbmc-py on MN**, or ``xCAT-openbmc-py`` can be installed on Service node from Management node by following instructions in **Install xCAT-openbmc-py on SN from MN** @@ -13,7 +13,7 @@ The following repositories should be configured on your Management Node. * RHEL 7.5 OS repository * RHEL 7.5 Extras repository * RHEL 7 EPEL repository (https://fedoraproject.org/wiki/EPEL) - * Fedora28 reposotory (for ``gevent`` and ``greenlet``) + * Fedora28 repository (for ``gevent`` and ``greenlet``) #. Configure RHEL 7.5 OS repository