More changes to rename this to openstack-compute

In the previous commit, the vast majority of the work to move this
repo to openstack-compute was completed. Functionally it works. This
change is intended to address some cosmetic issues and make it
consistent with work done in other cookbook repos.

All tests pass.

Change-Id: I58216cd87b9ff0a77c599c7b5aab132ab2a9304d
This commit is contained in:
Craig Tracey 2013-05-17 13:38:20 -04:00
parent 071c7ea7cd
commit ab49072ea9
47 changed files with 143 additions and 131 deletions

View File

@ -18,8 +18,8 @@ The following cookbooks are dependencies:
* apache2
* database
* glance
* keystone
* openstack-image
* openstack-identity
* mysql
* openstack-common
* rabbitmq
@ -91,7 +91,7 @@ vncproxy
Attributes
==========
* `default["openstack-compute"]["keystone_service_chef_role"]` - The name of the Chef role that sets up the Keystone Service API
* `default["openstack-compute"]["identity_service_chef_role"]` - The name of the Chef role that sets up the Keystone Service API
* `default["openstack-compute"]["user"]` - User nova services run as
* `default["openstack-compute"]["group"]` - Group nova services run as
* `default["openstack-compute"]["db"]["username"]` - Username for nova database access
@ -134,7 +134,7 @@ Basic networking configuration is controlled with the following attributes:
* `default["openstack-compute"]["network"]["vlan_interface"]` - Defaults to eth0. Refers to the network interface used for VM addresses when VMs are assigned in a VLAN subnet.
You can have the cookbook automatically create networks in Nova for you by adding a Hash to the `default["openstack-compute"]["networks"]` Array.
**Note**: The `nova::nova-setup` recipe contains the code that creates these pre-defined networks.
**Note**: The `openstack-compute::nova-setup` recipe contains the code that creates these pre-defined networks.
Each Hash must contain the following keys:
@ -232,10 +232,12 @@ License and Author
| **Author** | Matt Ray (<matt@opscode.com>) |
| **Author** | Jay Pipes (<jaypipes@att.com>) |
| **Author** | John Dewey (<jdewey@att.com>) |
| **Author** | Craig Tracey (<craigtracey@gmail.com>) |
| | |
| **Copyright** | Copyright (c) 2012-2013, Rackspace US, Inc. |
| **Copyright** | Copyright (c) 2012-2013, Opscode, Inc. |
| **Copyright** | Copyright (c) 2012-2013, AT&T Services, Inc. |
| **Copyright** | Copyright (c) 2013, Craig Tracey |
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -15,7 +15,7 @@ default["openstack-compute"]["custom_template_banner"] = "
default["openstack-compute"]["rabbit_server_chef_role"] = "rabbitmq-server"
# The name of the Chef role that sets up the Keystone Service API
default["openstack-compute"]["keystone_service_chef_role"] = "keystone"
default["openstack-compute"]["identity_service_chef_role"] = "os-identity"
# This user's password is stored in an encrypted databag
# and accessed with openstack-common cookbook library's
@ -187,24 +187,24 @@ when "fedora", "redhat", "centos" # :pragma-foodcritic: ~FC024 - won't fix this
"api_os_compute_service" => "openstack-nova-api",
"api_os_compute_process_name" => "nova-api",
"memcache_python_packages" => [ "python-memcached" ],
"nova_api_metadata_packages" => ["openstack-nova-api"],
"nova_api_metadata_process_name" => "nova-api",
"nova_api_metadata_service" => "openstack-nova-api",
"nova_compute_packages" => ["openstack-nova-compute"],
"nova_compute_service" => "openstack-nova-compute",
"nova_network_packages" => ["iptables", "openstack-nova-network"],
"nova_network_service" => "openstack-nova-network",
"nova_scheduler_packages" => ["openstack-nova-scheduler"],
"nova_scheduler_service" => "openstack-nova-scheduler",
"nova_vncproxy_packages" => ["openstack-nova-novncproxy"], # me thinks this is right?
"nova_vncproxy_service" => "openstack-nova-novncproxy",
"nova_vncproxy_consoleauth_packages" => ["openstack-nova-console"],
"nova_vncproxy_consoleauth_service" => "openstack-nova-console",
"nova_vncproxy_consoleauth_process_name" => "nova-console",
"compute_api_metadata_packages" => ["openstack-nova-api"],
"compute_api_metadata_process_name" => "nova-api",
"compute_api_metadata_service" => "openstack-nova-api",
"compute_compute_packages" => ["openstack-nova-compute"],
"compute_compute_service" => "openstack-nova-compute",
"compute_network_packages" => ["iptables", "openstack-nova-network"],
"compute_network_service" => "openstack-nova-network",
"compute_scheduler_packages" => ["openstack-nova-scheduler"],
"compute_scheduler_service" => "openstack-nova-scheduler",
"compute_vncproxy_packages" => ["openstack-nova-novncproxy"], # me thinks this is right?
"compute_vncproxy_service" => "openstack-nova-novncproxy",
"compute_vncproxy_consoleauth_packages" => ["openstack-nova-console"],
"compute_vncproxy_consoleauth_service" => "openstack-nova-console",
"compute_vncproxy_consoleauth_process_name" => "nova-console",
"libvirt_packages" => ["libvirt"],
"libvirt_service" => "libvirtd",
"nova_cert_packages" => ["openstack-nova-cert"],
"nova_cert_service" => "openstack-nova-cert",
"compute_cert_packages" => ["openstack-nova-cert"],
"compute_cert_service" => "openstack-nova-cert",
"mysql_service" => "mysqld",
"common_packages" => ["openstack-nova-common"],
"iscsi_helper" => "ietadm",
@ -218,25 +218,25 @@ when "ubuntu"
"api_os_compute_process_name" => "nova-api-os-compute",
"api_os_compute_service" => "nova-api-os-compute",
"memcache_python_packages" => [ "python-memcache" ],
"nova_api_metadata_packages" => ["nova-api-metadata"],
"nova_api_metadata_service" => "nova-api-metadata",
"nova_api_metadata_process_name" => "nova-api-metadata",
"nova_compute_packages" => ["nova-compute"],
"nova_compute_service" => "nova-compute",
"nova_network_packages" => ["iptables", "nova-network"],
"nova_network_service" => "nova-network",
"nova_scheduler_packages" => ["nova-scheduler"],
"nova_scheduler_service" => "nova-scheduler",
"compute_api_metadata_packages" => ["nova-api-metadata"],
"compute_api_metadata_service" => "nova-api-metadata",
"compute_api_metadata_process_name" => "nova-api-metadata",
"compute_compute_packages" => ["nova-compute"],
"compute_compute_service" => "nova-compute",
"compute_network_packages" => ["iptables", "nova-network"],
"compute_network_service" => "nova-network",
"compute_scheduler_packages" => ["nova-scheduler"],
"compute_scheduler_service" => "nova-scheduler",
# Websockify is needed due to https://bugs.launchpad.net/ubuntu/+source/nova/+bug/1076442
"nova_vncproxy_packages" => ["novnc", "websockify", "nova-novncproxy"],
"nova_vncproxy_service" => "nova-novncproxy",
"nova_vncproxy_consoleauth_packages" => ["nova-consoleauth"],
"nova_vncproxy_consoleauth_service" => "nova-consoleauth",
"nova_vncproxy_consoleauth_process_name" => "nova-consoleauth",
"compute_vncproxy_packages" => ["novnc", "websockify", "nova-novncproxy"],
"compute_vncproxy_service" => "nova-novncproxy",
"compute_vncproxy_consoleauth_packages" => ["nova-consoleauth"],
"compute_vncproxy_consoleauth_service" => "nova-consoleauth",
"compute_vncproxy_consoleauth_process_name" => "nova-consoleauth",
"libvirt_packages" => ["libvirt-bin"],
"libvirt_service" => "libvirt-bin",
"nova_cert_packages" => ["nova-cert"],
"nova_cert_service" => "nova-cert",
"compute_cert_packages" => ["nova-cert"],
"compute_cert_service" => "nova-cert",
"mysql_service" => "mysql",
"common_packages" => ["nova-common"],
"iscsi_helper" => "tgtadm",
@ -248,7 +248,7 @@ end
default["openstack-compute"]["ceilometer"]["api"]["server_hostname"] = "127.0.0.1"
default["openstack-compute"]["ceilometer"]["api"]["auth"]["user"] = "admin"
default["openstack-compute"]["ceilometer"]["api"]["auth"]["password"] = "adminpass"
default["openstack-compute"]["ceilometer"]["branch"] = 'stable/folsom'
default["openstack-compute"]["ceilometer"]["branch"] = 'stable/grizzly'
default["openstack-compute"]["ceilometer"]["repo"] = "git://github.com/openstack/ceilometer.git"
default["openstack-compute"]["ceilometer"]["conf"] = "/etc/ceilometer/ceilometer.conf"
default["openstack-compute"]["ceilometer"]["db"]["username"] = 'ceilometer'

