.. _installation-prereqs:


==========================
Installation Prerequisites
==========================

.. begin-install-prereqs

Several pre-requisites must be completed prior to starting the |prod|
installation.

Before attempting to install |prod|, ensure that you have the following:


-   The |prod-long| host installer ISO image file.

-   The ``update-iso.sh`` script.

-   *Optionally*, if required, update the ISO image to modify installation boot
    parameters, automatically select boot menu options and/or add a kickstart
    file to automatically perform configurations such as configuring the initial
    IP Interface for bootstrapping.

    Use the ``update-iso.sh`` script from |dnload-loc|. The script syntax and
    options are:

    .. code-block::

        update-iso.sh --initial-password <password> -i <input bootimage.iso> -o <output bootimage.iso>
            [ -a <ks-addon.cfg> ] [ -p param=value ]
            [ -d <default menu option> ] [ -t <menu timeout> ]
            -i <file>: Specify input ISO file
            -o <file>: Specify output ISO file
            -a <file>: Specify ks-addon.cfg file
            --initial-password <password>: Specify the initial login password for sysadmin user
            -p <p=v>:  Specify boot parameter

            Example:
                -p instdev=/dev/disk/by-path/pci-0000:00:0d.0-ata-1.0

            -d <default menu option>:
                Specify default boot menu option:
                0 - Standard Controller, Serial Console
                1 - Standard Controller, Graphical Console
                2 - AIO, Serial Console
                3 - AIO, Graphical Console
                4 - AIO Low-latency, Serial Console
                5 - AIO Low-latency, Graphical Console
                NULL - Clear default selection
            -t <menu timeout>:
                Specify boot menu timeout, in seconds

    The following example ``ks-addon.cfg`` file, used with the ``-a`` option,
    sets up an initial IP interface at boot time by defining a |VLAN| on an
    Ethernet interface with with ``static`` assigned |VLAN| addresses:

    .. code-block::

        #### start ks-addon.cfg
        RAW_DEV=enp24s0f0
        OAM_VLAN=103
        MGMT_VLAN=163

        cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/auto
        auto ${RAW_DEV} lo vlan${OAM_VLAN} vlan${MGMT_VLAN}

        EOF

        cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-${RAW_DEV}
        iface ${RAW_DEV} inet manual
        mtu 9000
        post-up echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/autoconf;\
        echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/accept_ra;\
        echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/accept_redirects
        EOF

        cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-vlan${OAM_VLAN}
        iface vlan${OAM_VLAN} inet6 static
        vlan-raw-device ${RAW_DEV}
        address <__address__>
        netmask 64
        gateway <__address__>
        mtu 1500
        post-up /usr/sbin/ip link set dev vlan${OAM_VLAN} mtu 1500;\
        echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/autoconf;\
        echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_ra;\
        echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_redirects
        pre-up /sbin/modprobe -q 8021q
        EOF

        cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-vlan${MGMT_VLAN}
        iface vlan${MGMT_VLAN} inet6 static
        vlan-raw-device ${RAW_DEV}
        address <__address__>
        netmask 64
        mtu 1500
        post-up /usr/local/bin/tc_setup.sh vlan${MGMT_VLAN} mgmt 10000 > /dev/null;\
        /usr/sbin/ip link set dev vlan${MGMT_VLAN} mtu 1500;\
        echo 0 > /proc/sys/net/ipv6/conf/vlan${MGMT_VLAN}/autoconf;\
        echo 0 > /proc/sys/net/ipv6/conf/vlan${MGMT_VLAN}/accept_ra;\
        echo 0 > /proc/sys/net/ipv6/conf/vlan${MGMT_VLAN}/accept_redirects
        pre-up /sbin/modprobe -q 8021q
        EOF

        #### end ks-addon.cfg

    After updating the ISO image, create a bootable USB with the ISO or put the
    ISO on a PXEBOOT server. See the next bullet for details.

-   A mechanism for boot installation of the |prod-long| host installer ISO
    downloaded from |dnload-loc|. This can be either:

    -   a bootable USB drive with the |prod-long| host installer ISO. See
        |bootable_usb|.

    -   the ISO image on a |PXE| boot server on the same network as the server
        that will be used as the initial controller-0. See
        |pxe-boot-controller-0-d5da025c2524|.


-   For all controller or AIO controller servers, |OAM| Network connectivity to:

    -   the |BMC| ports of all nodes

    -   An external DNS Server. This is required for accessing |org| Docker
        Registry as discussed below.

    -   A Docker Registry(s) containing the Docker images for the |prod| load
        accessible via the |OAM| Network.

    You can use one of the following options:

    .. only:: partner

       -   The |org| Docker Registry. This is the default option.

    .. only:: starlingx

       -   The public open source registries (i.e. docker.io, k8s.gcr.io,
           ghcr.io, gcr.io, quay.io). This is the default option.

    -   A private Docker Registry populated with the docker images from the
        |reg-string|.

        .. only:: partner

           .. include:: /_includes/bootstrapping-from-a-private-docker-registry.rest


-   A record of the IP addresses allocated for the public interfaces for your
    deployment (that is IP addresses for the |OAM| Network and |SRIOV| Data
    Networks).


.. end-install-prereqs