From f409a869ef2e604bb180384bc1385ad359499e70 Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Thu, 9 Aug 2018 13:51:00 +0800 Subject: [PATCH] Reformat instructions related with various OS Follow up to "Ironic behind mod wsgi" documentation [1]. This reformats instructions and clears TODOs in the document, similar places were found and fixed in this patch as well. References to Fedora 21 are removed. [1] https://review.openstack.org/#/c/407327 Change-Id: I3ded2614306df3f6ce4b1d14526b061dcaa7b829 --- doc/source/admin/console.rst | 51 ++++++++------ doc/source/contributor/dev-quickstart.rst | 66 +++++++++++-------- doc/source/install/configure-pxe.rst | 14 ++-- doc/source/install/deploy-ramdisk.rst | 34 ++++++---- .../include/configure-ironic-api-mod_wsgi.inc | 55 ++++++++-------- .../install/include/configure-ironic-api.inc | 11 ++-- .../include/configure-ironic-conductor.inc | 11 ++-- 7 files changed, 132 insertions(+), 110 deletions(-) diff --git a/doc/source/admin/console.rst b/doc/source/admin/console.rst index 28cc1d6c16..d67c7bf23d 100644 --- a/doc/source/admin/console.rst +++ b/doc/source/admin/console.rst @@ -20,32 +20,38 @@ The web console can be configured in Bare Metal service in the following way: is not present in base repositories, user must enable EPEL repository, you can find more from `FedoraProject page`_. - Installation example:: + Installation example: - Ubuntu: - sudo apt-get install shellinabox + Ubuntu:: - Fedora 21/RHEL7/CentOS7: - sudo yum install shellinabox + sudo apt-get install shellinabox - Fedora 22 or higher: - sudo dnf install shellinabox + RHEL7/CentOS7:: + + sudo yum install shellinabox + + Fedora:: + + sudo dnf install shellinabox You can find more about shellinabox on the `shellinabox page`_. You can optionally use the SSL certificate in shellinabox. If you want to use the SSL certificate in shellinabox, you should install openssl and generate the SSL certificate. - 1. Install openssl, for example:: + 1. Install openssl, for example: - Ubuntu: - sudo apt-get install openssl + Ubuntu:: - Fedora 21/RHEL7/CentOS7: - sudo yum install openssl + sudo apt-get install openssl - Fedora 22 or higher: - sudo dnf install openssl + RHEL7/CentOS7:: + + sudo yum install openssl + + Fedora:: + + sudo dnf install openssl 2. Generate the SSL certificate, here is an example, you can find more about openssl on the `openssl page`_:: @@ -163,16 +169,19 @@ Serial consoles can be configured in the Bare Metal service as follows: * Install socat on the ironic conductor node. Also, ``socat`` needs to be in the $PATH environment variable that the ironic-conductor service uses. - Installation example:: + Installation example: - Ubuntu: - sudo apt-get install socat + Ubuntu:: - Fedora 21/RHEL7/CentOS7: - sudo yum install socat + sudo apt-get install socat - Fedora 22 or higher: - sudo dnf install socat + RHEL7/CentOS7:: + + sudo yum install socat + + Fedora:: + + sudo dnf install socat * Append console parameters for bare metal PXE boot in the Bare Metal service configuration file. See the reference on how to configure them in diff --git a/doc/source/contributor/dev-quickstart.rst b/doc/source/contributor/dev-quickstart.rst index 9998cacdce..87d0c31866 100644 --- a/doc/source/contributor/dev-quickstart.rst +++ b/doc/source/contributor/dev-quickstart.rst @@ -40,7 +40,7 @@ well. sudo apt-get install build-essential python-dev libssl-dev python-pip libmysqlclient-dev libxml2-dev libxslt-dev libpq-dev git git-review libffi-dev gettext ipmitool psmisc graphviz libjpeg-dev -- Fedora 21/RHEL7/CentOS7:: +- RHEL7/CentOS7:: sudo yum install python-devel openssl-devel python-pip mysql-devel libxml2-devel libxslt-devel postgresql-devel git git-review libffi-devel gettext ipmitool psmisc graphviz gcc libjpeg-turbo-devel @@ -48,7 +48,7 @@ well. package git-review available", use the EPEL software repository. Instructions can be found at ``_. -- Fedora 22 or higher:: +- Fedora:: sudo dnf install python-devel openssl-devel python-pip mysql-devel libxml2-devel libxslt-devel postgresql-devel git git-review libffi-devel gettext ipmitool psmisc graphviz gcc libjpeg-turbo-devel @@ -236,43 +236,51 @@ This option will install RabbitMQ and MySQL on your local system. This may not be desirable in some situations (eg, you're developing from a laptop and do not want to run a MySQL server on it all the time). -#. Install rabbitmq-server:: +#. Install rabbitmq-server: - # install rabbit message broker - # Ubuntu/Debian: - sudo apt-get install rabbitmq-server + Ubuntu/Debian:: - # Fedora 21/RHEL7/CentOS7: - sudo yum install rabbitmq-server - sudo systemctl start rabbitmq-server.service + sudo apt-get install rabbitmq-server - # Fedora 22 or higher: - sudo dnf install rabbitmq-server - sudo systemctl start rabbitmq-server.service + RHEL7/CentOS7:: - # openSUSE/SLE 12: - sudo zypper install rabbitmq-server - sudo systemctl start rabbitmq-server.service + sudo yum install rabbitmq-server + sudo systemctl start rabbitmq-server.service -#. Install mysql-server:: + Fedora:: - # Ubuntu/Debian: - # sudo apt-get install mysql-server + sudo dnf install rabbitmq-server + sudo systemctl start rabbitmq-server.service - # Fedora 21/RHEL7/CentOS7: - # sudo yum install mariadb mariadb-server - # sudo systemctl start mariadb.service + openSUSE/SLE 12:: - # Fedora 22 or higher: - # sudo dnf install mariadb mariadb-server - # sudo systemctl start mariadb.service + sudo zypper install rabbitmq-server + sudo systemctl start rabbitmq-server.service - # openSUSE/SLE 12: - # sudo zypper install mariadb - # sudo systemctl start mysql.service +#. Install mysql-server: - # If using MySQL, you need to create the initial database - mysql -u root -pMYSQL_ROOT_PWD -e "create schema ironic" + Ubuntu/Debian:: + + sudo apt-get install mysql-server + + RHEL7/CentOS7:: + + sudo yum install mariadb mariadb-server + sudo systemctl start mariadb.service + + Fedora:: + + sudo dnf install mariadb mariadb-server + sudo systemctl start mariadb.service + + openSUSE/SLE 12:: + + sudo zypper install mariadb + sudo systemctl start mysql.service + + If using MySQL, you need to create the initial database:: + + mysql -u root -pMYSQL_ROOT_PWD -e "create schema ironic" .. note:: if you choose not to install mysql-server, ironic will default to using a local sqlite database. diff --git a/doc/source/install/configure-pxe.rst b/doc/source/install/configure-pxe.rst index 0fd1f7531e..097ae92488 100644 --- a/doc/source/install/configure-pxe.rst +++ b/doc/source/install/configure-pxe.rst @@ -23,11 +23,11 @@ node(s) where ``ironic-conductor`` is running. sudo apt-get install xinetd tftpd-hpa syslinux-common pxelinux - Fedora 21/RHEL7/CentOS7:: + RHEL7/CentOS7:: sudo yum install tftp-server syslinux-tftpboot xinetd - Fedora 22 or higher:: + Fedora:: sudo dnf install tftp-server syslinux-tftpboot xinetd @@ -128,11 +128,11 @@ steps on the ironic conductor node to configure the PXE UEFI environment. sudo apt-get install grub-efi-amd64-signed shim-signed - Fedora 21/RHEL7/CentOS7:: + RHEL7/CentOS7:: sudo yum install grub2-efi shim - Fedora 22 or higher:: + Fedora:: sudo dnf install grub2-efi shim @@ -147,7 +147,7 @@ steps on the ironic conductor node to configure the PXE UEFI environment. sudo cp /usr/lib/shim/shim.efi.signed /tftpboot/bootx64.efi sudo cp /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed /tftpboot/grubx64.efi - Fedora: (21 and later):: + Fedora:: sudo cp /boot/efi/EFI/fedora/shim.efi /tftpboot/bootx64.efi sudo cp /boot/efi/EFI/fedora/grubx64.efi /tftpboot/grubx64.efi @@ -272,11 +272,11 @@ on the Bare Metal service node(s) where ``ironic-conductor`` is running. apt-get install ipxe - Fedora 21/RHEL7/CentOS7:: + RHEL7/CentOS7:: yum install ipxe-bootimgs - Fedora 22 or higher:: + Fedora:: dnf install ipxe-bootimgs diff --git a/doc/source/install/deploy-ramdisk.rst b/doc/source/install/deploy-ramdisk.rst index 558f89a6e3..405984cfb1 100644 --- a/doc/source/install/deploy-ramdisk.rst +++ b/doc/source/install/deploy-ramdisk.rst @@ -29,31 +29,37 @@ CoreOS tools git clone https://git.openstack.org/openstack/ironic-python-agent -#. Install the requirements:: +#. Install the requirements: - Fedora 21/RHEL7/CentOS7: - sudo yum install docker gzip util-linux cpio findutils grep gpg + RHEL7/CentOS7:: - Fedora 22 or higher: - sudo dnf install docker gzip util-linux cpio findutils grep gpg + sudo yum install docker gzip util-linux cpio findutils grep gpg - Ubuntu 14.04 (trusty) or higher: - sudo apt-get install docker.io gzip uuid-runtime cpio findutils grep gnupg cgroup-lite + Fedora:: - SUSE: - sudo zypper install docker gzip util-linux cpio findutils grep gpg2 + sudo dnf install docker gzip util-linux cpio findutils grep gpg + + Ubuntu 14.04 (trusty) or higher:: + + sudo apt-get install docker.io gzip uuid-runtime cpio findutils grep gnupg cgroup-lite + + SUSE:: + + sudo zypper install docker gzip util-linux cpio findutils grep gpg2 #. Change directory to ``imagebuild/coreos``:: cd ironic-python-agent/imagebuild/coreos -#. Start the docker daemon:: +#. Start the docker daemon: - Fedora/RHEL7/CentOS7/SUSE: - sudo systemctl start docker + Fedora/RHEL7/CentOS7/SUSE:: - Ubuntu: - sudo service docker start + sudo systemctl start docker + + Ubuntu:: + + sudo service docker start #. Create the image:: diff --git a/doc/source/install/include/configure-ironic-api-mod_wsgi.inc b/doc/source/install/include/configure-ironic-api-mod_wsgi.inc index 4ca382fc33..0c5dcb80f1 100644 --- a/doc/source/install/include/configure-ironic-api-mod_wsgi.inc +++ b/doc/source/install/include/configure-ironic-api-mod_wsgi.inc @@ -6,36 +6,37 @@ Bare Metal service comes with an example file for configuring the #. Install the apache service: - .. TODO(mmitchell): Split this based on operating system - .. code-block:: console + RHEL7/CentOS7:: - Fedora 21/RHEL7/CentOS7: - sudo yum install httpd + sudo yum install httpd - Fedora 22 (or higher): - sudo dnf install httpd + Fedora:: - Debian/Ubuntu: - apt-get install apache2 + sudo dnf install httpd - SUSE: - zypper install apache2 + Debian/Ubuntu:: + + apt-get install apache2 + + SUSE:: + + zypper install apache2 #. Download the ``etc/apache2/ironic`` file from the Ironic project tree and copy it to the apache sites: - .. TODO(mmitchell): Split this based on operating system - .. code-block:: console + Fedora/RHEL7/CentOS7:: - Fedora/RHEL7/CentOS7: - sudo cp etc/apache2/ironic /etc/httpd/conf.d/ironic.conf + sudo cp etc/apache2/ironic /etc/httpd/conf.d/ironic.conf - Debian/Ubuntu: - sudo cp etc/apache2/ironic /etc/apache2/sites-available/ironic.conf + Debian/Ubuntu:: - SUSE - sudo cp etc/apache2/ironic /etc/apache2/vhosts.d/ironic.conf + sudo cp etc/apache2/ironic /etc/apache2/sites-available/ironic.conf + + SUSE:: + + sudo cp etc/apache2/ironic /etc/apache2/vhosts.d/ironic.conf #. Edit the recently copied ``/ironic.conf``: @@ -56,18 +57,18 @@ Bare Metal service comes with an example file for configuring the #. Enable the apache ``ironic`` in site and reload: - .. TODO(mmitchell): Split this based on operating system - .. code-block:: console + Fedora/RHEL7/CentOS7:: - Fedora/RHEL7/CentOS7: - sudo systemctl reload httpd + sudo systemctl reload httpd - Debian/Ubuntu: - sudo a2ensite ironic - sudo service apache2 reload + Debian/Ubuntu:: - SUSE: - sudo systemctl reload apache2 + sudo a2ensite ironic + sudo service apache2 reload + + SUSE:: + + sudo systemctl reload apache2 .. note:: The file ``ironic-api-wsgi`` is automatically generated by pbr and is diff --git a/doc/source/install/include/configure-ironic-api.inc b/doc/source/install/include/configure-ironic-api.inc index 69f51eb19a..52adb1d918 100644 --- a/doc/source/install/include/configure-ironic-api.inc +++ b/doc/source/install/include/configure-ironic-api.inc @@ -79,11 +79,10 @@ Configuring ironic-api service #. Restart the ironic-api service: - .. TODO(mmitchell): Split this based on operating system - .. code-block:: console + Fedora/RHEL7/CentOS7/SUSE:: - Fedora/RHEL7/CentOS7/SUSE: - sudo systemctl restart openstack-ironic-api + sudo systemctl restart openstack-ironic-api - Ubuntu: - sudo service ironic-api restart + Ubuntu:: + + sudo service ironic-api restart diff --git a/doc/source/install/include/configure-ironic-conductor.inc b/doc/source/install/include/configure-ironic-conductor.inc index 4d393d81bf..efb0c98cf6 100644 --- a/doc/source/install/include/configure-ironic-conductor.inc +++ b/doc/source/install/include/configure-ironic-conductor.inc @@ -161,13 +161,12 @@ Configuring ironic-conductor service #. Restart the ironic-conductor service: - .. TODO(mmitchell): Split this based on operating system - .. code-block:: console + Fedora/RHEL7/CentOS7/SUSE:: - Fedora/RHEL7/CentOS7/SUSE: - sudo systemctl restart openstack-ironic-conductor + sudo systemctl restart openstack-ironic-conductor - Ubuntu: - sudo service ironic-conductor restart + Ubuntu:: + + sudo service ironic-conductor restart .. _Keystoneauth documentation: https://docs.openstack.org/keystoneauth/latest/