Merge "Build Guide changes as per stx3.0 code"

This commit is contained in:
Zuul 2020-07-06 11:24:35 +00:00 committed by Gerrit Code Review
commit 579746ed4b

View File

@ -136,6 +136,14 @@ Install tools project
cd $HOME cd $HOME
git clone https://opendev.org/starlingx/tools.git git clone https://opendev.org/starlingx/tools.git
The command above fetches the tools project from the latest master. Use the
commands below to switch to the tools project for STX3.0 and STX2.0 respectively.
::
git checkout remotes/origin/r/stx.3.0
git checkout remotes/origin/r/stx.2.0
#. Navigate to the *<$HOME/tools>* project #. Navigate to the *<$HOME/tools>* project
directory: directory:
@ -330,6 +338,7 @@ downloading the packages:
:: ::
/localdisk/designer/<user>/<project>/stx-tools/centos-mirror-tools/output /localdisk/designer/<user>/<project>/stx-tools/centos-mirror-tools/output
.
└── stx-r1 └── stx-r1
└── CentOS └── CentOS
└── pike └── pike
@ -351,32 +360,29 @@ downloading the packages:
│   └── packstack │   └── packstack
│   └── puppet │   └── puppet
│   └── modules │   └── modules
├── layer_build_info
├── layer_image_inc
├── layer_pkg_lists
├── layer_wheels_inc
└── Source └── Source
******************************* *******************************
Copy CentOS mirror repository Copy CentOS mirror repository
******************************* *******************************
Exit from the building Docker container. Run the following commands: Exit from the building Docker container. Run the following commands:
#. Navigate to CentOS mirror directory *mirror/CentOS* under your *starlingx* #. Change the mirror folder owner to the current user and create CentOS folder
workspace directory: using the commands below:
:: ::
cd $HOME/starlingx/mirror/CentOS/ sudo chown $USER: $HOME/starlingx/mirror
mkdir -p $HOME/starlingx/mirror/CentOS/
chmod -R ug+w $HOME/starlingx/mirror
#. Copy the built CentOS mirror repository *$HOME/starlingx/mirror/* #. Copy the built CentOS mirror repository *$HOME/starlingx/mirror/*
workspace directory: workspace directory:
:: ::
cp -r $HOME/starlingx/workspace/localdisk/designer/<user>/<project>/stx-tools/centos-mirror-tools/output/stx-r1 . cp -r $HOME/starlingx/workspace/localdisk/designer/<user>/<project>/stx-tools/centos-mirror-tools/output/stx-r1 $HOME/starlingx/mirror/CentOS/
------------------------- -------------------------
@ -491,9 +497,8 @@ This builds *rpm* and *anaconda* packages. Then run:
update-pxe-network-installer update-pxe-network-installer
The *update-pxe-network-installer* covers the steps detailed in The *update-pxe-network-installer* covers the steps detailed in
*$MY_REPO/stx/stx-metal/installer/initrd/README*. This script *$MY_REPO/stx/metal/installer/initrd/README*. This script creates three files on
creates three files on */localdisk/loadbuild/<user>/<project>/pxe-network-installer/output*.
*/localdisk/loadbuild/pxe-network-installer/output*.
:: ::
@ -501,26 +506,36 @@ creates three files on
new-squashfs.img new-squashfs.img
new-vmlinuz new-vmlinuz
Rename the files as follows: Rename the files, as the file system is read only in the container, exit from
the container and follow the commands below to rename the files:
:: ::
initrd.img cd $HOME/starlingx/workspace/localdisk/loadbuild/<user>/<project>/pxe-network-installer/output
squashfs.img sudo mv new-initrd.img initrd.img
vmlinuz sudo mv new-squashfs.img squashfs.img
sudo mv new-vmlinuz vmlinuz
Two ways exist for using these files: Two ways exist for using these files:
#. Store the files in the */import/mirror/CentOS/stx-installer/* folder #. Store the files in the */import/mirrors/CentOS/stx-installer/* folder for
for future use. future use. Follow the commands below to store files:
#. Store the files in an arbitrary location and modify the
*$MY_REPO/stx/stx-metal/installer/pxe-network-installer/centos/build_srpm.data*
file to point to these files.
Recreate the *pxe-network-installer* package and rebuild the image:
:: ::
cp -r $HOME/starlingx/workspace/localdisk/loadbuild/<user>/<project>/pxe-network-installer/output/* $HOME/starlingx/mirror/CentOS/stx-installer/
#. Store the files in an arbitrary location and modify the
*$MY_REPO/stx/metal/installer/pxe-network-installer/centos/build_srpm.data*
file to point to these files.
Enter the StarlingX container, recreate the *pxe-network-installer* package, and
rebuild the image using the commands below:
::
cd $HOME/tools/
./tb.sh exec
build-pkgs --clean pxe-network-installer build-pkgs --clean pxe-network-installer
build-pkgs pxe-network-installer build-pkgs pxe-network-installer
build-iso build-iso