Build separately for each supported series and use binary builds
Charms for OpenStack Yoga supports both Ubuntu Focal and Jammy which means Python 3.8 and Python 3.10. Managing dependencies across those two versions is non-trivial and we need to build the charm on the series the charm is supposed to support. Switch to using a binary build which allows pip's dependency resolution to work. This patch also drops the impish bundle. Change-Id: I251f0715dd4cff68cba22ffe7d793878317bbef5
This commit is contained in:
parent
b3a5d3b358
commit
b0acd923b7
@ -1,4 +1,4 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-python3-ussuri-jobs
|
||||
- openstack-python3-charm-yoga-jobs
|
||||
- openstack-cover-jobs
|
||||
|
4
bindep.txt
Normal file
4
bindep.txt
Normal file
@ -0,0 +1,4 @@
|
||||
libffi-dev [platform:dpkg]
|
||||
libpq-dev [platform:dpkg]
|
||||
libxml2-dev [platform:dpkg]
|
||||
libxslt1-dev [platform:dpkg]
|
@ -6,20 +6,48 @@ parts:
|
||||
- tox
|
||||
- git
|
||||
- python3-dev
|
||||
- libffi-dev
|
||||
build-environment:
|
||||
- CHARM_INTERFACES_DIR: /root/project/interfaces/
|
||||
- CHARM_LAYERS_DIR: /root/project/layers/
|
||||
override-build: |
|
||||
apt-get install ca-certificates -y
|
||||
tox -e build-reactive
|
||||
override-stage: |
|
||||
echo "Copying charm to staging area: $CHARMCRAFT_STAGE"
|
||||
NAME=$(ls $CHARMCRAFT_PART_BUILD/build/builds)
|
||||
cp -r $CHARMCRAFT_PART_BUILD/build/builds/$NAME/* $CHARMCRAFT_STAGE/
|
||||
echo "Copying charm to staging area: $CRAFT_STAGE"
|
||||
NAME=$(ls $CRAFT_PART_BUILD/build/builds)
|
||||
cp -r $CRAFT_PART_BUILD/build/builds/$NAME/* $CRAFT_STAGE/
|
||||
override-prime: |
|
||||
# For some reason, the normal priming chokes on the fact that there's a
|
||||
# hooks directory.
|
||||
cp -r $CHARMCRAFT_STAGE/* .
|
||||
cp -r $CRAFT_STAGE/* .
|
||||
# Charmcraft looks for this specific entry point.
|
||||
mkdir -p src
|
||||
touch src/charm.py
|
||||
chmod +x src/charm.py
|
||||
|
||||
bases:
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
architectures:
|
||||
- amd64
|
||||
architectures: [amd64]
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
architectures: [arm64]
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
architectures: [ppc64el]
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
architectures: [s390x]
|
||||
- name: ubuntu
|
||||
channel: "22.04"
|
||||
architectures: [amd64]
|
||||
- name: ubuntu
|
||||
channel: "22.04"
|
||||
architectures: [arm64]
|
||||
- name: ubuntu
|
||||
channel: "22.04"
|
||||
architectures: [ppc64el]
|
||||
- name: ubuntu
|
||||
channel: "22.04"
|
||||
architectures: [s390x]
|
||||
|
@ -8,3 +8,4 @@
|
||||
needs_charm_build: true
|
||||
charm_build_name: cinder-purestorage
|
||||
build_type: charmcraft
|
||||
charmcraft_channel: 2.0/stable
|
||||
|
@ -10,7 +10,7 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb
|
||||
|
||||
# Build requirements
|
||||
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
|
||||
charm-tools==2.8.3
|
||||
git+https://github.com/juju/charm-tools.git
|
||||
|
||||
simplejson
|
||||
|
||||
|
@ -12,7 +12,7 @@ tags:
|
||||
- misc
|
||||
series:
|
||||
- focal
|
||||
- impish
|
||||
- jammy
|
||||
subordinate: true
|
||||
provides:
|
||||
storage-backend:
|
||||
|
@ -73,7 +73,7 @@ applications:
|
||||
- '4'
|
||||
channel: latest/edge
|
||||
cinder-purestorage:
|
||||
charm: ../../../cinder-purestorage.charm
|
||||
charm: ../../../cinder-purestorage_ubuntu-20.04-amd64.charm
|
||||
options:
|
||||
# Add config options here
|
||||
driver-source: ppa:openstack-charmers/purestorage-stable
|
||||
|
@ -73,7 +73,7 @@ applications:
|
||||
- '4'
|
||||
channel: latest/edge
|
||||
cinder-purestorage:
|
||||
charm: ../../../cinder-purestorage.charm
|
||||
charm: ../../../cinder-purestorage_ubuntu-20.04-amd64.charm
|
||||
options:
|
||||
# Add config options here
|
||||
driver-source: ppa:openstack-charmers/purestorage-stable
|
||||
|
@ -1,87 +0,0 @@
|
||||
variables:
|
||||
openstack-origin: &openstack-origin distro
|
||||
|
||||
local_overlay_enabled: False
|
||||
|
||||
series: impish
|
||||
|
||||
comment:
|
||||
- 'machines section to decide order of deployment. database sooner = faster'
|
||||
machines:
|
||||
'0':
|
||||
constraints: mem=3072M
|
||||
'1':
|
||||
constraints: mem=3072M
|
||||
'2':
|
||||
constraints: mem=3072M
|
||||
'3':
|
||||
'4':
|
||||
'5':
|
||||
|
||||
relations:
|
||||
- - 'cinder:identity-service'
|
||||
- 'keystone:identity-service'
|
||||
|
||||
- - 'cinder:amqp'
|
||||
- 'rabbitmq-server:amqp'
|
||||
|
||||
- - 'cinder:storage-backend'
|
||||
- 'cinder-purestorage:storage-backend'
|
||||
|
||||
- - 'keystone:shared-db'
|
||||
- 'keystone-mysql-router:shared-db'
|
||||
- - 'keystone-mysql-router:db-router'
|
||||
- 'mysql-innodb-cluster:db-router'
|
||||
|
||||
- - 'cinder:shared-db'
|
||||
- 'cinder-mysql-router:shared-db'
|
||||
- - 'cinder-mysql-router:db-router'
|
||||
- 'mysql-innodb-cluster:db-router'
|
||||
|
||||
applications:
|
||||
keystone-mysql-router:
|
||||
charm: ch:mysql-router
|
||||
channel: latest/edge
|
||||
cinder-mysql-router:
|
||||
charm: ch:mysql-router
|
||||
channel: latest/edge
|
||||
|
||||
mysql-innodb-cluster:
|
||||
charm: ch:mysql-innodb-cluster
|
||||
num_units: 3
|
||||
options:
|
||||
source: *openstack-origin
|
||||
to:
|
||||
- '0'
|
||||
- '1'
|
||||
- '2'
|
||||
channel: latest/edge
|
||||
keystone:
|
||||
charm: ch:keystone
|
||||
num_units: 1
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '3'
|
||||
channel: latest/edge
|
||||
cinder:
|
||||
charm: ch:cinder
|
||||
num_units: 1
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '4'
|
||||
channel: latest/edge
|
||||
cinder-purestorage:
|
||||
charm: ../../../cinder-purestorage.charm
|
||||
options:
|
||||
# Add config options here
|
||||
driver-source: ppa:openstack-charmers/purestorage-stable
|
||||
protocol: iscsi
|
||||
volume-backend-name: cinder-pure
|
||||
rabbitmq-server:
|
||||
charm: ch:rabbitmq-server
|
||||
num_units: 1
|
||||
to:
|
||||
- '5'
|
||||
channel: latest/edge
|
@ -73,7 +73,7 @@ applications:
|
||||
- '4'
|
||||
channel: latest/edge
|
||||
cinder-purestorage:
|
||||
charm: ../../../cinder-purestorage.charm
|
||||
charm: ../../../cinder-purestorage_ubuntu-22.04-amd64.charm
|
||||
options:
|
||||
# Add config options here
|
||||
driver-source: ppa:openstack-charmers/purestorage-stable
|
||||
|
@ -7,7 +7,6 @@ configure:
|
||||
- zaza.openstack.charm_tests.keystone.setup.add_demo_user
|
||||
gate_bundles:
|
||||
- focal-xena
|
||||
- impish-xena
|
||||
smoke_bundles:
|
||||
- focal-xena
|
||||
dev_bundles:
|
||||
@ -15,5 +14,4 @@ dev_bundles:
|
||||
- jammy-yoga
|
||||
tests_options:
|
||||
force_deploy:
|
||||
- impish-xena
|
||||
- jammy-yoga
|
||||
|
20
tox.ini
20
tox.ini
@ -11,18 +11,6 @@ envlist = pep8,py3
|
||||
sitepackages = False
|
||||
# NOTE: Avoid false positives by not skipping missing interpreters.
|
||||
skip_missing_interpreters = False
|
||||
# NOTES:
|
||||
# * We avoid the new dependency resolver by pinning pip < 20.3, see
|
||||
# https://github.com/pypa/pip/issues/9187
|
||||
# * Pinning dependencies requires tox >= 3.2.0, see
|
||||
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
|
||||
# * It is also necessary to pin virtualenv as a newer virtualenv would still
|
||||
# lead to fetching the latest pip in the func* tox targets, see
|
||||
# https://stackoverflow.com/a/38133283
|
||||
requires =
|
||||
pip < 20.3
|
||||
virtualenv < 20.0
|
||||
setuptools<50.0.0
|
||||
|
||||
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
|
||||
minversion = 3.18.0
|
||||
@ -41,7 +29,6 @@ allowlist_externals =
|
||||
charmcraft
|
||||
bash
|
||||
tox
|
||||
rename.sh
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
||||
@ -50,13 +37,12 @@ basepython = python3
|
||||
deps = -r{toxinidir}/build-requirements.txt
|
||||
commands =
|
||||
charmcraft clean
|
||||
charmcraft -v build
|
||||
{toxinidir}/rename.sh
|
||||
charmcraft -v pack
|
||||
|
||||
[testenv:build-reactive]
|
||||
basepython = python3
|
||||
commands =
|
||||
charm-build --log-level DEBUG --use-lock-file-branches -o {toxinidir}/build/builds src {posargs}
|
||||
charm-build --log-level DEBUG --use-lock-file-branches --binary-wheels-from-source -o {toxinidir}/build/builds src {posargs}
|
||||
|
||||
[testenv:add-build-lock-file]
|
||||
basepython = python3
|
||||
@ -96,7 +82,7 @@ commands = stestr run --slowest {posargs}
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
deps = flake8==3.9.2
|
||||
charm-tools==2.8.3
|
||||
git+https://github.com/juju/charm-tools.git
|
||||
commands = flake8 {posargs} src unit_tests
|
||||
|
||||
[testenv:func-target]
|
||||
|
Loading…
x
Reference in New Issue
Block a user