Skip to content

Commit

Permalink
horizon: Do not require other openstack proposals for deployment
Browse files Browse the repository at this point in the history
Horizon no longer requires Nova (or Glance) to function; it will run as long as keystone is present (for instance, swift-only deployments).
  • Loading branch information
sidthe committed Dec 5, 2016
1 parent cfdbfdc commit a91877e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
9 changes: 7 additions & 2 deletions chef/cookbooks/horizon/recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,13 @@
neutron_use_vpnaas = false
end

nova = get_instance("roles:nova-controller")
nova_insecure = (nova[:nova][:ssl][:enabled] && nova[:nova][:ssl][:insecure]) rescue false
novas = search(:node, "roles:nova-controller") || []
if !novas.empty?
nova = novas[0]
nova_insecure = nova[:nova][:ssl][:enabled] && nova[:nova][:ssl][:insecure]
else
nova_insecure = false
end

heats = search(:node, "roles:heat-server") || []
if !heats.empty?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def upgrade(ta, td, a, d)
a.delete("nova_instance")
return a, d
end

def downgrade(ta, td, a, d)
a["nova_instance"] = ta["nova_instance"]
return a, d
end
3 changes: 1 addition & 2 deletions chef/data_bags/crowbar/template-horizon.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"attributes": {
"horizon": {
"debug": false,
"nova_instance": "none",
"keystone_instance": "none",
"database_instance": "none",
"site_branding": "OpenStack Dashboard",
Expand Down Expand Up @@ -49,7 +48,7 @@
"horizon": {
"crowbar-revision": 0,
"crowbar-applied": false,
"schema-revision": 100,
"schema-revision": 101,
"element_states": {
"horizon-server": [ "readying", "ready", "applying" ]
},
Expand Down
1 change: 0 additions & 1 deletion chef/data_bags/crowbar/template-horizon.schema
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"required": true,
"mapping": {
"debug": { "type": "bool", "required": true },
"nova_instance": { "type": "str", "required": true },
"keystone_instance": { "type": "str", "required": true },
"database_instance": { "type": "str", "required": true },
"site_branding": { "type": "str", "required": true },
Expand Down
3 changes: 0 additions & 3 deletions crowbar_framework/app/models/horizon_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def proposal_dependencies(role)
answer = []
answer << { "barclamp" => "database", "inst" => role.default_attributes["horizon"]["database_instance"] }
answer << { "barclamp" => "keystone", "inst" => role.default_attributes["horizon"]["keystone_instance"] }
answer << { "barclamp" => "nova", "inst" => role.default_attributes["horizon"]["nova_instance"] }
answer
end

Expand All @@ -65,7 +64,6 @@ def create_proposal

base["attributes"][@bc_name]["database_instance"] = find_dep_proposal("database")
base["attributes"][@bc_name]["keystone_instance"] = find_dep_proposal("keystone")
base["attributes"][@bc_name]["nova_instance"] = find_dep_proposal("nova")

base["attributes"][@bc_name][:db][:password] = random_password

Expand Down Expand Up @@ -177,4 +175,3 @@ def apply_role_pre_chef_call(old_role, role, all_nodes)
@logger.debug("Horizon apply_role_pre_chef_call: leaving")
end
end

3 changes: 1 addition & 2 deletions horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ barclamp:
requires:
- 'pacemaker'
- 'database'
- 'keystone'
- 'nova'
- 'keystone'
member:
- 'openstack'

Expand Down

0 comments on commit a91877e

Please sign in to comment.