Migrate to charmhub
Change-Id: I2e048eaccb3b30388fa2395f47760f7b0e02017e
This commit is contained in:
committed by
Billy Olsen
parent
666c93dacb
commit
f73d05992a
16
actions.yaml
16
actions.yaml
@@ -1,16 +0,0 @@
|
||||
# Copyright 2021 Ubuntu
|
||||
# See LICENSE file for licensing details.
|
||||
#
|
||||
# TEMPLATE-TODO: change this example to suit your needs.
|
||||
# If you don't need actions, you can remove the file entirely.
|
||||
# It ties in to the example _on_fortune_action handler in src/charm.py
|
||||
#
|
||||
# Learn more about actions at: https://juju.is/docs/sdk/actions
|
||||
|
||||
fortune:
|
||||
description: Returns a pithy phrase.
|
||||
params:
|
||||
fail:
|
||||
description: "Fail with this message"
|
||||
type: string
|
||||
default: ""
|
||||
@@ -1,2 +1,7 @@
|
||||
git+https://github.com/canonical/charmcraft.git@0.10.2#egg=charmcraft
|
||||
# NOTES(lourot):
|
||||
# * We don't install charmcraft via pip anymore because it anyway spins up a
|
||||
# container and scp the system's charmcraft snap inside it. So the charmcraft
|
||||
# snap is necessary on the system anyway.
|
||||
# * `tox -e build` successfully validated with charmcraft 1.2.1
|
||||
|
||||
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35
|
||||
|
||||
30
charmcraft.yaml
Normal file
30
charmcraft.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
type: charm
|
||||
|
||||
parts:
|
||||
charm:
|
||||
after:
|
||||
- update-certificates
|
||||
charm-python-packages:
|
||||
# NOTE(lourot): see
|
||||
# * https://github.com/canonical/charmcraft/issues/551
|
||||
# * https://github.com/canonical/charmcraft/issues/632
|
||||
- setuptools < 58
|
||||
build-packages:
|
||||
- git
|
||||
|
||||
update-certificates:
|
||||
plugin: nil
|
||||
# See https://github.com/canonical/charmcraft/issues/658
|
||||
override-build: |
|
||||
apt update
|
||||
apt install -y ca-certificates
|
||||
update-ca-certificates
|
||||
|
||||
bases:
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
architectures:
|
||||
- amd64
|
||||
- arm64
|
||||
- ppc64le
|
||||
- s390x
|
||||
16
osci.yaml
16
osci.yaml
@@ -1,10 +1,10 @@
|
||||
- project:
|
||||
templates:
|
||||
- charm-unit-jobs
|
||||
- charm-unit-jobs-py38
|
||||
- charm-unit-jobs-py39
|
||||
check:
|
||||
jobs:
|
||||
- openstack-loadbalancer-focal
|
||||
- openstack-loadbalancer-hirsute
|
||||
vars:
|
||||
needs_charm_build: true
|
||||
charm_build_name: openstack-loadbalancer
|
||||
@@ -13,17 +13,9 @@
|
||||
name: openstack-loadbalancer-focal
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- charm-build
|
||||
- osci-lint
|
||||
- tox-py35
|
||||
- tox-py36
|
||||
- tox-py37
|
||||
- tox-py38
|
||||
- tox-py39
|
||||
vars:
|
||||
tox_extra_args: focal
|
||||
- job:
|
||||
name: openstack-loadbalancer-hirsute
|
||||
parent: func-target
|
||||
dependencies: &smoke-jobs
|
||||
- openstack-loadbalancer-focal
|
||||
vars:
|
||||
tox_extra_args: hirsute
|
||||
|
||||
13
rename.sh
Executable file
13
rename.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
charm=$(grep "charm_build_name" osci.yaml | awk '{print $2}')
|
||||
echo "renaming ${charm}_*.charm to ${charm}.charm"
|
||||
echo -n "pwd: "
|
||||
pwd
|
||||
ls -al
|
||||
echo "Removing bad downloaded charm maybe?"
|
||||
if [[ -e "${charm}.charm" ]];
|
||||
then
|
||||
rm "${charm}.charm"
|
||||
fi
|
||||
echo "Renaming charm here."
|
||||
mv ${charm}_*.charm ${charm}.charm
|
||||
19
tests/README.md
Normal file
19
tests/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Overview
|
||||
|
||||
This directory provides Zaza test definitions and bundles to verify basic
|
||||
deployment functionality from the perspective of this charm, its requirements
|
||||
and its features, as exercised in a subset of the full OpenStack deployment
|
||||
test bundle topology.
|
||||
|
||||
Run the smoke tests with:
|
||||
|
||||
```bash
|
||||
cd ../
|
||||
tox -e build
|
||||
cd tests/
|
||||
tox -e func-smoke
|
||||
```
|
||||
|
||||
For full details on functional testing of OpenStack charms please refer to
|
||||
the [functional testing](https://docs.openstack.org/charm-guide/latest/reference/testing.html#functional-testing)
|
||||
section of the OpenStack Charm Guide.
|
||||
@@ -2,37 +2,44 @@ local_overlay_enabled: False
|
||||
series: focal
|
||||
applications:
|
||||
ceph-osd:
|
||||
charm: cs:~openstack-charmers-next/ceph-osd
|
||||
charm: ch:ceph-osd
|
||||
num_units: 6
|
||||
storage:
|
||||
osd-devices: 'cinder,10G'
|
||||
options:
|
||||
osd-devices: '/dev/test-non-existent'
|
||||
channel: latest/edge
|
||||
ceph-mon:
|
||||
charm: cs:~openstack-charmers-next/ceph-mon
|
||||
charm: ch:ceph-mon
|
||||
num_units: 3
|
||||
options:
|
||||
monitor-count: '3'
|
||||
channel: latest/edge
|
||||
vault:
|
||||
num_units: 1
|
||||
charm: cs:~openstack-charmers-next/vault
|
||||
charm: ch:vault
|
||||
channel: latest/edge
|
||||
mysql-innodb-cluster:
|
||||
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
|
||||
charm: ch:mysql-innodb-cluster
|
||||
constraints: mem=3072M
|
||||
num_units: 3
|
||||
channel: latest/edge
|
||||
vault-mysql-router:
|
||||
charm: cs:~openstack-charmers-next/mysql-router
|
||||
charm: ch:mysql-router
|
||||
channel: latest/edge
|
||||
ceph-dashboard:
|
||||
charm: cs:~openstack-charmers-next/ceph-dashboard
|
||||
charm: ch:ceph-dashboard
|
||||
options:
|
||||
public-hostname: 'ceph-dashboard.zaza.local'
|
||||
channel: latest/edge
|
||||
openstack-loadbalancer:
|
||||
charm: ../../openstack-loadbalancer.charm
|
||||
num_units: 3
|
||||
hacluster:
|
||||
charm: cs:~openstack-charmers-next/hacluster
|
||||
charm: ch:hacluster
|
||||
options:
|
||||
cluster_count: 3
|
||||
channel: latest/edge
|
||||
relations:
|
||||
- - 'ceph-osd:mon'
|
||||
- 'ceph-mon:osd'
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
local_overlay_enabled: False
|
||||
series: hirsute
|
||||
applications:
|
||||
ceph-osd:
|
||||
charm: cs:~openstack-charmers-next/ceph-osd
|
||||
num_units: 6
|
||||
storage:
|
||||
osd-devices: 'cinder,10G'
|
||||
options:
|
||||
osd-devices: '/dev/test-non-existent'
|
||||
ceph-mon:
|
||||
charm: cs:~openstack-charmers-next/ceph-mon
|
||||
num_units: 3
|
||||
options:
|
||||
monitor-count: '3'
|
||||
vault:
|
||||
num_units: 1
|
||||
charm: cs:~openstack-charmers-next/vault
|
||||
mysql-innodb-cluster:
|
||||
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
|
||||
constraints: mem=3072M
|
||||
num_units: 3
|
||||
vault-mysql-router:
|
||||
charm: cs:~openstack-charmers-next/mysql-router
|
||||
ceph-dashboard:
|
||||
charm: cs:~openstack-charmers-next/ceph-dashboard
|
||||
options:
|
||||
public-hostname: 'ceph-dashboard.zaza.local'
|
||||
openstack-loadbalancer:
|
||||
charm: ../../openstack-loadbalancer.charm
|
||||
num_units: 3
|
||||
hacluster:
|
||||
charm: cs:~openstack-charmers-next/hacluster
|
||||
options:
|
||||
cluster_count: 3
|
||||
relations:
|
||||
- - 'ceph-osd:mon'
|
||||
- 'ceph-mon:osd'
|
||||
- - 'vault:shared-db'
|
||||
- 'vault-mysql-router:shared-db'
|
||||
- - 'vault-mysql-router:db-router'
|
||||
- 'mysql-innodb-cluster:db-router'
|
||||
- - 'ceph-dashboard:dashboard'
|
||||
- 'ceph-mon:dashboard'
|
||||
- - 'ceph-dashboard:certificates'
|
||||
- 'vault:certificates'
|
||||
- - 'openstack-loadbalancer:loadbalancer'
|
||||
- 'ceph-dashboard:loadbalancer'
|
||||
- - 'openstack-loadbalancer:ha'
|
||||
- 'hacluster:ha'
|
||||
@@ -1,4 +0,0 @@
|
||||
applications:
|
||||
openstack-loadbalancer:
|
||||
options:
|
||||
vip: '{{ TEST_VIP00 }}'
|
||||
@@ -1,7 +1,6 @@
|
||||
charm_name: openstack-loadbalancer
|
||||
gate_bundles:
|
||||
- focal
|
||||
- hirsute
|
||||
smoke_bundles:
|
||||
- focal
|
||||
configure:
|
||||
|
||||
16
tox.ini
16
tox.ini
@@ -15,8 +15,12 @@ skip_missing_interpreters = False
|
||||
# * 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
|
||||
# * It is necessary to declare setuptools as a dependency otherwise tox will
|
||||
# fail very early at not being able to load it. The version pinning is in
|
||||
# line with `pip.sh`.
|
||||
requires = pip < 20.3
|
||||
virtualenv < 20.0
|
||||
setuptools < 50.0.0
|
||||
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
|
||||
minversion = 3.2.0
|
||||
|
||||
@@ -27,11 +31,12 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
install_command =
|
||||
pip install {opts} {packages}
|
||||
commands = stestr run --slowest {posargs}
|
||||
whitelist_externals =
|
||||
allowlist_externals =
|
||||
git
|
||||
add-to-archive.py
|
||||
bash
|
||||
charmcraft
|
||||
rename.sh
|
||||
passenv = HOME TERM CS_* OS_* TEST_*
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
|
||||
@@ -55,6 +60,11 @@ basepython = python3.8
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py39]
|
||||
basepython = python3.9
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py3]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
@@ -102,7 +112,9 @@ commands = {posargs}
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/build-requirements.txt
|
||||
commands =
|
||||
charmcraft build
|
||||
charmcraft clean
|
||||
charmcraft -v build
|
||||
{toxinidir}/rename.sh
|
||||
|
||||
[testenv:func-noop]
|
||||
basepython = python3
|
||||
|
||||
Reference in New Issue
Block a user