Skip to content

Synchronise master with upstream #123

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

Merged
merged 2 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
- cloudkitty-tempest-full-ipv6-only
- cloudkitty-tox-bandit:
voting: false
- cloudkitty-grenade-job
- cloudkitty-grenade-job:
voting: false
gate:
jobs:
- cloudkitty-tempest-full-v2-storage-influxdb
Expand All @@ -211,4 +212,3 @@
- cloudkitty-tempest-full-v2-storage-opensearch
- cloudkitty-tempest-full-v1-storage-sqlalchemy
- cloudkitty-tempest-full-ipv6-only
- cloudkitty-grenade-job
11 changes: 3 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
========================
Team and repository tags
========================
==========
CloudKitty
==========

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

.. Change things from this point on

==========
CloudKitty
==========

.. image:: doc/source/images/cloudkitty-logo.png
:alt: cloudkitty
:align: center
Expand Down
Empty file added cloudkitty/wsgi/__init__.py
Empty file.
24 changes: 24 additions & 0 deletions cloudkitty/wsgi/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

"""WSGI application entry-point for the CloudKitty API."""

import threading

from cloudkitty.api import app

application = None

lock = threading.Lock()
with lock:
if application is None:
application = app.build_wsgi_app()
2 changes: 1 addition & 1 deletion devstack/plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [[ -d $CLOUDKITTY_DIR/bin ]]; then
else
CLOUDKITTY_BIN_DIR=$(get_python_exec_prefix)
fi
CLOUDKITTY_UWSGI=$CLOUDKITTY_BIN_DIR/cloudkitty-api
CLOUDKITTY_UWSGI=cloudkitty.wsgi.api:application
if [ ${CLOUDKITTY_USE_UWSGI,,} == 'true' ]; then
CLOUDKITTY_ENDPOINT=$CLOUDKITTY_SERVICE_PROTOCOL://$CLOUDKITTY_SERVICE_HOST/rating
else
Expand Down
29 changes: 29 additions & 0 deletions releasenotes/notes/remove-wsgi-scripts-27d0da6926c2127c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
features:
- |
A new module, ``cloudkitty.wsgi``, has been added as a place to gather WSGI
``application`` objects. This is intended to ease deployment by providing a
consistent location for these objects. For example, if using uWSGI then
instead of:

.. code-block:: ini

[uwsgi]
wsgi-file = /bin/cloudkitty-api

You can now use:

.. code-block:: ini

[uwsgi]
module = cloudkitty.wsgi.api:application

This also simplifies deployment with other WSGI servers that expect module
paths such as gunicorn.
upgrade:
- |
The WSGI script ``cloudkitty-api`` has been removed. Deployment tooling
should instead reference the Python module path for the wsgi module in
CloudKitty, ``cloudkitty.wsgi.api:application`` if their chosen WSGI server
supports this (gunicorn, uWSGI, etc.) or implement a .wsgi script
themselves if not (mod_wsgi).
Loading