From 5b2632d052c4fb4aa79a02f73c7f0d3a032f3acb Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Thu, 8 Mar 2018 09:15:54 -0800 Subject: [PATCH] Remove deprecated cloudwatch recipe * Queens removed cloudwatch outright[0], which has been deprecated since Havana. [0] http://lists.openstack.org/pipermail/openstack-dev/2017-October/123104.html Change-Id: I4cd53d7aed179787d192d6342ec44fea9332fb66 --- README.md | 3 --- attributes/default.rb | 11 -------- recipes/api-cloudwatch.rb | 43 ------------------------------ recipes/common.rb | 6 ----- recipes/identity_registration.rb | 3 --- spec/api-cloudwatch-redhat_spec.rb | 21 --------------- spec/spec_helper.rb | 10 ------- templates/default/default.yaml.erb | 5 +--- 8 files changed, 1 insertion(+), 101 deletions(-) delete mode 100644 recipes/api-cloudwatch.rb delete mode 100644 spec/api-cloudwatch-redhat_spec.rb diff --git a/README.md b/README.md index 92d2ff8..17f8f61 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,6 @@ openstack-common cookbook. Recipes ======= -## openstack-orchestration::api-cloudwatch -- Configure and start heat-api-cloudwatch service - ## openstack-orchestration::api-cfn - Configure and start heat-api-cfn service diff --git a/attributes/default.rb b/attributes/default.rb index 980f046..9af9bdc 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -28,18 +28,11 @@ default['openstack']['endpoints'][ep_type]['orchestration-api-cfn']['scheme'] = 'http' default['openstack']['endpoints'][ep_type]['orchestration-api-cfn']['path'] = '/v1' default['openstack']['endpoints'][ep_type]['orchestration-api-cfn']['port'] = 8000 - # openstack orchestration-api-cloudwatch service endpoints (used by users and services) - default['openstack']['endpoints'][ep_type]['orchestration-api-cloudwatch']['host'] = '127.0.0.1' - default['openstack']['endpoints'][ep_type]['orchestration-api-cloudwatch']['scheme'] = 'http' - default['openstack']['endpoints'][ep_type]['orchestration-api-cloudwatch']['path'] = '/v1' - default['openstack']['endpoints'][ep_type]['orchestration-api-cloudwatch']['port'] = 8003 end default['openstack']['bind_service']['all']['orchestration-api']['host'] = '127.0.0.1' default['openstack']['bind_service']['all']['orchestration-api']['port'] = 8004 default['openstack']['bind_service']['all']['orchestration-api-cfn']['host'] = '127.0.0.1' default['openstack']['bind_service']['all']['orchestration-api-cfn']['port'] = 8000 -default['openstack']['bind_service']['all']['orchestration-api-cloudwatch']['host'] = '127.0.0.1' -default['openstack']['bind_service']['all']['orchestration-api-cloudwatch']['port'] = 8003 # Set to some text value if you want templated config files # to contain a custom banner at the top of the written file @@ -73,8 +66,6 @@ when 'rhel' 'heat_api_service' => 'openstack-heat-api', 'heat_api_cfn_packages' => ['openstack-heat-api-cfn'], 'heat_api_cfn_service' => 'openstack-heat-api-cfn', - 'heat_api_cloudwatch_packages' => ['openstack-heat-api-cloudwatch'], - 'heat_api_cloudwatch_service' => 'openstack-heat-api-cloudwatch', 'heat_engine_packages' => ['openstack-heat-engine'], 'heat_engine_service' => 'openstack-heat-engine', 'heat_api_process_name' => 'heat-api', @@ -89,8 +80,6 @@ when 'debian' 'heat_api_service' => 'heat-api', 'heat_api_cfn_packages' => ['heat-api-cfn'], 'heat_api_cfn_service' => 'heat-api-cfn', - 'heat_api_cloudwatch_packages' => ['heat-api-cloudwatch'], - 'heat_api_cloudwatch_service' => 'heat-api-cloudwatch', 'heat_engine_packages' => ['heat-engine'], 'heat_engine_service' => 'heat-engine', 'package_overrides' => '', diff --git a/recipes/api-cloudwatch.rb b/recipes/api-cloudwatch.rb deleted file mode 100644 index b7532b1..0000000 --- a/recipes/api-cloudwatch.rb +++ /dev/null @@ -1,43 +0,0 @@ -# encoding: UTF-8 -# -# Cookbook Name:: openstack-orchestration -# Recipe:: api-cloudwatch -# -# -# Cookbook Name:: openstack-orchestration -# Recipe:: api-cloudwatch -# -# Copyright 2013, IBM Corp. -# -# 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. -# - -include_recipe 'openstack-orchestration::common' - -platform_options = node['openstack']['orchestration']['platform'] - -platform_options['heat_api_cloudwatch_packages'].each do |pkg| - package pkg do - options platform_options['package_overrides'] - - action :upgrade - end -end - -service 'heat-api-cloudwatch' do - service_name platform_options['heat_api_cloudwatch_service'] - supports status: true, restart: true - - action :enable - subscribes :restart, 'template[/etc/heat/heat.conf]' -end diff --git a/recipes/common.rb b/recipes/common.rb index efbf6ee..38e68fd 100644 --- a/recipes/common.rb +++ b/recipes/common.rb @@ -59,8 +59,6 @@ bind_services = node['openstack']['bind_service']['all'] api_bind = bind_services['orchestration-api'] api_cfn_bind = bind_services['orchestration-api-cfn'] api_cfn_endpoint = internal_endpoint 'orchestration-api-cfn' -api_cw_bind = bind_services['orchestration-api-cloudwatch'] -api_cw_endpoint = internal_endpoint 'orchestration-api-cloudwatch' ec2_auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['orchestration']['ec2authtoken']['auth']['version'] auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['orchestration']['api']['auth']['version'] @@ -68,13 +66,11 @@ base_auth_uri = identity_uri_transform auth_uri # We need these URIs without their default path metadata_uri = "#{api_cfn_endpoint.scheme}://#{api_cfn_endpoint.host}:#{api_cfn_endpoint.port}" -watch_uri = "#{api_cw_endpoint.scheme}://#{api_cw_endpoint.host}:#{api_cw_endpoint.port}" # define attributes that are needed in the heat.conf node.default['openstack']['orchestration']['conf'].tap do |conf| conf['DEFAULT']['heat_metadata_server_url'] = metadata_uri conf['DEFAULT']['heat_waitcondition_server_url'] = "#{api_cfn_endpoint}/waitcondition" - conf['DEFAULT']['heat_watch_server_url'] = watch_uri conf['DEFAULT']['region_name_for_services'] = node['openstack']['region'] conf['clients_keystone']['auth_uri'] = base_auth_uri conf['ec2authtoken']['auth_uri'] = ec2_auth_uri @@ -82,8 +78,6 @@ node.default['openstack']['orchestration']['conf'].tap do |conf| conf['heat_api']['bind_port'] = api_bind['port'] conf['heat_api_cfn']['bind_host'] = bind_address api_cfn_bind conf['heat_api_cfn']['bind_port'] = api_cfn_bind['port'] - conf['heat_api_cloudwatch']['bind_host'] = bind_address api_cw_bind - conf['heat_api_cloudwatch']['bind_port'] = api_cw_bind['port'] conf['keystone_authtoken']['auth_url'] = auth_uri conf['trustee']['auth_url'] = identity_admin_endpoint end diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 4f8343d..9c1b9f1 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -50,9 +50,6 @@ admin_project = node['openstack']['identity']['admin_project'] admin_domain = node['openstack']['identity']['admin_domain_name'] region = node['openstack']['region'] -# Do not configure a service/endpoint in keystone for heat-api-cloudwatch(Bug #1167927), -# See discussions on https://bugs.launchpad.net/heat/+bug/1167927 - connection_params = { openstack_auth_url: "#{auth_url}/auth/tokens", openstack_username: admin_user, diff --git a/spec/api-cloudwatch-redhat_spec.rb b/spec/api-cloudwatch-redhat_spec.rb deleted file mode 100644 index 4a1dd80..0000000 --- a/spec/api-cloudwatch-redhat_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# encoding: UTF-8 -require_relative 'spec_helper' - -describe 'openstack-orchestration::api-cloudwatch' do - describe 'redhat' do - let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) } - let(:node) { runner.node } - let(:chef_run) { runner.converge(described_recipe) } - - include_context 'orchestration_stubs' - include_examples 'expect runs openstack orchestration common recipe' - - it 'installs heat cloudwatch packages' do - expect(chef_run).to upgrade_package 'openstack-heat-api-cloudwatch' - end - - it 'starts heat api-cloudwatch on boot' do - expect(chef_run).to enable_service('openstack-heat-api-cloudwatch') - end - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4f551ab..2ede2d6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -126,7 +126,6 @@ shared_examples 'expects to create heat conf' do [ %r{^heat_metadata_server_url = http://127.0.0.1:8000$}, %r{^heat_waitcondition_server_url = http://127.0.0.1:8000/v1/waitcondition$}, - %r{^heat_watch_server_url = http://127.0.0.1:8003$}, %r{^log_dir = /var/log/heat$}, /^region_name_for_services = RegionOne$/, ].each do |line| @@ -160,15 +159,6 @@ shared_examples 'expects to create heat conf' do end end - it 'has heat_api_cloudwatch binding' do - [ - /^bind_host = 127.0.0.1$/, - /^bind_port = 8003$/, - ].each do |line| - expect(chef_run).to render_config_file(file.name).with_section_content('heat_api_cloudwatch', line) - end - end - it 'sets database connection value' do expect(chef_run).to render_config_file(file.name).with_section_content( 'database', %r{^connection = mysql\+pymysql://heat:heat@127.0.0.1:3306/heat\?charset=utf8$} diff --git a/templates/default/default.yaml.erb b/templates/default/default.yaml.erb index 56fb61f..46300b1 100644 --- a/templates/default/default.yaml.erb +++ b/templates/default/default.yaml.erb @@ -1,10 +1,7 @@ -<%= node["openstack"]["orchestration"]["custom_template_banner"] %> +<%= node['openstack']['orchestration']['custom_template_banner'] %> resource_registry: # allow older templates with Quantum in them. "OS::Quantum*": "OS::Neutron*" - # Choose your implementation of AWS::CloudWatch::Alarm - #"AWS::CloudWatch::Alarm": "file:///etc/heat/templates/AWS_CloudWatch_Alarm.yaml" - "AWS::CloudWatch::Alarm": "OS::Heat::CWLiteAlarm" "OS::Metering::Alarm": "OS::Ceilometer::Alarm" "AWS::RDS::DBInstance": "file:///etc/heat/templates/AWS_RDS_DBInstance.yaml"