Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zaza support for pulling bundles and overlays from external repository #441

Open
gnuoy opened this issue Apr 23, 2021 · 2 comments
Open

Comments

@gnuoy
Copy link
Contributor

gnuoy commented Apr 23, 2021

It would be nice if the charms did not have to carry the bundles they needed for running functional tests. This would allow bundles to be shared between charms.

As a starter for 10 this is what tests.yaml could look like.

charm_name: ovn-chassis
bundle_source:
  bionic-ussuri:
    # Remote repository to clone. (use 'git' in variable name to make it clear no other vcs is supported atm)
    git_repo: https://github.com/openstack-charmers/openstack-bundles
    # Branch or tag to checkout
    git_branch: add_osd
    # Path within the repo to the main bundle
    path: development/openstack-base-bionic-queens/bundle.yaml
    # Ordered list of overlays to apply from with repo
    overlays:
      - development/overlays/openstack-base-virt-overlay.yaml 
      - development/overlays/masakari-bionic-ussuri.yaml
    # Variable substitution to apply to bundle, not sure if this is a good
    # idea ?
    context:
       source: bionic-ussuri
       openstack-origin: bionic-ussuri
gate_bundles:
# zaza will look on the filesystem for the bundle first if one is not present
# then is will look up the bundle name in the bundle_source section.
- bionic-ussuri
- bionic-train
- focal
- groovy```
@gnuoy
Copy link
Contributor Author

gnuoy commented Apr 23, 2021

Maybe some inheritance:

charm_name: ovn-chassis
bundle_source:
  bundle-base:
    # Remote repository to clone
    repo: https://github.com/openstack-charmers/openstack-bundles
    # Branch or tag to checkout
    branch: add_osd
    # Path within the repo to the main bundle
    path: development/openstack-base-bionic-queens/bundle.yaml
    # Ordered list of overlays to apply from with repo
    overlays:
      - development/overlays/openstack-base-virt-overlay.yaml 
      - development/overlays/masakari-bionic-ussuri.yaml
  bionic-ussuri:
    inherit: bundle-base
    # Variable substitution to apply to bundle, not sure if this is a good
    # idea ?
    context:
      source: bionic-ussuri
      openstack-origin: bionic-ussuri
  bionic-train:
    inherit: bundle-base
    # Variable substitution to apply to bundle, not sure if this is a good
    # idea ?
    context:
      source: bionic-train
      openstack-origin: bionic-train
gate_bundles:
# zaza will look on the filesystem for the bundle first if one is not present
# then is will look up the bundle name in the bundle_source section.
- bionic-ussuri
- bionic-train
- focal
- groovy

@ajkavanagh
Copy link
Collaborator

I think this is heading in the same direction as I was thinking about, but I'd like to go much further. i.e. I'd like to pull almost all the metadata out of the charm and put it in the central repo, where almost all of the context lives there, and the charm just 'identifies' itself. (that could even be done via branch or repo name).

However, if we were going to have a minimal tests.yaml, I might go for something like:

version: 2.0
charm-name: ovn-chassis
# optional bundle set (default would be the 'default'
repo: https://....
# optional test-set; default would be 'master'
test-set: stable/21.04
# optional features or restriction (for local testing); normally wouldn't be present
bundle-filter:
  # e.g. all the bionics
 - bionic-*
  # or just one
 - bionic-train

And that's it. Then provide a tox target (which uses a module), to optionally 'pull' a bundle for manual testing and modify the tests that are run, etc, when doing development or working with the tests.

Everything else would be in the central repo; tests, overlays, bundles, etc.

And then zaza is taught, via a module, how to find the bundles, etc.

coreycb pushed a commit to coreycb/zaza that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants