Merge remote-tracking branch 'origin/master' into f/centos75
Change-Id: I745674f1f8156b5863dbd871e0353ad2da2861d8 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
commit
7c7d4ea234
|
@ -7,7 +7,7 @@ centos-mirror-tools/logs/
|
|||
centos-mirror-tools/output/
|
||||
|
||||
# Sphinx documentation
|
||||
docs/build/
|
||||
doc/build/
|
||||
|
||||
# Release Notes documentation
|
||||
releasenotes/build
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
---
|
||||
- project:
|
||||
templates:
|
||||
- build-openstack-docs-pti
|
||||
check:
|
||||
jobs:
|
||||
- build-openstack-releasenotes
|
||||
- openstack-tox-linters
|
||||
gate:
|
||||
jobs:
|
||||
- build-openstack-releasenotes
|
||||
- openstack-tox-linters
|
||||
|
|
|
@ -40,6 +40,7 @@ get_from() {
|
|||
# By default, we use "sudo" and we don't use a local yum.conf. These can
|
||||
# be overridden via flags.
|
||||
SUDOCMD="sudo -E"
|
||||
RELEASEVER="--releasever=7"
|
||||
YUMCONFOPT=""
|
||||
|
||||
CLEAN_LOGS_ONLY=0
|
||||
|
@ -59,6 +60,7 @@ while getopts "c:nxh" o; do
|
|||
c)
|
||||
# Use an alternate yum.conf
|
||||
YUMCONFOPT="-c $OPTARG"
|
||||
grep -q "releasever=" $OPTARG && RELEASEVER="--$(grep releasever= ${OPTARG})"
|
||||
;;
|
||||
h)
|
||||
# Help
|
||||
|
@ -215,11 +217,11 @@ download () {
|
|||
echo " ------ using $SFILE to search $rpm_name ------"
|
||||
# Yumdownloader with the appropriate flag for src, noarch or x86_64
|
||||
if [ "$_type" == "src" ];then
|
||||
download_cmd="${SUDOCMD} yumdownloader -q ${YUMCONFOPT} -C --source $SFILE"
|
||||
download_url_cmd="${SUDOCMD} yumdownloader --urls -q ${YUMCONFOPT}-C --source $SFILE"
|
||||
download_cmd="${SUDOCMD} yumdownloader -q ${YUMCONFOPT} ${RELEASEVER} -C --source $SFILE"
|
||||
download_url_cmd="${SUDOCMD} yumdownloader --urls -q ${YUMCONFOPT} ${RELEASEVER} -C --source $SFILE"
|
||||
else
|
||||
download_cmd="${SUDOCMD} yumdownloader -q -C ${YUMCONFOPT} $SFILE --archlist=noarch,x86_64"
|
||||
download_url_cmd="${SUDOCMD} yumdownloader --urls -q -C ${YUMCONFOPT} $SFILE --archlist=noarch,x86_64"
|
||||
download_cmd="${SUDOCMD} yumdownloader -q -C ${YUMCONFOPT} ${RELEASEVER} $SFILE --archlist=noarch,x86_64"
|
||||
download_url_cmd="${SUDOCMD} yumdownloader --urls -q -C ${YUMCONFOPT} ${RELEASEVER} $SFILE --archlist=noarch,x86_64"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -296,7 +298,7 @@ download () {
|
|||
}
|
||||
|
||||
# Prime the cache
|
||||
${SUDOCMD} yum ${YUMCONFOPT} makecache
|
||||
${SUDOCMD} yum ${YUMCONFOPT} ${RELEASEVER} makecache
|
||||
|
||||
# Download files
|
||||
if [ -s "$rpms_list" ];then
|
||||
|
|
|
@ -39,6 +39,7 @@ truncate -s 0 $ERROR_LOG_FILE
|
|||
retcode=0
|
||||
extra_opts=""
|
||||
|
||||
|
||||
usage() {
|
||||
echo "$0 [-c <yum.conf>]"
|
||||
echo ""
|
||||
|
@ -76,7 +77,7 @@ get_repoquery_info() {
|
|||
else
|
||||
repoquery_opts=
|
||||
fi
|
||||
repoquery $extra_opts -C --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}' \
|
||||
repoquery $extra_opts ${RELEASEVER} -C --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}' \
|
||||
$repoquery_opts "$_package_name"
|
||||
}
|
||||
|
||||
|
@ -114,6 +115,7 @@ while getopts "c:" opt; do
|
|||
case $opt in
|
||||
c)
|
||||
extra_opts="-c ${OPTARG}"
|
||||
grep -q "releasever=" $OPTARG && RELEASEVER="--$(grep releasever= ${OPTARG})"
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
|
@ -124,7 +126,7 @@ while getopts "c:" opt; do
|
|||
done
|
||||
|
||||
info "Getting yum cache"
|
||||
if ! yum $extra_opts makecache; then
|
||||
if ! yum $extra_opts ${RELEASEVER} makecache; then
|
||||
error "There was a problem getting yum cache"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
libvirt-python-3.5.0-1.fc24.src.rpm#https://libvirt.org/sources/python/libvirt-python-3.5.0-1.fc24.src.rpm
|
||||
novnc-0.6.2-1.el7.src.rpm#http://cbs.centos.org/kojifiles/packages/novnc/0.6.2/1.el7/src/novnc-0.6.2-1.el7.src.rpm
|
||||
novnc-0.6.2-1.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/novnc/0.6.2/1.el7/noarch/novnc-0.6.2-1.el7.noarch.rpm
|
||||
python2-httpbin-0.5.0-6.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/python-httpbin/0.5.0/6.el7/noarch/python2-httpbin-0.5.0-6.el7.noarch.rpm
|
||||
python2-pytest-httpbin-0.2.3-6.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/python-pytest-httpbin/0.2.3/6.el7/noarch/python2-pytest-httpbin-0.2.3-6.el7.noarch.rpm
|
||||
python2-pytest-mock-1.6.0-2.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/python-pytest-mock/1.6.0/2.el7/noarch/python2-pytest-mock-1.6.0-2.el7.noarch.rpm
|
||||
|
|
|
@ -810,7 +810,7 @@ mcstrans-0.3.4-5.el7.x86_64.rpm
|
|||
mdadm-4.0-13.el7.x86_64.rpm
|
||||
mdi-common-1.4.57.0-4.el7.noarch.rpm
|
||||
mdi-fonts-1.4.57.0-4.el7.noarch.rpm
|
||||
memcached-1.4.39-1.el7.src.rpm
|
||||
memcached-1.4.39-1.el7.x86_64.rpm
|
||||
mesa-libGLU-9.0.0-4.el7.x86_64.rpm
|
||||
mesa-libGLU-devel-9.0.0-4.el7.x86_64.rpm
|
||||
mesa-libwayland-egl-17.2.3-8.20171019.el7.x86_64.rpm
|
||||
|
|
|
@ -5,6 +5,9 @@ This is a quick reference for deploying StarlingX on libvirt/qemu systems.
|
|||
It assumes you have a working libvirt/qemu installation for a non-root user
|
||||
and that your user has NOPASSWD sudo permissions.
|
||||
|
||||
Refer also to pages "Installation Guide Virtual Environment", "Testing Guide"
|
||||
on the StarlingX wiki: https://wiki.openstack.org/wiki/StarlingX
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
|
@ -22,10 +25,8 @@ an interactive shell that configures everything. Here's an example::
|
|||
export CONTROLLER=madcloud
|
||||
export COMPUTE=madnode
|
||||
export BRIDGE_INTERFACE=madbr
|
||||
export INTERNAL_NETWORK=172.30.20.0/24
|
||||
export INTERNAL_IP=172.30.20.1/24
|
||||
export EXTERNAL_NETWORK=192.168.20.0/24
|
||||
export EXTERNAL_IP=192.168.20.1/24
|
||||
export EXTERNAL_NETWORK=172.30.20.0/24
|
||||
export EXTERNAL_IP=172.30.20.1/24
|
||||
|
||||
There is also a script ``cleanup_network.sh`` that will remove networking
|
||||
configuration from libvirt.
|
||||
|
|
|
@ -2,13 +2,17 @@
|
|||
#
|
||||
# cleanup_network.sh - Cleans up network interfaces - not safe to run blindly!
|
||||
|
||||
MY_WORKING_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source ${MY_WORKING_DIR}/functions.sh
|
||||
|
||||
NETWORK_DEFAULT=${NETWORK_DEFAULT:-default}
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE=stxbr0}
|
||||
|
||||
if virsh net-list --name | grep ${NETWORK_DEFAULT} ; then
|
||||
sudo virsh net-destroy ${NETWORK_DEFAULT}
|
||||
sudo virsh net-undefine ${NETWORK_DEFAULT}
|
||||
sudo rm -rf /etc/libvirt/qemu/networks/autostart/${NETWORK_DEFAULT}.xml
|
||||
delete_xml /etc/libvirt/qemu/networks/autostart/${NETWORK_DEFAULT}.xml
|
||||
fi
|
||||
|
||||
if [ -d "/sys/class/net/${BRIDGE_INTERFACE}" ]; then
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
<partition>/machine</partition>
|
||||
</resource>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
|
||||
<type arch='x86_64' machine='pc-q35-xenial'>hvm</type>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
</features>
|
||||
<cpu mode='host-model'>
|
||||
<model fallback='allow'/>
|
||||
<cpu match='exact'>
|
||||
<model fallback='forbid'>Nehalem</model>
|
||||
<topology sockets='1' cores='4' threads='1'/>
|
||||
<feature policy='optional' name='vmx'/>
|
||||
<feature policy='require' name='vmx'/>
|
||||
<feature policy='optional' name='svm'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
|
@ -32,34 +32,18 @@
|
|||
<backingStore/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<boot order='1'/>
|
||||
<alias name='sata0-0-0'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='qcow2'/>
|
||||
<source file='DISK1'/>
|
||||
<backingStore/>
|
||||
<target dev='sdb' bus='sata'/>
|
||||
<alias name='sata0-0-1'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
</disk>
|
||||
<controller type='usb' index='0'>
|
||||
<alias name='usb'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pci-root'>
|
||||
<alias name='pci.0'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'>
|
||||
<alias name='sata0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</controller>
|
||||
<interface type='bridge'>
|
||||
<source bridge='%BR1%'/>
|
||||
<target dev='vnet8'/>
|
||||
<model type='e1000'/>
|
||||
<alias name='net0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<source bridge='%BR2%'/>
|
||||
|
@ -67,21 +51,18 @@
|
|||
<model type='e1000'/>
|
||||
<boot order='2'/>
|
||||
<alias name='net1'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<source bridge='%BR3%'/>
|
||||
<target dev='vnet10'/>
|
||||
<model type='virtio'/>
|
||||
<alias name='net2'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<source bridge='%BR4%'/>
|
||||
<target dev='vnet11'/>
|
||||
<model type='virtio'/>
|
||||
<alias name='net3'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
|
||||
</interface>
|
||||
<serial type='pty'>
|
||||
<source path='/dev/pts/12'/>
|
||||
|
@ -101,11 +82,9 @@
|
|||
<video>
|
||||
<model type='cirrus' vram='16384' heads='1'/>
|
||||
<alias name='video0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</video>
|
||||
<memballoon model='virtio'>
|
||||
<alias name='balloon0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
||||
</memballoon>
|
||||
</devices>
|
||||
<seclabel type='dynamic' model='apparmor' relabel='yes'>
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
<partition>/machine</partition>
|
||||
</resource>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
|
||||
<type arch='x86_64' machine='pc-q35-xenial'>hvm</type>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
</features>
|
||||
<cpu mode='host-model'>
|
||||
<model fallback='allow'/>
|
||||
<cpu match='exact'>
|
||||
<model fallback='forbid'>Nehalem</model>
|
||||
<topology sockets='1' cores='4' threads='1'/>
|
||||
<feature policy='optional' name='vmx'/>
|
||||
<feature policy='optional' name='svm'/>
|
||||
|
@ -32,16 +32,12 @@
|
|||
<backingStore/>
|
||||
<target dev='sda' bus='sata'/>
|
||||
<boot order='1'/>
|
||||
<alias name='sata0-0-0'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='qcow2'/>
|
||||
<source file='DISK1'/>
|
||||
<backingStore/>
|
||||
<target dev='sdb' bus='sata'/>
|
||||
<alias name='sata0-0-1'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
</disk>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
|
@ -50,52 +46,31 @@
|
|||
<target dev='sdc' bus='sata'/>
|
||||
<readonly/>
|
||||
<boot order='2'/>
|
||||
<alias name='sata0-0-2'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
|
||||
</disk>
|
||||
<controller type='usb' index='0'>
|
||||
<alias name='usb'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||
</controller>
|
||||
<controller type='pci' index='0' model='pci-root'>
|
||||
<alias name='pci.0'/>
|
||||
</controller>
|
||||
<controller type='sata' index='0'>
|
||||
<alias name='sata0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</controller>
|
||||
<interface type='bridge'>
|
||||
<mac address='52:54:00:da:8c:ad'/>
|
||||
<source bridge='%BR1%'/>
|
||||
<target dev='vnet0'/>
|
||||
<model type='e1000'/>
|
||||
<alias name='net0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<mac address='52:54:00:da:48:ff'/>
|
||||
<source bridge='%BR2%'/>
|
||||
<target dev='vnet1'/>
|
||||
<model type='e1000'/>
|
||||
<boot order='3'/>
|
||||
<alias name='net1'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<mac address='52:54:00:54:e6:c2'/>
|
||||
<source bridge='%BR3%'/>
|
||||
<target dev='vnet2'/>
|
||||
<model type='virtio'/>
|
||||
<alias name='net2'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='bridge'>
|
||||
<mac address='52:54:00:c5:62:6d'/>
|
||||
<source bridge='%BR4%'/>
|
||||
<target dev='vnet3'/>
|
||||
<model type='virtio'/>
|
||||
<alias name='net3'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
|
||||
</interface>
|
||||
<serial type='pty'>
|
||||
<source path='/dev/pts/8'/>
|
||||
|
@ -115,11 +90,9 @@
|
|||
<video>
|
||||
<model type='cirrus' vram='16384' heads='1'/>
|
||||
<alias name='video0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
||||
</video>
|
||||
<memballoon model='virtio'>
|
||||
<alias name='balloon0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
||||
</memballoon>
|
||||
</devices>
|
||||
<seclabel type='dynamic' model='apparmor' relabel='yes'>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
MY_WORKING_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source ${MY_WORKING_DIR}/functions.sh
|
||||
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
CONTROLLER=${CONTROLLER:-controller-allinone}
|
||||
DOMAIN_DIRECTORY=vms
|
||||
|
@ -14,8 +18,8 @@ for i in {0..1}; do
|
|||
sudo virsh destroy ${CONTROLLER_NODE}
|
||||
fi
|
||||
sudo virsh undefine ${CONTROLLER_NODE}
|
||||
sudo rm -rf /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
|
||||
sudo rm -rf /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
|
||||
[ -e ${DOMAIN_FILE} ] && rm ${DOMAIN_FILE}
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
|
||||
[ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
INTERNAL_NETWORK=${INTERNAL_NETWORK:-10.10.10.0/24}
|
||||
INTERNAL_IP=${INTERNAL_IP:-10.10.10.1/24}
|
||||
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-192.168.204.0/24}
|
||||
EXTERNAL_IP=${EXTERNAL_IP:-192.168.204.1/24}
|
||||
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
|
||||
EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
|
||||
|
||||
for i in {1..4}; do
|
||||
BRIDGE_INTERFACE_NAME=${BRIDGE_INTERFACE}$i
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
MY_WORKING_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}" )" )"
|
||||
|
||||
source ${MY_WORKING_DIR}/functions.sh
|
||||
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
CONTROLLER=${CONTROLLER:-controller}
|
||||
COMPUTE=${COMPUTE:-compute}
|
||||
|
@ -15,9 +19,9 @@ for i in {0..1}; do
|
|||
sudo virsh destroy ${CONTROLLER_NODE}
|
||||
fi
|
||||
sudo virsh undefine ${CONTROLLER_NODE}
|
||||
sudo rm -rf /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
|
||||
sudo rm -rf /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
|
||||
[ -e ${DOMAIN_FILE} ] && rm ${DOMAIN_FILE}
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
|
||||
[ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -31,8 +35,8 @@ for i in {0..1}; do
|
|||
sudo virsh destroy ${COMPUTE_NODE}
|
||||
fi
|
||||
sudo virsh undefine ${COMPUTE_NODE}
|
||||
sudo rm -rf /var/lib/libvirt/images/${COMPUTE_NODE}-0.img
|
||||
sudo rm -rf /var/lib/libvirt/images/${COMPUTE_NODE}-1.img
|
||||
[ -e ${DOMAIN_FILE} ] && rm ${DOMAIN_FILE}
|
||||
delete_disk /var/lib/libvirt/images/${COMPUTE_NODE}-0.img
|
||||
delete_disk /var/lib/libvirt/images/${COMPUTE_NODE}-1.img
|
||||
[ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# delete a node's disk file in a safe way
|
||||
delete_disk() {
|
||||
local fpath="$1"
|
||||
|
||||
if [ ! -f "$fpath" ]; then
|
||||
echo "file to delete is not a regular file: $fpath" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
file -b "$fpath" | grep -q "^QEMU QCOW Image (v3),"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "file to delete is not QEMU QCOW Image (v3): $fpath" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
sudo rm "$fpath"
|
||||
}
|
||||
|
||||
# delete an xml file in a safe way
|
||||
delete_xml() {
|
||||
local fpath="$1"
|
||||
|
||||
if [ ! -f "$fpath" ]; then
|
||||
echo "file to delete is not a regular file: $fpath" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
file -b "$fpath" | grep -q "^ASCII text$"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "file to delete is not ASCII text: $fpath" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
sudo rm "$fpath"
|
||||
}
|
||||
|
|
@ -19,10 +19,8 @@ done
|
|||
shift $((OPTIND-1))
|
||||
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
INTERNAL_NETWORK=${INTERNAL_NETWORK:-10.10.10.0/24}
|
||||
INTERNAL_IP=${INTERNAL_IP:-10.10.10.1/24}
|
||||
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-192.168.204.0/24}
|
||||
EXTERNAL_IP=${EXTERNAL_IP:-192.168.204.1/24}
|
||||
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
|
||||
EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
|
||||
|
||||
if [[ -r /sys/class/net/${BRIDGE_INTERFACE}1 ]]; then
|
||||
echo "${BRIDGE_INTERFACE}1 exists, cowardly refusing to overwrite it, exiting..."
|
||||
|
@ -33,8 +31,8 @@ for i in {1..4}; do
|
|||
sudo brctl addbr ${BRIDGE_INTERFACE}$i
|
||||
done
|
||||
|
||||
sudo ifconfig ${BRIDGE_INTERFACE}1 $INTERNAL_IP up
|
||||
sudo ifconfig ${BRIDGE_INTERFACE}2 $EXTERNAL_IP up
|
||||
sudo ifconfig ${BRIDGE_INTERFACE}1 $EXTERNAL_IP up
|
||||
sudo ifconfig ${BRIDGE_INTERFACE}2 up
|
||||
sudo ifconfig ${BRIDGE_INTERFACE}3 up
|
||||
sudo ifconfig ${BRIDGE_INTERFACE}4 up
|
||||
sudo iptables -t nat -A POSTROUTING -s $EXTERNAL_NETWORK -j MASQUERADE
|
||||
|
|
|
@ -1,11 +1,24 @@
|
|||
#!/bin/bash
|
||||
# branch-stx.sh - create STX branches based on today
|
||||
# branch-stx.sh - create STX branches
|
||||
#
|
||||
# branch-stx.sh [--dry-run] [<manifest>]
|
||||
# branch-stx.sh [--dry-run|-n] [-l] [-m <manifest>] [<repo-url> ...]
|
||||
#
|
||||
# * get the repo list from stx-manifest in both starlingx and stx-staging remotes
|
||||
# * create a new branch
|
||||
# * tag the new branch with an initial release identifier
|
||||
# --dry-run|-n Do all work except pushing back to the remote repo.
|
||||
# Useful to validate everything locally before pushing.
|
||||
#
|
||||
# -l List the repo URLS that would be processed and exit
|
||||
#
|
||||
# -m <manifest> Extract the repo list from <manifest> for starlingx
|
||||
# and stx-staging remotes
|
||||
#
|
||||
# <repo-url> Specify one or more direct repo URLs to branch (ie git remote)
|
||||
# These are appended to the list of repos extracted from the
|
||||
# manifest if one is specified.
|
||||
#
|
||||
# For each repo:
|
||||
# * create a new branch $BRANCH
|
||||
# * tag the new branch with an initial release identifier if $TAG is set
|
||||
# * update the .gitreview file to default to the new branch (Gerrit repos only)
|
||||
#
|
||||
# Some environment variables are available for modifying this script's behaviour:
|
||||
#
|
||||
|
@ -17,18 +30,59 @@
|
|||
# 'r/' (for periodic releases) to SERIES.
|
||||
#
|
||||
# TAG is the release tag that represents the actual release, derived by adding
|
||||
# a 'patch' version to SERIES, initially '0'.
|
||||
# a 'patch' version to SERIES, initially '0'. If TAG is unset no tag is created.
|
||||
#
|
||||
# Notes:
|
||||
# * This script is used for creating milestone, release and feature branches.
|
||||
# * The default action is to create a milestone branch with prefix 'm/'.
|
||||
# * To create a release branch set BRANCH directly using a 'r/' prefix.
|
||||
# * To create a feature branch set BRANCH directly using a 'f/' prefix and set
|
||||
# TAG="" to skip tagging the branch point.
|
||||
# * The detection to use Gerrit or Github is determined by the presence of
|
||||
# 'git.starlingx.io' in the repo URL. This may be sub-optimal. The only actual
|
||||
# difference in execution is .gitreview updates are only prepared for Gerrit repos.
|
||||
|
||||
set -e
|
||||
|
||||
# Grab options
|
||||
if [[ "$1" == "--dry-run" ]]; then
|
||||
DRY_RUN=1
|
||||
shift;
|
||||
fi
|
||||
# Defaults
|
||||
MANIFEST=""
|
||||
|
||||
# Where to get the repo list
|
||||
MANIFEST=${1:-default.xml}
|
||||
optspec="lm:n-:"
|
||||
while getopts "$optspec" o; do
|
||||
case "${o}" in
|
||||
# Hack in longopt support
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
dry-run)
|
||||
DRY_RUN=1
|
||||
;;
|
||||
*)
|
||||
if [[ "$OPTERR" = 1 ]] && [[ "${optspec:0:1}" != ":" ]]; then
|
||||
echo "Unknown option --${OPTARG}" >&2
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
l)
|
||||
LIST=1
|
||||
;;
|
||||
m)
|
||||
MANIFEST=${OPTARG}
|
||||
;;
|
||||
n)
|
||||
DRY_RUN=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
# See if we can build a repo list
|
||||
if [[ $# == 0 && -z $MANIFEST ]]; then
|
||||
echo "ERROR: No repos to process"
|
||||
echo "Usage: $0 [--dry-run|-n] [-l] [-m <manifest>] [<repo-url> ...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# SERIES is the base of the branch and release tag names: year.month (YYYY.MM)
|
||||
SERIES=${SERIES:-$(date '+%Y.%m')}
|
||||
|
@ -57,7 +111,7 @@ function update_gitreview {
|
|||
defaultbranch=$branch"
|
||||
echo "$grcontents" > .gitreview
|
||||
git add .gitreview
|
||||
if ! git commit -s -m "Update .gitreview for $branch"; then
|
||||
if git commit -s -m "Update .gitreview for $branch"; then
|
||||
if [[ -z $DRY_RUN ]]; then
|
||||
git review -t "create-${branch}"
|
||||
else
|
||||
|
@ -68,21 +122,20 @@ defaultbranch=$branch"
|
|||
fi
|
||||
}
|
||||
|
||||
# branch_repo <remote> <repo-uri> <sha> <branch-base>
|
||||
# branch_repo <repo-uri> <sha> <branch-base>
|
||||
function branch_repo {
|
||||
local remote=$1
|
||||
local repo=$2
|
||||
local sha=$3
|
||||
local branch=$4
|
||||
local tag=$5
|
||||
local repo=$1
|
||||
local sha=$2
|
||||
local branch=$3
|
||||
local tag=$4
|
||||
|
||||
local repo_dir=${repo##*/}
|
||||
|
||||
if [[ ! -d $repo_dir ]]; then
|
||||
git clone $i $repo_dir || true
|
||||
git clone $repo $repo_dir || true
|
||||
fi
|
||||
|
||||
cd $repo_dir
|
||||
pushd $repo_dir >/dev/null
|
||||
git checkout master
|
||||
|
||||
if ! git branch | grep $BRANCH; then
|
||||
|
@ -90,11 +143,13 @@ function branch_repo {
|
|||
git branch $branch $sha
|
||||
fi
|
||||
|
||||
# tag branch point at $sha
|
||||
git tag -s -m "Branch $branch" -f $tag $sha
|
||||
if [[ -n $tag ]]; then
|
||||
# tag branch point at $sha
|
||||
git tag -s -m "Branch $branch" -f $tag $sha
|
||||
fi
|
||||
|
||||
# Push the new goodness back up
|
||||
if [[ "$r" == "starlingx" ]]; then
|
||||
if [[ "$repo" =~ "git.starlingx.io" ]]; then
|
||||
# Do the Gerrit way
|
||||
|
||||
# set up gerrit remote
|
||||
|
@ -118,14 +173,30 @@ function branch_repo {
|
|||
fi
|
||||
fi
|
||||
|
||||
cd -
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
for r in $REMOTES; do
|
||||
repos=$($script_dir/getrepo.sh $MANIFEST $r)
|
||||
# crap, convert github URLs to git:
|
||||
repos=$(sed -e 's|https://github.com/starlingx-staging|git@github.com:starlingx-staging|g' <<<$repos)
|
||||
for i in $repos; do
|
||||
branch_repo $r $i HEAD $BRANCH $TAG
|
||||
repo_list=""
|
||||
|
||||
if [[ -n $MANIFEST ]]; then
|
||||
# First get repos from the manifest
|
||||
for r in $REMOTES; do
|
||||
repos=$($script_dir/getrepo.sh $MANIFEST $r)
|
||||
# crap, convert github URLs to git:
|
||||
repos=$(sed -e 's|https://github.com/starlingx-staging|git@github.com:starlingx-staging|g' <<<$repos)
|
||||
repo_list+=" $repos"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ $# != 0 ]]; then
|
||||
# Then add whatever is on the command line
|
||||
repo_list+=" $@"
|
||||
fi
|
||||
|
||||
for i in $repo_list; do
|
||||
if [[ -z $LIST ]]; then
|
||||
branch_repo $i HEAD $BRANCH $TAG
|
||||
else
|
||||
echo "$i"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
prelude: >
|
||||
These release notes cover the initial release of StarlingX.
|
||||
The StarlingX Tools project is a new repository of tools used in the
|
||||
development, build, test and release of StarlingX.
|
||||
features:
|
||||
- |
|
||||
Deployment: Scripts to assist in deploying StarlingX in virtual
|
||||
environments, supports both QEMU/KVM and VirtualBox.
|
||||
- |
|
||||
Mirror Tools: Scripts to build and maintain the mirror required to
|
||||
complete the StarlingX build process.
|
||||
- |
|
||||
Release Tools: Scripts used to automate the steps in producing StarlingX
|
||||
milestones and releases.
|
12
tox.ini
12
tox.ini
|
@ -35,12 +35,6 @@ commands =
|
|||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:true]
|
||||
# Use same environment directory as venv to save space and install time
|
||||
envdir = {toxworkdir}/venv
|
||||
commands = true
|
||||
whitelist_externals = true
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
|
@ -56,3 +50,9 @@ commands =
|
|||
rm -rf releasenotes/build
|
||||
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
whitelist_externals = rm
|
||||
|
||||
[testenv:newnote]
|
||||
# Re-use the releasenotes venv
|
||||
envdir = {toxworkdir}/releasenotes
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = reno new {posargs}
|
||||
|
|
Loading…
Reference in New Issue