Remove api-ec2 recipe
api-ec2 is being replaced by the `openstack-ec2` cookbook. Change-Id: I5b4bc088bbf9a5061ed311d164dc381a3caca2d5 Depends-On: I2dbbafaf8641ece00d4181d1ea4ba93f00eed6ed
This commit is contained in:
parent
9b46ac6d13
commit
749f4ccfd3
|
@ -26,7 +26,6 @@ Metrics/MethodLength:
|
|||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||
Style/ClassAndModuleChildren:
|
||||
Exclude:
|
||||
- 'recipes/api-ec2.rb'
|
||||
- 'recipes/api-metadata.rb'
|
||||
- 'recipes/api-os-compute.rb'
|
||||
- 'recipes/client.rb'
|
||||
|
@ -42,7 +41,6 @@ Style/Documentation:
|
|||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'test/**/*'
|
||||
- 'recipes/api-ec2.rb'
|
||||
- 'recipes/api-metadata.rb'
|
||||
- 'recipes/api-os-compute.rb'
|
||||
- 'recipes/client.rb'
|
||||
|
|
18
README.md
18
README.md
|
@ -8,7 +8,7 @@ http://nova.openstack.org
|
|||
Requirements
|
||||
============
|
||||
|
||||
Chef 0.10.0 or higher required (for Chef environment use).
|
||||
Chef 12 or higher required.
|
||||
|
||||
Cookbooks
|
||||
---------
|
||||
|
@ -27,8 +27,7 @@ Usage
|
|||
|
||||
api-ec2
|
||||
----
|
||||
- Includes recipe `nova-common`
|
||||
- Installs AWS EC2 compatible API and configures the service and endpoints in keystone
|
||||
- This is obsoleted by https://github.com/cloudscaling/cookbook-openstack-ec2
|
||||
|
||||
api-metadata
|
||||
----
|
||||
|
@ -105,7 +104,6 @@ Openstack Compute attributes are in the attribute namespace ["openstack"]["compu
|
|||
* `openstack["compute"]["service_user"]` - User name used by nova when interacting with keystone
|
||||
* `openstack["compute"]["service_role"]` - User role used by nova when interacting with keystone
|
||||
* `openstack["compute"]["floating_cmd"]` - Path to the `nova-manage floating create` wrapper script.
|
||||
* `openstack["compute"]["ec2_workers"]` - Number of ec2 workers
|
||||
* `openstack["compute"]["osapi_compute_workers"]` - Number of api workers
|
||||
* `openstack["compute"]["metadata_workers"]` - Number of metadata workders
|
||||
* `openstack["compute"]["config"]["volume_api_class"]` - API Class used for Volume support
|
||||
|
@ -333,10 +331,10 @@ Arrays whose elements will be copied exactly into the respective config files (c
|
|||
* `openstack["compute"]["misc_nova"]` - Array of bare options for `nova.conf`.
|
||||
* `openstack["compute"]["misc_paste"]` - Array of bare options for `api-paste.ini`
|
||||
|
||||
EC2 Configuration Attributes
|
||||
API Configuration Attributes
|
||||
----------------------------
|
||||
|
||||
* `openstack["compute"]["enabled_apis"]` - Which apis have been enabled in nova compute, only for ec2 and osapi_compute. For metadata, include the api-metadata recipe.
|
||||
* `openstack["compute"]["enabled_apis"]` - Which apis have been enabled in nova compute, only for osapi_compute. For metadata, include the api-metadata recipe.
|
||||
|
||||
Notification Attributes
|
||||
-----------------------
|
||||
|
@ -408,14 +406,6 @@ The following attributes are defined in attributes/default.rb of the common cook
|
|||
* `openstack['endpoints']['compute-compute api-bind']['port']` - The port to bind the compute api service to
|
||||
* `openstack['endpoints']['compute-compute api-bind']['bind_interface']` - The interface name to bind the compute api service to
|
||||
|
||||
* `openstack['endpoints']['compute-ec2-api-bind']['host']` - The IP address to bind the ec2 api service to
|
||||
* `openstack['endpoints']['compute-ec2-api-bind']['port']` - The port to bind the ec2 api service to
|
||||
* `openstack['endpoints']['compute-ec2-api-bind']['bind_interface']` - The interface name to bind the ec2 api service to
|
||||
|
||||
* `openstack['endpoints']['compute-ec2-admin-bind']['host']` - The IP address to bind the ec2 admin api service to
|
||||
* `openstack['endpoints']['compute-ec2-admin-bind']['port']` - The port to bind the ec2 admin api service to
|
||||
* `openstack['endpoints']['compute-ec2-admin-bind']['bind_interface']` - The interface name to bind the ec2 admin api service to
|
||||
|
||||
* `openstack['endpoints']['compute-xvpvnc-bind']['host']` - The IP address to bind the xvpvnc service to
|
||||
* `openstack['endpoints']['compute-xvpvnc-bind']['port']` - The port to bind the xvpvnc service to
|
||||
* `openstack['endpoints']['compute-xvpvnc-bind']['bind_interface']` - The interface name to bind the xvpvnc service to
|
||||
|
|
|
@ -127,8 +127,6 @@ default['openstack']['compute']['api']['auth']['cache_dir'] = '/var/cache/nova/a
|
|||
case platform_family
|
||||
when 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||
default['openstack']['compute']['platform'] = {
|
||||
'api_ec2_packages' => ['openstack-nova-api'],
|
||||
'api_ec2_service' => 'openstack-nova-api',
|
||||
'api_os_compute_packages' => ['openstack-nova-api'],
|
||||
'api_os_compute_service' => 'openstack-nova-api',
|
||||
'neutron_python_packages' => ['python-neutronclient', 'pyparsing'],
|
||||
|
@ -165,8 +163,6 @@ when 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
|||
}
|
||||
when 'debian'
|
||||
default['openstack']['compute']['platform'] = {
|
||||
'api_ec2_packages' => ['nova-api-ec2'],
|
||||
'api_ec2_service' => 'nova-api-ec2',
|
||||
'api_os_compute_packages' => ['nova-api-os-compute'],
|
||||
'api_os_compute_service' => 'nova-api-os-compute',
|
||||
'memcache_python_packages' => ['python-memcache'],
|
||||
|
@ -207,8 +203,6 @@ end
|
|||
# Array of options for `api-paste.ini` (e.g. ['option1=value1', ...])
|
||||
default['openstack']['compute']['misc_paste'] = nil
|
||||
|
||||
# To disable the EC2 API endpoint, simply remove 'ec2,' from the list
|
||||
# of enabled API services.
|
||||
# NOTE: The metadata api service is enabled via including it's recipe
|
||||
# NOTE: api-metadata. By default the api-metadata recipe is included in
|
||||
# NOTE: the os-compute-api role which is included in the
|
||||
|
@ -244,7 +238,6 @@ default['openstack']['compute']['docker']['group'] = 'docker'
|
|||
compute-xvpvnc compute-novnc
|
||||
compute-metadata-api
|
||||
compute-vnc compute-api
|
||||
compute-ec2-api
|
||||
).each do |service|
|
||||
default['openstack']['bind_service']['all'][service]['host'] = '127.0.0.1'
|
||||
%w(public internal admin).each do |type|
|
||||
|
@ -261,11 +254,6 @@ end
|
|||
# The OpenStack Compute (Nova) novnc endpoint
|
||||
default['openstack']['endpoints'][type]['compute-novnc']['port'] = '6080'
|
||||
default['openstack']['endpoints'][type]['compute-novnc']['path'] = '/vnc_auto.html'
|
||||
# The OpenStack Compute (Nova) EC2 API endpoint
|
||||
default['openstack']['endpoints'][type]['compute-ec2-api']['port'] = '8773'
|
||||
default['openstack']['endpoints']['admin']['compute-ec2-api']['path'] = '/services/Admin'
|
||||
default['openstack']['endpoints']['public']['compute-ec2-api']['path'] = '/services/Cloud'
|
||||
default['openstack']['endpoints']['internal']['compute-ec2-api']['path'] = '/services/Cloud'
|
||||
# The OpenStack Compute (Nova) metadata API endpoint
|
||||
default['openstack']['endpoints'][type]['compute-metadata-api']['port'] = '8775'
|
||||
# The OpenStack Compute (Nova) serial proxy endpoint
|
||||
|
@ -283,4 +271,3 @@ default['openstack']['bind_service']['all']['compute-serial-proxy']['port'] = '6
|
|||
default['openstack']['bind_service']['all']['compute-novnc']['port'] = '6080'
|
||||
default['openstack']['bind_service']['all']['compute-metadata-api']['port'] = '8775'
|
||||
default['openstack']['bind_service']['all']['compute-api']['port'] = '8774'
|
||||
default['openstack']['bind_service']['all']['compute-ec2-api']['port'] = '8773'
|
||||
|
|
|
@ -9,7 +9,7 @@ default['openstack']['compute']['conf'].tap do |conf|
|
|||
conf['DEFAULT']['auth_version'] = node['openstack']['api']['auth']['version']
|
||||
conf['DEFAULT']['rpc_backend'] = node['openstack']['mq']['service_type']
|
||||
conf['DEFAULT']['instances_path'] = "#{node['openstack']['compute']['conf']['DEFAULT']['state_path']}/instances"
|
||||
conf['DEFAULT']['enabled_apis'] = 'ec2,osapi_compute'
|
||||
conf['DEFAULT']['enabled_apis'] = 'osapi_compute'
|
||||
if node['openstack']['compute']['syslog']['use'] #= false
|
||||
conf['DEFAULT']['log_config'] = '/etc/openstack/logging.conf'
|
||||
end
|
||||
|
|
|
@ -6,7 +6,6 @@ description 'The OpenStack Compute service Nova.'
|
|||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '13.0.0'
|
||||
|
||||
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::client', 'Install nova client packages'
|
||||
|
@ -14,7 +13,7 @@ recipe 'openstack-compute::compute', 'nova-compute service'
|
|||
recipe 'openstack-compute::conductor', 'Installs nova conductor service'
|
||||
recipe 'openstack-compute::libvirt', 'Installs libvirt, used by nova compute for management of the virtual machine environment'
|
||||
recipe 'openstack-compute::libvirt_rbd', 'Manages the RBD portions of libvirt. Included by openstack-compute::libvirt'
|
||||
recipe 'openstack-compute::identity_registration', 'Registers the API and EC2 endpoints with Keystone'
|
||||
recipe 'openstack-compute::identity_registration', 'Registers the API 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'
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-compute
|
||||
# Recipe:: api-ec2
|
||||
#
|
||||
# Copyright 2012, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
class ::Chef::Recipe
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
include_recipe 'openstack-compute::nova-common'
|
||||
|
||||
platform_options = node['openstack']['compute']['platform']
|
||||
|
||||
# NOTE(mrodden): required for keystone auth middleware
|
||||
package 'python-keystoneclient' do
|
||||
action :upgrade
|
||||
end
|
||||
|
||||
platform_options['api_ec2_packages'].each do |pkg|
|
||||
package pkg do
|
||||
options platform_options['package_overrides']
|
||||
action :upgrade
|
||||
end
|
||||
end
|
||||
|
||||
template '/etc/nova/api-paste.ini' do
|
||||
source 'api-paste.ini.erb'
|
||||
owner node['openstack']['compute']['user']
|
||||
group node['openstack']['compute']['group']
|
||||
mode 00644
|
||||
end
|
||||
|
||||
service 'nova-api-ec2' do
|
||||
service_name platform_options['api_ec2_service']
|
||||
supports status: true, restart: true
|
||||
action [:enable, :start]
|
||||
subscribes :restart, [
|
||||
'template[/etc/nova/nova.conf]',
|
||||
'template[/etc/nova/api-paste.ini]'
|
||||
]
|
||||
end
|
|
@ -38,9 +38,6 @@ internal_nova_api_endpoint = internal_endpoint 'compute-api'
|
|||
# TBD, another clean up opportunity. We could use the 'admin', and
|
||||
# 'internal' endpoints for a single service name. For now, we'll
|
||||
# leave the old names in place.
|
||||
ec2_admin_endpoint = admin_endpoint 'compute-ec2-api'
|
||||
ec2_public_endpoint = public_endpoint 'compute-ec2-api'
|
||||
ec2_internal_endpoint = internal_endpoint 'compute-ec2-api'
|
||||
region = node['openstack']['region']
|
||||
|
||||
# Register Service Tenant
|
||||
|
@ -93,27 +90,3 @@ openstack_identity_register 'Register Compute Endpoint' do
|
|||
endpoint_publicurl ::URI.decode public_nova_api_endpoint.to_s
|
||||
action :create_endpoint
|
||||
end
|
||||
|
||||
if node['openstack']['compute']['conf']['DEFAULT']['enabled_apis'].include?('ec2')
|
||||
# Register EC2 Service
|
||||
openstack_identity_register 'Register EC2 Service' do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
service_name 'ec2'
|
||||
service_type 'ec2'
|
||||
service_description 'EC2 Compatibility Layer'
|
||||
action :create_service
|
||||
end
|
||||
|
||||
# Register EC2 Endpoint
|
||||
openstack_identity_register 'Register EC2 Endpoint' do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
service_type 'ec2'
|
||||
endpoint_region region
|
||||
endpoint_adminurl ::URI.decode ec2_admin_endpoint.to_s
|
||||
endpoint_internalurl ::URI.decode ec2_internal_endpoint.to_s
|
||||
endpoint_publicurl ::URI.decode ec2_public_endpoint.to_s
|
||||
action :create_endpoint
|
||||
end
|
||||
end
|
||||
|
|
|
@ -117,9 +117,6 @@ compute_api_bind_address = bind_address compute_api_bind
|
|||
compute_api_endpoint = internal_endpoint 'compute-api'
|
||||
compute_metadata_api_bind = node['openstack']['bind_service']['all']['compute-metadata-api']
|
||||
compute_metadata_api_bind_address = bind_address compute_metadata_api_bind
|
||||
ec2_api_bind = node['openstack']['bind_service']['all']['compute-ec2-api']
|
||||
ec2_api_bind_address = bind_address ec2_api_bind
|
||||
ec2_public_endpoint = public_endpoint 'compute-ec2-api'
|
||||
serial_console_bind = node['openstack']['bind_service']['all']['compute-serial-console']
|
||||
serial_console_bind_address = bind_address serial_console_bind
|
||||
serial_proxy_endpoint = public_endpoint 'compute-serial-proxy'
|
||||
|
@ -130,7 +127,6 @@ Chef::Log.debug("openstack-compute::nova-common:identity_public_endpoint|#{ident
|
|||
Chef::Log.debug("openstack-compute::nova-common:xvpvnc_endpoint|#{xvpvnc_endpoint}")
|
||||
Chef::Log.debug("openstack-compute::nova-common:novnc_endpoint|#{novnc_endpoint}")
|
||||
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}")
|
||||
Chef::Log.debug("openstack-compute::nova-common:network_endpoint|#{network_endpoint}")
|
||||
Chef::Log.debug("openstack-compute::nova-common:image_endpoint|#{image_endpoint}")
|
||||
# Chef::Log.debug("openstack-compute::nova-common:ironic_endpoint|#{ironic_endpoint}")
|
||||
|
@ -157,9 +153,6 @@ node.default['openstack']['compute']['conf_secrets']
|
|||
get_password 'service', 'openstack-compute'
|
||||
|
||||
node.default['openstack']['compute']['conf'].tap do |conf|
|
||||
conf['DEFAULT']['ec2_listen'] = ec2_api_bind_address
|
||||
conf['DEFAULT']['ec2_listen_port'] = ec2_api_bind.port
|
||||
conf['DEFAULT']['keystone_ec2_url'] = "#{identity_endpoint.scheme}://#{identity_endpoint.host}:#{identity_endpoint.port}/v2.0/ec2tokens"
|
||||
conf['DEFAULT']['iscsi_helper'] = platform_options['iscsi_helper']
|
||||
# conf['DEFAULT']['scheduler_default_filters'] = node['openstack']['compute']['scheduler']['default_filters'].join(',')
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-compute::api-ec2' do
|
||||
describe 'redhat' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) { runner.converge(described_recipe) }
|
||||
|
||||
include_context 'compute_stubs'
|
||||
include_examples 'expect_runs_nova_common_recipe'
|
||||
include_examples 'expect_creates_nova_state_dir'
|
||||
include_examples 'expect_creates_nova_lock_dir'
|
||||
|
||||
it 'upgrades ec2 api packages' do
|
||||
expect(chef_run).to upgrade_package 'openstack-nova-api'
|
||||
end
|
||||
%w(python-keystoneclient).each do |pkg|
|
||||
it do
|
||||
expect(chef_run).to upgrade_package pkg
|
||||
end
|
||||
end
|
||||
it 'starts ec2 api on boot' do
|
||||
expect(chef_run).to enable_service 'openstack-nova-api'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,33 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-compute::api-ec2' do
|
||||
describe 'ubuntu' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) { runner.converge(described_recipe) }
|
||||
|
||||
include_context 'compute_stubs'
|
||||
include_examples 'expect_runs_nova_common_recipe'
|
||||
include_examples 'expect_creates_nova_state_dir'
|
||||
include_examples 'expect_creates_nova_lock_dir'
|
||||
include_examples 'expect_creates_api_paste_template'
|
||||
|
||||
include_examples 'expect_upgrades_python_keystoneclient'
|
||||
|
||||
it 'upgrade ec2 api package' do
|
||||
expect(chef_run).to upgrade_package 'nova-api-ec2'
|
||||
end
|
||||
|
||||
it 'starts ec2 api on boot' do
|
||||
expect(chef_run).to enable_service 'nova-api-ec2'
|
||||
end
|
||||
|
||||
it do
|
||||
template = chef_run.template('/etc/nova/api-paste.ini')
|
||||
expect(template).to notify('service[nova-api-ec2]').to(:restart)
|
||||
end
|
||||
# expect_creates_api_paste 'service[nova-api-ec2]'
|
||||
end
|
||||
end
|
|
@ -97,62 +97,6 @@ describe 'openstack-compute::identity_registration' do
|
|||
end
|
||||
end
|
||||
|
||||
it 'registers ec2 service' do
|
||||
expect(chef_run).to create_service_openstack_identity_register(
|
||||
'Register EC2 Service'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_name: 'ec2',
|
||||
service_type: 'ec2',
|
||||
service_description: 'EC2 Compatibility Layer'
|
||||
)
|
||||
end
|
||||
|
||||
context 'registers ec2 endpoint' do
|
||||
it 'with default values' do
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register EC2 Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'ec2',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: 'http://127.0.0.1:8773/services/Admin',
|
||||
endpoint_internalurl: 'http://127.0.0.1:8773/services/Cloud',
|
||||
endpoint_publicurl: 'http://127.0.0.1:8773/services/Cloud'
|
||||
)
|
||||
end
|
||||
|
||||
it 'with different URLs for all endpoints' do
|
||||
admin_url = 'https://admin.host:123/admin_path'
|
||||
public_url = 'https://public.host:789/public_path'
|
||||
internal_url = 'http://internal.host:456/internal_path'
|
||||
|
||||
node.set['openstack']['endpoints']['admin']['compute-ec2-api']['uri'] = admin_url
|
||||
node.set['openstack']['endpoints']['internal']['compute-ec2-api']['uri'] = internal_url
|
||||
node.set['openstack']['endpoints']['public']['compute-ec2-api']['uri'] = public_url
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register EC2 Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'ec2',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: admin_url,
|
||||
endpoint_internalurl: internal_url,
|
||||
endpoint_publicurl: public_url
|
||||
)
|
||||
end
|
||||
|
||||
it 'with customer region override' do
|
||||
node.set['openstack']['region'] = 'ec2Region'
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register EC2 Endpoint'
|
||||
).with(endpoint_region: 'ec2Region')
|
||||
end
|
||||
end
|
||||
|
||||
describe "when 'ec2' is not in the list of enabled_apis" do
|
||||
before do
|
||||
node.set['openstack']['compute']['conf']['DEFAULT']['enabled_apis'] = 'osapi_compute'
|
||||
|
|
|
@ -105,13 +105,6 @@ describe 'openstack-compute::nova-common' do
|
|||
end
|
||||
end
|
||||
|
||||
it 'has default ec2 ip and port options set' do
|
||||
[/^ec2_listen = 127.0.0.1$/,
|
||||
/^ec2_listen_port = 8773$/].each do |line|
|
||||
expect(chef_run).to render_file(file.name).with_content(line)
|
||||
end
|
||||
end
|
||||
|
||||
it 'has default metadata ip and port options set' do
|
||||
[/^metadata_listen = 127.0.0.1$/,
|
||||
/^metadata_listen_port = 8775$/].each do |line|
|
||||
|
@ -120,8 +113,7 @@ describe 'openstack-compute::nova-common' do
|
|||
end
|
||||
|
||||
it 'confirms default min value for workers' do
|
||||
[/^ec2_workers = /,
|
||||
/^osapi_compute_workers = /,
|
||||
[/^osapi_compute_workers = /,
|
||||
/^metadata_workers = /,
|
||||
/^workers = /].each do |line|
|
||||
expect(chef_run).to_not render_file(file.name).with_content(line)
|
||||
|
@ -176,8 +168,7 @@ describe 'openstack-compute::nova-common' do
|
|||
end
|
||||
|
||||
it 'does not have ha rabbit options set' do
|
||||
[/^rabbit_hosts = /, /^rabbit_ha_queues = /,
|
||||
/^ec2_private_dns_show_ip$/].each do |line|
|
||||
[/^rabbit_hosts = /, /^rabbit_ha_queues = /].each do |line|
|
||||
expect(chef_run).not_to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -149,23 +149,6 @@ shared_examples 'expect_creates_api_paste_template' do
|
|||
end
|
||||
|
||||
context 'template contents' do
|
||||
context 'ec2 enabled' do
|
||||
before do
|
||||
node.set['openstack']['compute']['conf']['DEFAULT']['enabled_apis'] =
|
||||
%w(ec2)
|
||||
end
|
||||
|
||||
it 'sets the pipeline attribute' do
|
||||
expect(chef_run).to render_file(file.name)
|
||||
.with_content(/^pipeline = ec2faultwrap logrequest metaapp$/)
|
||||
end
|
||||
|
||||
it 'sets ec2 attributes' do
|
||||
expect(chef_run).to render_file(file.name)
|
||||
.with_content(/^\[composite:ec2\]$/)
|
||||
end
|
||||
end
|
||||
|
||||
it 'sets the pipeline attribute when ec2 api is disabled' do
|
||||
node.set['openstack']['compute']['conf']['DEFAULT']['enabled_apis'] = []
|
||||
expect(chef_run).to render_file(file.name)
|
||||
|
|
|
@ -8,59 +8,11 @@ use = egg:Paste#urlmap
|
|||
/: meta
|
||||
|
||||
[pipeline:meta]
|
||||
<% if node['openstack']['compute']['conf']['DEFAULT']['enabled_apis'].include?("ec2") %>
|
||||
pipeline = ec2faultwrap logrequest metaapp
|
||||
<% else -%>
|
||||
pipeline = faultwrap metaapp
|
||||
<% end -%>
|
||||
|
||||
[app:metaapp]
|
||||
paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory
|
||||
|
||||
<% if node['openstack']['compute']['conf']['DEFAULT']['enabled_apis'].include?("ec2") %>
|
||||
#######
|
||||
# EC2 #
|
||||
#######
|
||||
|
||||
# NOTE: this is now deprecated in favor of https://github.com/stackforge/ec2-api
|
||||
[composite:ec2]
|
||||
use = egg:Paste#urlmap
|
||||
/: ec2cloud
|
||||
|
||||
[composite:ec2cloud]
|
||||
use = call:nova.api.auth:pipeline_factory
|
||||
noauth2 = ec2faultwrap logrequest ec2noauth cloudrequest validator ec2executor
|
||||
keystone = ec2faultwrap logrequest ec2keystoneauth cloudrequest validator ec2executor
|
||||
|
||||
[filter:ec2faultwrap]
|
||||
paste.filter_factory = nova.api.ec2:FaultWrapper.factory
|
||||
|
||||
[filter:logrequest]
|
||||
paste.filter_factory = nova.api.ec2:RequestLogging.factory
|
||||
|
||||
[filter:ec2lockout]
|
||||
paste.filter_factory = nova.api.ec2:Lockout.factory
|
||||
|
||||
[filter:ec2keystoneauth]
|
||||
paste.filter_factory = nova.api.ec2:EC2KeystoneAuth.factory
|
||||
|
||||
[filter:ec2noauth]
|
||||
paste.filter_factory = nova.api.ec2:NoAuth.factory
|
||||
|
||||
[filter:cloudrequest]
|
||||
controller = nova.api.ec2.cloud.CloudController
|
||||
paste.filter_factory = nova.api.ec2:Requestify.factory
|
||||
|
||||
[filter:authorizer]
|
||||
paste.filter_factory = nova.api.ec2:Authorizer.factory
|
||||
|
||||
[filter:validator]
|
||||
paste.filter_factory = nova.api.ec2:Validator.factory
|
||||
|
||||
[app:ec2executor]
|
||||
paste.app_factory = nova.api.ec2:Executor.factory
|
||||
<% end -%>
|
||||
|
||||
#############
|
||||
# OpenStack #
|
||||
#############
|
||||
|
|
Loading…
Reference in New Issue