Added keystone to mini-mon
This commit is contained in:
parent
0b46c17f65
commit
d5b70900a9
@ -9,5 +9,6 @@ apt cookbook
|
|||||||
Recipes
|
Recipes
|
||||||
---------
|
---------
|
||||||
- default - configures base apt repostories needed for mini-mon as well as option apt cache
|
- 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
|
- mysql_schema - Defines the mysql_schema used by mini-mon
|
||||||
- postfix - extremely simple postfix install
|
- postfix - extremely simple postfix install
|
||||||
|
@ -4,5 +4,5 @@ maintainer_email "hpcs-mon@hp.com"
|
|||||||
license "All rights reserved"
|
license "All rights reserved"
|
||||||
description "Base setup for all vagrant boxes"
|
description "Base setup for all vagrant boxes"
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version "0.0.4"
|
version "0.0.5"
|
||||||
depends "apt"
|
depends "apt"
|
||||||
|
26
cookbooks/mini-mon/recipes/keystone.rb
Normal file
26
cookbooks/mini-mon/recipes/keystone.rb
Normal 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
|
@ -38,6 +38,7 @@
|
|||||||
"chef_type": "role",
|
"chef_type": "role",
|
||||||
"run_list": [
|
"run_list": [
|
||||||
"recipe[mini-mon]",
|
"recipe[mini-mon]",
|
||||||
|
"recipe[mini-mon::keystone]",
|
||||||
"recipe[percona::cluster]",
|
"recipe[percona::cluster]",
|
||||||
"recipe[mini-mon::mysql_schema]",
|
"recipe[mini-mon::mysql_schema]",
|
||||||
"recipe[zookeeper]",
|
"recipe[zookeeper]",
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
"chef_type": "role",
|
"chef_type": "role",
|
||||||
"run_list": [
|
"run_list": [
|
||||||
"role[Basenode]",
|
"role[Basenode]",
|
||||||
"recipe[mon_api]"
|
"recipe[mon_api]",
|
||||||
|
"recipe[mini-mon::keystone]"
|
||||||
],
|
],
|
||||||
"env_run_lists": {
|
"env_run_lists": {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user