Removed the use of non-standard ohai plugin
We now have a helper method `#address_for` to return the IP of a given interface. Switched out the ohai use in favor of `#address_for`. Also, updated berkshelf to 2.x which handles dep resolution correctly. I run into problems getting berkshelf to lock to the new 0.3.0 openstack-common w/o updating berkshelf. Change-Id: If5988dc5290ed8d5faa3950c1995f9943d9efe65
This commit is contained in:
parent
ce3677c8dc
commit
5f310582e0
|
@ -1,2 +1 @@
|
|||
.bundle/
|
||||
Berksfile.lock
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"sha": "1813fcdac9032d4b6f66b99d9f04f7e40d3a91ba",
|
||||
"sources": {
|
||||
"openstack-identity": {
|
||||
"path": "."
|
||||
},
|
||||
"openstack-common": {
|
||||
"locked_version": "0.3.0",
|
||||
"git": "git://github.com/stackforge/cookbook-openstack-common.git",
|
||||
"ref": "ae80d36e8f8d5705e01bb6c14238eccb5450a229"
|
||||
},
|
||||
"database": {
|
||||
"locked_version": "1.4.0"
|
||||
},
|
||||
"mysql": {
|
||||
"locked_version": "3.0.0"
|
||||
},
|
||||
"openssl": {
|
||||
"locked_version": "1.0.2"
|
||||
},
|
||||
"build-essential": {
|
||||
"locked_version": "1.4.0"
|
||||
},
|
||||
"postgresql": {
|
||||
"locked_version": "3.0.0"
|
||||
},
|
||||
"apt": {
|
||||
"locked_version": "1.10.0"
|
||||
},
|
||||
"aws": {
|
||||
"locked_version": "0.101.0"
|
||||
},
|
||||
"xfs": {
|
||||
"locked_version": "1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
4
Gemfile
4
Gemfile
|
@ -2,8 +2,8 @@ source "https://rubygems.org"
|
|||
|
||||
gem "chef", "~> 11.4.4"
|
||||
gem "json", "<= 1.7.7" # chef 11 dependency
|
||||
gem "berkshelf", "~> 1.4.5"
|
||||
gem "berkshelf", "~> 2.0.3"
|
||||
gem "chefspec", "~> 1.3.0"
|
||||
gem "foodcritic"
|
||||
gem "strainer"
|
||||
gem "tailor"
|
||||
gem "tailor"
|
||||
|
|
80
Gemfile.lock
80
Gemfile.lock
|
@ -1,33 +1,41 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (3.2.13)
|
||||
i18n (= 0.6.1)
|
||||
multi_json (~> 1.0)
|
||||
addressable (2.3.4)
|
||||
activesupport (4.0.0)
|
||||
i18n (~> 0.6, >= 0.6.4)
|
||||
minitest (~> 4.2)
|
||||
multi_json (~> 1.3)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 0.3.37)
|
||||
addressable (2.3.5)
|
||||
akami (1.2.0)
|
||||
gyoku (>= 0.4.0)
|
||||
nokogiri (>= 1.4.0)
|
||||
berkshelf (1.4.5)
|
||||
atomic (1.1.10)
|
||||
berkshelf (2.0.5)
|
||||
activesupport (>= 3.2.0)
|
||||
addressable
|
||||
addressable (~> 2.3.4)
|
||||
buff-shell_out (~> 0.1)
|
||||
celluloid (>= 0.14.0)
|
||||
chozo (>= 0.6.1)
|
||||
faraday (>= 0.8.5)
|
||||
hashie (>= 2.0.2)
|
||||
json (>= 1.5.0)
|
||||
minitar
|
||||
mixlib-config (~> 1.1)
|
||||
mixlib-shellout (~> 1.1)
|
||||
multi_json (~> 1.5)
|
||||
retryable
|
||||
ridley (~> 0.12.4)
|
||||
solve (>= 0.4.2)
|
||||
minitar (~> 0.5.4)
|
||||
rbzip2 (~> 0.2.0)
|
||||
retryable (~> 1.3.3)
|
||||
ridley (~> 1.2.1)
|
||||
solve (>= 0.5.0)
|
||||
thor (~> 0.18.0)
|
||||
yajl-ruby
|
||||
buff-extensions (0.5.0)
|
||||
buff-ruby_engine (0.1.0)
|
||||
buff-shell_out (0.1.0)
|
||||
buff-ruby_engine (~> 0.1.0)
|
||||
builder (3.2.2)
|
||||
celluloid (0.14.1)
|
||||
timers (>= 1.0.0)
|
||||
celluloid-io (0.14.1)
|
||||
celluloid (>= 0.14.1)
|
||||
nio4r (>= 0.4.5)
|
||||
chef (11.4.4)
|
||||
erubis
|
||||
highline (>= 1.6.9)
|
||||
|
@ -42,7 +50,7 @@ GEM
|
|||
ohai (>= 0.6.0)
|
||||
rest-client (>= 1.0.4, < 1.7.0)
|
||||
yajl-ruby (~> 1.1)
|
||||
chefspec (1.3.0)
|
||||
chefspec (1.3.1)
|
||||
chef (>= 10.0)
|
||||
erubis
|
||||
fauxhai (>= 0.1.1, < 2.0)
|
||||
|
@ -62,7 +70,7 @@ GEM
|
|||
httparty
|
||||
net-ssh
|
||||
ohai
|
||||
ffi (1.8.1)
|
||||
ffi (1.9.0)
|
||||
foodcritic (2.1.0)
|
||||
erubis
|
||||
gherkin (~> 2.11.7)
|
||||
|
@ -84,7 +92,7 @@ GEM
|
|||
httpclient (2.2.0.2)
|
||||
httpi (0.9.7)
|
||||
rack
|
||||
i18n (0.6.1)
|
||||
i18n (0.6.4)
|
||||
ipaddress (0.8.0)
|
||||
json (1.7.7)
|
||||
little-plugger (1.1.3)
|
||||
|
@ -93,7 +101,7 @@ GEM
|
|||
little-plugger (>= 1.1.3)
|
||||
mime-types (1.23)
|
||||
minitar (0.5.4)
|
||||
minitest (4.7.4)
|
||||
minitest (4.7.5)
|
||||
minitest-chef-handler (1.0.1)
|
||||
chef
|
||||
ci_reporter
|
||||
|
@ -104,7 +112,7 @@ GEM
|
|||
mixlib-config (1.1.2)
|
||||
mixlib-log (1.6.0)
|
||||
mixlib-shellout (1.1.0)
|
||||
multi_json (1.7.6)
|
||||
multi_json (1.7.7)
|
||||
multi_xml (0.5.4)
|
||||
multipart-post (1.2.0)
|
||||
net-http-persistent (2.8)
|
||||
|
@ -114,7 +122,8 @@ GEM
|
|||
net-ssh-multi (1.1)
|
||||
net-ssh (>= 2.1.4)
|
||||
net-ssh-gateway (>= 0.99.0)
|
||||
nokogiri (1.5.9)
|
||||
nio4r (0.4.6)
|
||||
nokogiri (1.5.10)
|
||||
nori (1.1.5)
|
||||
ohai (6.16.0)
|
||||
ipaddress
|
||||
|
@ -127,24 +136,26 @@ GEM
|
|||
polyglot (0.3.3)
|
||||
rack (1.5.2)
|
||||
rak (1.4)
|
||||
rbzip2 (0.2.0)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
retryable (1.3.3)
|
||||
ridley (0.12.4)
|
||||
ridley (1.2.3)
|
||||
addressable
|
||||
buff-extensions (~> 0.3)
|
||||
buff-shell_out (~> 0.1)
|
||||
celluloid (~> 0.14.0)
|
||||
chozo (>= 0.6.0)
|
||||
celluloid-io (~> 0.14.0)
|
||||
erubis
|
||||
faraday (>= 0.8.4)
|
||||
hashie (>= 2.0.2)
|
||||
json (>= 1.7.7)
|
||||
mixlib-authentication (>= 1.3.0)
|
||||
mixlib-config (>= 1.1.0)
|
||||
mixlib-log (>= 1.3.0)
|
||||
mixlib-shellout (>= 1.1.0)
|
||||
net-http-persistent (>= 2.8)
|
||||
net-ssh
|
||||
retryable
|
||||
solve (>= 0.4.4)
|
||||
varia_model (~> 0.1)
|
||||
winrm (~> 1.1.0)
|
||||
rspec (2.13.0)
|
||||
rspec-core (~> 2.13.0)
|
||||
|
@ -163,10 +174,9 @@ GEM
|
|||
nokogiri (>= 1.4.0)
|
||||
nori (~> 1.0)
|
||||
wasabi (~> 1.0)
|
||||
solve (0.4.4)
|
||||
json
|
||||
strainer (2.1.0)
|
||||
berkshelf (~> 1.3)
|
||||
solve (0.6.0)
|
||||
strainer (3.0.3)
|
||||
berkshelf (~> 2.0)
|
||||
systemu (2.5.2)
|
||||
tailor (1.2.1)
|
||||
log_switch (>= 0.3.0)
|
||||
|
@ -176,12 +186,18 @@ GEM
|
|||
tins (~> 0.8)
|
||||
text-table (1.2.3)
|
||||
thor (0.18.1)
|
||||
thread_safe (0.1.0)
|
||||
atomic
|
||||
timers (1.1.0)
|
||||
tins (0.8.0)
|
||||
tins (0.8.2)
|
||||
treetop (1.4.14)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.37)
|
||||
uuidtools (2.1.4)
|
||||
varia_model (0.1.0)
|
||||
buff-extensions (~> 0.1)
|
||||
hashie (>= 2.0.2)
|
||||
wasabi (1.0.0)
|
||||
nokogiri (>= 1.4.0)
|
||||
winrm (1.1.2)
|
||||
|
@ -198,7 +214,7 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
berkshelf (~> 1.4.5)
|
||||
berkshelf (~> 2.0.3)
|
||||
chef (~> 11.4.4)
|
||||
chefspec (~> 1.3.0)
|
||||
foodcritic
|
||||
|
|
|
@ -8,8 +8,7 @@ http://keystone.openstack.org/
|
|||
Requirements
|
||||
============
|
||||
|
||||
* Chef 0.10.0 or higher required (for Chef environment use)
|
||||
* [Network Addr](https://gist.github.com/jtimberman/1040543) Ohai plugin.
|
||||
Chef 0.10.0 or higher required (for Chef environment use)
|
||||
|
||||
Cookbooks
|
||||
---------
|
||||
|
|
|
@ -108,7 +108,7 @@ sql_connection = db_uri("identity", db_user, db_pass)
|
|||
|
||||
bootstrap_token = secret "secrets", "openstack_identity_bootstrap_token"
|
||||
|
||||
ip_address = node["network"]["ipaddress_#{node["openstack"]["identity"]["bind_interface"]}"]
|
||||
ip_address = address_for node["openstack"]["identity"]["bind_interface"]
|
||||
|
||||
# If the search role is set, we search for memcache
|
||||
# servers via a Chef search. If not, we look at the
|
||||
|
|
|
@ -165,8 +165,9 @@ describe "openstack-identity::server" do
|
|||
expect(sprintf("%o", @template.mode)).to eq "644"
|
||||
end
|
||||
|
||||
it "template contents" do
|
||||
pending "TODO: implement"
|
||||
it "has bind host" do
|
||||
expect(@chef_run).to create_file_with_content @template.name,
|
||||
"bind_host = 127.0.1.1"
|
||||
end
|
||||
|
||||
it "notifies keystone restart" do
|
||||
|
|
|
@ -18,6 +18,9 @@ require "chefspec"
|
|||
}
|
||||
|
||||
def identity_stubs
|
||||
::Chef::Recipe.any_instance.stub(:address_for).
|
||||
with("lo").
|
||||
and_return "127.0.1.1"
|
||||
::Chef::Recipe.any_instance.stub(:memcached_servers).and_return []
|
||||
::Chef::Recipe.any_instance.stub(:db_password).and_return String.new
|
||||
::Chef::Recipe.any_instance.stub(:secret).and_return String.new
|
||||
|
|
Loading…
Reference in New Issue