Can I use Chef to...manage customer accounts and databases too?


#1

Hi! I’m new to Chef having heard about it for the first time at OSCON this
year.

We love the idea of using Chef to manage our Amazon EC2 servers. We are
constantly trying to manage these with bash scripts right now, and we are
making new images all the time when our old ones get outdated. Chef seems
to be the best possible solution here.

We have another problem though. We manage databases for our clients and so
we have hundreds of clients and each has their own database. We need to
continually be adding, removing, cloning, enabling, disabling databases and
database users. Chef seems to be very oriented to managing SERVERS but
could we write something to have it also manage our databases ON the
servers?

Lastly we want to do this from a web interface so we can start having
non-devops people like our customer support staff do some of this through
the web. Does Chef Server have a web interface that we could extend with
tasks like managing customer accounts or databases too?

Please let me know.

-K. Read


#2

Sure it’s possible to add ruby like syntax to your code and perform the
database operations that way using ruby code blocks inside cookbooks that
perform different database functions based on attributes you set during it’s
run.

chef does have a web interface but nothing as extensive as you’re proposing,
it’s still in the works and has it’s uses.

–sahil

On Tue, Jul 27, 2010 at 4:08 PM, Kris Read kris.read@curvedental.comwrote:

Hi! I’m new to Chef having heard about it for the first time at OSCON this
year.

We love the idea of using Chef to manage our Amazon EC2 servers. We are
constantly trying to manage these with bash scripts right now, and we are
making new images all the time when our old ones get outdated. Chef seems
to be the best possible solution here.

We have another problem though. We manage databases for our clients and so
we have hundreds of clients and each has their own database. We need to
continually be adding, removing, cloning, enabling, disabling databases and
database users. Chef seems to be very oriented to managing SERVERS but
could we write something to have it also manage our databases ON the
servers?

Lastly we want to do this from a web interface so we can start having
non-devops people like our customer support staff do some of this through
the web. Does Chef Server have a web interface that we could extend with
tasks like managing customer accounts or databases too?

Please let me know.

-K. Read


#3

Hi!

You can do a couple of things here. We support Data Bags for storing
arbitrary data - so you can model things as having a “database” data
bag, which has an item for each database, with instructions on how it
should be configured. Then have your recipes read that data, and do
the right thing. Same goes for users, or anything else you need to
provision.

As for having a nice Web UI, you have two choices. The Chef Server
and the Opscode Platform both ship with Web UI’s that are generic, but
can be used for basic editing. If you have a specific application in
mind, just use the API to write to the data bags directly - it’s just
RESTful GET/PUT/POST/DELETE with some authentication wrapped around
it. We have a number of people who have examples of doing just that
for things like user management.

Best,
Adam

On Tue, Jul 27, 2010 at 4:08 PM, Kris Read kris.read@curvedental.com wrote:

Hi! I’m new to Chef having heard about it for the first time at OSCON this
year.
We love the idea of using Chef to manage our Amazon EC2 servers. We are
constantly trying to manage these with bash scripts right now, and we are
making new images all the time when our old ones get outdated. Chef seems
to be the best possible solution here.
We have another problem though. We manage databases for our clients and so
we have hundreds of clients and each has their own database. We need to
continually be adding, removing, cloning, enabling, disabling databases and
database users. Chef seems to be very oriented to managing SERVERS but
could we write something to have it also manage our databases ON the
servers?
Lastly we want to do this from a web interface so we can start having
non-devops people like our customer support staff do some of this through
the web. Does Chef Server have a web interface that we could extend with
tasks like managing customer accounts or databases too?
Please let me know.
-K. Read


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com