Upgrade to Python3/Stein
Move openstack-projects part from python2 to python3. Add cloud archive. Update qemu and libvirt versions to those from cloud archive (they work with python3, while the distro packages versions don't). Switch from rocky to stein. Fetch libvirt and qemu sources via "apt source". Gets rid of sub version hard coding in snapcraft. Update hard coded references in tests to rocky from stein. Change-Id: Idb38717998a13feaaf0782e880e540f28bc452a8
This commit is contained in:
parent
93f412fc93
commit
30f09c0c9a
|
@ -4,7 +4,7 @@
|
||||||
timeout: 7200
|
timeout: 7200
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: init_lint init_unit snap
|
tox_envlist: snap
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: microstack
|
name: microstack
|
||||||
version: rocky
|
version: stein
|
||||||
base: core18
|
base: core18
|
||||||
summary: OpenStack on your laptop.
|
summary: OpenStack on your laptop.
|
||||||
description: |
|
description: |
|
||||||
|
@ -308,24 +308,40 @@ apps:
|
||||||
# - network
|
# - network
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
|
# Add Ubuntu Cloud Archive sources.
|
||||||
|
# Allows us to fetch things such as updated libvirt.
|
||||||
|
uca-sources:
|
||||||
|
plugin: nil
|
||||||
|
build-packages:
|
||||||
|
- ubuntu-cloud-keyring
|
||||||
|
- software-properties-common
|
||||||
|
- dpkg-dev # We'll need to manipulate sources later.
|
||||||
|
override-build: |
|
||||||
|
add-apt-repository -s cloud-archive:stein
|
||||||
|
apt-key update
|
||||||
|
apt update
|
||||||
|
snapcraftctl build
|
||||||
|
|
||||||
# OpenStack Python Projects, keyed off Keystone
|
# OpenStack Python Projects, keyed off Keystone
|
||||||
openstack-projects:
|
openstack-projects:
|
||||||
plugin: python
|
plugin: python
|
||||||
python-version: python2
|
python-version: python3
|
||||||
|
after:
|
||||||
|
- uca-sources
|
||||||
constraints:
|
constraints:
|
||||||
- https://raw.githubusercontent.com/openstack/requirements/stable/rocky/upper-constraints.txt
|
- https://raw.githubusercontent.com/openstack/requirements/stable/stein/upper-constraints.txt
|
||||||
source: http://tarballs.openstack.org/keystone/keystone-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/keystone/keystone-stable-stein.tar.gz
|
||||||
python-packages:
|
python-packages:
|
||||||
- libvirt-python
|
- libvirt-python
|
||||||
- oslo.cache[dogpile]
|
- oslo.cache[dogpile]
|
||||||
- pymysql
|
- pymysql
|
||||||
- uwsgi
|
- uwsgi
|
||||||
- git+https://opendev.org/x/snap.openstack#egg=snap.openstack
|
- git+https://opendev.org/x/snap.openstack#egg=snap.openstack
|
||||||
- http://tarballs.openstack.org/nova/nova-stable-rocky.tar.gz
|
- http://tarballs.openstack.org/nova/nova-stable-stein.tar.gz
|
||||||
- http://tarballs.openstack.org/neutron/neutron-stable-rocky.tar.gz
|
- http://tarballs.openstack.org/neutron/neutron-stable-stein.tar.gz
|
||||||
- http://tarballs.openstack.org/glance/glance-stable-rocky.tar.gz
|
- http://tarballs.openstack.org/glance/glance-stable-stein.tar.gz
|
||||||
- http://tarballs.openstack.org/cinder/cinder-stable-rocky.tar.gz
|
- http://tarballs.openstack.org/cinder/cinder-stable-stein.tar.gz
|
||||||
- http://tarballs.openstack.org/horizon/horizon-stable-rocky.tar.gz
|
- http://tarballs.openstack.org/horizon/horizon-stable-stein.tar.gz
|
||||||
- python-cinderclient
|
- python-cinderclient
|
||||||
- python-openstackclient
|
- python-openstackclient
|
||||||
- python-swiftclient
|
- python-swiftclient
|
||||||
|
@ -341,21 +357,21 @@ parts:
|
||||||
- conntrack
|
- conntrack
|
||||||
- coreutils
|
- coreutils
|
||||||
- haproxy
|
- haproxy
|
||||||
- libpython2.7
|
- python3-dev
|
||||||
override-prime: |
|
override-prime: |
|
||||||
snapcraftctl prime
|
snapcraftctl prime
|
||||||
# Uncomment the below line for better python-libvirt debugging output.
|
# Uncomment the below line for better python-libvirt debugging output.
|
||||||
# patch --batch --forward --strip 1 --input ../project/patches/nova/nova_log_error.patch
|
# patch --batch --forward --strip 1 --input ../project/patches/nova/nova_log_error.patch
|
||||||
# Now that everything is built, let's disable user site-packages
|
# Now that everything is built, let's disable user site-packages
|
||||||
# as stated in PEP-0370
|
# as stated in PEP-0370
|
||||||
sed -i usr/lib/python2.7/site.py -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
|
sed -i usr/lib/python3.6/site.py -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
|
||||||
# This is the last step, let's now compile all our pyc files.
|
# This is the last step, let's now compile all our pyc files.
|
||||||
# Ignore errors due to syntax issues in foobar python 2.
|
# Ignore errors due to syntax issues in foobar python 2.
|
||||||
./usr/bin/python2.7 -m compileall . || true
|
./usr/bin/python3.6 -m compileall . || true
|
||||||
keystone-config:
|
keystone-config:
|
||||||
after: [openstack-projects]
|
after: [openstack-projects]
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: http://tarballs.openstack.org/keystone/keystone-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/keystone/keystone-stable-stein.tar.gz
|
||||||
organize:
|
organize:
|
||||||
etc/*.conf: etc/keystone/
|
etc/*.conf: etc/keystone/
|
||||||
etc/*.ini: etc/keystone/
|
etc/*.ini: etc/keystone/
|
||||||
|
@ -379,7 +395,7 @@ parts:
|
||||||
nova-config:
|
nova-config:
|
||||||
after: [openstack-projects]
|
after: [openstack-projects]
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: http://tarballs.openstack.org/nova/nova-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/nova/nova-stable-stein.tar.gz
|
||||||
filesets:
|
filesets:
|
||||||
etc:
|
etc:
|
||||||
- etc/nova/*
|
- etc/nova/*
|
||||||
|
@ -389,7 +405,7 @@ parts:
|
||||||
neutron-config:
|
neutron-config:
|
||||||
after: [openstack-projects]
|
after: [openstack-projects]
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: http://tarballs.openstack.org/neutron/neutron-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/neutron/neutron-stable-stein.tar.gz
|
||||||
organize:
|
organize:
|
||||||
etc/*.conf: etc/neutron/
|
etc/*.conf: etc/neutron/
|
||||||
etc/*.ini: etc/neutron/
|
etc/*.ini: etc/neutron/
|
||||||
|
@ -404,7 +420,7 @@ parts:
|
||||||
glance-config:
|
glance-config:
|
||||||
after: [openstack-projects]
|
after: [openstack-projects]
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: http://tarballs.openstack.org/glance/glance-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/glance/glance-stable-stein.tar.gz
|
||||||
organize:
|
organize:
|
||||||
etc/*.conf: etc/glance/
|
etc/*.conf: etc/glance/
|
||||||
etc/*.ini: etc/glance/
|
etc/*.ini: etc/glance/
|
||||||
|
@ -418,7 +434,7 @@ parts:
|
||||||
cinder-config:
|
cinder-config:
|
||||||
after: [openstack-projects]
|
after: [openstack-projects]
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: http://tarballs.openstack.org/cinder/cinder-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/cinder/cinder-stable-stein.tar.gz
|
||||||
organize:
|
organize:
|
||||||
etc/*.conf: etc/cinder/
|
etc/*.conf: etc/cinder/
|
||||||
etc/*.ini: etc/cinder/
|
etc/*.ini: etc/cinder/
|
||||||
|
@ -433,7 +449,7 @@ parts:
|
||||||
horizon-config:
|
horizon-config:
|
||||||
after: [openstack-projects]
|
after: [openstack-projects]
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: http://tarballs.openstack.org/horizon/horizon-stable-rocky.tar.gz
|
source: http://tarballs.openstack.org/horizon/horizon-stable-stein.tar.gz
|
||||||
organize:
|
organize:
|
||||||
etc/*.conf: etc/horizon/
|
etc/*.conf: etc/horizon/
|
||||||
filesets:
|
filesets:
|
||||||
|
@ -530,10 +546,11 @@ parts:
|
||||||
# libvirt/qemu
|
# libvirt/qemu
|
||||||
qemu:
|
qemu:
|
||||||
source: .
|
source: .
|
||||||
source-subdir: qemu-2.11+dfsg
|
source-subdir: qemu-3.1+dfsg
|
||||||
plugin: autotools
|
plugin: autotools
|
||||||
after:
|
after:
|
||||||
- openstack-projects
|
- openstack-projects
|
||||||
|
- uca-sources
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- seabios
|
- seabios
|
||||||
- ipxe-qemu
|
- ipxe-qemu
|
||||||
|
@ -612,19 +629,17 @@ parts:
|
||||||
- --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current
|
- --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current
|
||||||
- --localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
|
- --localstatedir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
|
||||||
- --sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
|
- --sysconfdir=/var/snap/$SNAPCRAFT_PROJECT_NAME/common
|
||||||
- --extra-cflags=-DCONFIG_QEMU_DATAPATH='"/snap/$SNAPCRAFT_PROJECT_NAME/current/share/qemu:/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/seabios:/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/ipxe/qemu"'
|
- --firmwarepath=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/seabios:/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/qemu:/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/ipxe/qemu
|
||||||
- --disable-user
|
- --disable-user
|
||||||
- --disable-linux-user
|
- --disable-linux-user
|
||||||
- --enable-system
|
- --enable-system
|
||||||
- --target-list=x86_64-softmmu
|
- --target-list=x86_64-softmmu
|
||||||
override-build: |
|
override-build: |
|
||||||
# Clean up old install
|
# I think that snapcraft is creating this dir, which breaks the below.xo
|
||||||
rm -R qemu-2.* || true
|
rm -Rf qemu-3.1+dfsg
|
||||||
# Download sources and patch
|
apt source qemu
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu_2.11+dfsg.orig.tar.xz
|
# Fix issue with running apt source as root
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu_2.11+dfsg-1ubuntu7.14.debian.tar.xz
|
dpkg-source --before-build qemu-3.1+dfsg
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu_2.11+dfsg-1ubuntu7.14.dsc
|
|
||||||
dpkg-source -x qemu_*.dsc
|
|
||||||
snapcraftctl build
|
snapcraftctl build
|
||||||
organize:
|
organize:
|
||||||
# Hack to shift installed qemu back to root of snap
|
# Hack to shift installed qemu back to root of snap
|
||||||
|
@ -640,8 +655,11 @@ parts:
|
||||||
|
|
||||||
libvirt:
|
libvirt:
|
||||||
source: .
|
source: .
|
||||||
source-subdir: libvirt-4.0.0
|
source-subdir: libvirt-5.0.0
|
||||||
after: [openstack-projects, qemu]
|
after:
|
||||||
|
- openstack-projects
|
||||||
|
- qemu
|
||||||
|
- uca-sources
|
||||||
plugin: autotools
|
plugin: autotools
|
||||||
build-packages:
|
build-packages:
|
||||||
- libxml2-dev
|
- libxml2-dev
|
||||||
|
@ -704,13 +722,11 @@ parts:
|
||||||
- IPTABLES_PATH=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/iptables
|
- IPTABLES_PATH=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/iptables
|
||||||
- IP6TABLES_PATH=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/ip6tables
|
- IP6TABLES_PATH=/snap/$SNAPCRAFT_PROJECT_NAME/current/sbin/ip6tables
|
||||||
override-build: |
|
override-build: |
|
||||||
# Clean up old install
|
# I think that snapcraft is creating this dir, which breaks the below.
|
||||||
rm -R libvirt-4.0.* || true
|
rm -Rf libvirt-5.0.0
|
||||||
# Download sources and patch
|
apt source libvirt
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/libv/libvirt/libvirt_4.0.0.orig.tar.xz
|
# Fix issue with running apt source as root
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/libv/libvirt/libvirt_4.0.0-1ubuntu8.12.debian.tar.xz
|
dpkg-source --before-build libvirt-5.0.0
|
||||||
wget http://archive.ubuntu.com/ubuntu/pool/main/libv/libvirt/libvirt_4.0.0-1ubuntu8.12.dsc
|
|
||||||
dpkg-source -x libvirt*.dsc
|
|
||||||
snapcraftctl build
|
snapcraftctl build
|
||||||
organize:
|
organize:
|
||||||
# Hack to shift installed libvirt back to root of snap
|
# Hack to shift installed libvirt back to root of snap
|
||||||
|
|
|
@ -35,8 +35,8 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -f microstack_rocky_amd64.snap ]; then
|
if [ ! -f microstack_stein_amd64.snap ]; then
|
||||||
echo "microstack_rocky_amd64.snap not found."
|
echo "microstack_stein_amd64.snap not found."
|
||||||
echo "Please run snapcraft before executing the tests."
|
echo "Please run snapcraft before executing the tests."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -71,7 +71,7 @@ if [ "$PREFIX" == "multipass" ]; then
|
||||||
PREFIX="multipass exec $MACHINE --"
|
PREFIX="multipass exec $MACHINE --"
|
||||||
|
|
||||||
multipass launch --cpus 2 --mem 16G $DISTRO --name $MACHINE
|
multipass launch --cpus 2 --mem 16G $DISTRO --name $MACHINE
|
||||||
multipass copy-files microstack_rocky_amd64.snap $MACHINE:
|
multipass copy-files microstack_stein_amd64.snap $MACHINE:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Possibly install a release of the snap before running a test.
|
# Possibly install a release of the snap before running a test.
|
||||||
|
|
|
@ -20,7 +20,7 @@ MACHINE=$(petname)
|
||||||
multipass launch --cpus 2 --mem 16G $DISTRO --name $MACHINE
|
multipass launch --cpus 2 --mem 16G $DISTRO --name $MACHINE
|
||||||
|
|
||||||
# Install the snap
|
# Install the snap
|
||||||
multipass copy-files microstack_rocky_amd64.snap $MACHINE:
|
multipass copy-files microstack_stein_amd64.snap $MACHINE:
|
||||||
multipass exec $MACHINE -- \
|
multipass exec $MACHINE -- \
|
||||||
sudo snap install --classic --dangerous microstack*.snap
|
sudo snap install --classic --dangerous microstack*.snap
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ from setuptools import setup, find_packages
|
||||||
setup(
|
setup(
|
||||||
name="microstack_init",
|
name="microstack_init",
|
||||||
description="Optionally interactive init script for Microstack.",
|
description="Optionally interactive init script for Microstack.",
|
||||||
packages=find_packages(),
|
packages=find_packages(exclude=("tests",)),
|
||||||
version="0.0.1",
|
version="0.0.1",
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
|
Loading…
Reference in New Issue