View File

@ -12,7 +12,7 @@ recipe "openstack-compute::api-os-compute", "Installs OS API"
recipe "openstack-compute::compute", "nova-compute service"
recipe "openstack-compute::db", "Configures database for use with nova"
recipe "openstack-compute::libvirt", "Installs libvirt, used by nova compute for management of the virtual machine environment"
recipe "openstack-compute::keystone_registration", "Registers the API and EC2 endpoints with Keystone"
recipe "openstack-compute::identity_registration", "Registers the API and EC2 endpoints with Keystone"
recipe "openstack-compute::network", "Installs nova network service"
recipe "openstack-compute::nova-cert", "Installs nova-cert service"
recipe "openstack-compute::nova-common", "Builds the basic nova.conf config file with details of the rabbitmq, mysql, glance and keystone servers"

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: api-ec2
#
# Copyright 2012, Rackspace US, Inc.

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: api-metadata
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -39,7 +40,7 @@ package "python-keystone" do
action :upgrade
end
platform_options["nova_api_metadata_packages"].each do |pkg|
platform_options["compute_api_metadata_packages"].each do |pkg|
package pkg do
options platform_options["package_overrides"]
@ -48,7 +49,7 @@ platform_options["nova_api_metadata_packages"].each do |pkg|
end
service "nova-api-metadata" do
service_name platform_options["nova_api_metadata_service"]
service_name platform_options["compute_api_metadata_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")
@ -56,8 +57,7 @@ service "nova-api-metadata" do
end
identity_admin_endpoint = endpoint "identity-admin"
keystone_service_role = node["openstack-compute"]["keystone_service_chef_role"]
keystone = config_by_role keystone_service_role, "keystone"
identity_service_role = node["openstack-compute"]["identity_service_chef_role"]
auth_uri = ::URI.decode identity_admin_endpoint.to_s
service_pass = service_password "nova"

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: api-os-compute
#
# Copyright 2012, Rackspace US, Inc.

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: ceilometer-agent-central
#
# Copyright 2012, AT&T

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: ceilometer-agent-compute
#
# Copyright 2012, AT&T

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: ceilometer-api
#
# Copyright 2012, AT&T
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -23,8 +24,8 @@ end
include_recipe "openstack-compute::ceilometer-common"
nova_owner = node["openstack-compute"]["user"]
nova_group = node["openstack-compute"]["group"]
compute_owner = node["openstack-compute"]["user"]
compute_group = node["openstack-compute"]["group"]
directory ::File.dirname(node["openstack-compute"]["api"]["auth"]["cache_dir"]) do
owner node["openstack-compute"]["user"]

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: ceilometer-collector
#
# Copyright 2012, AT&T
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -23,7 +24,7 @@ end
include_recipe "openstack-compute::ceilometer-common"
release = node["openstack"]["release"] || 'folsom'
release = node["openstack"]["release"] || 'grizzly'
bindir = '/usr/local/bin'
install_dir = node["openstack-compute"]["ceilometer"]["install_dir"]

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: ceilometer-common
#
# Copyright 2012, AT&T
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -52,12 +53,12 @@ end
# install source
install_dir = node["openstack-compute"]["ceilometer"]["install_dir"]
nova_owner = node["openstack-compute"]["user"]
nova_group = node["openstack-compute"]["group"]
compute_owner = node["openstack-compute"]["user"]
compute_group = node["openstack-compute"]["group"]
directory install_dir do
owner nova_owner
group nova_group
owner compute_owner
group compute_group
mode 00755
recursive true
@ -77,8 +78,8 @@ python_pip install_dir do
end
directory ::File.dirname(ceilometer_conf) do
owner nova_owner
group nova_group
owner compute_owner
group compute_group
mode 00755
action :create
@ -93,9 +94,9 @@ rabbit_pass = user_password "rabbit"
rabbit_vhost = node["openstack-compute"]["rabbit"]["vhost"]
# nova db
nova_db_user = node["openstack-compute"]["db"]["username"]
nova_db_pass = db_password "nova"
nova_uri = db_uri("compute", nova_db_user, nova_db_pass)
compute_db_user = node['openstack-compute']['db']['username']
compute_db_pass = db_password "nova"
compute_uri = db_uri("compute", compute_db_user, compute_db_pass)
# ceilometer db
ceilo_db_info = db 'metering'
@ -121,8 +122,8 @@ Chef::Log.debug("openstack-compute::ceilometer-common:identity_admin_endpoint|#{
template ceilometer_conf do
source "ceilometer.conf.erb"
owner nova_owner
group nova_group
owner compute_owner
group compute_group
mode 00644
variables(
:auth_uri => auth_uri,
@ -137,13 +138,13 @@ template ceilometer_conf do
:service_pass => service_pass,
:service_tenant_name => service_tenant,
:service_user => service_user,
:sql_connection => nova_uri
:sql_connection => compute_uri
)
end
cookbook_file "/etc/ceilometer/policy.json" do
source "policy.json"
mode 0755
owner nova_owner
group nova_group
owner compute_owner
group compute_group
end

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: ceilometer
# Cookbook Name:: openstack-compute
# Recipe:: ceilometer-db
#
# Copyright 2012, AT&T

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: compute
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -26,19 +27,19 @@ include_recipe "openstack-compute::api-metadata"
include_recipe "openstack-compute::network"
platform_options = node["openstack-compute"]["platform"]
# Note(maoy): Make sure nova_compute_packages is not a node object.
# Note(maoy): Make sure compute_compute_packages is not a node object.
# so that this is compatible with chef 11 when being changed later.
nova_compute_packages = Array(platform_options["nova_compute_packages"])
compute_compute_packages = Array(platform_options["compute_compute_packages"])
if platform?(%w(ubuntu))
if node["openstack-compute"]["libvirt"]["virt_type"] == "kvm"
nova_compute_packages << "nova-compute-kvm"
compute_compute_packages << "nova-compute-kvm"
elsif node["openstack-compute"]["libvirt"]["virt_type"] == "qemu"
nova_compute_packages << "nova-compute-qemu"
compute_compute_packages << "nova-compute-qemu"
end
end
nova_compute_packages.each do |pkg|
compute_compute_packages.each do |pkg|
package pkg do
options platform_options["package_overrides"]
@ -54,7 +55,7 @@ cookbook_file "/etc/nova/nova-compute.conf" do
end
service "nova-compute" do
service_name platform_options["nova_compute_service"]
service_name platform_options["compute_compute_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: db
#
# Copyright 2012, AT&T
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: default
#
# Copyright 2012, Opscode, Inc.

View File

@ -1,6 +1,6 @@
#
# Cookbook Name:: nova
# Recipe:: keystone_registration
# Cookbook Name:: openstack-compute
# Recipe:: identity_registration
#
# Copyright 2013, AT&T
#

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: libvirt
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: network
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -21,7 +22,7 @@ include_recipe "openstack-compute::nova-common"
platform_options = node["openstack-compute"]["platform"]
platform_options["nova_network_packages"].each do |pkg|
platform_options["compute_network_packages"].each do |pkg|
package pkg do
options platform_options["package_overrides"]
@ -30,7 +31,7 @@ platform_options["nova_network_packages"].each do |pkg|
end
service "nova-network" do
service_name platform_options["nova_network_service"]
service_name platform_options["compute_network_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: nova-cert
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -20,7 +21,7 @@ include_recipe "openstack-compute::nova-common"
platform_options=node["openstack-compute"]["platform"]
platform_options["nova_cert_packages"].each do |pkg|
platform_options["compute_cert_packages"].each do |pkg|
package pkg do
options platform_options["package_overrides"]
@ -29,7 +30,7 @@ platform_options["nova_cert_packages"].each do |pkg|
end
service "nova-cert" do
service_name platform_options["nova_cert_service"]
service_name platform_options["compute_cert_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: nova-common
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -75,8 +76,8 @@ rabbit_user = node["openstack-compute"]["rabbit"]["username"]
rabbit_pass = user_password "rabbit"
rabbit_vhost = node["openstack-compute"]["rabbit"]["vhost"]
keystone_service_role = node["openstack-compute"]["keystone_service_chef_role"]
keystone = config_by_role keystone_service_role, "keystone"
identity_service_role = node["openstack-compute"]["identity_service_chef_role"]
keystone = config_by_role identity_service_role, "openstack-identity"
ksadmin_tenant_name = keystone["admin_tenant_name"]
ksadmin_user = keystone["admin_user"]
@ -89,7 +90,7 @@ identity_admin_endpoint = endpoint "identity-admin"
identity_endpoint = endpoint "identity-api"
xvpvnc_endpoint = endpoint "compute-xvpvnc" || {}
novnc_endpoint = endpoint "compute-novnc" || {}
nova_api_endpoint = endpoint "compute-api" || {}
compute_api_endpoint = endpoint "compute-api" || {}
ec2_public_endpoint = endpoint "compute-ec2-api" || {}
image_endpoint = endpoint "image-api"
@ -98,7 +99,7 @@ Chef::Log.debug("openstack-compute::nova-common:keystone|#{keystone}")
Chef::Log.debug("openstack-compute::nova-common:identity_endpoint|#{identity_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:xvpvnc_endpoint|#{xvpvnc_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:novnc_endpoint|#{novnc_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:nova_api_endpoint|#{::URI.decode nova_api_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:compute_api_endpoint|#{::URI.decode compute_api_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:ec2_public_endpoint|#{ec2_public_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:image_endpoint|#{image_endpoint.to_s}")
@ -132,7 +133,7 @@ template "/etc/nova/nova.conf" do
:glance_api_port => image_endpoint.port,
:iscsi_helper => platform_options["iscsi_helper"],
:scheduler_default_filters => node["openstack-compute"]["scheduler"]["default_filters"].join(","),
:osapi_compute_link_prefix => nova_api_endpoint.to_s
:osapi_compute_link_prefix => compute_api_endpoint.to_s
)
end
@ -182,7 +183,6 @@ template "/root/openrc" do
:tenant => ksadmin_tenant_name,
:password => ksadmin_pass,
:identity_endpoint => identity_endpoint,
:nova_api_version => "1.1",
:auth_strategy => "keystone",
:ec2_url => ec2_public_endpoint.to_s
)

View File

@ -1,5 +1,5 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: nova-setup
#
# Copyright 2012, Rackspace US, Inc.

View File

@ -1,6 +1,7 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: scheduler
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Copyright 2012, Rackspace US, Inc.
#
@ -29,7 +30,7 @@ directory "/var/lock/nova" do
action :create
end
platform_options["nova_scheduler_packages"].each do |pkg|
platform_options["compute_scheduler_packages"].each do |pkg|
package pkg do
options platform_options["package_overrides"]
@ -38,7 +39,7 @@ platform_options["nova_scheduler_packages"].each do |pkg|
end
service "nova-scheduler" do
service_name platform_options["nova_scheduler_service"]
service_name platform_options["compute_scheduler_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")

View File

@ -1,8 +1,9 @@
#
# Cookbook Name:: nova
# Cookbook Name:: openstack-compute
# Recipe:: vncproxy
#
# Copyright 2012, Rackspace US, Inc.
# Copyright 2013, Craig Tracey <craigtracey@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -21,7 +22,7 @@ include_recipe "openstack-compute::nova-common"
platform_options = node["openstack-compute"]["platform"]
platform_options["nova_vncproxy_packages"].each do |pkg|
platform_options["compute_vncproxy_packages"].each do |pkg|
package pkg do
options platform_options["package_overrides"]
@ -30,14 +31,14 @@ platform_options["nova_vncproxy_packages"].each do |pkg|
end
# required for vnc console authentication
platform_options["nova_vncproxy_consoleauth_packages"].each do |pkg|
platform_options["compute_vncproxy_consoleauth_packages"].each do |pkg|
package pkg do
action :upgrade
end
end
service "nova-vncproxy" do
service_name platform_options["nova_vncproxy_service"]
service_name platform_options["compute_vncproxy_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")
@ -45,7 +46,7 @@ service "nova-vncproxy" do
end
service "nova-consoleauth" do
service_name platform_options["nova_vncproxy_consoleauth_service"]
service_name platform_options["compute_vncproxy_consoleauth_service"]
supports :status => true, :restart => true
subscribes :restart, resources("template[/etc/nova/nova.conf]")

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::api-ec2" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::api-ec2"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::api-ec2" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::api-ec2"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::api-metadata" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::api-metadata"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::api-metadata" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::api-metadata"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::api-os-compute" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::api-os-compute"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::api-os-compute" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::api-os-compute"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::compute" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::compute"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::compute" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::compute"
end

View File

@ -0,0 +1,5 @@
require "spec_helper"
describe "openstack-compute::identity_registration" do
#TODO: implement
end

View File

@ -1,5 +0,0 @@
require "spec_helper"
describe "openstack-compute::keystone_registration" do
#TODO: implement
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::libvirt" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::libvirt"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::libvirt" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::libvirt"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::network" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::network"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::network" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::network"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::nova-cert" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::nova-cert"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::nova-cert" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::nova-cert"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::nova-common" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::nova-common"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::nova-common" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@node = @chef_run.node
@node.set["openstack-compute"]["syslog"]["use"] = true

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::nova-setup" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::nova-setup"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::scheduler" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::scheduler"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::scheduler" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::scheduler"
end

View File

@ -11,13 +11,13 @@ require "chefspec"
:log_level => ::LOG_LEVEL
}
def nova_common_stubs
def compute_common_stubs
::Chef::Recipe.any_instance.stub(:config_by_role).
with("rabbitmq-server", "queue").and_return(
{'host' => 'rabbit-host', 'port' => 'rabbit-port'}
)
::Chef::Recipe.any_instance.stub(:config_by_role).
with("keystone", "keystone").and_return(
with("os-identity", "openstack-identity").and_return(
{'admin_tenant_name' => 'admin-tenant', 'admin_user' => 'admin-user'}
)
::Chef::Recipe.any_instance.stub(:db_password).and_return String.new

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::vncproxy" do
describe "redhat" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "openstack-compute::vncproxy"
end

View File

@ -3,7 +3,7 @@ require "spec_helper"
describe "openstack-compute::vncproxy" do
describe "ubuntu" do
before do
nova_common_stubs
compute_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-compute::vncproxy"
end