Remove ::Openstack:: and include ::Openstack in Chef::Recipe. ugh.

This commit is contained in:
Jay Pipes
2012-11-14 17:29:38 -05:00
parent db3e25d730
commit eed2512322
8 changed files with 51 additions and 23 deletions

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
include_recipe "nova::nova-common"
@@ -50,13 +54,13 @@ service "nova-api-ec2" do
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
end
identity_admin_endpoint = ::Openstack::endpoint('identity-admin')
identity_endpoint = ::Openstack::endpoint('identity-api')
identity_admin_endpoint = endpoint('identity-admin')
identity_endpoint = endpoint('identity-api')
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone = get_settings_by_role(keystone_service_role, "keystone")
ec2_admin_endpoint = ::Openstack::endpoint('compute-ec2-admin')
ec2_public_endpoint = ::Openstack::endpoint('compute-ec2-api')
ec2_admin_endpoint = endpoint('compute-ec2-admin')
ec2_public_endpoint = endpoint('compute-ec2-api')
# Register Service Tenant
keystone_register "Register Service Tenant" do

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
platform_options = node["nova"]["platform"]
@@ -46,8 +50,8 @@ service "nova-api-metadata" do
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
end
identity_admin_endpoint = ::Openstack::endpoint('identity-admin')
identity_endpoint = ::Openstack::endpoint('identity-api')
identity_admin_endpoint = endpoint('identity-admin')
identity_endpoint = endpoint('identity-api')
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone = get_settings_by_role(keystone_service_role, "keystone")

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)
include_recipe "nova::nova-common"
@@ -53,9 +57,9 @@ end
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone = get_settings_by_role(keystone_service_role, "keystone")
identity_admin_endpoint = ::Openstack::endpoint('identity-admin')
identity_endpoint = ::Openstack::endpoint('identity-api')
nova_api_endpoint = ::Openstack::endpoint('compute-api')
identity_admin_endpoint = endpoint('identity-admin')
identity_endpoint = endpoint('identity-api')
nova_api_endpoint = endpoint('compute-api')
# Register Service Tenant
keystone_register "Register Service Tenant" do

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
platform_options = node["nova"]["platform"]
@@ -46,8 +50,8 @@ service "nova-api-os-volume" do
subscribes :restart, resources(:template => "/etc/nova/nova.conf"), :delayed
end
identity_admin_endpoint = ::Openstack::endpoint('identity-admin')
identity_endpoint = ::Openstack::endpoint('identity-api')
identity_admin_endpoint = endpoint('identity-admin')
identity_endpoint = endpoint('identity-api')
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone = get_settings_by_role(keystone_service_role, "keystone")

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "nova::api-metadata"
include_recipe "nova::network"

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
if platform?(%w(redhat centos))
include_recipe "yum::epel"
end
@@ -48,19 +52,19 @@ nova_setup_info = get_settings_by_role(nova_setup_role, "nova")
db_user = node['db']['username']
db_pass = nova_setup_info['db']['password']
sql_connection = ::Openstack::db_uri("compute", db_user, db_pass)
sql_connection = db_uri("compute", db_user, db_pass)
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone = get_settings_by_role(keystone_service_role, "keystone")
# find the node attribute endpoint settings for the server holding a given role
identity_endpoint = ::Openstack::endpoint('identity-api')
xvpvnc_endpoint = ::Openstack::endpoint('compute-xvpvnc') || {}
novnc_endpoint = ::Openstack::endpoint('compute-novnc-server') || {}
novnc_proxy_endpoint = ::Openstack::endpoint('compute-novnc')
nova_api_endpoint = ::Openstack::endpoint('compute-api') || {}
ec2_public_endpoint = ::Openstack::endpoint('compute-ec2-api') || {}
image_endpoint = ::Openstack::endpoint('image-api')
identity_endpoint = endpoint('identity-api')
xvpvnc_endpoint = endpoint('compute-xvpvnc') || {}
novnc_endpoint = endpoint('compute-novnc-server') || {}
novnc_proxy_endpoint = endpoint('compute-novnc')
nova_api_endpoint = endpoint('compute-api') || {}
ec2_public_endpoint = endpoint('compute-ec2-api') || {}
image_endpoint = endpoint('image-api')
Chef::Log.debug("nova::nova-common:rabbit_info|#{rabbit_info}")
Chef::Log.debug("nova::nova-common:keystone|#{keystone}")

View File

@@ -39,7 +39,7 @@ keystone_admin_tenant = keystone["users"][keystone_admin_user]["default_tenant"]
#creates db and user
#function defined in osops-utils/libraries
# TODO(jaypipes): Replace this with a recipe in openstack-common
# that uses the ::Openstack::db_uri() library routine to create
# that uses the db_uri() library routine to create
# the database
create_db_and_user("mysql",
node["nova"]["db"]["name"],

View File

@@ -17,6 +17,10 @@
# limitations under the License.
#
class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "nova::api-os-volume"
@@ -50,11 +54,11 @@ end
# stop_cmd "/usr/sbin/service #{service_name} stop"
# end
identity_admin_endpoint = ::Openstack::endpoint('identity-admin')
identity_endpoint = ::Openstack::endpoint('identity-api')
identity_admin_endpoint = endpoint('identity-admin')
identity_endpoint = endpoint('identity-api')
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone = get_settings_by_role(keystone_service_role, "keystone")
volume_endpoint = ::Openstack::endpoint('compute-volume')
volume_endpoint = endpoint('compute-volume')
# Register Volume Service
keystone_register "Register Volume Service" do