root/build-tools/build-docker-images
Delfino Curado 6a825ce390 Revert "Add priority to repositories in base-image"
This reverts commit 965e897c71b378ee895d2ca6a00d0a892df6177e.

The yum plugin called yum-priorities was added to make sure that the
build system use the ussuri-ceph repo. This was done because StarlingX
used to build ceph without its python3 packages.

Now that ceph is generating its python3 packages this plugin is
removed as well as the ussuri-ceph repo. This way StarlingX base image
will use the packages built by it's own build system.

Test plan:
Complete build run
Starlingx installation
stx-openstack apply - check that the helm chart can create ceph pools

Depends-On: https://review.opendev.org/c/starlingx/integ/+/824582
Story: 2009074
Task: 44281

Signed-off-by: Delfino Curado <delfinogomes.curadofilho@windriver.com>
Change-Id: I4390c9bc9ec9dbc9ff077c4bcc1adb7d4fbfdbe5
2022-01-13 10:38:00 -05:00
..
2019-03-24 21:03:21 -04:00

## Example commands for building StarlingX images

PRIVATE_REGISTRY_USERID=myuser
PRIVATE_REGISTRY=xxx.xxx.xxx.xxx:9001
VERSION=2018.11.13
OS=centos
OS_VERSION=7.5.1804
BUILD_STREAM=stable
HOST_PORT=8088

## Step 1: Build stx-centos
time $MY_REPO/build-tools/build-docker-images/build-stx-base.sh \
    --os ${OS} \
    --os-version ${OS_VERSION} \
    --version ${VERSION} \
    --user ${PRIVATE_REGISTRY_USERID} \
    --registry ${PRIVATE_REGISTRY} \
    --push \
    --repo stx-local-build,http://${HOSTNAME}:${HOST_PORT}/${MY_WORKSPACE}/std/rpmbuild/RPMS \
    --repo stx-mirror-distro,http://${HOSTNAME}:${HOST_PORT}/${MY_REPO}/cgcs-root/cgcs-${OS}-repo/Binary \
    --clean


## Step 2: Build wheels (output as tarball)
time $MY_REPO/build-tools/build-wheels/build-wheel-tarball.sh \
    --os ${OS} \
    --os-version ${OS_VERSION} \
    --stream ${BUILD_STREAM}

## Step 3: Build images
time $MY_REPO/build-tools/build-docker-images/build-stx-images.sh \
    --os ${OS} \
    --version ${VERSION} \
    --stream ${BUILD_STREAM} \
    --base ${PRIVATE_REGISTRY}/${PRIVATE_REGISTRY_USERID}/stx-${OS}:${VERSION} \
    --wheels http://${HOSTNAME}:${HOST_PORT}/${MY_WORKSPACE}/std/build-wheels-${OS}-${BUILD_STREAM}/stx-${OS}-${BUILD_STREAM}-wheels.tar \
    --user ${PRIVATE_REGISTRY_USERID} \
    --registry ${PRIVATE_REGISTRY} \
    --push --latest \
    --clean


## Note: Verify that lighttpd is not bound to "localhost"
vi /etc/lighttpd/lighttpd.conf
# server.bind = "localhost"
systemctl restart lighttpd

## Note: You may need to add an iptables rule to allow the docker
## containers to access the http server on your host. For example:
iptables -I INPUT 6 -i docker0 -p tcp --dport ${HOST_PORT} -m state --state NEW,ESTABLISHED -j ACCEPT