
The existing user interface for docker image and wheel creation is not flexible enough to name images is described in the spec, and to push those images to the starlingx organization at docker.hub This update adds new arguements that will allow creation of docker images with compliant names, and will allow them to be pushed to https://hub.docker.com/r/starlingx. I will also change build-base-wheels.sh to allow the 'os-version' to be pushed through to build-wheels-tarball.sh. Story: 2003907 Task: 28370 Change-Id: I4378db63d5ff906ffd636034351e580afa5e3472 Signed-off-by: Scott Little <scott.little@windriver.com>
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
## 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
|
|
OPENSTACK_RELEASE=pike
|
|
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} \
|
|
--release ${OPENSTACK_RELEASE}
|
|
|
|
## Step 3: Build images
|
|
time $MY_REPO/build-tools/build-docker-images/build-stx-images.sh \
|
|
--os ${OS} \
|
|
--version ${VERSION} \
|
|
--release ${OPENSTACK_RELEASE} \
|
|
--base ${PRIVATE_REGISTRY}/${PRIVATE_REGISTRY_USERID}/stx-${OS}:${VERSION} \
|
|
--wheels http://${HOSTNAME}:${HOST_PORT}/${MY_WORKSPACE}/std/build-wheels-${OS}-${OPENSTACK_RELEASE}/stx-${OS}-${OPENSTACK_RELEASE}-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
|
|
|