Skip to content

Commit

Permalink
Update the charm for new releases
Browse files Browse the repository at this point in the history
* Switch to test bundles;
* Update charmcraft.yaml;
* Update requirements files;
* Switch to ch:osci-frr from ch:quagga;
* Update tox config files.

Func-Test-PR: openstack-charmers/zaza-openstack-tests#1060
Change-Id: Ie611966bb19631a586285f45f27dc52b96ff2937
  • Loading branch information
Dmitrii Shcherbakov committed May 24, 2023
1 parent 13a994f commit 5963ea4
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 218 deletions.
3 changes: 2 additions & 1 deletion .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- project:
templates:
- openstack-python3-charm-yoga-jobs
- openstack-python3-charm-jobs
- openstack-cover-jobs
83 changes: 65 additions & 18 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,79 @@ type: charm

parts:
charm:
source: src/
plugin: reactive
reactive-charm-build-arguments:
- --binary-wheels-from-source
- -v
build-packages:
- tox
- git
- python3-dev
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/
override-prime: |
# For some reason, the normal priming chokes on the fact that there's a
# hooks directory.
cp -r $CHARMCRAFT_STAGE/* .
- libffi-dev
- libssl-dev
- rustc
- cargo
build-snaps:
- charm
build-environment:
- CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/
- CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/
- MAKEFLAGS: -j$(nproc)

bases:
- build-on:
- name: ubuntu
channel: "20.04"
architectures:
- amd64
channel: "22.04"
architectures: [amd64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "22.10"
architectures: [amd64]
- name: ubuntu
channel: "23.04"
architectures: [amd64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
- name: ubuntu
channel: "22.10"
architectures: [arm64]
- name: ubuntu
channel: "23.04"
architectures: [arm64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "20.04"
architectures: [amd64, s390x, ppc64el, arm64]
channel: "22.04"
architectures: [ppc64el]
- name: ubuntu
channel: "22.10"
architectures: [ppc64el]
- name: ubuntu
channel: "23.04"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64, s390x, ppc64el, arm64]
architectures: [s390x]
- name: ubuntu
channel: "22.10"
architectures: [s390x]
- name: ubuntu
channel: "23.04"
architectures: [s390x]
5 changes: 2 additions & 3 deletions osci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
- project:
templates:
- charm-unit-jobs-py38
- charm-unit-jobs-py310
- charm-xena-functional-jobs
- charm-yoga-functional-jobs
- charm-functional-jobs
vars:
needs_charm_build: true
charm_build_name: neutron-dynamic-routing
build_type: charmcraft
charmcraft_channel: 2.1/stable
18 changes: 0 additions & 18 deletions pip.sh

This file was deleted.

22 changes: 1 addition & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,8 @@
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# NOTE(lourot): This might look like a duplication of test-requirements.txt but
# some tox targets use only test-requirements.txt whereas charm-build uses only
# requirements.txt
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85

# NOTE: newer versions of cryptography require a Rust compiler to build,
# see
# * https://github.com/openstack-charmers/zaza/issues/421
# * https://mail.python.org/pipermail/cryptography-dev/2021-January/001003.html
#
cryptography<3.4

# Build requirements
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
git+https://github.com/juju/charm-tools#egg=charm-tools
git+https://github.com/juju/charm-tools.git

simplejson

# Newer versions use keywords that didn't exist in python 3.5 yet (e.g.
# "ModuleNotFoundError")
# NOTE(lourot): This might look like a duplication of test-requirements.txt but
# some tox targets use only test-requirements.txt whereas charm-build uses only
# requirements.txt
importlib-metadata<3.0.0; python_version < '3.6'
importlib-resources<3.0.0; python_version < '3.6'
3 changes: 2 additions & 1 deletion src/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ description: |
tags:
- openstack
series:
- focal
- jammy
- kinetic
- lunar
subordinate: false
extra-bindings:
# Used to specify the OpenStack provider network interface
Expand Down
3 changes: 0 additions & 3 deletions src/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# https://github.com/openstack-charmers/release-tools
#

# Need tox to be available from tox... inception yes, but its a workaround for now
tox

# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
local_overlay_enabled: False

variables:
openstack-origin: &openstack-origin cloud:focal-xena
openstack-origin: &openstack-origin cloud:jammy-antelope

series: focal
series: jammy

comment:
- 'machines section to decide order of deployment. database sooner = faster'
Expand All @@ -19,28 +19,26 @@ machines:
'5':
'6':
'7':
# for quagga which has no focal support yet
series: bionic
# osci-frr has a limited set of supported series.
series: jammy

applications:

keystone-mysql-router:
charm: ch:mysql-router
channel: 8.0.19/edge
channel: latest/edge
neutron-api-mysql-router:
charm: ch:mysql-router
channel: 8.0.19/edge
channel: latest/edge

mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
channel: 8.0.19/edge
channel: latest/edge

keystone:
charm: ch:keystone
Expand All @@ -53,7 +51,7 @@ applications:
haproxy-connect-timeout: 9000
to:
- '3'
channel: xena/edge
channel: latest/edge

neutron-api:
charm: ch:neutron-api
Expand All @@ -70,10 +68,10 @@ applications:
haproxy-connect-timeout: 9000
to:
- '4'
channel: xena/edge
channel: latest/edge

neutron-dynamic-routing:
charm: ../../../neutron-dynamic-routing.charm
charm: ../../../neutron-dynamic-routing_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin
Expand All @@ -83,15 +81,13 @@ applications:
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
options:
source: *openstack-origin
to:
- '6'
channel: 3.8/edge
channel: latest/edge

quagga:
charm: ch:openstack-charmers-next-quagga
series: bionic
osci-frr:
charm: ch:osci-frr
series: jammy
num_units: 1
to:
- '7'
Expand All @@ -102,7 +98,7 @@ relations:
- 'rabbitmq-server:amqp'

- - 'neutron-dynamic-routing:bgp-speaker'
- 'quagga:bgpclient'
- 'osci-frr:bgpclient'

- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
local_overlay_enabled: False

variables:
openstack-origin: &openstack-origin cloud:focal-yoga
openstack-origin: &openstack-origin cloud:jammy-zed

series: focal
series: jammy

comment:
- 'machines section to decide order of deployment. database sooner = faster'
Expand All @@ -19,28 +19,26 @@ machines:
'5':
'6':
'7':
# for quagga which has no focal support yet
series: bionic
# osci-frr has a limited set of supported series.
series: jammy

applications:

keystone-mysql-router:
charm: ch:mysql-router
channel: 8.0.19/edge
channel: latest/edge
neutron-api-mysql-router:
charm: ch:mysql-router
channel: 8.0.19/edge
channel: latest/edge

mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
channel: 8.0.19/edge
channel: latest/edge

keystone:
charm: ch:keystone
Expand All @@ -53,7 +51,7 @@ applications:
haproxy-connect-timeout: 9000
to:
- '3'
channel: yoga/edge
channel: latest/edge

neutron-api:
charm: ch:neutron-api
Expand All @@ -70,10 +68,10 @@ applications:
haproxy-connect-timeout: 9000
to:
- '4'
channel: yoga/edge
channel: latest/edge

neutron-dynamic-routing:
charm: ../../../neutron-dynamic-routing.charm
charm: ../../../neutron-dynamic-routing_ubuntu-22.04-amd64_ubuntu-22.10-amd64_ubuntu-23.04-amd64.charm
num_units: 1
options:
openstack-origin: *openstack-origin
Expand All @@ -83,15 +81,13 @@ applications:
rabbitmq-server:
charm: ch:rabbitmq-server
num_units: 1
options:
source: *openstack-origin
to:
- '6'
channel: 3.8/edge
channel: latest/edge

quagga:
charm: ch:openstack-charmers-next-quagga
series: bionic
osci-frr:
charm: ch:osci-frr
series: jammy
num_units: 1
to:
- '7'
Expand All @@ -102,7 +98,7 @@ relations:
- 'rabbitmq-server:amqp'

- - 'neutron-dynamic-routing:bgp-speaker'
- 'quagga:bgpclient'
- 'osci-frr:bgpclient'

- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
Expand Down

0 comments on commit 5963ea4

Please sign in to comment.