settingsLogin | Registersettings

[openstack-dev] [kolla][puppet][openstack-ansible] Better way to run wsgi service.

0 votes

We are moving to deploy service via WSGI[0].

There are two recommended ways.

  • apache + mod_wsgi
  • nginx + uwsgi

later one is more better.

For traditional deployment, it is easy to implement. Use one
uwsgi progress to launch all wsgi services ( nova-api,cinder-api , etc).
Then one nginx process to forward the http require into uwsgi server.

But kolla is running one process in one container. If we use
the recommended solution, we have to use two container to run
nova-api container. and it will generate lots of containers.
like: nginx-nova-api, uwsig-nova-api.

i propose use uwsgi native http mode[1]. Then one uwsgi
container is enough to run nova-api service. Base one the official
doc, if there is no static resource, uWSGI is recommended to use
as a real http server.

So how about this?

[0] https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html
[1]
http://uwsgi-docs.readthedocs.io/en/latest/HTTP.html#can-i-use-uwsgi-s-http-capabilities-in-production

--
Regards,
Jeffrey Zhang
Blog: http://xcodest.me


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked Aug 25, 2017 in openstack-dev by Lei_Zhang (6,360 points)   1 2 5

1 Response

0 votes

On Thu, 24 Aug 2017, Jeffrey Zhang wrote:

i propose use uwsgi native http mode[1]. Then one uwsgi
container is enough to run nova-api service. Base one the official
doc, if there is no static resource, uWSGI is recommended to use
as a real http server.

I would consider using uwsgi in uwsgi mode, to run the api server in
a container independently. Using uwsgi mode preserves the capability
of your container (or containers) being anywhere, but is more
performant than http mode.

The relatively new uwsgi stuff on devstack has relatively clean ways
to run uwsgi services under systemd, but does so with unix domain
sockets. This might be a useful guide for writing uwsgi.ini files
for single processes in containers. Some adaptations will be
required.

And then reverse proxy to the container from either nginx or apache2
such that every service is on the same
https://api.mycloud.example.com/ host with the service on a path
prefix: https://api.mycloud.example.com/compute/,
https://api.mycould.example.com/block-storage, etc

--
Chris Dent (⊙_⊙') https://anticdent.org/
freenode: cdent tw: @anticdent__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

responded Aug 25, 2017 by cdent_plus_os_at_ant (12,800 points)   2 2 5
...