retire unmaintained project
Change-Id: Id1b2dd2a959d274012be837b2099cc7f39dff370
This commit is contained in:
parent
4b0d41b64f
commit
a6a5014d6e
|
@ -1,9 +0,0 @@
|
|||
.bundle/
|
||||
berks-cookbooks/
|
||||
.kitchen
|
||||
.vagrant
|
||||
.coverage/
|
||||
*.swp
|
||||
Berksfile.lock
|
||||
Vagrantfile
|
||||
Gemfile.lock
|
30
.rubocop.yml
30
.rubocop.yml
|
@ -1,30 +0,0 @@
|
|||
inherit_from: .rubocop_todo.yml
|
||||
|
||||
AllCops:
|
||||
Include:
|
||||
- metadata.rb
|
||||
- Gemfile
|
||||
- attributes/**
|
||||
- libraries/**
|
||||
- providers/**
|
||||
- recipes/**
|
||||
- resources/**
|
||||
- spec/**
|
||||
Exclude:
|
||||
- .cookbooks/**/*
|
||||
- berks-cookbooks/**/*
|
||||
- .bundle/**/*
|
||||
|
||||
Encoding:
|
||||
Exclude:
|
||||
- metadata.rb
|
||||
- Gemfile
|
||||
|
||||
NumericLiterals:
|
||||
Enabled: false
|
||||
|
||||
LineLength:
|
||||
Enabled: false
|
||||
|
||||
WordArray:
|
||||
MinSize: 3
|
|
@ -1,11 +0,0 @@
|
|||
# This configuration was generated by `rubocop --auto-gen-config`
|
||||
# on 2015-05-28 16:22:49 -0500 using RuboCop version 0.29.1.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||
Style/ClassAndModuleChildren:
|
||||
Enabled: false
|
|
@ -1,8 +0,0 @@
|
|||
source "https://supermarket.getchef.com"
|
||||
|
||||
metadata
|
||||
|
||||
cookbook "openstack-common",
|
||||
github: "stackforge/cookbook-openstack-common"
|
||||
cookbook "openstack-identity",
|
||||
github: "stackforge/cookbook-openstack-identity"
|
|
@ -1,36 +0,0 @@
|
|||
Contributing
|
||||
============
|
||||
|
||||
How To Get Started
|
||||
------------------
|
||||
|
||||
If you would like to contribute to the development of OpenStack Chef Cookbooks,
|
||||
you must follow the steps in this page:
|
||||
|
||||
http://docs.openstack.org/infra/manual/developers.html
|
||||
|
||||
Gerrit Workflow
|
||||
---------------
|
||||
|
||||
Once those steps have been completed, changes to OpenStack
|
||||
should be submitted for review via the Gerrit tool, following
|
||||
the workflow documented at:
|
||||
|
||||
http://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||
|
||||
Pull requests submitted through GitHub will be ignored.
|
||||
|
||||
Bugs
|
||||
----
|
||||
|
||||
Bugs should be filed on Launchpad, not GitHub:
|
||||
|
||||
https://bugs.launchpad.net/openstack-chef
|
||||
|
||||
Contacts
|
||||
--------
|
||||
|
||||
Mailing list: groups.google.com/group/opscode-chef-openstack
|
||||
IRC: #openstack-chef is our channel on irc.freenode.net
|
||||
Wiki: https://wiki.openstack.org/wiki/Chef/GettingStarted and https://docs.getchef.com/openstack.html
|
||||
Twitter: @chefopenstack
|
14
Gemfile
14
Gemfile
|
@ -1,14 +0,0 @@
|
|||
## THIS GEMFILE IS DEPRECATED AND WILL BE REMOVED AFTER THE NEXT RELEASE
|
||||
## THERE WON'T BE ANY UPDATES TO THIS FILE DURING THIS RELEASE CYCLE
|
||||
## WE SWITCHED TO CHEFDK AS THE BUNDLE FOR THE NEEDED GEMS
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'chef', '~> 11.18.6'
|
||||
gem 'json', '<= 1.7.7' # chef 11 dependency
|
||||
gem 'berkshelf', '~> 3.2.1'
|
||||
gem 'hashie', '~> 2.0'
|
||||
gem 'chefspec', '~> 4.0.0'
|
||||
gem 'rspec', '~> 3.0.0'
|
||||
gem 'foodcritic', '~> 4.0'
|
||||
gem 'rubocop', '~> 0.29.1'
|
75
README.md
75
README.md
|
@ -1,71 +1,6 @@
|
|||
Description
|
||||
===========
|
||||
This project is no longer maintained.
|
||||
|
||||
Installs the OpenStack Database service **Trove** as part of the
|
||||
OpenStack reference deployment Chef for OpenStack. Trove is currently
|
||||
installed from packages.
|
||||
|
||||
https://wiki.openstack.org/wiki/Trove
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
Chef 11
|
||||
|
||||
Cookbooks
|
||||
---------
|
||||
|
||||
The following cookbooks are dependencies:
|
||||
|
||||
* openstack-common
|
||||
* openstack-identity
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
api
|
||||
----
|
||||
- Installs the API service.
|
||||
|
||||
conductor
|
||||
----
|
||||
- Installs conductor service.
|
||||
|
||||
taskmanager
|
||||
----
|
||||
- Installs the taskmanager service.
|
||||
|
||||
identity_registration
|
||||
----
|
||||
- Registers the endpoints with Keystone.
|
||||
|
||||
Attributes
|
||||
==========
|
||||
|
||||
Testing
|
||||
=====
|
||||
|
||||
Please refer to the [TESTING.md](TESTING.md) for instructions for testing the cookbook.
|
||||
|
||||
License and Author
|
||||
==================
|
||||
|
||||
| | |
|
||||
|:---------------------|:---------------------------------------------------|
|
||||
| **Author** | Ionut Artarisi (<iartarisi@suse.cz>) |
|
||||
| | |
|
||||
| **Copyright** | Copyright (c) 2013-2014, SUSE Linux GmbH |
|
||||
|
||||
|
||||
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.
|
||||
The contents of this repository are still available in the Git
|
||||
source code management system. To see the contents of this
|
||||
repository before it reached its end of life, please check out the
|
||||
previous commit with "git checkout HEAD^1".
|
||||
|
|
40
Rakefile
40
Rakefile
|
@ -1,40 +0,0 @@
|
|||
task default: ["test"]
|
||||
|
||||
task :test => [:lint, :style, :unit]
|
||||
|
||||
desc "Vendor the cookbooks in the Berksfile"
|
||||
task :berks_prep do
|
||||
sh %{chef exec berks vendor}
|
||||
end
|
||||
|
||||
desc "Run FoodCritic (lint) tests"
|
||||
task :lint do
|
||||
sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .}
|
||||
end
|
||||
|
||||
desc "Run RuboCop (style) tests"
|
||||
task :style do
|
||||
sh %{chef exec rubocop}
|
||||
end
|
||||
|
||||
desc "Run RSpec (unit) tests"
|
||||
task :unit => :berks_prep do
|
||||
sh %{chef exec rspec --format documentation}
|
||||
end
|
||||
|
||||
desc "Remove the berks-cookbooks directory and the Berksfile.lock"
|
||||
task :clean do
|
||||
rm_rf [
|
||||
'berks-cookbooks',
|
||||
'Berksfile.lock'
|
||||
]
|
||||
end
|
||||
|
||||
desc "All-in-One Neutron build Infra using Common task"
|
||||
task :integration do
|
||||
# Use the common integration task
|
||||
sh %(wget -nv -t 3 -O Rakefile-Common https://raw.githubusercontent.com/openstack/cookbook-openstack-common/master/Rakefile)
|
||||
load './Rakefile-Common'
|
||||
Rake::Task["common_integration"].invoke
|
||||
end
|
||||
|
30
TESTING.md
30
TESTING.md
|
@ -1,30 +0,0 @@
|
|||
# Testing the Cookbook #
|
||||
|
||||
This cookbook uses [chefdk](https://downloads.chef.io/chef-dk/) and [berkshelf](http://berkshelf.com/) to isolate dependencies. Make sure you have chefdk and the header files for `gecode` installed before continuing. Make sure that you're using gecode version 3. More info [here](https://github.com/opscode/dep-selector-libgecode/tree/0bad63fea305ede624c58506423ced697dd2545e#using-a-system-gecode-instead). For more detailed information on what needs to be installed, you can have a quick look into the bootstrap.sh file in this repository, which does install all the needed things to get going on ubuntu trusty. The tests defined in the Rakefile include lint, style and unit. For integration testing please refere to the [openstack-chef-repo](https://github.com/stackforge/openstack-chef-repo).
|
||||
|
||||
We have three test suites which you can run either, individually (there are three rake tasks):
|
||||
|
||||
$ chef exec rake lint
|
||||
$ chef exec rake style
|
||||
$ chef exec rake unit
|
||||
|
||||
or altogether:
|
||||
|
||||
$ chef exec rake
|
||||
|
||||
The `rake` tasks will take care of installing the needed cookbooks with `berkshelf`.
|
||||
|
||||
## Rubocop ##
|
||||
|
||||
[Rubocop](https://github.com/bbatsov/rubocop) is a static Ruby code analyzer, based on the community [Ruby style guide](https://github.com/bbatsov/ruby-style-guide). We are attempting to adhere to this where applicable, slowly cleaning up the cookbooks until we can turn on Rubocop for gating the commits.
|
||||
|
||||
## Foodcritic ##
|
||||
|
||||
[Foodcritic](http://acrmp.github.io/foodcritic/) is a lint tool for Chef cookbooks. We ignore the following rules:
|
||||
|
||||
* [FC003](http://acrmp.github.io/foodcritic/#FC003) These cookbooks are not intended for Chef Solo.
|
||||
* [FC023](http://acrmp.github.io/foodcritic/#FC023) Prefer conditional attributes.
|
||||
|
||||
## Chefspec
|
||||
|
||||
[ChefSpec](https://github.com/sethvargo/chefspec) is a unit testing framework for testing Chef cookbooks. ChefSpec makes it easy to write examples and get fast feedback on cookbook changes without the need for virtual machines or cloud servers.
|
|
@ -1,60 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-database
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2013-2014 SUSE Linux GmbH
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Set to some text value if you want templated config files
|
||||
# to contain a custom banner at the top of the written file
|
||||
default['openstack']['database']['custom_template_banner'] = '
|
||||
# This file autogenerated by Chef
|
||||
# Do not edit, changes will be overwritten
|
||||
'
|
||||
|
||||
default['openstack']['database']['verbose'] = false
|
||||
default['openstack']['database']['debug'] = false
|
||||
|
||||
default['openstack']['database']['syslog']['use'] = false
|
||||
|
||||
default['openstack']['database']['user'] = 'trove'
|
||||
default['openstack']['database']['group'] = 'trove'
|
||||
|
||||
case platform
|
||||
when 'suse'
|
||||
default['openstack']['database']['platform'] = {
|
||||
'api_packages' => ['openstack-trove-api'],
|
||||
'api_service' => 'openstack-trove-api',
|
||||
'conductor_packages' => ['openstack-trove-conductor'],
|
||||
'conductor_service' => 'openstack-trove-conductor',
|
||||
'taskmanager_packages' => ['openstack-trove-taskmanager'],
|
||||
'taskmanager_service' => 'openstack-trove-taskmanager'
|
||||
}
|
||||
end
|
||||
|
||||
default['openstack']['database']['service_user'] = 'trove'
|
||||
default['openstack']['database']['service_role'] = 'service'
|
||||
default['openstack']['database']['service_tenant_name'] = 'service'
|
||||
default['openstack']['database']['region'] = node['openstack']['region']
|
||||
|
||||
default['openstack']['database']['volume_support'] = true
|
||||
|
||||
# Keystone PKI signing directory
|
||||
default['openstack']['database']['api']['auth']['cache_dir'] = '/var/cache/trove/api'
|
||||
|
||||
default['openstack']['database']['nova_proxy_user'] = 'admin'
|
||||
default['openstack']['database']['nova_proxy_password'] = 'admin'
|
||||
default['openstack']['database']['nova_proxy_tenant'] = 'admin'
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash -x
|
||||
## This script is for installing all the needed packages on trusty to run the chef tests with 'chef exec rake'.
|
||||
## It relies on the common bootstrap.sh from stackforge/cookbook-openstack-common for installing common dependencies.
|
||||
|
||||
curl https://raw.githubusercontent.com/stackforge/cookbook-openstack-common/master/bootstrap.sh \
|
||||
--retry 3 \
|
||||
--silent \
|
||||
--show-error \
|
||||
| /bin/bash -x
|
16
metadata.rb
16
metadata.rb
|
@ -1,16 +0,0 @@
|
|||
name 'openstack-database'
|
||||
maintainer 'openstack-chef'
|
||||
maintainer_email 'openstack-dev@lists.openstack.org'
|
||||
license 'Apache 2.0'
|
||||
description 'Installs/Configures trove'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '12.0.0'
|
||||
recipe 'openstack-database::identity_registration', 'Registers Trove endpoints and service with Keystone'
|
||||
recipe 'openstack-database::api', 'Installs API service'
|
||||
recipe 'openstack-database::conductor', 'Installs Conductor service'
|
||||
recipe 'openstack-database::taskmanager', 'Installs TaskManager service'
|
||||
|
||||
depends 'openstack-common', '>= 12.0.0'
|
||||
depends 'openstack-identity', '>= 12.0.0'
|
||||
|
||||
supports 'suse'
|
103
recipes/api.rb
103
recipes/api.rb
|
@ -1,103 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-database
|
||||
# Recipe:: api
|
||||
#
|
||||
# Copyright 2013-2014, SUSE Linux GmbH
|
||||
#
|
||||
# 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 # rubocop:disable Documentation
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
if node['openstack']['database']['syslog']['use']
|
||||
include_recipe 'openstack-common::logging'
|
||||
end
|
||||
|
||||
platform_options = node['openstack']['database']['platform']
|
||||
|
||||
platform_options['api_packages'].each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
|
||||
service 'trove-api' do
|
||||
service_name platform_options['api_service']
|
||||
supports status: true, restart: true
|
||||
|
||||
action [:enable]
|
||||
end
|
||||
|
||||
db_user = node['openstack']['db']['database']['username']
|
||||
db_pass = get_password 'db', 'database'
|
||||
db_uri = db_uri('database', db_user, db_pass).to_s
|
||||
|
||||
api_endpoint = internal_endpoint 'database-api'
|
||||
|
||||
identity_uri = internal_endpoint('identity-internal')
|
||||
compute_uri = internal_endpoint('compute-api').to_s.gsub(/%\(tenant_id\)s/, '')
|
||||
block_storage_uri = internal_endpoint('block-storage-api').to_s.gsub(/%\(tenant_id\)s/, '')
|
||||
object_storage_uri = internal_endpoint('object-storage-api')
|
||||
|
||||
rabbit = node['openstack']['mq']['database']['rabbit']
|
||||
rabbit_pass = get_password('user', rabbit['userid'])
|
||||
|
||||
template '/etc/trove/trove.conf' do
|
||||
source 'trove.conf.erb'
|
||||
owner node['openstack']['database']['user']
|
||||
group node['openstack']['database']['group']
|
||||
mode 00640
|
||||
variables(
|
||||
database_connection: db_uri,
|
||||
endpoint: api_endpoint,
|
||||
rabbit: rabbit,
|
||||
rabbit_pass: rabbit_pass,
|
||||
identity_uri: identity_uri,
|
||||
compute_uri: compute_uri,
|
||||
block_storage_uri: block_storage_uri,
|
||||
object_storage_uri: object_storage_uri
|
||||
)
|
||||
|
||||
notifies :restart, 'service[trove-api]', :immediately
|
||||
end
|
||||
|
||||
admin_token = get_password('token', 'openstack_identity_bootstrap_token')
|
||||
identity_admin_uri = admin_endpoint('identity-admin')
|
||||
|
||||
directory ::File.dirname(node['openstack']['database']['api']['auth']['cache_dir']) do
|
||||
owner node['openstack']['database']['user']
|
||||
group node['openstack']['database']['group']
|
||||
mode 00700
|
||||
end
|
||||
|
||||
template '/etc/trove/api-paste.ini' do
|
||||
source 'api-paste.ini.erb'
|
||||
owner node['openstack']['database']['user']
|
||||
group node['openstack']['database']['group']
|
||||
mode 00640
|
||||
variables(
|
||||
identity_admin_uri: identity_admin_uri,
|
||||
identity_uri: identity_uri,
|
||||
admin_token: admin_token
|
||||
)
|
||||
|
||||
notifies :restart, 'service[trove-api]', :immediately
|
||||
end
|
||||
|
||||
execute 'trove-manage db_sync' do
|
||||
user node['openstack']['database']['user']
|
||||
group node['openstack']['database']['group']
|
||||
notifies :restart, 'service[trove-api]', :immediately
|
||||
not_if { platform_family? 'suse' }
|
||||
end
|
|
@ -1,58 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-database
|
||||
# Recipe:: conductor
|
||||
#
|
||||
# Copyright 2013-2014, SUSE Linux GmbH
|
||||
#
|
||||
# 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 # rubocop:disable Documentation
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
platform_options = node['openstack']['database']['platform']
|
||||
|
||||
platform_options['conductor_packages'].each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
|
||||
service 'trove-conductor' do
|
||||
service_name platform_options['conductor_service']
|
||||
supports status: true, restart: true
|
||||
|
||||
action [:enable]
|
||||
end
|
||||
|
||||
db_user = node['openstack']['db']['database']['username']
|
||||
db_pass = get_password 'db', 'database'
|
||||
db_uri = db_uri('database', db_user, db_pass).to_s
|
||||
rabbit = node['openstack']['mq']['database']['rabbit']
|
||||
rabbit_pass = get_password('user', rabbit['userid'])
|
||||
identity_uri = internal_endpoint('identity-internal')
|
||||
|
||||
template '/etc/trove/trove-conductor.conf' do
|
||||
source 'trove-conductor.conf.erb'
|
||||
owner node['openstack']['database']['user']
|
||||
group node['openstack']['database']['group']
|
||||
mode 00640
|
||||
variables(
|
||||
database_connection: db_uri,
|
||||
identity_uri: identity_uri,
|
||||
rabbit: rabbit,
|
||||
rabbit_pass: rabbit_pass
|
||||
)
|
||||
|
||||
notifies :restart, 'service[trove-conductor]', :immediately
|
||||
end
|
|
@ -1,93 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-database
|
||||
# Recipe:: identity_registration
|
||||
#
|
||||
# Copyright 2013-2014, SUSE Linux GmbH
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
require 'uri'
|
||||
|
||||
class ::Chef::Recipe # rubocop:disable Documentation
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
identity_admin_endpoint = admin_endpoint 'identity-admin'
|
||||
bootstrap_token = get_password('token', 'openstack_identity_bootstrap_token')
|
||||
auth_uri = ::URI.decode identity_admin_endpoint.to_s
|
||||
service_pass = get_password 'service', 'database'
|
||||
service_user = node['openstack']['database']['service_user']
|
||||
service_role = node['openstack']['database']['service_role']
|
||||
service_tenant_name = node['openstack']['database']['service_tenant_name']
|
||||
admin_database_service_api_endpoint = admin_endpoint 'database-api'
|
||||
internal_database_service_api_endpoint = internal_endpoint 'database-api'
|
||||
public_database_service_api_endpoint = public_endpoint 'database-api'
|
||||
region = node['openstack']['database']['region']
|
||||
|
||||
# Register Service Tenant
|
||||
openstack_identity_register 'Register Service Tenant' do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
tenant_name service_tenant_name
|
||||
tenant_description 'Service Tenant'
|
||||
|
||||
action :create_tenant
|
||||
end
|
||||
|
||||
# Register Service User
|
||||
openstack_identity_register 'Register Service User' do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
tenant_name service_tenant_name
|
||||
user_name service_user
|
||||
user_pass service_pass
|
||||
|
||||
action :create_user
|
||||
end
|
||||
|
||||
## Grant Service role to Service User for Service Tenant ##
|
||||
openstack_identity_register "Grant '#{service_role}' Role to Service User for Service Tenant" do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
tenant_name service_tenant_name
|
||||
user_name service_user
|
||||
role_name service_role
|
||||
|
||||
action :grant_role
|
||||
end
|
||||
|
||||
# Register Database Service Service
|
||||
openstack_identity_register 'Register Database Service' do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
service_name 'trove'
|
||||
service_type 'database'
|
||||
service_description 'Trove Service'
|
||||
|
||||
action :create_service
|
||||
end
|
||||
|
||||
# Register Database Service Endpoint
|
||||
openstack_identity_register 'Register Database Endpoint' do
|
||||
auth_uri auth_uri
|
||||
bootstrap_token bootstrap_token
|
||||
service_type 'database'
|
||||
endpoint_region region
|
||||
endpoint_adminurl ::URI.decode admin_database_service_api_endpoint.to_s
|
||||
endpoint_internalurl ::URI.decode internal_database_service_api_endpoint.to_s
|
||||
endpoint_publicurl ::URI.decode public_database_service_api_endpoint.to_s
|
||||
|
||||
action :create_endpoint
|
||||
end
|
|
@ -1,66 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-database
|
||||
# Recipe:: taskmanager
|
||||
#
|
||||
# Copyright 2013-2014, SUSE Linux GmbH
|
||||
#
|
||||
# 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 # rubocop:disable Documentation
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
platform_options = node['openstack']['database']['platform']
|
||||
|
||||
platform_options['taskmanager_packages'].each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
|
||||
service 'trove-taskmanager' do
|
||||
service_name platform_options['taskmanager_service']
|
||||
supports status: true, restart: true
|
||||
|
||||
action [:enable]
|
||||
end
|
||||
|
||||
db_user = node['openstack']['db']['database']['username']
|
||||
db_pass = get_password 'db', 'database'
|
||||
db_uri = db_uri('database', db_user, db_pass).to_s
|
||||
|
||||
identity_uri = internal_endpoint('identity-internal')
|
||||
compute_uri = internal_endpoint('compute-api').to_s.gsub(/%\(tenant_id\)s/, '')
|
||||
block_storage_uri = internal_endpoint('block-storage-api').to_s.gsub(/%\(tenant_id\)s/, '')
|
||||
object_storage_uri = internal_endpoint('object-storage-api')
|
||||
|
||||
rabbit = node['openstack']['mq']['database']['rabbit']
|
||||
rabbit_pass = get_password('user', rabbit['userid'])
|
||||
|
||||
template '/etc/trove/trove-taskmanager.conf' do
|
||||
source 'trove-taskmanager.conf.erb'
|
||||
owner node['openstack']['database']['user']
|
||||
group node['openstack']['database']['group']
|
||||
mode 00640
|
||||
variables(
|
||||
database_connection: db_uri,
|
||||
rabbit: rabbit,
|
||||
rabbit_pass: rabbit_pass,
|
||||
identity_uri: identity_uri,
|
||||
compute_uri: compute_uri,
|
||||
block_storage_uri: block_storage_uri,
|
||||
object_storage_uri: object_storage_uri
|
||||
)
|
||||
|
||||
notifies :restart, 'service[trove-taskmanager]', :immediately
|
||||
end
|
|
@ -1,105 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-database::api' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) { runner.converge(described_recipe) }
|
||||
|
||||
include_context 'database-stubs'
|
||||
|
||||
it 'installs the api packages' do
|
||||
expect(chef_run).to install_package('openstack-trove-api')
|
||||
end
|
||||
|
||||
it 'starts the api service' do
|
||||
expect(chef_run).to enable_service('openstack-trove-api')
|
||||
end
|
||||
|
||||
it 'includes the logging recipe if syslog is enabled' do
|
||||
chef_run = ChefSpec::SoloRunner.new(::SUSE_OPTS) do |node|
|
||||
node.set['openstack']['database']['syslog']['use'] = true
|
||||
end.converge('openstack-database::api')
|
||||
|
||||
expect(chef_run).to include_recipe 'openstack-common::logging'
|
||||
end
|
||||
|
||||
it 'creates the /var/cache/trove directory' do
|
||||
expect(chef_run).to create_directory('/var/cache/trove').with(
|
||||
user: 'trove',
|
||||
group: 'trove',
|
||||
mode: 0700
|
||||
)
|
||||
end
|
||||
|
||||
describe 'trove.conf' do
|
||||
let(:filename) { '/etc/trove/trove.conf' }
|
||||
|
||||
it 'creates trove.conf file' do
|
||||
expect(chef_run).to create_template(filename).with(
|
||||
user: 'trove',
|
||||
group: 'trove',
|
||||
mode: 0640
|
||||
)
|
||||
end
|
||||
|
||||
it 'has the default values for configurable attributes' do
|
||||
[/^debug = false$/,
|
||||
/^verbose = false$/,
|
||||
%r{^sql_connection = mysql://trove:db-pass@127.0.0.1:3306/trove\?charset=utf8$},
|
||||
/^bind_host = 127.0.0.1$/,
|
||||
/^bind_port = 8779$/,
|
||||
/^rabbit_host = 127.0.0.1$/,
|
||||
%r{^rabbit_virtual_host = /$},
|
||||
/^rabbit_port = 5672$/,
|
||||
/^rabbit_userid = guest$/,
|
||||
/^rabbit_password = rabbit-pass$/,
|
||||
/^rabbit_use_ssl = false$/,
|
||||
%r{^trove_auth_url = http://127.0.0.1:5000/v2.0$},
|
||||
%r{^nova_compute_url = http://127.0.0.1:8774/v2/$},
|
||||
%r{^cinder_url = http://127.0.0.1:8776/v2/$},
|
||||
%r{^swift_url = http://127.0.0.1:8080/v1/AUTH_%\(tenant_id\)s$},
|
||||
%r{^dns_auth_url = http://127.0.0.1:5000/v2.0$},
|
||||
%r{^log_dir = /var/log/trove$},
|
||||
/^trove_volume_support = true$/
|
||||
].each do |content|
|
||||
expect(chef_run).to render_file(filename).with_content(content)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'api-paste.ini' do
|
||||
let(:filename) { '/etc/trove/api-paste.ini' }
|
||||
|
||||
it 'creates the file' do
|
||||
expect(chef_run).to create_template(filename).with(
|
||||
user: 'trove',
|
||||
group: 'trove',
|
||||
mode: 0640
|
||||
)
|
||||
end
|
||||
|
||||
it 'has the default values for configurable attributes' do
|
||||
[%r{^auth_uri = http://127.0.0.1:5000/v2.0$},
|
||||
/^auth_host = 127.0.0.1$/,
|
||||
/^auth_port = 35357$/,
|
||||
/^auth_protocol = http$/,
|
||||
%r{^signing_dir = /var/cache/trove/api$}
|
||||
].each do |content|
|
||||
expect(chef_run).to render_file(filename).with_content(content)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'database initialization' do
|
||||
let(:manage_cmd) { 'trove-manage db_sync' }
|
||||
|
||||
it 'runs not trove-manage' do
|
||||
expect(chef_run).to_not run_execute(manage_cmd).with(
|
||||
user: 'trove',
|
||||
group: 'trove'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,47 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-database::conductor' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) { runner.converge(described_recipe) }
|
||||
|
||||
include_context 'database-stubs'
|
||||
|
||||
it 'installs the converge packages' do
|
||||
expect(chef_run).to install_package('openstack-trove-conductor')
|
||||
end
|
||||
|
||||
it 'starts the conductor service' do
|
||||
expect(chef_run).to enable_service('openstack-trove-conductor')
|
||||
end
|
||||
|
||||
describe 'trove-conductor.conf' do
|
||||
let(:filename) { '/etc/trove/trove-conductor.conf' }
|
||||
|
||||
it 'creates the trove-conductor.conf file' do
|
||||
expect(chef_run).to create_template(filename).with(
|
||||
user: 'trove',
|
||||
group: 'trove',
|
||||
mode: 0640
|
||||
)
|
||||
end
|
||||
|
||||
it 'has the default values for configurable attributes' do
|
||||
[/^debug = false$/,
|
||||
/^verbose = false$/,
|
||||
%r{^sql_connection = mysql://trove:db-pass@127.0.0.1:3306/trove\?charset=utf8$},
|
||||
%r{^trove_auth_url = http://127.0.0.1:5000/v2.0$},
|
||||
/^rabbit_host = 127.0.0.1$/,
|
||||
%r{^rabbit_virtual_host = /$},
|
||||
/^rabbit_port = 5672$/,
|
||||
/^rabbit_userid = guest$/,
|
||||
/^rabbit_password = rabbit-pass$/,
|
||||
/^rabbit_use_ssl = false$/
|
||||
].each do |content|
|
||||
expect(chef_run).to render_file(filename).with_content(content)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,160 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-database::identity_registration' do
|
||||
describe 'suse' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) { runner.converge(described_recipe) }
|
||||
|
||||
include_context 'database-stubs'
|
||||
|
||||
it 'registers service tenant' do
|
||||
expect(chef_run).to create_tenant_openstack_identity_register(
|
||||
'Register Service Tenant'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
tenant_name: 'service',
|
||||
tenant_description: 'Service Tenant'
|
||||
)
|
||||
end
|
||||
|
||||
it 'registers service user' do
|
||||
expect(chef_run).to create_user_openstack_identity_register(
|
||||
'Register Service User'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
tenant_name: 'service',
|
||||
user_name: 'trove',
|
||||
user_pass: 'service-pass'
|
||||
)
|
||||
end
|
||||
|
||||
it 'grants service role to service user for service tenant' do
|
||||
expect(chef_run).to grant_role_openstack_identity_register(
|
||||
"Grant 'service' Role to Service User for Service Tenant"
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
tenant_name: 'service',
|
||||
user_name: 'trove',
|
||||
role_name: 'service'
|
||||
)
|
||||
end
|
||||
|
||||
it 'registers database service' do
|
||||
expect(chef_run).to create_service_openstack_identity_register(
|
||||
'Register Database Service'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_name: 'trove',
|
||||
service_type: 'database',
|
||||
service_description: 'Trove Service'
|
||||
)
|
||||
end
|
||||
|
||||
context 'registers database endpoint' do
|
||||
it 'with default values' do
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register Database Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'database',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: 'http://127.0.0.1:8779/v1.0/%(tenant_id)s',
|
||||
endpoint_internalurl: 'http://127.0.0.1:8779/v1.0/%(tenant_id)s',
|
||||
endpoint_publicurl: 'http://127.0.0.1:8779/v1.0/%(tenant_id)s'
|
||||
)
|
||||
end
|
||||
|
||||
it 'with different admin url' do
|
||||
admin_url = 'https://admin.host:123/admin_path'
|
||||
general_url = 'http://general.host:456/general_path'
|
||||
|
||||
# Set the general endpoint
|
||||
node.set['openstack']['endpoints']['database-api']['uri'] = general_url
|
||||
# Set the admin endpoint override
|
||||
node.set['openstack']['endpoints']['admin']['database-api']['uri'] = admin_url
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register Database Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'database',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: admin_url,
|
||||
endpoint_internalurl: general_url,
|
||||
endpoint_publicurl: general_url
|
||||
)
|
||||
end
|
||||
|
||||
it 'with different public url' do
|
||||
public_url = 'https://public.host:789/public_path'
|
||||
general_url = 'http://general.host:456/general_path'
|
||||
|
||||
# Set the general endpoint
|
||||
node.set['openstack']['endpoints']['database-api']['uri'] = general_url
|
||||
# Set the public endpoint override
|
||||
node.set['openstack']['endpoints']['public']['database-api']['uri'] = public_url
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register Database Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'database',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: general_url,
|
||||
endpoint_internalurl: general_url,
|
||||
endpoint_publicurl: public_url
|
||||
)
|
||||
end
|
||||
|
||||
it 'with different internal url' do
|
||||
internal_url = 'http://internal.host:456/internal_path'
|
||||
general_url = 'http://general.host:456/general_path'
|
||||
|
||||
# Set the general endpoint
|
||||
node.set['openstack']['endpoints']['database-api']['uri'] = general_url
|
||||
# Set the internal endpoint override
|
||||
node.set['openstack']['endpoints']['internal']['database-api']['uri'] = internal_url
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register Database Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'database',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: general_url,
|
||||
endpoint_internalurl: internal_url,
|
||||
endpoint_publicurl: general_url
|
||||
)
|
||||
end
|
||||
|
||||
it 'with all different urls' do
|
||||
internal_url = 'http://internal.host:456/internal_path'
|
||||
public_url = 'https://public.host:789/public_path'
|
||||
admin_url = 'https://admin.host:123/admin_path'
|
||||
|
||||
node.set['openstack']['endpoints']['internal']['database-api']['uri'] = internal_url
|
||||
node.set['openstack']['endpoints']['public']['database-api']['uri'] = public_url
|
||||
node.set['openstack']['endpoints']['admin']['database-api']['uri'] = admin_url
|
||||
expect(chef_run).to create_endpoint_openstack_identity_register(
|
||||
'Register Database Endpoint'
|
||||
).with(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_type: 'database',
|
||||
endpoint_region: 'RegionOne',
|
||||
endpoint_adminurl: admin_url,
|
||||
endpoint_internalurl: internal_url,
|
||||
endpoint_publicurl: public_url
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,38 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require 'chefspec'
|
||||
require 'chefspec/berkshelf'
|
||||
require 'chef/application'
|
||||
|
||||
LOG_LEVEL = :fatal
|
||||
SUSE_OPTS = {
|
||||
platform: 'suse',
|
||||
version: '11.3',
|
||||
log_level: ::LOG_LEVEL
|
||||
}
|
||||
REDHAT_OPTS = {
|
||||
platform: 'redhat',
|
||||
version: '7.1',
|
||||
log_level: ::LOG_LEVEL
|
||||
}
|
||||
UBUNTU_OPTS = {
|
||||
platform: 'ubuntu',
|
||||
version: '14.04',
|
||||
log_level: ::LOG_LEVEL
|
||||
}
|
||||
|
||||
shared_context 'database-stubs' do
|
||||
before do
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('token', 'openstack_identity_bootstrap_token')
|
||||
.and_return('bootstrap-token')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('user', 'guest').and_return('rabbit-pass')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('db', 'database').and_return('db-pass')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('service', 'database').and_return('service-pass')
|
||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||
.with('user', 'database').and_return('user-pass')
|
||||
end
|
||||
end
|
|
@ -1,53 +0,0 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-database::taskmanager' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) { runner.converge(described_recipe) }
|
||||
|
||||
include_context 'database-stubs'
|
||||
|
||||
it 'installs the taskmanager packages' do
|
||||
expect(chef_run).to install_package('openstack-trove-taskmanager')
|
||||
end
|
||||
|
||||
it 'starts the taskmanager service' do
|
||||
expect(chef_run).to enable_service('openstack-trove-taskmanager')
|
||||
end
|
||||
|
||||
describe 'trove-taskmanager.conf' do
|
||||
let(:filename) { '/etc/trove/trove-taskmanager.conf' }
|
||||
|
||||
it 'creates trove-taskmanager.conf file' do
|
||||
expect(chef_run).to create_template(filename).with(
|
||||
user: 'trove',
|
||||
group: 'trove',
|
||||
mode: 0640
|
||||
)
|
||||
end
|
||||
|
||||
it 'has the default values for configurable attributes' do
|
||||
[/^debug = false$/,
|
||||
/^verbose = false$/,
|
||||
%r{^sql_connection = mysql://trove:db-pass@127.0.0.1:3306/trove\?charset=utf8},
|
||||
/^rabbit_host = 127.0.0.1$/,
|
||||
%r{^rabbit_virtual_host = /$},
|
||||
/^rabbit_port = 5672$/,
|
||||
/^rabbit_userid = guest$/,
|
||||
/^rabbit_password = rabbit-pass$/,
|
||||
/^rabbit_use_ssl = false$/,
|
||||
%r{^trove_auth_url = http://127.0.0.1:5000/v2.0$},
|
||||
%r{^nova_compute_url = http://127.0.0.1:8774/v2/$},
|
||||
%r{^cinder_url = http://127.0.0.1:8776/v2/$},
|
||||
%r{^swift_url = http://127.0.0.1:8080/v1/AUTH_%\(tenant_id\)s$},
|
||||
%r{^dns_auth_url = http://127.0.0.1:5000/v2.0$},
|
||||
%r{^log_dir = /var/log/trove},
|
||||
/^trove_volume_support = true$/
|
||||
].each do |content|
|
||||
expect(chef_run).to render_file(filename).with_content(content)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,47 +0,0 @@
|
|||
<%= node["openstack"]["database"]["custom_template_banner"] %>
|
||||
|
||||
[composite:trove]
|
||||
use = call:trove.common.wsgi:versioned_urlmap
|
||||
/: versions
|
||||
/v1.0: troveapi
|
||||
|
||||
[app:versions]
|
||||
paste.app_factory = trove.versions:app_factory
|
||||
|
||||
[pipeline:troveapi]
|
||||
pipeline = faultwrapper tokenauth authorization contextwrapper ratelimit extensions troveapp
|
||||
#pipeline = debug extensions troveapp
|
||||
|
||||
[filter:extensions]
|
||||
paste.filter_factory = trove.common.extensions:factory
|
||||
|
||||
[filter:tokenauth]
|
||||
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
|
||||
auth_uri = <%= @identity_uri.to_s %>
|
||||
auth_host = <%= @identity_admin_uri.host %>
|
||||
auth_port = <%= @identity_admin_uri.port %>
|
||||
auth_protocol = <%= @identity_admin_uri.scheme %>
|
||||
admin_token = <%= @admin_token %>
|
||||
# signing_dir is configurable, but the default behavior of the authtoken
|
||||
# middleware should be sufficient. It will create a temporary directory
|
||||
# in the home directory for the user the trove process is running as.
|
||||
signing_dir = <%= node["openstack"]["database"]["api"]["auth"]["cache_dir"] %>
|
||||
|
||||
[filter:authorization]
|
||||
paste.filter_factory = trove.common.auth:AuthorizationMiddleware.factory
|
||||
|
||||
[filter:contextwrapper]
|
||||
paste.filter_factory = trove.common.wsgi:ContextMiddleware.factory
|
||||
|
||||
[filter:faultwrapper]
|
||||
paste.filter_factory = trove.common.wsgi:FaultWrapper.factory
|
||||
|
||||
[filter:ratelimit]
|
||||
paste.filter_factory = trove.common.limits:RateLimitingMiddleware.factory
|
||||
|
||||
[app:troveapp]
|
||||
paste.app_factory = trove.common.api:app_factory
|
||||
|
||||
#Add this filter to log request and response for debugging
|
||||
[filter:debug]
|
||||
paste.filter_factory = trove.common.wsgi:Debug
|
|
@ -1,21 +0,0 @@
|
|||
<%= node["openstack"]["database"]["custom_template_banner"] %>
|
||||
|
||||
[DEFAULT]
|
||||
verbose = <%= node["openstack"]["database"]["verbose"] %>
|
||||
debug = <%= node["openstack"]["database"]["debug"] %>
|
||||
control_exchange = trove
|
||||
trove_auth_url = <%= @identity_uri %>
|
||||
nova_proxy_admin_user = <%= node['openstack']['database']['nova_proxy_user'] %>
|
||||
nova_proxy_admin_pass = <%= node['openstack']['database']['nova_proxy_password'] %>
|
||||
nova_proxy_admin_tenant_name = <%= node['openstack']['database']['nova_proxy_tenant'] %>
|
||||
sql_connection = <%= @database_connection %>
|
||||
|
||||
# AMQP Connection info
|
||||
rabbit_host = <%= @rabbit['host'] %>
|
||||
rabbit_userid = <%= @rabbit['userid'] %>
|
||||
rabbit_password = <%= @rabbit_pass %>
|
||||
rabbit_virtual_host = <%= @rabbit['vhost'] %>
|
||||
rabbit_port = <%= @rabbit['port'] %>
|
||||
rabbit_use_ssl = <%= @rabbit['use_ssl'] %>
|
||||
|
||||
log_dir = /var/log/trove
|
|
@ -1,130 +0,0 @@
|
|||
<%= node["openstack"]["database"]["custom_template_banner"] %>
|
||||
|
||||
[DEFAULT]
|
||||
# Show more verbose log output (sets INFO log level output)
|
||||
verbose = <%= node["openstack"]["database"]["verbose"] %>
|
||||
|
||||
# Show debugging output in logs (sets DEBUG log level output)
|
||||
debug = <%= node["openstack"]["database"]["debug"] %>
|
||||
|
||||
# Updates service and instance task statuses if instance failed become active
|
||||
update_status_on_fail = True
|
||||
|
||||
# AMQP Connection info
|
||||
rabbit_host = <%= @rabbit['host'] %>
|
||||
rabbit_userid = <%= @rabbit['userid'] %>
|
||||
rabbit_password = <%= @rabbit_pass %>
|
||||
rabbit_virtual_host = <%= @rabbit['vhost'] %>
|
||||
rabbit_port = <%= @rabbit['port'] %>
|
||||
rabbit_use_ssl = <%= @rabbit['use_ssl'] %>
|
||||
|
||||
# SQLAlchemy connection string for the reference implementation
|
||||
# registry server. Any valid SQLAlchemy connection string is fine.
|
||||
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
|
||||
sql_connection = <%= @database_connection %>
|
||||
# sql_connection = mysql://root:root@localhost/trove
|
||||
|
||||
# Period in seconds after which SQLAlchemy should reestablish its connection
|
||||
# to the database.
|
||||
#
|
||||
# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
|
||||
# idle connections. This can result in 'MySQL Gone Away' exceptions. If you
|
||||
# notice this, you can lower this value to ensure that SQLAlchemy reconnects
|
||||
# before MySQL can drop the connection.
|
||||
sql_idle_timeout = 3600
|
||||
|
||||
#DB Api Implementation
|
||||
db_api_implementation = trove.db.sqlalchemy.api
|
||||
|
||||
# Configuration options for talking to nova via the novaclient.
|
||||
trove_auth_url = <%= @identity_uri %>
|
||||
nova_compute_url = <%= @compute_uri %>
|
||||
cinder_url = <%= @block_storage_uri %>
|
||||
swift_url = <%= @object_storage_uri %>
|
||||
|
||||
# Config options for enabling volume service
|
||||
trove_volume_support = <%= node['openstack']['database']['volume_support'] %>
|
||||
block_device_mapping = vdb
|
||||
device_path = /dev/vdb
|
||||
mount_point = /var/lib/mysql
|
||||
volume_time_out=30
|
||||
server_delete_time_out=480
|
||||
|
||||
# Configuration options for talking to nova via the novaclient.
|
||||
# These options are for an admin user in your keystone config.
|
||||
# It proxy's the token received from the user to send to nova via this admin users creds,
|
||||
# basically acting like the client via that proxy token.
|
||||
nova_proxy_admin_user = <%= node['openstack']['database']['nova_proxy_user'] %>
|
||||
nova_proxy_admin_pass = <%= node['openstack']['database']['nova_proxy_password'] %>
|
||||
nova_proxy_admin_tenant_name = <%= node['openstack']['database']['nova_proxy_tenant'] %>
|
||||
|
||||
# Manager impl for the taskmanager
|
||||
taskmanager_manager=trove.taskmanager.manager.Manager
|
||||
|
||||
# Manager sends Exists Notifications
|
||||
exists_notification_transformer = trove.extensions.mgmt.instances.models.NovaNotificationTransformer
|
||||
exists_notification_ticks = 30
|
||||
notification_service_id = mysql:2f3ff068-2bfb-4f70-9a9d-a6bb65bc084b
|
||||
|
||||
# Trove DNS
|
||||
trove_dns_support = False
|
||||
dns_account_id = 123456
|
||||
dns_auth_url = http://127.0.0.1:5000/v2.0
|
||||
dns_username = user
|
||||
dns_passkey = password
|
||||
dns_ttl = 3600
|
||||
dns_domain_name = 'trove.com.'
|
||||
dns_domain_id = 11111111-1111-1111-1111-111111111111
|
||||
dns_driver = trove.dns.designate.driver.DesignateDriver
|
||||
dns_instance_entry_factory = trove.dns.designate.driver.DesignateInstanceEntryFactory
|
||||
dns_endpoint_url = http://127.0.0.1/v1/
|
||||
dns_service_type = dns
|
||||
|
||||
# Trove Security Groups for Instances
|
||||
trove_security_groups_support = True
|
||||
trove_security_groups_rules_support = False
|
||||
trove_security_group_rule_protocol = tcp
|
||||
trove_security_group_rule_port = 3306
|
||||
trove_security_group_rule_cidr = 0.0.0.0/0
|
||||
|
||||
# Guest related conf
|
||||
agent_heartbeat_time = 10
|
||||
agent_call_low_timeout = 5
|
||||
agent_call_high_timeout = 150
|
||||
|
||||
# Whether to use nova's contrib api for create server with volume
|
||||
use_nova_server_volume = False
|
||||
|
||||
# Datastore templates
|
||||
template_path = /etc/trove/templates/
|
||||
|
||||
# ============ notifer queue kombu connection options ========================
|
||||
|
||||
notifier_queue_transport = memory
|
||||
|
||||
# usage notifications
|
||||
notification_driver=trove.openstack.common.notifier.rpc_notifier
|
||||
control_exchange=trove
|
||||
|
||||
# ============ Logging information =============================
|
||||
log_dir = /var/log/trove
|
||||
#log_file = trove-taskmanager.log
|
||||
|
||||
# ============ PyDev remote dubugging =============================
|
||||
|
||||
# Enable or disable pydev remote debugging.
|
||||
# There are three values allowed: 'disabled', 'enabled' and 'auto'
|
||||
# If value is 'auto' tries to connect to remote debugger server,
|
||||
# but in case of error continue running with disabled debugging
|
||||
pydev_debug = disabled
|
||||
|
||||
# remote debug server host and port options
|
||||
#pydev_debug_host = localhost
|
||||
#pydev_debug_port = 5678
|
||||
|
||||
# path to pydevd library. It will be used if pydevd is absent in sys.path
|
||||
#pydev_path = <path>
|
||||
|
||||
# ================= Guestagent related ========================
|
||||
#guest_config = $pybasedir/etc/trove/trove-guestagent.conf.sample
|
||||
#cloudinit_location = /etc/trove/cloudinit
|
|
@ -1,138 +0,0 @@
|
|||
<%= node["openstack"]["database"]["custom_template_banner"] %>
|
||||
|
||||
[DEFAULT]
|
||||
# Show more verbose log output (sets INFO log level output)
|
||||
verbose = <%= node["openstack"]["database"]["verbose"] %>
|
||||
|
||||
# Show debugging output in logs (sets DEBUG log level output)
|
||||
debug = <%= node["openstack"]["database"]["debug"] %>
|
||||
|
||||
# Address to bind the API server
|
||||
bind_host = <%= @endpoint.host %>
|
||||
|
||||
# Port the bind the API server to
|
||||
bind_port = <%= @endpoint.port %>
|
||||
|
||||
# Number of child processes to run
|
||||
#trove_api_workers=5
|
||||
|
||||
# AMQP Connection info
|
||||
rabbit_host = <%= @rabbit['host'] %>
|
||||
rabbit_userid = <%= @rabbit['userid'] %>
|
||||
rabbit_password = <%= @rabbit_pass %>
|
||||
rabbit_virtual_host = <%= @rabbit['vhost'] %>
|
||||
rabbit_port = <%= @rabbit['port'] %>
|
||||
rabbit_use_ssl = <%= @rabbit['use_ssl'] %>
|
||||
rabbit_notification_topic = <%= @rabbit['notification_topic'] %>
|
||||
|
||||
# SQLAlchemy connection string for the reference implementation
|
||||
# registry server. Any valid SQLAlchemy connection string is fine.
|
||||
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
|
||||
# sql_connection = sqlite:///trove_test.sqlite
|
||||
sql_connection = <%= @database_connection %>
|
||||
#sql_connection = postgresql://trove:trove@localhost/trove
|
||||
|
||||
# Period in seconds after which SQLAlchemy should reestablish its connection
|
||||
# to the database.
|
||||
#
|
||||
# MySQL uses a default `wait_timeout` of 8 hours, after which it will drop
|
||||
# idle connections. This can result in 'MySQL Gone Away' exceptions. If you
|
||||
# notice this, you can lower this value to ensure that SQLAlchemy reconnects
|
||||
# before MySQL can drop the connection.
|
||||
sql_idle_timeout = 3600
|
||||
|
||||
#DB Api Implementation
|
||||
db_api_implementation = "trove.db.sqlalchemy.api"
|
||||
|
||||
# Path to the extensions
|
||||
api_extensions_path = $pybasedir/extensions/routes
|
||||
|
||||
# Configuration options for talking to nova via the novaclient.
|
||||
trove_auth_url = <%= @identity_uri %>
|
||||
nova_compute_url = <%= @compute_uri %>
|
||||
cinder_url = <%= @block_storage_uri %>
|
||||
swift_url = <%= @object_storage_uri %>
|
||||
|
||||
# Config option for showing the IP address that nova doles out
|
||||
add_addresses = True
|
||||
network_label_regex = ^private$
|
||||
#ip_regex = ^(15.|123.)
|
||||
|
||||
# Config options for enabling volume service
|
||||
trove_volume_support = <%= node['openstack']['database']['volume_support'] %>
|
||||
block_device_mapping = vdb
|
||||
device_path = /dev/vdb
|
||||
mount_point = /var/lib/mysql
|
||||
max_accepted_volume_size = 10
|
||||
max_instances_per_user = 5
|
||||
max_volumes_per_user = 100
|
||||
max_backups_per_user = 5
|
||||
volume_time_out=30
|
||||
|
||||
# Config options for rate limits
|
||||
http_get_rate = 200
|
||||
http_post_rate = 200
|
||||
http_put_rate = 200
|
||||
http_delete_rate = 200
|
||||
|
||||
# Trove DNS
|
||||
trove_dns_support = False
|
||||
dns_account_id = 123456
|
||||
dns_auth_url = <%= @identity_uri %>
|
||||
dns_username = user
|
||||
dns_passkey = password
|
||||
dns_ttl = 3600
|
||||
dns_domain_name = 'trove.com.'
|
||||
dns_domain_id = 11111111-1111-1111-1111-111111111111
|
||||
dns_driver = trove.dns.designate.driver.DesignateDriver
|
||||
dns_instance_entry_factory = trove.dns.designate.driver.DesignateInstanceEntryFactory
|
||||
dns_endpoint_url = http://127.0.0.1/v1/
|
||||
dns_service_type = dns
|
||||
|
||||
# Taskmanager queue name
|
||||
taskmanager_queue = taskmanager
|
||||
|
||||
# Auth
|
||||
admin_roles = admin
|
||||
|
||||
root_on_create = False
|
||||
|
||||
# Users to ignore for user create/list/delete operations
|
||||
ignore_users = os_admin, root
|
||||
ignore_dbs = lost+found, mysql, information_schema
|
||||
|
||||
# Guest related conf
|
||||
agent_heartbeat_time = 10
|
||||
agent_call_low_timeout = 5
|
||||
agent_call_high_timeout = 150
|
||||
|
||||
# Reboot time out for instances
|
||||
reboot_time_out = 60
|
||||
|
||||
# Trove api-paste file name
|
||||
api_paste_config = api-paste.ini
|
||||
|
||||
|
||||
# ============ notifer queue kombu connection options ========================
|
||||
|
||||
notifier_queue_transport = memory
|
||||
|
||||
control_exchange = trove
|
||||
|
||||
# ============ Logging information =============================
|
||||
log_dir = /var/log/trove
|
||||
#log_file = trove-api.log
|
||||
|
||||
|
||||
# ============ SSL configuration (and enablement) =============================
|
||||
# In order to enable SSL for the trove api server, uncomment
|
||||
# the cert_file and key_file - and of course have those files
|
||||
# accessible. The existance of those setting and files will
|
||||
# enable SSL.
|
||||
|
||||
[ssl]
|
||||
|
||||
#cert_file = /path/to/server.crt
|
||||
#key_file = /path/to/server.key
|
||||
#optional:
|
||||
#ca_file = /path/to/ca_file
|
Loading…
Reference in New Issue