Changed cookbook name to openstack-compute

Changed the cookbook name to openstack-compute, fixed all tests, and
addressed attributes. Also addressed calls to external services,
primarily keystone -> openstack-identity.

All tests pass.

Change-Id: Ic567a33cefd78cc3b2217986d3ff7475bc93f874
This commit is contained in:
John Dewey
2013-05-16 17:59:06 -07:00
parent ba1daa9b49
commit a1acd590a0
61 changed files with 414 additions and 414 deletions

132
README.md
View File

@@ -106,49 +106,49 @@ volume
Attributes
==========
* `default["nova"]["keystone_service_chef_role"]` - The name of the Chef role that sets up the Keystone Service API
* `default["nova"]["user"]` - User nova services run as
* `default["nova"]["group"]` - Group nova services run as
* `default["nova"]["db"]["username"]` - Username for nova database access
* `default["nova"]["rabbit"]["username"]` - Username for nova rabbit access
* `default["nova"]["rabbit"]["vhost"]` - The rabbit vhost to use
* `default["nova"]["service_tenant_name"]` - Tenant name used by nova when interacting with keystone
* `default["nova"]["service_user"]` - User name used by nova when interacting with keystone
* `default["nova"]["service_role"]` - User role used by nova when interacting with keystone
* `default["nova"]["floating_cmd"]` - Path to the `nova-manage floating create` wrapper script.
* `default["nova"]["pki"]["signing_dir"]` - Defaults to `/tmp/nova-signing-dir`. Directory where `auth_token` middleware writes certificate
* `default["nova"]["config"]["volume_api_class"]` - API Class used for Volume support
* `default["nova"]["compute"]["api"]["protocol"]` - Protocol used for the OS API
* `default["nova"]["compute"]["api"]["port"]` - Port on which OS API runs
* `default["nova"]["compute"]["api"]["version"]` - Version of the OS API used
* `default["nova"]["compute"]["adminURL"]` - URL used to access the OS API for admin functions
* `default["nova"]["compute"]["internalURL"]` - URL used to access the OS API for user functions from an internal network
* `default["nova"]["compute"]["publicURL"]` - URL used to access the OS API for user functions from an external network
* `default["nova"]["config"]["availability_zone"]` - Nova availability zone. Usually set at the node level to place a compute node in another az
* `default["nova"]["config"]["default_schedule_zone"]` - The availability zone to schedule instances in when no az is specified in the request
* `default["nova"]["config"]["force_raw_images"]` - Convert all images used as backing files for instances to raw (we default to false)
* `default["nova"]["config"]["allow_same_net_traffic"]` - Disable security groups for internal networks (we default to true)
* `default["nova"]["config"]["osapi_max_limit"]` - The maximum number of items returned in a single response from a collection resource (default is 1000)
* `default["nova"]["config"]["cpu_allocation_ratio"]` - Virtual CPU to Physical CPU allocation ratio (default 16.0)
* `default["nova"]["config"]["ram_allocation_ratio"]` - Virtual RAM to Physical RAM allocation ratio (default 1.5)
* `default["nova"]["config"]["snapshot_image_format"]` - Snapshot image format (valid options are : raw, qcow2, vmdk, vdi [we default to qcow2]).
* `default["nova"]["config"]["start_guests_on_host_boot"]` - Whether to restart guests when the host reboots
* `default["nova"]["config"]["resume_guests_state_on_host_boot"]` - Whether to start guests that were running before the host rebooted
* `default["nova"]["api"]["signing_dir"]` - Keystone PKI needs a location to hold the signed tokens
* `default["nova"]["api"]["signing_dir"]` - Keystone PKI needs a location to hold the signed tokens
* `default["openstack-compute"]["keystone_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
* `default["openstack-compute"]["rabbit"]["username"]` - Username for nova rabbit access
* `default["openstack-compute"]["rabbit"]["vhost"]` - The rabbit vhost to use
* `default["openstack-compute"]["service_tenant_name"]` - Tenant name used by nova when interacting with keystone
* `default["openstack-compute"]["service_user"]` - User name used by nova when interacting with keystone
* `default["openstack-compute"]["service_role"]` - User role used by nova when interacting with keystone
* `default["openstack-compute"]["floating_cmd"]` - Path to the `nova-manage floating create` wrapper script.
* `default["openstack-compute"]["pki"]["signing_dir"]` - Defaults to `/tmp/nova-signing-dir`. Directory where `auth_token` middleware writes certificate
* `default["openstack-compute"]["config"]["volume_api_class"]` - API Class used for Volume support
* `default["openstack-compute"]["compute"]["api"]["protocol"]` - Protocol used for the OS API
* `default["openstack-compute"]["compute"]["api"]["port"]` - Port on which OS API runs
* `default["openstack-compute"]["compute"]["api"]["version"]` - Version of the OS API used
* `default["openstack-compute"]["compute"]["adminURL"]` - URL used to access the OS API for admin functions
* `default["openstack-compute"]["compute"]["internalURL"]` - URL used to access the OS API for user functions from an internal network
* `default["openstack-compute"]["compute"]["publicURL"]` - URL used to access the OS API for user functions from an external network
* `default["openstack-compute"]["config"]["availability_zone"]` - Nova availability zone. Usually set at the node level to place a compute node in another az
* `default["openstack-compute"]["config"]["default_schedule_zone"]` - The availability zone to schedule instances in when no az is specified in the request
* `default["openstack-compute"]["config"]["force_raw_images"]` - Convert all images used as backing files for instances to raw (we default to false)
* `default["openstack-compute"]["config"]["allow_same_net_traffic"]` - Disable security groups for internal networks (we default to true)
* `default["openstack-compute"]["config"]["osapi_max_limit"]` - The maximum number of items returned in a single response from a collection resource (default is 1000)
* `default["openstack-compute"]["config"]["cpu_allocation_ratio"]` - Virtual CPU to Physical CPU allocation ratio (default 16.0)
* `default["openstack-compute"]["config"]["ram_allocation_ratio"]` - Virtual RAM to Physical RAM allocation ratio (default 1.5)
* `default["openstack-compute"]["config"]["snapshot_image_format"]` - Snapshot image format (valid options are : raw, qcow2, vmdk, vdi [we default to qcow2]).
* `default["openstack-compute"]["config"]["start_guests_on_host_boot"]` - Whether to restart guests when the host reboots
* `default["openstack-compute"]["config"]["resume_guests_state_on_host_boot"]` - Whether to start guests that were running before the host rebooted
* `default["openstack-compute"]["api"]["signing_dir"]` - Keystone PKI needs a location to hold the signed tokens
* `default["openstack-compute"]["api"]["signing_dir"]` - Keystone PKI needs a location to hold the signed tokens
Networking Attributes
---------------------
Basic networking configuration is controlled with the following attributes:
* `default["nova"]["network"]["network_manager"]` - Defaults to "nova.network.manager.FlatDHCPManager". Set to "nova.network.manager.VlanManager" to configure VLAN Networking.
* `default["nova"]["network"]["fixed_range"]` - The CIDR for the network that VMs will be assigned to. In the case of VLAN Networking, this should be the network in which all VLAN networks that tenants are assigned will fit.
* `default["nova"]["network"]["dmz_cidr"]` - A CIDR for the range of IP addresses that will NOT be SNAT'ed by the nova network controller
* `default["nova"]["network"]["public_interface"]` - Defaults to eth0. Refers to the network interface used for VM addresses in the `fixed_range`.
* `default["nova"]["network"]["vlan_interface"]` - Defaults to eth0. Refers to the network interface used for VM addresses when VMs are assigned in a VLAN subnet.
* `default["openstack-compute"]["network"]["network_manager"]` - Defaults to "nova.network.manager.FlatDHCPManager". Set to "nova.network.manager.VlanManager" to configure VLAN Networking.
* `default["openstack-compute"]["network"]["fixed_range"]` - The CIDR for the network that VMs will be assigned to. In the case of VLAN Networking, this should be the network in which all VLAN networks that tenants are assigned will fit.
* `default["openstack-compute"]["network"]["dmz_cidr"]` - A CIDR for the range of IP addresses that will NOT be SNAT'ed by the nova network controller
* `default["openstack-compute"]["network"]["public_interface"]` - Defaults to eth0. Refers to the network interface used for VM addresses in the `fixed_range`.
* `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["nova"]["networks"]` Array.
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.
Each Hash must contain the following keys:
@@ -167,61 +167,61 @@ In addition to the above required keys in the Hash, the below keys are optional:
* `multi_host` - Passed as-is to `nova-manage network create` as the `--multi_host` option. Values should be either 'T' or 'F'
* `vlan` - Passed as-is to `nova-manage network create` as the `--vlan` option. Should be the VLAN tag ID.
By default, the `default["nova"]["networks"]` array has two networks:
By default, the `default["openstack-compute"]["networks"]` array has two networks:
* `default["nova"]["networks"]["public"]["label"]` - Network label to be assigned to the public network on creation
* `default["nova"]["networks"]["public"]["ipv4_cidr"]` - Network to be created (in CIDR notation, e.g., 192.168.100.0/24)
* `default["nova"]["networks"]["public"]["num_networks"]` - Number of networks to be created
* `default["nova"]["networks"]["public"]["network_size"]` - Number of IP addresses to be used in this network
* `default["nova"]["networks"]["public"]["bridge"]` - Bridge to be created for accessing the VM network (e.g., br100)
* `default["nova"]["networks"]["public"]["bridge_dev"]` - Physical device on which the bridge device should be attached (e.g., eth2)
* `default["nova"]["networks"]["public"]["dns1"]` - DNS server 1
* `default["nova"]["networks"]["public"]["dns2"]` - DNS server 2
* `default["openstack-compute"]["networks"]["public"]["label"]` - Network label to be assigned to the public network on creation
* `default["openstack-compute"]["networks"]["public"]["ipv4_cidr"]` - Network to be created (in CIDR notation, e.g., 192.168.100.0/24)
* `default["openstack-compute"]["networks"]["public"]["num_networks"]` - Number of networks to be created
* `default["openstack-compute"]["networks"]["public"]["network_size"]` - Number of IP addresses to be used in this network
* `default["openstack-compute"]["networks"]["public"]["bridge"]` - Bridge to be created for accessing the VM network (e.g., br100)
* `default["openstack-compute"]["networks"]["public"]["bridge_dev"]` - Physical device on which the bridge device should be attached (e.g., eth2)
* `default["openstack-compute"]["networks"]["public"]["dns1"]` - DNS server 1
* `default["openstack-compute"]["networks"]["public"]["dns2"]` - DNS server 2
* `default["nova"]["networks"]["private"]["label"]` - Network label to be assigned to the private network on creation
* `default["nova"]["networks"]["private"]["ipv4_cidr"]` - Network to be created (in CIDR notation e.g., 192.168.200.0/24)
* `default["nova"]["networks"]["private"]["num_networks"]` - Number of networks to be created
* `default["nova"]["networks"]["private"]["network_size"]` - Number of IP addresses to be used in this network
* `default["nova"]["networks"]["private"]["bridge"]` - Bridge to be created for accessing the VM network (e.g., br200)
* `default["nova"]["networks"]["private"]["bridge_dev"]` - Physical device on which the bridge device should be attached (e.g., eth3)
* `default["openstack-compute"]["networks"]["private"]["label"]` - Network label to be assigned to the private network on creation
* `default["openstack-compute"]["networks"]["private"]["ipv4_cidr"]` - Network to be created (in CIDR notation e.g., 192.168.200.0/24)
* `default["openstack-compute"]["networks"]["private"]["num_networks"]` - Number of networks to be created
* `default["openstack-compute"]["networks"]["private"]["network_size"]` - Number of IP addresses to be used in this network
* `default["openstack-compute"]["networks"]["private"]["bridge"]` - Bridge to be created for accessing the VM network (e.g., br200)
* `default["openstack-compute"]["networks"]["private"]["bridge_dev"]` - Physical device on which the bridge device should be attached (e.g., eth3)
VNC Configuration Attributes
----------------------------
Requires [network_addr](https://gist.github.com/jtimberman/1040543) Ohai plugin.
* `default["nova"]["xvpvnc_proxy"]["service_port"]` - Port on which XvpVNC runs
* `default["nova"]["xvpvnc_proxy"]["bind_interface"]` - Determine the interface's IP address to bind to
* `default["nova"]["novnc_proxy"]["service_port"]` - Port on which NoVNC runs
* `default["nova"]["novnc_proxy"]["bind_interface"]` - Determine the interface's IP address to bind to
* `default["openstack-compute"]["xvpvnc_proxy"]["service_port"]` - Port on which XvpVNC runs
* `default["openstack-compute"]["xvpvnc_proxy"]["bind_interface"]` - Determine the interface's IP address to bind to
* `default["openstack-compute"]["novnc_proxy"]["service_port"]` - Port on which NoVNC runs
* `default["openstack-compute"]["novnc_proxy"]["bind_interface"]` - Determine the interface's IP address to bind to
Libvirt Configuration Attributes
---------------------------------
* `default["nova"]["libvirt"]["virt_type"]` - What hypervisor software layer to use with libvirt (e.g., kvm, qemu)
* `default["nova"]["libvirt"]["bind_interface"]` - Determine the interface's IP address (used for VNC). IP address on the hypervisor that libvirt listens for VNC requests on, and IP address on the hypervisor that libvirt exposes for VNC requests on.
* `default["nova"]["libvirt"]["auth_tcp"]` - Type of authentication your libvirt layer requires
* `default["nova"]["libvirt"]["ssh"]["private_key"]` - Private key to use if using SSH authentication to your libvirt layer
* `default["nova"]["libvirt"]["ssh"]["public_key"]` - Public key to use if using SSH authentication to your libvirt layer
* `default["openstack-compute"]["libvirt"]["virt_type"]` - What hypervisor software layer to use with libvirt (e.g., kvm, qemu)
* `default["openstack-compute"]["libvirt"]["bind_interface"]` - Determine the interface's IP address (used for VNC). IP address on the hypervisor that libvirt listens for VNC requests on, and IP address on the hypervisor that libvirt exposes for VNC requests on.
* `default["openstack-compute"]["libvirt"]["auth_tcp"]` - Type of authentication your libvirt layer requires
* `default["openstack-compute"]["libvirt"]["ssh"]["private_key"]` - Private key to use if using SSH authentication to your libvirt layer
* `default["openstack-compute"]["libvirt"]["ssh"]["public_key"]` - Public key to use if using SSH authentication to your libvirt layer
Scheduler Configuration Attributes
----------------------------------
* `default["nova"]["scheduler"]["scheduler_driver"]` - the scheduler driver to use
* `default["openstack-compute"]["scheduler"]["scheduler_driver"]` - the scheduler driver to use
NOTE: The filter scheduler currently does not work with ec2.
* `default["nova"]["scheduler"]["default_filters"]` - a list of filters enabled for schedulers that support them.
* `default["openstack-compute"]["scheduler"]["default_filters"]` - a list of filters enabled for schedulers that support them.
Syslog Configuration Attributes
-------------------------------
* `default["nova"]["syslog"]["use"]` - Should nova log to syslog?
* `default["nova"]["syslog"]["facility"]` - Which facility nova should use when logging in python style (for example, `LOG_LOCAL1`)
* `default["nova"]["syslog"]["config_facility"]` - Which facility nova should use when logging in rsyslog style (for example, local1)
* `default["openstack-compute"]["syslog"]["use"]` - Should nova log to syslog?
* `default["openstack-compute"]["syslog"]["facility"]` - Which facility nova should use when logging in python style (for example, `LOG_LOCAL1`)
* `default["openstack-compute"]["syslog"]["config_facility"]` - Which facility nova should use when logging in rsyslog style (for example, local1)
OSAPI Compute Extentions
------------------------
* `default["nova"]["plugins"]` - Array of osapi compute exntesions to add to nova
* `default["openstack-compute"]["plugins"]` - Array of osapi compute exntesions to add to nova
Testing
=====

View File

@@ -5,52 +5,52 @@ default["enable_monit"] = false # OS provides packages
# Set to some text value if you want templated config files
# to contain a custom banner at the top of the written file
default["nova"]["custom_template_banner"] = "
default["openstack-compute"]["custom_template_banner"] = "
# This file autogenerated by Chef
# Do not edit, changes will be overwritten
"
# The name of the Chef role that knows about the message queue server
# that Nova uses
default["nova"]["rabbit_server_chef_role"] = "rabbitmq-server"
default["openstack-compute"]["rabbit_server_chef_role"] = "rabbitmq-server"
# The name of the Chef role that sets up the Keystone Service API
default["nova"]["keystone_service_chef_role"] = "keystone"
default["openstack-compute"]["keystone_service_chef_role"] = "keystone"
# This user's password is stored in an encrypted databag
# and accessed with openstack-common cookbook library's
# db_password routine.
default["nova"]["db"]["username"] = "nova"
default["openstack-compute"]["db"]["username"] = "nova"
# This user's password is stored in an encrypted databag
# and accessed with openstack-common cookbook library's
# user_password routine. You are expected to create
# the user, pass, vhost in a wrapper rabbitmq cookbook.
default["nova"]["rabbit"]["username"] = "rabbit"
default["nova"]["rabbit"]["vhost"] = "/nova"
default["openstack-compute"]["rabbit"]["username"] = "rabbit"
default["openstack-compute"]["rabbit"]["vhost"] = "/nova"
default["nova"]["service_tenant_name"] = "service"
default["nova"]["service_user"] = "nova"
default["nova"]["service_role"] = "admin"
default["openstack-compute"]["service_tenant_name"] = "service"
default["openstack-compute"]["service_user"] = "nova"
default["openstack-compute"]["service_role"] = "admin"
# Controls for the PKI options in the auth_token middleware
# that is in the paste INI files.
default["nova"]["pki"]["signing_dir"] = "/tmp/nova-signing-dir"
default["openstack-compute"]["pki"]["signing_dir"] = "/tmp/nova-signing-dir"
default["nova"]["user"] = "nova"
default["nova"]["group"] = "nova"
default["openstack-compute"]["user"] = "nova"
default["openstack-compute"]["group"] = "nova"
# Logging stuff
default["nova"]["syslog"]["use"] = false
default["nova"]["syslog"]["facility"] = "LOG_LOCAL1"
default["nova"]["syslog"]["config_facility"] = "local1"
default["openstack-compute"]["syslog"]["use"] = false
default["openstack-compute"]["syslog"]["facility"] = "LOG_LOCAL1"
default["openstack-compute"]["syslog"]["config_facility"] = "local1"
default["nova"]["region"] = "RegionOne"
default["openstack-compute"]["region"] = "RegionOne"
default["nova"]["floating_cmd"] = "/usr/local/bin/add_floaters.py"
default["openstack-compute"]["floating_cmd"] = "/usr/local/bin/add_floaters.py"
# TODO(shep): This should probably be ['nova']['network']['fixed']
default["nova"]["networks"] = [
# TODO(shep): This should probably be ["openstack-compute"]["network"]["fixed"]
default["openstack-compute"]["networks"] = [
{
"label" => "public",
"ipv4_cidr" => "192.168.100.0/24",
@@ -77,22 +77,22 @@ default["nova"]["networks"] = [
# For VLAN Networking, do the following:
#
# default["nova"]["network"]["network_manager"] = "nova.network.manager.VlanManager"
# default["nova"]["network"]["vlan_interface"] = "eth1" # Or "eth2", "bond1", etc...
# default["openstack-compute"]["network"]["network_manager"] = "nova.network.manager.VlanManager"
# default["openstack-compute"]["network"]["vlan_interface"] = "eth1" # Or "eth2", "bond1", etc...
# # The fixed_range setting is the **entire** subnet/network that all your VLAN
# # networks will fit inside.
# default["nova"]["network"]["fixed_range"] = "10.0.0.0/8" # Or smaller for smaller deploys...
# default["openstack-compute"]["network"]["fixed_range"] = "10.0.0.0/8" # Or smaller for smaller deploys...
#
# In addition to the above, you typically either want to do one of the following:
#
# 1) Set default["nova"]["networks"] to an empty Array ([]) and create your
# 1) Set default["openstack-compute"]["networks"] to an empty Array ([]) and create your
# VLAN networks (using nova-manage network create) **when you create a tenant**.
#
# 2) Set default["nova"]["networks"] to an Array of VLAN networks that get created
# 2) Set default["openstack-compute"]["networks"] to an Array of VLAN networks that get created
# **without a tenant assignment** for tenants to use when they are created later.
# Such an array might look like this:
#
# default["nova"]["networks"] = [
# default["openstack-compute"]["networks"] = [
# {
# "label": "vlan100",
# "vlan": "100",
@@ -110,19 +110,19 @@ default["nova"]["networks"] = [
# },
# ]
default["nova"]["network"]["multi_host"] = false
default["nova"]["network"]["fixed_range"] = default["nova"]["networks"][0]["ipv4_cidr"]
default["openstack-compute"]["network"]["multi_host"] = false
default["openstack-compute"]["network"]["fixed_range"] = default["openstack-compute"]["networks"][0]["ipv4_cidr"]
# DMZ CIDR is a range of IP addresses that should not
# have their addresses SNAT'ed by the nova network controller
default["nova"]["network"]["dmz_cidr"] = "10.128.0.0/24"
default["nova"]["network"]["network_manager"] = "nova.network.manager.FlatDHCPManager"
default["nova"]["network"]["public_interface"] = "eth0"
default["nova"]["network"]["vlan_interface"] = "eth0"
default["openstack-compute"]["network"]["dmz_cidr"] = "10.128.0.0/24"
default["openstack-compute"]["network"]["network_manager"] = "nova.network.manager.FlatDHCPManager"
default["openstack-compute"]["network"]["public_interface"] = "eth0"
default["openstack-compute"]["network"]["vlan_interface"] = "eth0"
# https://bugs.launchpad.net/nova/+bug/1075859
default["nova"]["network"]["use_single_default_gateway"] = false
default["openstack-compute"]["network"]["use_single_default_gateway"] = false
default["nova"]["scheduler"]["scheduler_driver"] = "nova.scheduler.filter_scheduler.FilterScheduler"
default["nova"]["scheduler"]["default_filters"] = ["AvailabilityZoneFilter",
default["openstack-compute"]["scheduler"]["scheduler_driver"] = "nova.scheduler.filter_scheduler.FilterScheduler"
default["openstack-compute"]["scheduler"]["default_filters"] = ["AvailabilityZoneFilter",
"RamFilter",
"ComputeFilter",
"CoreFilter",
@@ -130,57 +130,57 @@ default["nova"]["scheduler"]["default_filters"] = ["AvailabilityZoneFilter",
"DifferentHostFilter"]
default["nova"]["xvpvnc_proxy"]["service_port"] = "6081"
default["nova"]["xvpvnc_proxy"]["bind_interface"] = "lo"
default["nova"]["novnc_proxy"]["service_port"] = "6080"
default["nova"]["novnc_proxy"]["bind_interface"] = "lo"
default["openstack-compute"]["xvpvnc_proxy"]["service_port"] = "6081"
default["openstack-compute"]["xvpvnc_proxy"]["bind_interface"] = "lo"
default["openstack-compute"]["novnc_proxy"]["service_port"] = "6080"
default["openstack-compute"]["novnc_proxy"]["bind_interface"] = "lo"
default["nova"]["libvirt"]["virt_type"] = "kvm"
default["nova"]["libvirt"]["bind_interface"] = "lo"
default["nova"]["libvirt"]["auth_tcp"] = "none"
default["nova"]["libvirt"]["remove_unused_base_images"] = true
default["nova"]["libvirt"]["remove_unused_resized_minimum_age_seconds"] = 3600
default["nova"]["libvirt"]["remove_unused_original_minimum_age_seconds"] = 3600
default["nova"]["libvirt"]["checksum_base_images"] = false
default["nova"]["config"]["availability_zone"] = "nova"
default["nova"]["config"]["storage_availability_zone"] = "nova"
default["nova"]["config"]["default_schedule_zone"] = "nova"
default["nova"]["config"]["force_raw_images"] = false
default["nova"]["config"]["allow_same_net_traffic"] = true
default["nova"]["config"]["osapi_max_limit"] = 1000
default["nova"]["config"]["cpu_allocation_ratio"] = 16.0
default["nova"]["config"]["ram_allocation_ratio"] = 1.5
default["nova"]["config"]["snapshot_image_format"] = "qcow2"
default["openstack-compute"]["libvirt"]["virt_type"] = "kvm"
default["openstack-compute"]["libvirt"]["bind_interface"] = "lo"
default["openstack-compute"]["libvirt"]["auth_tcp"] = "none"
default["openstack-compute"]["libvirt"]["remove_unused_base_images"] = true
default["openstack-compute"]["libvirt"]["remove_unused_resized_minimum_age_seconds"] = 3600
default["openstack-compute"]["libvirt"]["remove_unused_original_minimum_age_seconds"] = 3600
default["openstack-compute"]["libvirt"]["checksum_base_images"] = false
default["openstack-compute"]["config"]["availability_zone"] = "nova"
default["openstack-compute"]["config"]["storage_availability_zone"] = "nova"
default["openstack-compute"]["config"]["default_schedule_zone"] = "nova"
default["openstack-compute"]["config"]["force_raw_images"] = false
default["openstack-compute"]["config"]["allow_same_net_traffic"] = true
default["openstack-compute"]["config"]["osapi_max_limit"] = 1000
default["openstack-compute"]["config"]["cpu_allocation_ratio"] = 16.0
default["openstack-compute"]["config"]["ram_allocation_ratio"] = 1.5
default["openstack-compute"]["config"]["snapshot_image_format"] = "qcow2"
# `start` will cause nova-compute to error out if a VM is already running, where
# `resume` checks to see if it is running first.
default["nova"]["config"]["start_guests_on_host_boot"] = false
default["openstack-compute"]["config"]["start_guests_on_host_boot"] = false
# requires https://review.openstack.org/#/c/8423/
default["nova"]["config"]["resume_guests_state_on_host_boot"] = true
default["openstack-compute"]["config"]["resume_guests_state_on_host_boot"] = true
# Volume API class (driver)
default["nova"]["config"]["volume_api_class"] = "nova.volume.cinder.API"
default["openstack-compute"]["config"]["volume_api_class"] = "nova.volume.cinder.API"
# quota settings
default["nova"]["config"]["quota_security_groups"] = 50
default["nova"]["config"]["quota_security_group_rules"] = 20
default["openstack-compute"]["config"]["quota_security_groups"] = 50
default["openstack-compute"]["config"]["quota_security_group_rules"] = 20
default["nova"]["ratelimit"]["settings"] = {
default["openstack-compute"]["ratelimit"]["settings"] = {
"generic-post-limit" => { "verb" => "POST", "uri" => "*", "regex" => ".*", "limit" => "10", "interval" => "MINUTE" },
"create-servers-limit" => { "verb" => "POST", "uri" => "*/servers", "regex" => "^/servers", "limit" => "50", "interval" => "DAY" },
"generic-put-limit" => { "verb" => "PUT", "uri" => "*", "regex" => ".*", "limit" => "10", "interval" => "MINUTE" },
"changes-since-limit" => { "verb" => "GET", "uri" => "*changes-since*", "regex" => ".*changes-since.*", "limit" => "3", "interval" => "MINUTE" },
"generic-delete-limit" => { "verb" => "DELETE", "uri" => "*", "regex" => ".*", "limit" => "100", "interval" => "MINUTE" }
}
default["nova"]["ratelimit"]["api"]["enabled"] = true
default["openstack-compute"]["ratelimit"]["api"]["enabled"] = true
# Keystone PKI signing directory. Only written to the filter:authtoken section
# of the api-paste.ini when node["openstack"]["auth"]["strategy"] == "pki"
default["nova"]["api"]["auth"]["cache_dir"] = "/var/cache/nova/api"
default["nova"]["ceilometer-api"]["auth"]["cache_dir"] = "/var/cache/nova/ceilometer-api"
default["openstack-compute"]["api"]["auth"]["cache_dir"] = "/var/cache/nova/api"
default["openstack-compute"]["ceilometer-api"]["auth"]["cache_dir"] = "/var/cache/nova/ceilometer-api"
case platform
when "fedora", "redhat", "centos" # :pragma-foodcritic: ~FC024 - won't fix this
default["nova"]["platform"] = {
default["openstack-compute"]["platform"] = {
"api_ec2_packages" => ["openstack-nova-api"],
"api_ec2_service" => "openstack-nova-api",
"api_os_compute_packages" => ["openstack-nova-api"],
@@ -211,7 +211,7 @@ when "fedora", "redhat", "centos" # :pragma-foodcritic: ~FC024 - won't fix this
"package_overrides" => ""
}
when "ubuntu"
default["nova"]["platform"] = {
default["openstack-compute"]["platform"] = {
"api_ec2_packages" => ["nova-api-ec2"],
"api_ec2_service" => "nova-api-ec2",
"api_os_compute_packages" => ["nova-api-os-compute"],
@@ -245,17 +245,17 @@ when "ubuntu"
end
# ceilometer specific attrs
default["nova"]["ceilometer"]["api"]["server_hostname"] = "127.0.0.1"
default["nova"]["ceilometer"]["api"]["auth"]["user"] = "admin"
default["nova"]["ceilometer"]["api"]["auth"]["password"] = "adminpass"
default["nova"]["ceilometer"]["branch"] = 'stable/folsom'
default["nova"]["ceilometer"]["repo"] = "git://github.com/openstack/ceilometer.git"
default["nova"]["ceilometer"]["conf"] = "/etc/ceilometer/ceilometer.conf"
default["nova"]["ceilometer"]["db"]["username"] = 'ceilometer'
default["nova"]["ceilometer"]["dependent_pkgs"] = ['libxslt-dev', 'libxml2-dev']
default["nova"]["ceilometer"]["install_dir"] = '/opt/ceilometer'
default["nova"]["ceilometer"]["periodic_interval"] = 600
default["nova"]["ceilometer"]["syslog"]["use"] = false
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"]["repo"] = "git://github.com/openstack/ceilometer.git"
default["openstack-compute"]["ceilometer"]["conf"] = "/etc/ceilometer/ceilometer.conf"
default["openstack-compute"]["ceilometer"]["db"]["username"] = 'ceilometer'
default["openstack-compute"]["ceilometer"]["dependent_pkgs"] = ['libxslt-dev', 'libxml2-dev']
default["openstack-compute"]["ceilometer"]["install_dir"] = '/opt/ceilometer'
default["openstack-compute"]["ceilometer"]["periodic_interval"] = 600
default["openstack-compute"]["ceilometer"]["syslog"]["use"] = false
# plugins
default["nova"]["plugins"] = nil
default["openstack-compute"]["plugins"] = nil

View File

@@ -1,4 +1,4 @@
name "nova"
name "openstack-compute"
maintainer "Opscode, Inc."
maintainer_email "matt@opscode.com"
license "Apache 2.0"
@@ -6,19 +6,19 @@ description "The OpenStack Compute service Nova."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "2012.2.1"
recipe "nova::api-ec2", "Installs AWS EC2 compatible API"
recipe "nova::api-metadata", "Installs the nova metadata package"
recipe "nova::api-os-compute", "Installs OS API"
recipe "nova::compute", "nova-compute service"
recipe "nova::db", "Configures database for use with nova"
recipe "nova::libvirt", "Installs libvirt, used by nova compute for management of the virtual machine environment"
recipe "nova::keystone_registration", "Registers the API and EC2 endpoints with Keystone"
recipe "nova::network", "Installs nova network service"
recipe "nova::nova-cert", "Installs nova-cert service"
recipe "nova::nova-common", "Builds the basic nova.conf config file with details of the rabbitmq, mysql, glance and keystone servers"
recipe "nova::nova-setup", "Sets up the nova database on the mysql server, including the initial schema and subsequent creation of the appropriate networks"
recipe "nova::scheduler", "Installs nova scheduler service"
recipe "nova::vncproxy", "Installs and configures the vncproxy service for console access to VMs"
recipe "openstack-compute::api-ec2", "Installs AWS EC2 compatible API"
recipe "openstack-compute::api-metadata", "Installs the nova metadata package"
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::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"
recipe "openstack-compute::nova-setup", "Sets up the nova database on the mysql server, including the initial schema and subsequent creation of the appropriate networks"
recipe "openstack-compute::scheduler", "Installs nova scheduler service"
recipe "openstack-compute::vncproxy", "Installs and configures the vncproxy service for console access to VMs"
%w{ ubuntu fedora redhat centos }.each do |os|
supports os

View File

@@ -21,13 +21,13 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
directory "/var/lock/nova" do
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
action :create
@@ -58,8 +58,8 @@ service_pass = service_password "nova"
template "/etc/nova/api-paste.ini" do
source "api-paste.ini.erb"
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00644
variables(
:identity_admin_endpoint => identity_admin_endpoint,

View File

@@ -23,13 +23,13 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
directory "/var/lock/nova" do
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
action :create
@@ -56,7 +56,7 @@ service "nova-api-metadata" do
end
identity_admin_endpoint = endpoint "identity-admin"
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone_service_role = node["openstack-compute"]["keystone_service_chef_role"]
keystone = config_by_role keystone_service_role, "keystone"
auth_uri = ::URI.decode identity_admin_endpoint.to_s
@@ -64,8 +64,8 @@ service_pass = service_password "nova"
template "/etc/nova/api-paste.ini" do
source "api-paste.ini.erb"
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00644
variables(
:identity_admin_endpoint => identity_admin_endpoint,

View File

@@ -21,19 +21,19 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
directory "/var/lock/nova" do
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
end
directory ::File.dirname(node["nova"]["api"]["auth"]["cache_dir"]) do
owner node["nova"]["user"]
group node["nova"]["group"]
directory ::File.dirname(node["openstack-compute"]["api"]["auth"]["cache_dir"]) do
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
only_if { node["openstack"]["auth"]["strategy"] == "pki" }
@@ -64,8 +64,8 @@ service_pass = service_password "nova"
template "/etc/nova/api-paste.ini" do
source "api-paste.ini.erb"
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00644
variables(
:identity_admin_endpoint => identity_admin_endpoint,

View File

@@ -21,10 +21,10 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::ceilometer-common"
include_recipe "openstack-compute::ceilometer-common"
bindir = '/usr/local/bin'
ceilometer_conf = node["nova"]["ceilometer"]["conf"]
ceilometer_conf = node["openstack-compute"]["ceilometer"]["conf"]
conf_switch = "--config-file #{ceilometer_conf}"
service "ceilometer-agent-central" do

View File

@@ -21,10 +21,10 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::ceilometer-common"
include_recipe "openstack-compute::ceilometer-common"
bindir = '/usr/local/bin'
ceilometer_conf = node["nova"]["ceilometer"]["conf"]
ceilometer_conf = node["openstack-compute"]["ceilometer"]["conf"]
conf_switch = "--config-file #{ceilometer_conf}"
service "ceilometer-agent-compute" do

View File

@@ -21,21 +21,21 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::ceilometer-common"
include_recipe "openstack-compute::ceilometer-common"
nova_owner = node["nova"]["user"]
nova_group = node["nova"]["group"]
nova_owner = node["openstack-compute"]["user"]
nova_group = node["openstack-compute"]["group"]
directory ::File.dirname(node["nova"]["api"]["auth"]["cache_dir"]) do
owner node["nova"]["user"]
group node["nova"]["group"]
directory ::File.dirname(node["openstack-compute"]["api"]["auth"]["cache_dir"]) do
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
only_if { node["openstack"]["auth"]["strategy"] == "pki" }
end
bindir = '/usr/local/bin'
ceilometer_conf = node["nova"]["ceilometer"]["conf"]
ceilometer_conf = node["openstack-compute"]["ceilometer"]["conf"]
conf_switch = "--config-file #{ceilometer_conf}"
include_recipe "apache2"
@@ -46,8 +46,8 @@ apache_module "proxy"
apache_module "proxy_http"
htpasswd_path = "#{node['apache']['dir']}/htpasswd"
htpasswd_user = node['nova']['ceilometer']['api']['auth']['user']
htpasswd_password = node['nova']['ceilometer']['api']['auth']['password']
htpasswd_user = node["openstack-compute"]["ceilometer"]["api"]["auth"]["user"]
htpasswd_password = node["openstack-compute"]["ceilometer"]["api"]["auth"]["password"]
template "#{node['apache']['dir']}/sites-available/meter" do
source "meter-site.conf.erb"

View File

@@ -21,13 +21,13 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::ceilometer-common"
include_recipe "openstack-compute::ceilometer-common"
release = node["openstack"]["release"] || 'folsom'
bindir = '/usr/local/bin'
install_dir = node["nova"]["ceilometer"]["install_dir"]
ceilometer_conf = node["nova"]["ceilometer"]["conf"]
install_dir = node["openstack-compute"]["ceilometer"]["install_dir"]
ceilometer_conf = node["openstack-compute"]["ceilometer"]["conf"]
conf_switch = "--config-file #{ceilometer_conf}"
# db migration

View File

@@ -22,15 +22,15 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
include_recipe "python::pip"
if node["nova"]["ceilometer"]["syslog"]["use"]
if node["openstack-compute"]["ceilometer"]["syslog"]["use"]
include_recipe "openstack-common::logging"
end
ceilometer_conf = node["nova"]["ceilometer"]["conf"]
ceilometer_conf = node["openstack-compute"]["ceilometer"]["conf"]
dependent_pkgs = node["nova"]["ceilometer"]["dependent_pkgs"]
dependent_pkgs = node["openstack-compute"]["ceilometer"]["dependent_pkgs"]
dependent_pkgs.each do |pkg|
package pkg do
action :upgrade
@@ -50,10 +50,10 @@ bin_names.each do |bin_name|
end
# install source
install_dir = node["nova"]["ceilometer"]["install_dir"]
install_dir = node["openstack-compute"]["ceilometer"]["install_dir"]
nova_owner = node["nova"]["user"]
nova_group = node["nova"]["group"]
nova_owner = node["openstack-compute"]["user"]
nova_group = node["openstack-compute"]["group"]
directory install_dir do
owner nova_owner
@@ -64,8 +64,8 @@ directory install_dir do
action :create
end
git_branch = node["nova"]["ceilometer"]["branch"]
git_repo = node["nova"]["ceilometer"]["repo"]
git_branch = node["openstack-compute"]["ceilometer"]["branch"]
git_repo = node["openstack-compute"]["ceilometer"]["repo"]
git install_dir do
repo git_repo
reference git_branch
@@ -84,29 +84,29 @@ directory ::File.dirname(ceilometer_conf) do
action :create
end
rabbit_server_role = node["nova"]["rabbit_server_chef_role"]
rabbit_server_role = node["openstack-compute"]["rabbit_server_chef_role"]
rabbit_info = config_by_role rabbit_server_role, "queue"
rabbit_port = rabbit_info["port"]
rabbit_ipaddress = rabbit_info["host"]
rabbit_user = node["nova"]["rabbit"]["username"]
rabbit_user = node["openstack-compute"]["rabbit"]["username"]
rabbit_pass = user_password "rabbit"
rabbit_vhost = node["nova"]["rabbit"]["vhost"]
rabbit_vhost = node["openstack-compute"]["rabbit"]["vhost"]
# nova db
nova_db_user = node['nova']['db']['username']
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)
# ceilometer db
ceilo_db_info = db 'metering'
ceilo_db_user = node['nova']['ceilometer']['db']['username']
ceilo_db_user = node["openstack-compute"]["ceilometer"]["db"]["username"]
ceilo_db_pass = db_password "ceilometer"
ceilo_db_query = ceilo_db_info['db_type'] == 'mysql' ? '?charset=utf8' : nil
ceilo_db_uri = db_uri("metering", ceilo_db_user, ceilo_db_pass).to_s + ceilo_db_query
service_user = node["nova"]["service_user"]
service_user = node["openstack-compute"]["service_user"]
service_pass = service_password "nova"
service_tenant = node["nova"]["service_tenant_name"]
service_tenant = node["openstack-compute"]["service_tenant_name"]
# find the node attribute endpoint settings for the server holding a given role
identity_admin_endpoint = endpoint "identity-admin"
@@ -114,10 +114,10 @@ auth_uri = ::URI.decode identity_admin_endpoint.to_s
image_endpoint = endpoint "image-api"
Chef::Log.debug("nova::ceilometer-common:rabbit_info|#{rabbit_info}")
Chef::Log.debug("nova::ceilometer-common:service_user|#{service_user}")
Chef::Log.debug("nova::ceilometer-common:service_tenant|#{service_tenant}")
Chef::Log.debug("nova::ceilometer-common:identity_admin_endpoint|#{identity_admin_endpoint.to_s}")
Chef::Log.debug("openstack-compute::ceilometer-common:rabbit_info|#{rabbit_info}")
Chef::Log.debug("openstack-compute::ceilometer-common:service_user|#{service_user}")
Chef::Log.debug("openstack-compute::ceilometer-common:service_tenant|#{service_tenant}")
Chef::Log.debug("openstack-compute::ceilometer-common:identity_admin_endpoint|#{identity_admin_endpoint.to_s}")
template ceilometer_conf do
source "ceilometer.conf.erb"

View File

@@ -32,6 +32,6 @@ include_recipe "mysql::ruby"
db_pass = db_password "ceilometer"
db_create_with_user("metering",
node["nova"]["ceilometer"]["db"]["username"],
node["openstack-compute"]["ceilometer"]["db"]["username"],
db_pass
)

View File

@@ -21,19 +21,19 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "nova::api-metadata"
include_recipe "nova::network"
include_recipe "openstack-compute::nova-common"
include_recipe "openstack-compute::api-metadata"
include_recipe "openstack-compute::network"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
# Note(maoy): Make sure nova_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"])
if platform?(%w(ubuntu))
if node["nova"]["libvirt"]["virt_type"] == "kvm"
if node["openstack-compute"]["libvirt"]["virt_type"] == "kvm"
nova_compute_packages << "nova-compute-kvm"
elsif node["nova"]["libvirt"]["virt_type"] == "qemu"
elsif node["openstack-compute"]["libvirt"]["virt_type"] == "qemu"
nova_compute_packages << "nova-compute-qemu"
end
end
@@ -61,4 +61,4 @@ service "nova-compute" do
action :enable
end
include_recipe "nova::libvirt"
include_recipe "openstack-compute::libvirt"

View File

@@ -32,6 +32,6 @@ include_recipe "mysql::ruby"
db_pass = db_password "nova"
db_create_with_user("compute",
node["nova"]["db"]["username"],
node["openstack-compute"]["db"]["username"],
db_pass
)

View File

@@ -32,39 +32,39 @@ ec2_admin_endpoint = endpoint "compute-ec2-admin"
ec2_public_endpoint = endpoint "compute-ec2-api"
# Register Service Tenant
keystone_register "Register Service Tenant" do
openstack_identity_register "Register Service Tenant" do
auth_uri auth_uri
bootstrap_token bootstrap_token
tenant_name node["nova"]["service_tenant_name"]
tenant_name node["openstack-compute"]["service_tenant_name"]
tenant_description "Service Tenant"
action :create_tenant
end
# Register Service User
keystone_register "Register Service User" do
openstack_identity_register "Register Service User" do
auth_uri auth_uri
bootstrap_token bootstrap_token
tenant_name node["nova"]["service_tenant_name"]
user_name node["nova"]["service_user"]
tenant_name node["openstack-compute"]["service_tenant_name"]
user_name node["openstack-compute"]["service_user"]
user_pass service_pass
action :create_user
end
## Grant Admin role to Service User for Service Tenant ##
keystone_register "Grant 'admin' Role to Service User for Service Tenant" do
openstack_identity_register "Grant 'admin' Role to Service User for Service Tenant" do
auth_uri auth_uri
bootstrap_token bootstrap_token
tenant_name node["nova"]["service_tenant_name"]
user_name node["nova"]["service_user"]
role_name node["nova"]["service_role"]
tenant_name node["openstack-compute"]["service_tenant_name"]
user_name node["openstack-compute"]["service_user"]
role_name node["openstack-compute"]["service_role"]
action :grant_role
end
# Register Compute Service
keystone_register "Register Compute Service" do
openstack_identity_register "Register Compute Service" do
auth_uri auth_uri
bootstrap_token bootstrap_token
service_name "nova"
@@ -75,11 +75,11 @@ keystone_register "Register Compute Service" do
end
# Register Compute Endpoint
keystone_register "Register Compute Endpoint" do
openstack_identity_register "Register Compute Endpoint" do
auth_uri auth_uri
bootstrap_token bootstrap_token
service_type "compute"
endpoint_region node["nova"]["region"]
endpoint_region node["openstack-compute"]["region"]
endpoint_adminurl ::URI.decode nova_api_endpoint.to_s
endpoint_internalurl ::URI.decode nova_api_endpoint.to_s
endpoint_publicurl ::URI.decode nova_api_endpoint.to_s
@@ -88,39 +88,39 @@ keystone_register "Register Compute Endpoint" do
end
# Register Service Tenant
keystone_register "Register Service Tenant" do
openstack_identity_register "Register Service Tenant" do
auth_uri auth_uri
bootstrap_token bootstrap_token
tenant_name node["nova"]["service_tenant_name"]
tenant_name node["openstack-compute"]["service_tenant_name"]
tenant_description "Service Tenant"
action :create_tenant
end
# Register Service User
keystone_register "Register Service User" do
openstack_identity_register "Register Service User" do
auth_uri auth_uri
bootstrap_token bootstrap_token
tenant_name node["nova"]["service_tenant_name"]
user_name node["nova"]["service_user"]
tenant_name node["openstack-compute"]["service_tenant_name"]
user_name node["openstack-compute"]["service_user"]
user_pass service_pass
action :create_user
end
# Grant Admin role to Service User for Service Tenant
keystone_register "Grant 'admin' Role to Service User for Service Tenant" do
openstack_identity_register "Grant 'admin' Role to Service User for Service Tenant" do
auth_uri auth_uri
bootstrap_token bootstrap_token
tenant_name node["nova"]["service_tenant_name"]
user_name node["nova"]["service_user"]
role_name node["nova"]["service_role"]
tenant_name node["openstack-compute"]["service_tenant_name"]
user_name node["openstack-compute"]["service_user"]
role_name node["openstack-compute"]["service_role"]
action :grant_role
end
# Register EC2 Service
keystone_register "Register EC2 Service" do
openstack_identity_register "Register EC2 Service" do
auth_uri auth_uri
bootstrap_token bootstrap_token
service_name "ec2"
@@ -131,11 +131,11 @@ keystone_register "Register EC2 Service" do
end
# Register EC2 Endpoint
keystone_register "Register Compute Endpoint" do
openstack_identity_register "Register Compute Endpoint" do
auth_uri auth_uri
bootstrap_token bootstrap_token
service_type "ec2"
endpoint_region node["nova"]["region"]
endpoint_region node["openstack-compute"]["region"]
endpoint_adminurl ::URI.decode ec2_admin_endpoint.to_s
endpoint_internalurl ::URI.decode ec2_public_endpoint.to_s
endpoint_publicurl ::URI.decode ec2_public_endpoint.to_s

View File

@@ -17,7 +17,7 @@
# limitations under the License.
#
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
platform_options["libvirt_packages"].each do |pkg|
package pkg do
@@ -72,7 +72,7 @@ template "/etc/libvirt/libvirtd.conf" do
group "root"
mode 00644
variables(
:auth_tcp => node["nova"]["libvirt"]["auth_tcp"]
:auth_tcp => node["openstack-compute"]["libvirt"]["auth_tcp"]
)
notifies :restart, "service[libvirt-bin]", :immediately

View File

@@ -17,9 +17,9 @@
# limitations under the License.
#
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
platform_options["nova_network_packages"].each do |pkg|
package pkg do

View File

@@ -16,9 +16,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options=node["nova"]["platform"]
platform_options=node["openstack-compute"]["platform"]
platform_options["nova_cert_packages"].each do |pkg|
package pkg do

View File

@@ -26,11 +26,11 @@ end
if platform?(%w(fedora redhat centos)) # :pragma-foodcritic: ~FC024 - won't fix this
include_recipe "yum::epel"
end
if node["nova"]["syslog"]["use"]
if node["openstack-compute"]["syslog"]["use"]
include_recipe "openstack-common::logging"
end
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
platform_options["common_packages"].each do |pkg|
package pkg do
@@ -48,8 +48,8 @@ platform_options["memcache_python_packages"].each do |pkg|
end
directory "/etc/nova" do
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
action :create
@@ -64,18 +64,18 @@ directory "/etc/nova/rootwrap.d" do
action :create
end
rabbit_server_role = node["nova"]["rabbit_server_chef_role"]
rabbit_server_role = node["openstack-compute"]["rabbit_server_chef_role"]
rabbit_info = config_by_role rabbit_server_role, "queue"
db_user = node['nova']['db']['username']
db_user = node["openstack-compute"]["db"]["username"]
db_pass = db_password "nova"
sql_connection = db_uri("compute", db_user, db_pass)
rabbit_user = node["nova"]["rabbit"]["username"]
rabbit_user = node["openstack-compute"]["rabbit"]["username"]
rabbit_pass = user_password "rabbit"
rabbit_vhost = node["nova"]["rabbit"]["vhost"]
rabbit_vhost = node["openstack-compute"]["rabbit"]["vhost"]
keystone_service_role = node["nova"]["keystone_service_chef_role"]
keystone_service_role = node["openstack-compute"]["keystone_service_chef_role"]
keystone = config_by_role keystone_service_role, "keystone"
ksadmin_tenant_name = keystone["admin_tenant_name"]
@@ -93,23 +93,23 @@ 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}")
Chef::Log.debug("nova::nova-common:identity_endpoint|#{identity_endpoint.to_s}")
Chef::Log.debug("nova::nova-common:xvpvnc_endpoint|#{xvpvnc_endpoint.to_s}")
Chef::Log.debug("nova::nova-common:novnc_endpoint|#{novnc_endpoint.to_s}")
Chef::Log.debug("nova::nova-common:nova_api_endpoint|#{::URI.decode nova_api_endpoint.to_s}")
Chef::Log.debug("nova::nova-common:ec2_public_endpoint|#{ec2_public_endpoint.to_s}")
Chef::Log.debug("nova::nova-common:image_endpoint|#{image_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:rabbit_info|#{rabbit_info}")
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:ec2_public_endpoint|#{ec2_public_endpoint.to_s}")
Chef::Log.debug("openstack-compute::nova-common:image_endpoint|#{image_endpoint.to_s}")
vnc_bind_ip = node["network"]["ipaddress_#{node["nova"]["libvirt"]["bind_interface"]}"]
xvpvnc_proxy_ip = node["network"]["ipaddress_#{node["nova"]["xvpvnc_proxy"]["bind_interface"]}"]
novnc_proxy_ip = node["network"]["ipaddress_#{node["nova"]["novnc_proxy"]["bind_interface"]}"]
vnc_bind_ip = node["network"]["ipaddress_#{node["openstack-compute"]["libvirt"]["bind_interface"]}"]
xvpvnc_proxy_ip = node["network"]["ipaddress_#{node["openstack-compute"]["xvpvnc_proxy"]["bind_interface"]}"]
novnc_proxy_ip = node["network"]["ipaddress_#{node["openstack-compute"]["novnc_proxy"]["bind_interface"]}"]
template "/etc/nova/nova.conf" do
source "nova.conf.erb"
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00644
variables(
:sql_connection => sql_connection,
@@ -131,7 +131,7 @@ template "/etc/nova/nova.conf" do
:glance_api_ipaddress => image_endpoint.host,
:glance_api_port => image_endpoint.port,
:iscsi_helper => platform_options["iscsi_helper"],
:scheduler_default_filters => node["nova"]["scheduler"]["default_filters"].join(","),
:scheduler_default_filters => node["openstack-compute"]["scheduler"]["default_filters"].join(","),
:osapi_compute_link_prefix => nova_api_endpoint.to_s
)
end
@@ -189,5 +189,5 @@ template "/root/openrc" do
end
execute "enable nova login" do
command "usermod -s /bin/sh #{node["nova"]["user"]}"
command "usermod -s /bin/sh #{node["openstack-compute"]["user"]}"
end

View File

@@ -21,7 +21,7 @@ class ::Chef::Recipe
include ::Openstack
end
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
execute "nova-manage db sync" do
command "nova-manage db sync"
@@ -30,7 +30,7 @@ execute "nova-manage db sync" do
end
next_vlan = 100
node["nova"]["networks"].each do |net|
node["openstack-compute"]["networks"].each do |net|
execute "nova-manage network create --label=#{net['label']}" do
# The only two required keys in each network Hash
# are "label" and "ipv4_cidr".
@@ -61,7 +61,7 @@ node["nova"]["networks"].each do |net|
end
if net.has_key?("vlan")
cmd += " --vlan=#{net['vlan']}"
elsif node["nova"]["network"]["network_manager"] == "nova.network.manager.VlanManager"
elsif node["openstack-compute"]["network"]["network_manager"] == "nova.network.manager.VlanManager"
cmd += " --vlan=#{next_vlan}"
next_vlan = next_vlan + 1
end
@@ -73,20 +73,20 @@ node["nova"]["networks"].each do |net|
end
end
cookbook_file node["nova"]["floating_cmd"] do
cookbook_file node["openstack-compute"]["floating_cmd"] do
source "add_floaters.py"
mode 00755
action :create
end
floating = node["nova"]["network"]["floating"]
floating = node["openstack-compute"]["network"]["floating"]
if floating && (floating["ipv4_cidr"] || floating["ipv4_range"])
cmd = ""
if floating["ipv4_cidr"]
cmd = "#{node["nova"]["floating_cmd"]} --cidr=#{floating["ipv4_cidr"]}"
cmd = "#{node["openstack-compute"]["floating_cmd"]} --cidr=#{floating["ipv4_cidr"]}"
elsif floating["ipv4_range"]
cmd = "#{node["nova"]["floating_cmd"]} --ip-range=#{floating["ipv4_range"]}"
cmd = "#{node["openstack-compute"]["floating_cmd"]} --ip-range=#{floating["ipv4_range"]}"
end
execute "nova-manage floating create" do

View File

@@ -17,13 +17,13 @@
# limitations under the License.
#
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
directory "/var/lock/nova" do
owner node["nova"]["user"]
group node["nova"]["group"]
owner node["openstack-compute"]["user"]
group node["openstack-compute"]["group"]
mode 00700
action :create

View File

@@ -17,9 +17,9 @@
# limitations under the License.
#
include_recipe "nova::nova-common"
include_recipe "openstack-compute::nova-common"
platform_options = node["nova"]["platform"]
platform_options = node["openstack-compute"]["platform"]
platform_options["nova_vncproxy_packages"].each do |pkg|
package pkg do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::api-ec2" do
describe "openstack-compute::api-ec2" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::api-ec2"
@chef_run.converge "openstack-compute::api-ec2"
end
it "installs ec2 api packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::api-ec2" do
describe "openstack-compute::api-ec2" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::api-ec2"
@chef_run.converge "openstack-compute::api-ec2"
end
expect_runs_nova_common_recipe

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::api-metadata" do
describe "openstack-compute::api-metadata" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::api-metadata"
@chef_run.converge "openstack-compute::api-metadata"
end
it "installs metadata api packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::api-metadata" do
describe "openstack-compute::api-metadata" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::api-metadata"
@chef_run.converge "openstack-compute::api-metadata"
end
expect_runs_nova_common_recipe

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::api-os-compute" do
describe "openstack-compute::api-os-compute" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::api-os-compute"
@chef_run.converge "openstack-compute::api-os-compute"
end
it "installs openstack api packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::api-os-compute" do
describe "openstack-compute::api-os-compute" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::api-os-compute"
@chef_run.converge "openstack-compute::api-os-compute"
end
expect_runs_nova_common_recipe

View File

@@ -1,6 +1,6 @@
require "spec_helper"
describe "nova::ceilometer-db" do
describe "openstack-compute::ceilometer-db" do
it "installs mysql packages" do
@chef_run = converge
@@ -19,6 +19,6 @@ describe "nova::ceilometer-db" do
::Chef::Recipe.any_instance.stub(:db_password).with("ceilometer").
and_return "test-pass"
::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "nova::ceilometer-db"
::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "openstack-compute::ceilometer-db"
end
end

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::compute" do
describe "openstack-compute::compute" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::compute"
@chef_run.converge "openstack-compute::compute"
end
it "does not install kvm when virt_type is 'kvm'" do

View File

@@ -1,21 +1,21 @@
require "spec_helper"
describe "nova::compute" do
describe "openstack-compute::compute" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::compute"
@chef_run.converge "openstack-compute::compute"
end
expect_runs_nova_common_recipe
it "runs api-metadata recipe" do
expect(@chef_run).to include_recipe "nova::api-metadata"
expect(@chef_run).to include_recipe "openstack-compute::api-metadata"
end
it "runs network recipe" do
expect(@chef_run).to include_recipe "nova::network"
expect(@chef_run).to include_recipe "openstack-compute::network"
end
it "installs nova compute packages" do
@@ -25,8 +25,8 @@ describe "nova::compute" do
it "installs kvm when virt_type is 'kvm'" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["nova"]["libvirt"]["virt_type"] = "kvm"
chef_run.converge "nova::compute"
node.set["openstack-compute"]["libvirt"]["virt_type"] = "kvm"
chef_run.converge "openstack-compute::compute"
expect(chef_run).to upgrade_package "nova-compute-kvm"
expect(chef_run).not_to upgrade_package "nova-compute-qemu"
@@ -35,8 +35,8 @@ describe "nova::compute" do
it "installs qemu when virt_type is 'qemu'" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["nova"]["libvirt"]["virt_type"] = "qemu"
chef_run.converge "nova::compute"
node.set["openstack-compute"]["libvirt"]["virt_type"] = "qemu"
chef_run.converge "openstack-compute::compute"
expect(chef_run).to upgrade_package "nova-compute-qemu"
expect(chef_run).not_to upgrade_package "nova-compute-kvm"
@@ -61,7 +61,7 @@ describe "nova::compute" do
end
it "runs libvirt recipe" do
expect(@chef_run).to include_recipe "nova::libvirt"
expect(@chef_run).to include_recipe "openstack-compute::libvirt"
end
end
end

View File

@@ -1,6 +1,6 @@
require "spec_helper"
describe "nova::db" do
describe "openstack-compute::db" do
it "installs mysql packages" do
@chef_run = converge
@@ -19,6 +19,6 @@ describe "nova::db" do
::Chef::Recipe.any_instance.stub(:db_password).with("nova").
and_return "test-pass"
::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "nova::db"
::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "openstack-compute::db"
end
end

View File

@@ -1,4 +1,4 @@
require "spec_helper"
describe "nova::default" do
describe "openstack-compute::default" do
end

View File

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

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::libvirt" do
describe "openstack-compute::libvirt" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::libvirt"
@chef_run.converge "openstack-compute::libvirt"
end
it "installs libvirt packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::libvirt" do
describe "openstack-compute::libvirt" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::libvirt"
@chef_run.converge "openstack-compute::libvirt"
end
it "installs libvirt packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::network" do
describe "openstack-compute::network" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::network"
@chef_run.converge "openstack-compute::network"
end
it "installs nova network packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::network" do
describe "openstack-compute::network" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::network"
@chef_run.converge "openstack-compute::network"
end
expect_runs_nova_common_recipe

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::nova-cert" do
describe "openstack-compute::nova-cert" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::nova-cert"
@chef_run.converge "openstack-compute::nova-cert"
end
it "installs nova cert packages" do

View File

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

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::nova-common" do
describe "openstack-compute::nova-common" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::nova-common"
@chef_run.converge "openstack-compute::nova-common"
end
it "runs epel recipe" do

View File

@@ -1,13 +1,13 @@
require "spec_helper"
describe "nova::nova-common" do
describe "openstack-compute::nova-common" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@node = @chef_run.node
@node.set["nova"]["syslog"]["use"] = true
@chef_run.converge "nova::nova-common"
@node.set["openstack-compute"]["syslog"]["use"] = true
@chef_run.converge "openstack-compute::nova-common"
end
it "doesn't run epel recipe" do
@@ -20,7 +20,7 @@ describe "nova::nova-common" do
it "doesn't run logging recipe" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
chef_run.converge "nova::nova-common"
chef_run.converge "openstack-compute::nova-common"
expect(chef_run).not_to include_recipe "openstack-common::logging"
end

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::nova-setup" do
describe "openstack-compute::nova-setup" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::nova-setup"
@chef_run.converge "openstack-compute::nova-setup"
end
expect_runs_nova_common_recipe
@@ -36,8 +36,8 @@ describe "nova::nova-setup" do
it "adds cidr range of floating ipv4 addresses" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["nova"]["network"]["floating"]["ipv4_cidr"] = "10.10.10.0/24"
chef_run.converge "nova::nova-setup"
node.set["openstack-compute"]["network"]["floating"]["ipv4_cidr"] = "10.10.10.0/24"
chef_run.converge "openstack-compute::nova-setup"
cmd = "/usr/local/bin/add_floaters.py --cidr=10.10.10.0/24"
expect(chef_run).to execute_command cmd
@@ -46,12 +46,12 @@ describe "nova::nova-setup" do
it "adds range of floating ipv4 addresses" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
node = chef_run.node
node.set["nova"]["network"] = {
node.set["openstack-compute"]["network"] = {
"floating" => {
"ipv4_range" => "10.10.10.1,10.10.10.5"
}
}
chef_run.converge "nova::nova-setup"
chef_run.converge "openstack-compute::nova-setup"
cmd = "/usr/local/bin/add_floaters.py --ip-range=10.10.10.1,10.10.10.5"
expect(chef_run).to execute_command cmd

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::scheduler" do
describe "openstack-compute::scheduler" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::scheduler"
@chef_run.converge "openstack-compute::scheduler"
end
it "installs nova scheduler packages" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::scheduler" do
describe "openstack-compute::scheduler" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::scheduler"
@chef_run.converge "openstack-compute::scheduler"
end
expect_runs_nova_common_recipe

View File

@@ -28,7 +28,7 @@ end
def expect_runs_nova_common_recipe
it "installs nova-common" do
expect(@chef_run).to include_recipe "nova::nova-common"
expect(@chef_run).to include_recipe "openstack-compute::nova-common"
end
end

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::vncproxy" do
describe "openstack-compute::vncproxy" do
describe "redhat" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
@chef_run.converge "nova::vncproxy"
@chef_run.converge "openstack-compute::vncproxy"
end
it "starts nova vncproxy on boot" do

View File

@@ -1,11 +1,11 @@
require "spec_helper"
describe "nova::vncproxy" do
describe "openstack-compute::vncproxy" do
describe "ubuntu" do
before do
nova_common_stubs
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS
@chef_run.converge "nova::vncproxy"
@chef_run.converge "openstack-compute::vncproxy"
end
expect_runs_nova_common_recipe

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
############
# Metadata #
@@ -82,7 +82,7 @@ use = call:nova.api.openstack.urlmap:urlmap_factory
# NOTE(vish): use the following pipeline for deprecated auth
# pipeline = faultwrap auth ratelimit osapi_compute_app_v2
# NOTE(vish): use the following pipeline for keystone auth
<% if node["nova"]["ratelimit"]["api"]["enabled"] -%>
<% if node["openstack-compute"]["ratelimit"]["api"]["enabled"] -%>
pipeline = faultwrap authtoken keystonecontext ratelimit osapi_compute_app_v2
<% else -%>
pipeline = faultwrap authtoken keystonecontext osapi_compute_app_v2
@@ -100,7 +100,7 @@ paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory
[filter:ratelimit]
paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory
limits =
<%= node["nova"]["ratelimit"]["settings"].values.inject([]) { |output,v| output << " ( #{v['verb']}, #{v['uri']}, #{v['regex']}, #{v['limit']}, #{v['interval']} )" }.join(";\n") %>
<%= node["openstack-compute"]["ratelimit"]["settings"].values.inject([]) { |output,v| output << " ( #{v['verb']}, #{v['uri']}, #{v['regex']}, #{v['limit']}, #{v['interval']} )" }.join(";\n") %>
[app:osapi_compute_app_v2]
paste.app_factory = nova.api.openstack.compute:APIRouter.factory
@@ -126,9 +126,9 @@ paste.filter_factory = keystone.middleware.auth_token:filter_factory
auth_host = <%= @identity_admin_endpoint.host %>
auth_port = <%= @identity_admin_endpoint.port %>
auth_protocol = <%= @identity_admin_endpoint.scheme %>
admin_tenant_name = <%= node["nova"]["service_tenant_name"] %>
admin_user = <%= node["nova"]["service_user"] %>
admin_tenant_name = <%= node["openstack-compute"]["service_tenant_name"] %>
admin_user = <%= node["openstack-compute"]["service_user"] %>
admin_password = <%= @service_pass %>
<% if node["openstack"]["auth"]["strategy"] == "pki" -%>
signing_dir = <%= node["nova"]["api"]["auth"]["cache_dir"] %>
signing_dir = <%= node["openstack-compute"]["api"]["auth"]["cache_dir"] %>
<% end -%>

View File

@@ -14,11 +14,11 @@ rabbit_virtual_host = <%= @rabbit_virtual_host %>
verbose = True
notification_topics = notifications,glance_notifications
rpc_backend = ceilometer.openstack.common.rpc.impl_kombu
<% if node["nova"]["ceilometer"]["syslog"]["use"] %>
<% if node["openstack-compute"]["ceilometer"]["syslog"]["use"] %>
log_config = /etc/openstack/logging.conf
<% end %>
glance_registry_host = <%= @image_endpoint_host %>
periodic_interval = <%= node["nova"]["ceilometer"]["periodic_interval"] %>
periodic_interval = <%= node["openstack-compute"]["ceilometer"]["periodic_interval"] %>
[keystone_authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
@@ -29,5 +29,5 @@ admin_tenant_name = <%= @service_tenant_name %>
admin_user = <%= @service_user %>
admin_password = <%= @service_pass %>
<% if node["openstack"]["auth"]["strategy"] == "pki" -%>
signing_dir = <%= node["nova"]["ceilometer-api"]["auth"]["cache_dir"] %>
signing_dir = <%= node["openstack-compute"]["ceilometer-api"]["auth"]["cache_dir"] %>
<% end -%>

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
LoadPlugin "<%= @name %>"
<% if not @options.empty? %>

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# Defaults for libvirt-bin initscript (/etc/init.d/libvirt-bin)
# This is a POSIX shell fragment

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# Master libvirt daemon configuration file
#

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# Override the default config file
# NOTE: This setting is no longer honoured if using

View File

@@ -1,5 +1,5 @@
<VirtualHost *:80>
ServerName <%= node['nova']['ceilometer']['api']['server_hostname'] %>
ServerName <%= node["openstack-compute"]["ceilometer"]["api"]["server_hostname"] %>
ServerAdmin <%= node["apache"]["contact"] %>
<Location "/">

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
[DEFAULT]
@@ -8,7 +8,7 @@ auth_strategy=keystone
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
<% if node["nova"]["syslog"]["use"] %>
<% if node["openstack-compute"]["syslog"]["use"] %>
log_config = /etc/openstack/logging.conf
<% end %>
state_path=/var/lib/nova
@@ -23,37 +23,37 @@ rabbit_virtual_host=<%= @rabbit_virtual_host %>
##### SCHEDULER #####
# scheduler_manager=nova.scheduler.manager.SchedulerManager
compute_scheduler_driver=<%= node["nova"]["scheduler"]["scheduler_driver"] %>
compute_scheduler_driver=<%= node["openstack-compute"]["scheduler"]["scheduler_driver"] %>
scheduler_available_filters=nova.scheduler.filters.standard_filters
# which filter class names to use for filtering hosts when not specified in the request.
scheduler_default_filters=<%= @scheduler_default_filters %>
node_availability_zone=<%= node["nova"]["config"]["availability_zone"] %>
default_schedule_zone=<%= node["nova"]["config"]["default_schedule_zone"] %>
storage_availability_zone=<%= node["nova"]["config"]["storage_availability_zone"] %>
node_availability_zone=<%= node["openstack-compute"]["config"]["availability_zone"] %>
default_schedule_zone=<%= node["openstack-compute"]["config"]["default_schedule_zone"] %>
storage_availability_zone=<%= node["openstack-compute"]["config"]["storage_availability_zone"] %>
##### NETWORK #####
multi_host=<%= node["nova"]["network"]["multi_host"] %>
network_manager=<%= node["nova"]["network"]["network_manager"] %>
public_interface=<%= node["nova"]["network"]["public_interface"] %>
fixed_range=<%= node["nova"]["network"]["fixed_range"] %>
dmz_cidr=<%= node["nova"]["network"]["dmz_cidr"] %>
multi_host=<%= node["openstack-compute"]["network"]["multi_host"] %>
network_manager=<%= node["openstack-compute"]["network"]["network_manager"] %>
public_interface=<%= node["openstack-compute"]["network"]["public_interface"] %>
fixed_range=<%= node["openstack-compute"]["network"]["fixed_range"] %>
dmz_cidr=<%= node["openstack-compute"]["network"]["dmz_cidr"] %>
<% if %w(fedora redhat centos).include? node.platform -%>
# https://bugzilla.redhat.com/show_bug.cgi?id=788485 - not released in epel yet
force_dhcp_release=false
<% else -%>
force_dhcp_release=true
<% end -%>
<% if node["nova"]["dhcp_domain"] -%>
dhcp_domain=<%= node["nova"]["dhcp_domain"] %>
<% if node["openstack-compute"]["dhcp_domain"] -%>
dhcp_domain=<%= node["openstack-compute"]["dhcp_domain"] %>
<% end %>
send_arp_for_ha=true
use_single_default_gateway=<%= node["nova"]["network"]["use_single_default_gateway"] %>
<% if node["nova"]["libvirt"]["virt_type"] == "qemu" -%>
use_single_default_gateway=<%= node["openstack-compute"]["network"]["use_single_default_gateway"] %>
<% if node["openstack-compute"]["libvirt"]["virt_type"] == "qemu" -%>
libvirt_use_virtio_for_bridges=false
<% else -%>
libvirt_use_virtio_for_bridges=true
<% end -%>
vlan_interface=<%= node["nova"]["network"]["vlan_interface"] %>
vlan_interface=<%= node["openstack-compute"]["network"]["vlan_interface"] %>
##### GLANCE #####
image_service=nova.image.glance.GlanceImageService
@@ -63,17 +63,17 @@ glance_api_servers=<%= @glance_api_ipaddress %>:<%= @glance_api_port %>
compute_manager=nova.compute.manager.ComputeManager
sql_connection=<%= @sql_connection %>
connection_type=libvirt
libvirt_type=<%= node["nova"]["libvirt"]["virt_type"] %>
libvirt_type=<%= node["openstack-compute"]["libvirt"]["virt_type"] %>
# Command prefix to use for running commands as root (default: sudo)
rootwrap_config=/etc/nova/rootwrap.conf
# Should unused base images be removed? (default: false)
remove_unused_base_images=<%= node["nova"]["libvirt"]["remove_unused_base_images"] %>
remove_unused_base_images=<%= node["openstack-compute"]["libvirt"]["remove_unused_base_images"] %>
# Unused resized base images younger than this will not be removed (default: 3600)
remove_unused_resized_minimum_age_seconds=<%= node["nova"]["libvirt"]["remove_unused_resized_minimum_age_seconds"] %>
remove_unused_resized_minimum_age_seconds=<%= node["openstack-compute"]["libvirt"]["remove_unused_resized_minimum_age_seconds"] %>
# Unused unresized base images younger than this will not be removed (default: 86400)
remove_unused_original_minimum_age_seconds=<%= node["nova"]["libvirt"]["remove_unused_original_minimum_age_seconds"] %>
remove_unused_original_minimum_age_seconds=<%= node["openstack-compute"]["libvirt"]["remove_unused_original_minimum_age_seconds"] %>
# Write a checksum for files in _base to disk (default: false)
checksum_base_images=<%= node["nova"]["libvirt"]["checksum_base_images"] %>
checksum_base_images=<%= node["openstack-compute"]["libvirt"]["checksum_base_images"] %>
##### VNCPROXY #####
novncproxy_base_url=<%= @novncproxy_base_url %>
@@ -81,11 +81,11 @@ xvpvncproxy_base_url=<%= @xvpvncproxy_base_url %>
# This is only required on the server running xvpvncproxy
xvpvncproxy_host=<%= @xvpvncproxy_bind_host %>
xvpvncproxy_port=<%= node["nova"]["xvpvnc_proxy"]["service_port"] %>
xvpvncproxy_port=<%= node["openstack-compute"]["xvpvnc_proxy"]["service_port"] %>
# This is only required on the server running novncproxy
novncproxy_host=<%= @novncproxy_bind_host %>
novncproxy_port=<%= node["nova"]["novnc_proxy"]["service_port"] %>
novncproxy_port=<%= node["openstack-compute"]["novnc_proxy"]["service_port"] %>
vncserver_listen=<%= @vncserver_listen %>
vncserver_proxyclient_address=<%= @vncserver_proxyclient_address %>
@@ -95,38 +95,38 @@ memcached_servers=<%= @memcache_servers %>
##### MISC #####
# force backing images to raw format
force_raw_images=<%= node["nova"]["config"]["force_raw_images"] %>
allow_same_net_traffic=<%= node["nova"]["config"]["allow_same_net_traffic"] %>
osapi_max_limit=<%= node["nova"]["config"]["osapi_max_limit"] %>
force_raw_images=<%= node["openstack-compute"]["config"]["force_raw_images"] %>
allow_same_net_traffic=<%= node["openstack-compute"]["config"]["allow_same_net_traffic"] %>
osapi_max_limit=<%= node["openstack-compute"]["config"]["osapi_max_limit"] %>
# If you terminate SSL with a load balancer, the HTTP_HOST environ
# variable that generates the request_uri in webob.Request will lack
# the HTTPS scheme. Setting this overrides the default and allows
# URIs returned in the various links collections to contain the proper
# HTTPS endpoint.
osapi_compute_link_prefix = <%= @osapi_compute_link_prefix %>
snapshot_image_format=<%= node["nova"]["config"]["snapshot_image_format"] %>
start_guests_on_host_boot=<%= node["nova"]["config"]["start_guests_on_host_boot"] %>
resume_guests_state_on_host_boot=<%= node["nova"]["config"]["resume_guests_state_on_host_boot"] %>
snapshot_image_format=<%= node["openstack-compute"]["config"]["snapshot_image_format"] %>
start_guests_on_host_boot=<%= node["openstack-compute"]["config"]["start_guests_on_host_boot"] %>
resume_guests_state_on_host_boot=<%= node["openstack-compute"]["config"]["resume_guests_state_on_host_boot"] %>
# number of security groups per project (default: 10)
quota_security_groups=<%= node["nova"]["config"]["quota_security_groups"] %>
quota_security_groups=<%= node["openstack-compute"]["config"]["quota_security_groups"] %>
# number of security rules per security group (default: 20)
quota_security_group_rules=<%= node["nova"]["config"]["quota_security_group_rules"] %>
quota_security_group_rules=<%= node["openstack-compute"]["config"]["quota_security_group_rules"] %>
<%- if /FilterScheduler/.match(node["nova"]["scheduler"]["scheduler_driver"]) or
/MultiScheduler/.match(node["nova"]["scheduler"]["scheduler_driver"]) %>
<%- if /FilterScheduler/.match(node["openstack-compute"]["scheduler"]["scheduler_driver"]) or
/MultiScheduler/.match(node["openstack-compute"]["scheduler"]["scheduler_driver"]) %>
# FilterScheduler Only Options
<%- if /ComputeFilter/.match(@scheduler_default_filters) %>
# virtual CPU to Physical CPU allocation ratio (default: 16.0)
cpu_allocation_ratio=<%= node["nova"]["config"]["cpu_allocation_ratio"] %>
cpu_allocation_ratio=<%= node["openstack-compute"]["config"]["cpu_allocation_ratio"] %>
<%- end %>
<%- if /RamFilter/.match(@scheduler_default_filters) %>
# virtual ram to physical ram allocation ratio (default: 1.5)
ram_allocation_ratio=<%= node["nova"]["config"]["ram_allocation_ratio"] %>
ram_allocation_ratio=<%= node["openstack-compute"]["config"]["ram_allocation_ratio"] %>
<%- end %>
<%- elsif /SimpleScheduler/.match(node["nova"]["scheduler"]["scheduler_driver"]) %>
<%- elsif /SimpleScheduler/.match(node["openstack-compute"]["scheduler"]["scheduler_driver"]) %>
# SimpleScheduler Only Options
# maximum number of instance cores to allow per host
max_cores=<%= node["nova"]["config"]["cpu_allocation_ratio"].to_i * node["cpu"]["total"].to_i %>
max_cores=<%= node["openstack-compute"]["config"]["cpu_allocation_ratio"].to_i * node["cpu"]["total"].to_i %>
<%- end %>
<% if %w(fedora redhat centos).include? node.platform -%>
@@ -146,11 +146,11 @@ keystone_ec2_url=<%= @identity_endpoint.scheme %>://<%= @identity_endpoint.host
##### VOLUMES #####
# iscsi target user-land tool to use
iscsi_helper=<%= @iscsi_helper %>
volume_api_class=<%= node["nova"]["config"]["volume_api_class"] %>
volume_api_class=<%= node["openstack-compute"]["config"]["volume_api_class"] %>
##### THIRD PARTY ADDITIONS #####
<% if node["nova"]["plugins"] %>
<% node["nova"]["plugins"].each do |p| %>
<% if node["openstack-compute"]["plugins"] %>
<% node["openstack-compute"]["plugins"].each do |p| %>
osapi_compute_extension=<%= p %>
<% end %>
<% end %>

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# COMMON OPENSTACK ENVS
export OS_USERNAME=<%= @user %>
@@ -6,7 +6,7 @@ export OS_PASSWORD=<%= @password %>
export OS_TENANT_NAME=<%= @tenant %>
export OS_AUTH_URL=<%= @identity_endpoint.to_s %>
export OS_AUTH_STRATEGY=<%= @auth_strategy %>
export OS_REGION_NAME=<%= node["nova"]["region"] %>
export OS_REGION_NAME=<%= node["openstack-compute"]["region"] %>
# LEGACY NOVA ENVS
export NOVA_USERNAME=${OS_USERNAME}
@@ -15,7 +15,7 @@ export NOVA_PASSWORD=${OS_PASSWORD}
export NOVA_API_KEY=${OS_PASSWORD}
export NOVA_URL=${OS_AUTH_URL}
export NOVA_VERSION=<%= @nova_api_version %>
export NOVA_REGION_NAME=<%= node["nova"]["region"] %>
export NOVA_REGION_NAME=<%= node["openstack-compute"]["region"] %>
# EUCA2OOLs ENV VARIABLES
export EC2_ACCESS_KEY=<%= node["credentials"]["EC2"]["admin"]["access"] %>

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# Configuration for nova-rootwrap
# This file should be owned by (and only-writeable by) the root user

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# nova-rootwrap command filters for api-metadata nodes
# This is needed on nova-api hosts running with "metadata" in enabled_apis

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# nova-rootwrap command filters for compute nodes
# This file should be owned by (and only-writeable by) the root user

View File

@@ -1,4 +1,4 @@
<%= node["nova"]["custom_template_banner"] %>
<%= node["openstack-compute"]["custom_template_banner"] %>
# nova-rootwrap command filters for network nodes
# This file should be owned by (and only-writeable by) the root user