Index ¦ Archives ¦ Atom

Placement From PyPI

Today the OpenStack placement service has reached something of a milestone: It is now possible to install it from PyPI and make it do its thing. Here's a quick shell script that demonstrates (without keystone). It requires a working python3 development environment but is otherwise self-contained.

Because keystone is not being used, requests need to fake authentication by adding a header:

curl -H 'x-auth-token: admin' http://localhost:8000/resource_providers

To experience the full API you'll want to be using the latest microversion. You have to opt-in to that, also with a header:

curl -H 'x-auth-token: admin'\
     -H 'openstack-api-version: placement latest' \
     http://localhost:8000/resource_providers

In that gist, note the lack of a configuration file and the general sense of "is that all?" That's on purpose. Placement is a web app that sits on top of a database. It shouldn't be any more complicated to run (or scale) than any other run-of-the-mill Python-based WSGI application, because that's all it is.

Trimming Placement to this level was basically a process of finding things that were superfluous, and either removing or making them not required. A lot of the discovery for that was done in my placement container playground series. Most of it was related to configuration management.

As noted in the gist above, there's at least one more area to trim: removing the db sync. Having this as a separate step is useful for many deployment scenarios but for others it's yet another thing to remember. Having lots of thing to remember is one of things that has always bothered me about OpenStack services.

I hope that as placement evolves we can keep it simple with as few moving parts and things to remember as possible. One way to help that is to make sure it never becomes more than a web app over a persistence layer.

© Chris Dent. Built using Pelican. Theme by Giulio Fidente on github.