Added keystone to mini-mon

This commit is contained in:
Tim Kuhlman 2014-05-30 16:50:54 -06:00
parent 0b46c17f65
commit d5b70900a9
5 changed files with 31 additions and 2 deletions

View File

@ -9,5 +9,6 @@ apt cookbook
Recipes
---------
- default - configures base apt repostories needed for mini-mon as well as option apt cache
- keystone - simple keystone installation
- mysql_schema - Defines the mysql_schema used by mini-mon
- postfix - extremely simple postfix install

View File

@ -4,5 +4,5 @@ maintainer_email "hpcs-mon@hp.com"
license "All rights reserved"
description "Base setup for all vagrant boxes"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.0.4"
version "0.0.5"
depends "apt"

View File

@ -0,0 +1,26 @@
# Install a simple keystone just using sqlite, then setup a user mini-mon/password
package 'keystone' do
action :install
end
service 'keystone' do
action [ :enable, :start ]
end
# The python-keystoneclient that comes with precise is broken by a newer python-prettytable needed by python-monclient, so cmdline interaction is messed
# up, using the api directly is fine though
python 'make default keystone user' do
action :run
code <<-EOH
from keystoneclient.v2_0 import client
import sys
key = client.Client(token='ADMIN', endpoint='http://127.0.0.1:35357/v2.0/')
for user in key.users.list():
if user.name == 'mini-mon':
sys.exit(0)
key.users.create(name='mini-mon', password='password', email='mini@mon.com', enabled=True)
EOH
end

View File

@ -38,6 +38,7 @@
"chef_type": "role",
"run_list": [
"recipe[mini-mon]",
"recipe[mini-mon::keystone]",
"recipe[percona::cluster]",
"recipe[mini-mon::mysql_schema]",
"recipe[zookeeper]",

View File

@ -9,7 +9,8 @@
"chef_type": "role",
"run_list": [
"role[Basenode]",
"recipe[mon_api]"
"recipe[mon_api]",
"recipe[mini-mon::keystone]"
],
"env_run_lists": {
}