opdemand/deis — pull request #486 by tombh (2014-01-23 00:31:10+00:00)
Title: 231 service registry

This is the first working draft of @bacongobblers service registry code. There's still a lot to do but it works and it has tests.

To test you will need to install some dependencies on the controller, namely `apt-get install mysql-server libmysqlclient-dev` and `pip install MySQL-python==1.2.5`. Also make sure to restart Django in order to run the new DB migration. If everything's set up then you should be able to do;

`deis services:enable mysql`
`deis addons:add mysql` (inside the repo of an existing app of course)

I've left a few 'TODO #231' comments on the things that I didn't know enough about to do properly.

I haven't tested if the permissions for all the commands are correct, ie; only super users can manage services and only app collaborators can manage addons.

The question of how to actually provision services using the Config Manager and Cookbooks has not been addressed at all.

I would like to propose a significant change to the naming convention. That `ServiceProvider` and all its descendants be know as `Service` and that `Service` and all its descendants be known as `Addon`.

I've had to take the initiative on solving some problems here, so I won't be surprised if I've made any unreasonable assumptions.