Skip to content

Commit 220feae

Browse files
authored
Merge pull request #123 from stackhpc/upstream/master-2025-05-26
Synchronise master with upstream
2 parents e335ffe + 2a29211 commit 220feae

File tree

6 files changed

+59
-11
lines changed

6 files changed

+59
-11
lines changed

.zuul.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@
201201
- cloudkitty-tempest-full-ipv6-only
202202
- cloudkitty-tox-bandit:
203203
voting: false
204-
- cloudkitty-grenade-job
204+
- cloudkitty-grenade-job:
205+
voting: false
205206
gate:
206207
jobs:
207208
- cloudkitty-tempest-full-v2-storage-influxdb
@@ -211,4 +212,3 @@
211212
- cloudkitty-tempest-full-v2-storage-opensearch
212213
- cloudkitty-tempest-full-v1-storage-sqlalchemy
213214
- cloudkitty-tempest-full-ipv6-only
214-
- cloudkitty-grenade-job

README.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
========================
2-
Team and repository tags
3-
========================
1+
==========
2+
CloudKitty
3+
==========
44

55
.. image:: https://governance.openstack.org/tc/badges/cloudkitty.svg
6-
:target: https://governance.openstack.org/tc/reference/tags/index.html
76

87
.. Change things from this point on
98
10-
==========
11-
CloudKitty
12-
==========
13-
149
.. image:: doc/source/images/cloudkitty-logo.png
1510
:alt: cloudkitty
1611
:align: center

cloudkitty/wsgi/__init__.py

Whitespace-only changes.

cloudkitty/wsgi/api.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
"""WSGI application entry-point for the CloudKitty API."""
14+
15+
import threading
16+
17+
from cloudkitty.api import app
18+
19+
application = None
20+
21+
lock = threading.Lock()
22+
with lock:
23+
if application is None:
24+
application = app.build_wsgi_app()

devstack/plugin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [[ -d $CLOUDKITTY_DIR/bin ]]; then
3737
else
3838
CLOUDKITTY_BIN_DIR=$(get_python_exec_prefix)
3939
fi
40-
CLOUDKITTY_UWSGI=$CLOUDKITTY_BIN_DIR/cloudkitty-api
40+
CLOUDKITTY_UWSGI=cloudkitty.wsgi.api:application
4141
if [ ${CLOUDKITTY_USE_UWSGI,,} == 'true' ]; then
4242
CLOUDKITTY_ENDPOINT=$CLOUDKITTY_SERVICE_PROTOCOL://$CLOUDKITTY_SERVICE_HOST/rating
4343
else
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
features:
3+
- |
4+
A new module, ``cloudkitty.wsgi``, has been added as a place to gather WSGI
5+
``application`` objects. This is intended to ease deployment by providing a
6+
consistent location for these objects. For example, if using uWSGI then
7+
instead of:
8+
9+
.. code-block:: ini
10+
11+
[uwsgi]
12+
wsgi-file = /bin/cloudkitty-api
13+
14+
You can now use:
15+
16+
.. code-block:: ini
17+
18+
[uwsgi]
19+
module = cloudkitty.wsgi.api:application
20+
21+
This also simplifies deployment with other WSGI servers that expect module
22+
paths such as gunicorn.
23+
upgrade:
24+
- |
25+
The WSGI script ``cloudkitty-api`` has been removed. Deployment tooling
26+
should instead reference the Python module path for the wsgi module in
27+
CloudKitty, ``cloudkitty.wsgi.api:application`` if their chosen WSGI server
28+
supports this (gunicorn, uWSGI, etc.) or implement a .wsgi script
29+
themselves if not (mod_wsgi).

0 commit comments

Comments
 (0)