├── .gitignore ├── .gitreview ├── .pdkignore ├── .zuul.yaml ├── CHANGELOG.md ├── CONTRIBUTING.rst ├── Gemfile ├── LICENSE ├── README.md ├── Rakefile ├── bindep.txt ├── doc └── requirements.txt ├── examples └── site.pp ├── lib └── puppet │ ├── provider │ ├── trove.rb │ ├── trove_api_paste_ini │ │ └── ini_setting.rb │ ├── trove_config │ │ └── openstackconfig.rb │ ├── trove_datastore │ │ └── trove.rb │ ├── trove_datastore_version │ │ └── trove.rb │ └── trove_guestagent_config │ │ └── openstackconfig.rb │ └── type │ ├── trove_api_paste_ini.rb │ ├── trove_config.rb │ ├── trove_datastore.rb │ ├── trove_datastore_version.rb │ └── trove_guestagent_config.rb ├── manifests ├── api.pp ├── cache.pp ├── cache │ └── instance_ports.pp ├── client.pp ├── conductor.pp ├── config.pp ├── db.pp ├── db │ ├── mysql.pp │ ├── postgresql.pp │ └── sync.pp ├── deps.pp ├── generic_service.pp ├── guestagent.pp ├── guestagent │ ├── mariadb.pp │ ├── mysql.pp │ └── service_credentials.pp ├── healthcheck.pp ├── init.pp ├── keystone │ ├── auth.pp │ └── authtoken.pp ├── logging.pp ├── params.pp ├── policy.pp ├── quota.pp ├── service_credentials.pp ├── taskmanager.pp └── wsgi │ └── apache.pp ├── metadata.json ├── releasenotes ├── notes │ ├── add-openstackclient-client-aa12e000df7722b3.yaml │ ├── add-pool_timeout-option-for-db-bd805b61c49faa1e.yaml │ ├── add-service_token_roles-option-9dca2ded7ff9094f.yaml │ ├── add-use_journal-option-for-logging-94d344838c254a75.yaml │ ├── add_db_sync_timeout-9a64e1cb0cd4b80d.yaml │ ├── add_endpoint_type-92489bc41571f213.yaml │ ├── add_glance_service_type-option-1b62f22b9e3d3290.yaml │ ├── add_messaging_default_parameters-9135a887ef423451.yaml │ ├── add_mysql_enable_ndb-option-b5f429ce4141a4e4.yaml │ ├── add_oslo_messaging_amqp-ee62f22b973da190.yaml │ ├── add_rabbit_kombu_options-919c4f7279179e1b.yaml │ ├── add_transport_url_parameters-eaef5deb44a5bced.yaml │ ├── add_watch_log_file-option-ac0a6a04447b759f.yaml │ ├── amqp_auto_delete-d6d8b79d6445f6b2.yaml │ ├── api_paste_ini-separator-04370950f086c7bb.yaml │ ├── authtoken-bcb9cc0581080079.yaml │ ├── authtoken_manage_memcache_package-7bbd660df45a370e.yaml │ ├── bug-2058861-5b9681aa693a44e7.yaml │ ├── cache-backend-expiration-time-ff2e121362581278.yaml │ ├── cache-opts-d22f9a6692121131.yaml │ ├── cache-redis-opts-d6ebee69d2a12f84.yaml │ ├── centos-9-support-46d145a9ed994fe7.yaml │ ├── cleanup_deprecated_params_from_trove-quota-19ce39fbd7611db7.yaml │ ├── configurable_swift_service_type-9a9b3bab6ff5e185.yaml │ ├── configure-backup_aes_cbc_key-aaf934036d76ee57.yaml │ ├── configure_service-a1d6962c8833e640.yaml │ ├── default_domain-a75b4fc5a094f93d.yaml │ ├── deprecate-api-service_credentials-a988f20f56a499e4.yaml │ ├── deprecate-default_password_length-cb13316b55232a7e.yaml │ ├── deprecate-guestagent-backup_aes_cbc_key-84ed0dd16e26c8b9.yaml │ ├── deprecate-rabbit_heartbeat_in_pthread-cbb628bff236eca0.yaml │ ├── deprecate-rabbit_notification_topic-50956d3673363355.yaml │ ├── deprecate-use_neutron-d39ccd82299c38b7.yaml │ ├── deprecate-watch_log_file-370604865ba4b894.yaml │ ├── deprecate_allow_insecure_clients-option-ac2bec38b8b002b8.yaml │ ├── deprecate_auth_uri_parameter-87ffc735509a6e7c.yaml │ ├── deprecate_database_min_pool_size-option-86a395d45d177298.yaml │ ├── deprecate_database_options-34f9def22611cb34.yaml │ ├── deprecate_ensure_package_parameter-843952a793d67911.yaml │ ├── deprecate_heat_service_type-8a7a6a5b1c40bcdc.yaml │ ├── deprecate_idle_timeout_parameter-a47e878d44bf161b.yaml │ ├── deprecate_pki_related_parameters-a29fb4207f537afb.yaml │ ├── deprecate_revocation_cache_time_parameter-28379ba2e4a35d0c.yaml │ ├── deprecate_rpc_backend_parameter-69670fb9496a4b95.yaml │ ├── deprecate_signing_dir_parameter-a5197a359e998f13.yaml │ ├── deprecate_templated_guestagent_conf-96e92af47e01fe35.yaml │ ├── drop-fedora-38ed41e5138154d7.yaml │ ├── drop_qpid-00ae0858778cae53.yaml │ ├── enable_cancel_on_failover-230b2088cad64cd9.yaml │ ├── external_dependency_management-4f5c1e349d9983fb.yaml │ ├── fix-auth_url-330322b223994b41.yaml │ ├── fix_log_dir_documentation-a8bb71233fba1e9e.yaml │ ├── guestagent-disable-service-3c4100c486de4c2e.yaml │ ├── guestagent-override-rabbit-params-eaf20f06fad960c5.yaml │ ├── guestagent-swift_endpoint_type-2cd4e898f9ca5029.yaml │ ├── guestagent-volume-opts-6552894cb095e53b.yaml │ ├── guestagent_swift_default-f14d658a976d69e2.yaml │ ├── hc-enable_by_file_paths-504bc380faf3b461.yaml │ ├── healthcheck-39c7baba411cc930.yaml │ ├── keystone-auth-name-ca9c69995d1eac09.yaml │ ├── keystone-authtoken-interface-a21e29a682e51819.yaml │ ├── keystone-authtoken-service_type-839ae99f7083eacb.yaml │ ├── keystone-v3-auth-1572c6fe82f65b8b.yaml │ ├── log-json-8713a9e0f135d123.yaml │ ├── make_client_more_configurable-aa43f623d8c9d3c7.yaml │ ├── management-networks-cff664649b786960.yaml │ ├── migrate-policy-format-from-json-to-yaml-dea57c16ede75e23.yaml │ ├── mitaka-deprecations2-3ac716b493057152.yaml │ ├── mitka_deprecations-08a9171d3ec8bb5b.yaml │ ├── mysql-opts-cafd18ca1dc56cbd.yaml │ ├── network_isolation-d7b0f489fb53d578.yaml │ ├── non-boolean-for-url-b33f16655e40c732.yaml │ ├── notification-retry-73b060f14a1cf542.yaml │ ├── notifications-77b6674b294c74e5.yaml │ ├── openstack_db_tag-801df2b37104b652.yaml │ ├── os_workers_for_worker_count-3c4240c334ddc6a7.yaml │ ├── oslo_policy-enforce_scope-ea005786fd908381.yaml │ ├── parameter-cleanup-zed-92fb9e1f474c923a.yaml │ ├── policy-dirs-4345bfef1f3a3b85.yaml │ ├── policy-enforce_new_defaults-f4a0c36ad87ad096.yaml │ ├── policy-file-support-06db0c1ae60284a5.yaml │ ├── policy_default_rule-7734b5695bae2731.yaml │ ├── policy_purge_config-77dcdf6fec79a4fa.yaml │ ├── provider-deprecate-at-params-8a9c23a010d4b4d3.yaml │ ├── puppet-8-9f6429d787e1d6e6.yaml │ ├── puppet4-mysql-func-a6bf94ee5cb5980e.yaml │ ├── pymysql-e57bf1f0289dd426.yaml │ ├── rabbit-connection-params-deprecation-8e209afd31c042a1.yaml │ ├── rabbit-heartbeat-opts-6263999f7a7536a8.yaml │ ├── rabbit-quorum-queue-080ee93b83f60196.yaml │ ├── rabbit_hosts_in_guestagent_template-00c3a03cf1f2be39.yaml │ ├── rabbit_qos_prefetch_count-92ac029d5c8ce265.yaml │ ├── rabbit_transient_queues_ttl-9416ff6bc511dcda.yaml │ ├── rabbit_transient_quorum_queue-1431457758c39744.yaml │ ├── rabbitmq-heartbeat-over-pthread-93fe3506ae120580.yaml │ ├── ram-quota-db3f2cad1b2bfa90.yaml │ ├── refacotr-ssl-opts-bff4682538e62acb.yaml │ ├── release-note-ubuntu-py3-73f045d7443fc9a6.yaml │ ├── remove-amqp1-71e859dfe34b0104.yaml │ ├── remove-amqp_allow_insecure_clients-1d9b19079584373a.yaml │ ├── remove-api-service_credentials-9faa76a3466ab8d6.yaml │ ├── remove-auth-uri-78dfc3af814c1367.yaml │ ├── remove-centos-8-438a33ab60339ad4.yaml │ ├── remove-database-options-9f865faa07dee7af.yaml │ ├── remove-database_min_pool_size-085bbcba091e61c9.yaml │ ├── remove-default_neutron_networks-1f133abd9e127a35.yaml │ ├── remove-deprecated-logging-89cb2fcbedb06176.yaml │ ├── remove-deprecated-rabbit-params-b874abdbb701f1ae.yaml │ ├── remove-deprecated-rabbit-params-guestagent-4f0178bdfac9ffd9.yaml │ ├── remove-guestagent-control_exchange-a890e7661cb40151.yaml │ ├── remove-keystone-v2-params-047438374b04606d.yaml │ ├── remove-puppet-6-44adc89d762d943b.yaml │ ├── remove-rabbit_notification_topic-705300aaf5725e2d.yaml │ ├── remove-separate-config-9fed57e7e4954005.yaml │ ├── remove-single_tenant_mode-6a8080f1e74266ad.yaml │ ├── remove-use_guestagent_template-68282b363e234266.yaml │ ├── remove-use_neutron-820b1a0eb3db454b.yaml │ ├── remove-watch_log_file-30401b10abdc1769.yaml │ ├── remove_deprecated_ensure_package_option-a4088afe0b345a44.yaml │ ├── remove_deprecated_heat_service_type-8f7a2256681b5ed0.yaml │ ├── remove_deprecated_keystone_auth_options-65fea5e2c80278e7.yaml │ ├── remove_deprecated_keystone_revocation_cache_time_option-bbae786702cd1618.yaml │ ├── remove_deprecated_keystone_signing_dir_option-9dfe0af3219d10f7.yaml │ ├── remove_deprecated_pki_related_options-9713e0ed5956a82a.yaml │ ├── remove_idle_timeout_option-81bb50a1292b535e.yaml │ ├── remove_old_authtoken_options-e873bed4cc0139cc.yaml │ ├── remove_qpid-0b446db43fdea617.yaml │ ├── remove_verbose-208dc449d7fe91ff.yaml │ ├── separate-api-taskmanager-settings-cc860762b270383a.yaml │ ├── service_token_roles_required-a2d688ca8fc88039.yaml │ ├── single-tenant-mode-9e39b1becaaad8c0.yaml │ ├── switch-to-keystone-v3-6e8e02a1f2445ad9.yaml │ ├── switch_to_oslo-1ae208bc1295238d.yaml │ ├── system_scope-all-b264889f42741908.yaml │ ├── system_scope-keystone-527142cfc221fa2b.yaml │ ├── ubuntu-jammy-c4fbcd167bf27b70.yaml │ ├── ubuntu-noble-a0b44b61a1105a08.yaml │ ├── use-reno-1caaec4ba5aa4285.yaml │ ├── use-service-default-for-quota-opts-d06793e6832314d3.yaml │ ├── use-single-config-233fda77f7d6c942.yaml │ ├── use-volumev3-e0b5c5c444163b61.yaml │ ├── verbose-deprecation-805b7a15b97a2f48.yaml │ ├── volume-opts-4456caffc83b79df.yaml │ └── wsgi-c8adcf992c49ea50.yaml └── source │ ├── 2023.1.rst │ ├── 2023.2.rst │ ├── 2024.1.rst │ ├── 2024.2.rst │ ├── 2025.1.rst │ ├── _static │ └── .placeholder │ ├── conf.py │ ├── index.rst │ ├── mitaka.rst │ ├── newton.rst │ ├── ocata.rst │ ├── pike.rst │ ├── queens.rst │ ├── rocky.rst │ ├── stein.rst │ ├── train.rst │ ├── unreleased.rst │ ├── ussuri.rst │ ├── victoria.rst │ ├── wallaby.rst │ ├── xena.rst │ ├── yoga.rst │ └── zed.rst ├── setup.cfg ├── setup.py ├── spec ├── acceptance │ ├── 10_basic_trove_spec.rb │ └── 99_trove_config_spec.rb ├── classes │ ├── trove_api_spec.rb │ ├── trove_cache_instance_ports_spec.rb │ ├── trove_cache_spec.rb │ ├── trove_client_spec.rb │ ├── trove_conductor_spec.rb │ ├── trove_config_spec.rb │ ├── trove_db_mysql_spec.rb │ ├── trove_db_postgresql_spec.rb │ ├── trove_db_spec.rb │ ├── trove_db_sync_spec.rb │ ├── trove_deps_spec.rb │ ├── trove_guestagent_mariadb_spec.rb │ ├── trove_guestagent_mysql_spec.rb │ ├── trove_guestagent_service_credentials_spec.rb │ ├── trove_guestagent_spec.rb │ ├── trove_healthcheck_spec.rb │ ├── trove_init_spec.rb │ ├── trove_keystone_auth_spec.rb │ ├── trove_keystone_authtoken_spec.rb │ ├── trove_logging_spec.rb │ ├── trove_policy_spec.rb │ ├── trove_quota_spec.rb │ ├── trove_service_credentials_spec.rb │ ├── trove_taskmanager_spec.rb │ └── trove_wsgi_apache_spec.rb ├── shared_examples.rb ├── spec_helper.rb ├── spec_helper_acceptance.rb └── unit │ ├── provider │ ├── trove_config │ │ └── openstackconfig_spec.rb │ ├── trove_datastore_version │ │ └── trove_spec.rb │ ├── trove_guestagent_config │ │ └── openstackconfig_spec.rb │ └── trove_spec.rb │ └── type │ ├── trove_api_paste_ini_spec.rb │ ├── trove_conductor_guestagent_spec.rb │ ├── trove_config_spec.rb │ └── trove_guestagent_config_spec.rb └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | # Add patterns in here to exclude files created by tools integrated with this 2 | # repository, such as test frameworks from the project's recommended workflow, 3 | # rendered documentation and package builds. 4 | # 5 | # Don't add patterns to exclude files created by preferred personal tools 6 | # (editors, IDEs, your operating system itself even). These should instead be 7 | # maintained outside the repository, for example in a ~/.gitignore file added 8 | # with: 9 | # 10 | # git config --global core.excludesfile '~/.gitignore' 11 | 12 | pkg/ 13 | Gemfile.lock 14 | vendor/ 15 | spec/fixtures/ 16 | .vagrant/ 17 | .bundle/ 18 | coverage/ 19 | .idea/ 20 | *.iml 21 | /openstack 22 | /log 23 | 24 | # Files created by releasenotes build 25 | releasenotes/build 26 | .tox 27 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=review.opendev.org 3 | port=29418 4 | project=openstack/puppet-trove.git 5 | -------------------------------------------------------------------------------- /.pdkignore: -------------------------------------------------------------------------------- 1 | # common list used in puppetlabs repos 2 | .git/ 3 | .*.sw[op] 4 | .metadata 5 | .yardoc 6 | .yardwarns 7 | *.iml 8 | /.bundle/ 9 | /.idea/ 10 | /.vagrant/ 11 | /coverage/ 12 | /bin/ 13 | /doc/ 14 | /Gemfile.local 15 | /Gemfile.lock 16 | /junit/ 17 | /log/ 18 | /pkg/ 19 | /spec/fixtures/manifests/ 20 | /spec/fixtures/modules/* 21 | /tmp/ 22 | /vendor/ 23 | /convert_report.txt 24 | /update_report.txt 25 | .DS_Store 26 | .project 27 | .envrc 28 | /inventory.yaml 29 | /spec/fixtures/litmus_inventory.yaml 30 | /.fixtures.yml 31 | /Gemfile 32 | /.gitattributes 33 | /.gitignore 34 | /.pdkignore 35 | /.puppet-lint.rc 36 | /Rakefile 37 | /rakelib/ 38 | /.rspec 39 | /..yml 40 | /.yardopts 41 | /spec/ 42 | /.vscode/ 43 | /.sync.yml 44 | /.devcontainer/ 45 | # OpenStack-specific files 46 | /bindep.txt 47 | /.gitreview 48 | /releasenotes/ 49 | /setup.cfg 50 | /setup.py 51 | /tox.ini 52 | /.zuul.yaml 53 | -------------------------------------------------------------------------------- /.zuul.yaml: -------------------------------------------------------------------------------- 1 | - project: 2 | templates: 3 | - puppet-openstack-check-jobs 4 | - puppet-openstack-module-unit-jobs 5 | - puppet-openstack-integration-jobs-scenario003 6 | - puppet-openstack-litmus-jobs 7 | - release-notes-jobs-python3 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 8.0.0 and beyond 2 | 3 | From 8.0.0 release and beyond, release notes are published on 4 | [docs.openstack.org](https://docs.openstack.org/releasenotes/puppet-trove/). 5 | 6 | ##2015-11-25 - 7.0.0 7 | ###Summary 8 | 9 | This is a backwards-compatible major release for OpenStack Liberty. 10 | 11 | ####Features 12 | - add tag to package and service resources 13 | - add trove::config class 14 | - reflect provider change in puppet-openstacklib 15 | - introduce trove::quota class 16 | - introduce use_guestagent_template option 17 | - make taskmanager_queue option configurable 18 | - add api ratelimit options 19 | - add region and resource url related options 20 | - add default_neutron_networks in trove::taskmanager 21 | - complete qpid support 22 | - keystone/auth: make service description configurable 23 | 24 | ####Bugfixes 25 | - fix rabbit_userid parameter 26 | - fix default value of guestagent_config_file option 27 | 28 | ####Maintenance 29 | - initial msync run for all Puppet OpenStack modules 30 | - try to use zuul-cloner to prepare fixtures 31 | - remove class_parameter_defaults puppet-lint check 32 | - acceptance: use common bits from puppet-openstack-integration 33 | - acceptance: enable debug & verbosity for OpenStack logs 34 | - fix rspec 3.x syntax 35 | 36 | ##2015-10-10 - 6.1.0 37 | ###Summary 38 | 39 | This is a feature and bugfix release in the Kilo series. 40 | 41 | ####Features 42 | - Introduce trove:config to manage custom options 43 | 44 | ####Maintenance 45 | - acceptance: checkout stable/kilo puppet modules 46 | 47 | ####Bugfixes 48 | - Fix catalog compilation when not configuring endpoint 49 | 50 | ##2015-07-08 - 6.0.0 51 | ###Summary 52 | 53 | - Initial release of the puppet-trove module 54 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | The source repository for this project can be found at: 2 | 3 | https://opendev.org/openstack/puppet-trove 4 | 5 | Pull requests submitted through GitHub are not monitored. 6 | 7 | To start contributing to OpenStack, follow the steps in the contribution guide 8 | to set up and use Gerrit: 9 | 10 | https://docs.openstack.org/contributors/code-and-documentation/quick-start.html 11 | 12 | Bugs should be filed on Launchpad: 13 | 14 | https://bugs.launchpad.net/puppet-trove 15 | 16 | For more specific information about contributing to this repository, see the 17 | Puppet OpenStack contributor guide: 18 | 19 | https://docs.openstack.org/puppet-openstack-guide/latest/contributor/contributing.html 20 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source ENV['GEM_SOURCE'] || "https://rubygems.org" 2 | 3 | group :development, :test, :system_tests do 4 | spec_helper_dir = '/home/zuul/src/opendev.org/openstack/puppet-openstack_spec_helper' 5 | if File.directory?(spec_helper_dir) 6 | if ENV['ZUUL_PROJECT'] == 'openstack/puppet-openstack_spec_helper' 7 | gem 'puppet-openstack_spec_helper', 8 | :path => '../..', 9 | :require => 'false' 10 | else 11 | gem 'puppet-openstack_spec_helper', 12 | :path => spec_helper_dir, 13 | :require => 'false' 14 | end 15 | else 16 | spec_helper_version = ENV['ZUUL_BRANCH'] || "master" 17 | gem 'puppet-openstack_spec_helper', 18 | :git => 'https://opendev.org/openstack/puppet-openstack_spec_helper', 19 | :ref => spec_helper_version, 20 | :require => 'false' 21 | end 22 | end 23 | 24 | if facterversion = ENV['FACTER_GEM_VERSION'] 25 | gem 'facter', facterversion, :require => false 26 | else 27 | gem 'facter', :require => false 28 | end 29 | 30 | if puppetversion = ENV['PUPPET_GEM_VERSION'] 31 | gem 'puppet', puppetversion, :require => false 32 | else 33 | gem 'puppet', :require => false 34 | end 35 | 36 | # vim:ft=ruby 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Team and repository tags 2 | ======================== 3 | 4 | [![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-trove.svg)](https://governance.openstack.org/tc/reference/tags/index.html) 5 | 6 | 7 | 8 | puppet-trove 9 | ============= 10 | 11 | #### Table of Contents 12 | 13 | 1. [Overview - What is the trove module?](#overview) 14 | 2. [Module Description - What does the module do?](#module-description) 15 | 3. [Setup - The basics of getting started with trove](#setup) 16 | 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 17 | 5. [Limitations - OS compatibility, etc.](#limitations) 18 | 6. [Development - Guide for contributing to the module](#development) 19 | 7. [Contributors - Those with commits](#contributors) 20 | 8. [Release Notes - Release notes for the project](#release-notes) 21 | 9. [Repository - The project source code repository](#repository) 22 | 23 | Overview 24 | -------- 25 | 26 | The trove module is a part of [OpenStack](https://opendev.org/openstack), an effort by the OpenStack infrastructure team to provide continuous integration testing and code review for OpenStack and OpenStack community projects as part of the core software. The module itself is used to flexibly configure and manage the database service for OpenStack. 27 | 28 | Module Description 29 | ------------------ 30 | 31 | Setup 32 | ----- 33 | 34 | **What the trove module affects:** 35 | 36 | * [trove](https://docs.openstack.org/trove/latest/), the database service for OpenStack. 37 | 38 | ### Installing trove 39 | 40 | puppet module install openstack/trove 41 | 42 | Implementation 43 | -------------- 44 | 45 | ### trove 46 | 47 | trove is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers. 48 | 49 | ### Types 50 | 51 | #### trove_config 52 | 53 | The `trove_config` provider is a child of the ini_setting provider. It allows one to write an entry in the `/etc/trove/trove.conf` file. 54 | 55 | ```puppet 56 | trove_config { 'DEFAULT/backlog' : 57 | value => 4096, 58 | } 59 | ``` 60 | 61 | This will write `backlog=4096` in the `[DEFAULT]` section. 62 | 63 | ##### name 64 | 65 | Section/setting name to manage from `trove.conf` 66 | 67 | ##### value 68 | 69 | The value of the setting to be defined. 70 | 71 | ##### secret 72 | 73 | Whether to hide the value from Puppet logs. Defaults to `false`. 74 | 75 | ##### ensure_absent_val 76 | 77 | If value is equal to ensure_absent_val then the resource will behave as if `ensure => absent` was specified. Defaults to `` 78 | 79 | #### trove_guestagent_config 80 | 81 | The `trove_guestagent_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/trove/trove-guestagent.conf` file. 82 | 83 | ```puppet 84 | trove_guestagent_config { 'DEFAULT/trove_auth_url' : 85 | value => http://localhost:5000/v3, 86 | } 87 | ``` 88 | 89 | This will write `trove_auth_url=http://localhost:5000/v3` in the `[DEFAULT]` section. 90 | 91 | ##### name 92 | 93 | Section/setting name to manage from `trove.conf` 94 | 95 | ##### value 96 | 97 | The value of the setting to be defined. 98 | 99 | ##### secret 100 | 101 | Whether to hide the value from Puppet logs. Defaults to `false`. 102 | 103 | ##### ensure_absent_val 104 | 105 | If value is equal to ensure_absent_val then the resource will behave as if `ensure => absent` was specified. Defaults to `` 106 | 107 | Limitations 108 | ----------- 109 | 110 | Security 111 | -------- 112 | 113 | For security reasons, a separate in-cloud RabbitMQ cluster should be set up for trove to use. The reason for this is that the guest agent needs to communicate with RabbitMQ, so it is not advisable to give instances access to the same RabbitMQ server that the core OpenStack services are using for communication. 114 | 115 | Please note that puppet-trove cannot check if this rule is being followed, so it is the deployer's responsibility to do it. 116 | 117 | Development 118 | ----------- 119 | 120 | Developer documentation for the entire puppet-openstack project. 121 | 122 | * https://docs.openstack.org/puppet-openstack-guide/latest/ 123 | 124 | Contributors 125 | ------------ 126 | 127 | * https://github.com/enovance/puppet-trove/graphs/contributors 128 | 129 | Release Notes 130 | ------------- 131 | 132 | * https://docs.openstack.org/releasenotes/puppet-trove 133 | 134 | Repository 135 | ---------- 136 | 137 | * https://opendev.org/openstack/puppet-trove 138 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'puppet-openstack_spec_helper/rake_tasks' 2 | -------------------------------------------------------------------------------- /bindep.txt: -------------------------------------------------------------------------------- 1 | # This is a cross-platform list tracking distribution packages needed by tests; 2 | # see https://docs.openstack.org/infra/bindep/ for additional information. 3 | 4 | libxml2-devel [test platform:rpm] 5 | libxml2-dev [test platform:dpkg] 6 | libxslt-devel [test platform:rpm] 7 | libxslt1-dev [test platform:dpkg] 8 | ruby-devel [test platform:rpm] 9 | ruby-dev [test platform:dpkg] 10 | zlib1g-dev [test platform:dpkg] 11 | zlib-devel [test platform:rpm] 12 | puppet [build] 13 | -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | # This is required for the docs build jobs 2 | sphinx>=3.5.1 # BSD 3 | openstackdocstheme>=2.2.7 # Apache-2.0 4 | 5 | # This is required for the releasenotes build jobs 6 | reno>=3.2.0 # Apache-2.0 7 | -------------------------------------------------------------------------------- /examples/site.pp: -------------------------------------------------------------------------------- 1 | # This is an example of site.pp to deploy Trove 2 | 3 | class { 'trove::client': } 4 | 5 | class { 'trove::keystone::auth': 6 | public_url => 'http://localhost:8779/v1.0/%(tenant_id)s', 7 | internal_url => 'http://localhost:8779/v1.0/%(tenant_id)s', 8 | admin_url => 'http://localhost:8779/v1.0/%(tenant_id)s', 9 | password => 'verysecrete', 10 | } 11 | 12 | class { 'trove::db::mysql': 13 | password => 'dbpass', 14 | host => 'localhost', 15 | allowed_hosts => ['localhost'] 16 | } 17 | 18 | class { 'trove::db': 19 | database_connection => 'mysql://trove:dbpass@localhost/trove?charset=utf8', 20 | } 21 | 22 | class { 'trove': 23 | default_transport_url => 'rabbit://trove:an_even_bigger_secret@localhost:5672/trove', 24 | } 25 | 26 | class { 'trove::service_credentials': 27 | auth_url => 'https://identity.openstack.org:5000/v3', 28 | password => 'verysecrete', 29 | } 30 | 31 | class { 'trove::conductor::service_credentials': 32 | password => 'verysecrete', 33 | } 34 | 35 | class { 'trove::task_manager::service_credentials': 36 | password => 'verysecrete', 37 | } 38 | 39 | class { 'trove::guestagent::service_credentials': 40 | auth_url => 'https://identity.openstack.org:5000/v3', 41 | password => 'verysecrete', 42 | } 43 | 44 | class { 'trove::keystone::authtoken': 45 | auth_url => 'https://identity.openstack.org:5000/v3', 46 | password => 'verysecrete', 47 | } 48 | 49 | class { 'trove::api': 50 | bind_host => '10.0.0.1', 51 | } 52 | 53 | class { 'trove::conductor': } 54 | 55 | class { 'trove::taskmanager': } 56 | -------------------------------------------------------------------------------- /lib/puppet/provider/trove.rb: -------------------------------------------------------------------------------- 1 | # Add openstacklib code to $LOAD_PATH so that we can load this during 2 | # standalone compiles without error. 3 | File.expand_path('../../../../openstacklib/lib', File.dirname(__FILE__)).tap { |dir| $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir) } 4 | 5 | require 'puppet/util/inifile' 6 | require 'puppet/provider/openstack' 7 | require 'puppet/provider/openstack/auth' 8 | 9 | class Puppet::Provider::Trove < Puppet::Provider::Openstack 10 | 11 | extend Puppet::Provider::Openstack::Auth 12 | 13 | initvars # so commands will work 14 | commands :trove_manage => 'trove-manage' 15 | 16 | def trove_manage(*args) 17 | execute([command(:trove_manage)] + args) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/puppet/provider/trove_api_paste_ini/ini_setting.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.type(:trove_api_paste_ini).provide( 2 | :ini_setting, 3 | :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) 4 | ) do 5 | 6 | def self.file_path 7 | '/etc/trove/api-paste.ini' 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/provider/trove_config/openstackconfig.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.type(:trove_config).provide( 2 | :openstackconfig, 3 | :parent => Puppet::Type.type(:openstack_config).provider(:ruby) 4 | ) do 5 | 6 | def self.file_path 7 | '/etc/trove/trove.conf' 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/provider/trove_datastore/trove.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), "..","..","..", 2 | "puppet/provider/trove") 3 | 4 | Puppet::Type.type(:trove_datastore).provide( 5 | :trove, 6 | :parent => Puppet::Provider::Trove 7 | ) do 8 | desc <<-EOT 9 | Trove provider to manage datastore type. 10 | EOT 11 | 12 | mk_resource_methods 13 | 14 | @credentials = Puppet::Provider::Openstack::CredentialsV3.new 15 | 16 | def self.instances 17 | request('datastore', 'list').collect do |attrs| 18 | new( 19 | :ensure => :present, 20 | :name => attrs[:name], 21 | :id => attrs[:id] 22 | ) 23 | end 24 | end 25 | 26 | def self.prefetch(resources) 27 | instances_ = instances 28 | resources.keys.each do |name| 29 | if provider = instances_.find{ |instance| instance.name == name } 30 | resources[name].provider = provider 31 | end 32 | end 33 | end 34 | 35 | def exists? 36 | @property_hash[:ensure] == :present 37 | end 38 | 39 | def create 40 | trove_manage(['datastore_update', "#{@resource[:name]}", "''"]) 41 | 42 | if @resource[:version] 43 | trove_manage(['datastore_update', "#{@resource[:name]}", "#{@resource[:version]}"]) 44 | end 45 | end 46 | end 47 | 48 | -------------------------------------------------------------------------------- /lib/puppet/provider/trove_datastore_version/trove.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), "..","..","..", 2 | "puppet/provider/trove") 3 | 4 | Puppet::Type.type(:trove_datastore_version).provide( 5 | :trove, 6 | :parent => Puppet::Provider::Trove 7 | ) do 8 | desc <<-EOT 9 | Trove provider to manage datastore version type. 10 | EOT 11 | 12 | mk_resource_methods 13 | 14 | @credentials = Puppet::Provider::Openstack::CredentialsV3.new 15 | 16 | def self.prefetch(resource) 17 | @datastore_version_hash = nil 18 | end 19 | 20 | def self.datastore_version_hash(datastore) 21 | @datastore_version_hash ||= build_datastore_version_hash(datastore) 22 | end 23 | 24 | def datastore_version_hash(datastore) 25 | self.class.datastore_version_hash(datastore) 26 | end 27 | 28 | def self.instances 29 | [] 30 | end 31 | 32 | def exists? 33 | datastore_version_hash(@resource[:datastore])[@resource[:name]] 34 | end 35 | 36 | def create 37 | trove_manage([ 38 | 'datastore_version_update', 39 | "#{@resource[:datastore]}", "#{@resource[:name]}", 40 | "#{@resource[:manager]}", "#{@resource[:image_id]}", 41 | "#{@resource[:packages]}", "#{@resource[:active]}" 42 | ]) 43 | end 44 | 45 | def destroy 46 | fail("Datastore version cannot be removed") 47 | end 48 | 49 | private 50 | 51 | def self.build_datastore_version_hash(datastore) 52 | dvs = {} 53 | begin 54 | request('datastore version', 'list', datastore).each do |attrs| 55 | dvs[attrs[:name]] = attrs 56 | end 57 | rescue Puppet::ExecutionFailure => e 58 | if ! e.message.match("Datastore '#{datastore}' cannot be found") 59 | raise e 60 | end 61 | end 62 | dvs 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /lib/puppet/provider/trove_guestagent_config/openstackconfig.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.type(:trove_guestagent_config).provide( 2 | :openstackconfig, 3 | :parent => Puppet::Type.type(:openstack_config).provider(:ruby) 4 | ) do 5 | 6 | def self.file_path 7 | '/etc/trove/trove-guestagent.conf' 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/type/trove_api_paste_ini.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:trove_api_paste_ini) do 2 | 3 | ensurable 4 | 5 | newparam(:name, :namevar => true) do 6 | desc 'Section/setting name to manage from /etc/trove/api-paste.ini' 7 | newvalues(/\S+\/\S+/) 8 | end 9 | 10 | newproperty(:value) do 11 | desc 'The value of the setting to be defined.' 12 | munge do |value| 13 | value = value.to_s.strip 14 | value.capitalize! if value =~ /^(true|false)$/i 15 | value 16 | end 17 | 18 | def is_to_s( currentvalue ) 19 | if resource.secret? 20 | return '[old secret redacted]' 21 | else 22 | return currentvalue 23 | end 24 | end 25 | 26 | def should_to_s( newvalue ) 27 | if resource.secret? 28 | return '[new secret redacted]' 29 | else 30 | return newvalue 31 | end 32 | end 33 | end 34 | 35 | newparam(:secret, :boolean => true) do 36 | desc 'Whether to hide the value from Puppet logs. Defaults to `false`.' 37 | 38 | newvalues(:true, :false) 39 | 40 | defaultto false 41 | end 42 | 43 | newparam(:ensure_absent_val) do 44 | desc 'A value that is specified as the value property will behave as if ensure => absent was specified' 45 | defaultto('') 46 | end 47 | 48 | newparam(:key_val_separator) do 49 | desc 'The separator string to use between each setting name and value.' 50 | defaultto('=') 51 | end 52 | 53 | autorequire(:anchor) do 54 | ['trove::install::end'] 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /lib/puppet/type/trove_config.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:trove_config) do 2 | 3 | ensurable 4 | 5 | newparam(:name, :namevar => true) do 6 | desc 'Section/setting name to manage from /etc/trove/trove.conf' 7 | newvalues(/\S+\/\S+/) 8 | end 9 | 10 | newproperty(:value, :array_matching => :all) do 11 | desc 'The value of the setting to be defined.' 12 | def insync?(is) 13 | return true if @should.empty? 14 | return false unless is.is_a? Array 15 | return false unless is.length == @should.length 16 | return ( 17 | is & @should == is or 18 | is & @should.map(&:to_s) == is 19 | ) 20 | end 21 | munge do |value| 22 | value = value.to_s.strip 23 | value.capitalize! if value =~ /^(true|false)$/i 24 | value 25 | end 26 | 27 | def is_to_s( currentvalue ) 28 | if resource.secret? 29 | return '[old secret redacted]' 30 | else 31 | return currentvalue 32 | end 33 | end 34 | 35 | def should_to_s( newvalue ) 36 | if resource.secret? 37 | return '[new secret redacted]' 38 | else 39 | return newvalue 40 | end 41 | end 42 | end 43 | 44 | newparam(:secret, :boolean => true) do 45 | desc 'Whether to hide the value from Puppet logs. Defaults to `false`.' 46 | 47 | newvalues(:true, :false) 48 | 49 | defaultto false 50 | end 51 | 52 | newparam(:ensure_absent_val) do 53 | desc 'A value that is specified as the value property will behave as if ensure => absent was specified' 54 | defaultto('') 55 | end 56 | 57 | autorequire(:anchor) do 58 | ['trove::install::end'] 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /lib/puppet/type/trove_datastore.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:trove_datastore) do 2 | 3 | @doc = "Manage creation of Trove datastores" 4 | 5 | ensurable 6 | 7 | newparam(:name, :namevar => true) do 8 | desc "Datastore version name)" 9 | newvalues(/^.*$/) 10 | end 11 | 12 | newparam(:version) do 13 | desc "Datastore version name" 14 | end 15 | 16 | newproperty(:id) do 17 | validate do |v| 18 | raise(Puppet::Error, 'This is a read only property') 19 | end 20 | end 21 | 22 | autorequire(:anchor) do 23 | ['trove::service::end'] 24 | end 25 | end 26 | 27 | -------------------------------------------------------------------------------- /lib/puppet/type/trove_datastore_version.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:trove_datastore_version) do 2 | 3 | @doc = "Manage creation of Trove datastore versions" 4 | 5 | ensurable 6 | 7 | newparam(:name, :namevar => true) do 8 | desc "Datastore version" 9 | end 10 | 11 | newparam(:datastore) do 12 | desc "Datastore name" 13 | end 14 | 15 | newparam(:manager) do 16 | desc "Manager name" 17 | end 18 | 19 | newparam(:image_id) do 20 | desc "Glance image id" 21 | end 22 | 23 | newparam(:packages) do 24 | desc "Packages to install" 25 | end 26 | 27 | newparam(:active) do 28 | desc "State" 29 | newvalues('0', '1') 30 | defaultto('1') 31 | end 32 | 33 | validate do 34 | raise(Puppet::Error, 'Datastore must be set') unless self[:datastore] 35 | raise(Puppet::Error, 'Manager must be set') unless self[:manager] 36 | raise(Puppet::Error, 'Image must be set') unless self[:image_id] 37 | raise(Puppet::Error, 'Packages must be set') unless self[:packages] 38 | end 39 | 40 | autorequire(:anchor) do 41 | ['trove::service::end'] 42 | end 43 | 44 | autorequire(:trove_datastore) do 45 | [self[:datastore]] 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /lib/puppet/type/trove_guestagent_config.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:trove_guestagent_config) do 2 | 3 | ensurable 4 | 5 | newparam(:name, :namevar => true) do 6 | desc 'Section/setting name to manage from /etc/trove/trove-guestagent.conf' 7 | newvalues(/\S+\/\S+/) 8 | end 9 | 10 | newproperty(:value, :array_matching => :all) do 11 | desc 'The value of the setting to be defined.' 12 | def insync?(is) 13 | return true if @should.empty? 14 | return false unless is.is_a? Array 15 | return false unless is.length == @should.length 16 | return ( 17 | is & @should == is or 18 | is & @should.map(&:to_s) == is 19 | ) 20 | end 21 | munge do |value| 22 | value = value.to_s.strip 23 | value.capitalize! if value =~ /^(true|false)$/i 24 | value 25 | end 26 | 27 | def is_to_s( currentvalue ) 28 | if resource.secret? 29 | return '[old secret redacted]' 30 | else 31 | return currentvalue 32 | end 33 | end 34 | 35 | def should_to_s( newvalue ) 36 | if resource.secret? 37 | return '[new secret redacted]' 38 | else 39 | return newvalue 40 | end 41 | end 42 | end 43 | 44 | newparam(:secret, :boolean => true) do 45 | desc 'Whether to hide the value from Puppet logs. Defaults to `false`.' 46 | 47 | newvalues(:true, :false) 48 | 49 | defaultto false 50 | end 51 | 52 | newparam(:ensure_absent_val) do 53 | desc 'A value that is specified as the value property will behave as if ensure => absent was specified' 54 | defaultto('') 55 | end 56 | 57 | autorequire(:anchor) do 58 | ['trove::install::end'] 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /manifests/cache/instance_ports.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::cache::instance_ports 2 | # 3 | # Configure instance_ports_cache options 4 | # 5 | # === Parameters 6 | # 7 | # [*expiration_time*] 8 | # (Optional) TTL, in seconds, for any cached item in the dogpile.cache region 9 | # used for caching of the instance ports. 10 | # Defaults to $facts['os_service_default'] 11 | # 12 | # [*caching*] 13 | # (Optional) Toggle to enable/disable caching when getting trove instance 14 | # ports. 15 | # Defaults to $facts['os_service_default'] 16 | # 17 | class trove::cache::instance_ports ( 18 | $expiration_time = $facts['os_service_default'], 19 | $caching = $facts['os_service_default'], 20 | ) { 21 | 22 | include trove::deps 23 | 24 | trove_config { 25 | 'instance_ports_cache/expiration_time': value => $expiration_time; 26 | 'instance_ports_cache/caching': value => $caching; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /manifests/client.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # trove::client 19 | # 20 | # Manages the trove client package on systems 21 | # 22 | # === Parameters: 23 | # 24 | # [*client_package_name*] 25 | # (optional) The name of python trove client package 26 | # Defaults to $trove::params::client_package_name 27 | # 28 | # [*package_ensure*] 29 | # (optional) The state of the package 30 | # Defaults to present 31 | # 32 | # 33 | class trove::client ( 34 | $client_package_name = $trove::params::client_package_name, 35 | $package_ensure = present, 36 | ) inherits trove::params { 37 | 38 | include trove::deps 39 | 40 | # NOTE(tkajinam): trove-package tag is used because troveclient is required 41 | # by trove 42 | package { 'python-troveclient': 43 | ensure => $package_ensure, 44 | name => $client_package_name, 45 | tag => ['openstack', 'openstackclient', 'trove-package'], 46 | } 47 | 48 | include openstacklib::openstackclient 49 | 50 | } 51 | -------------------------------------------------------------------------------- /manifests/conductor.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::conductor 2 | # 3 | # Manages trove conductor package and service 4 | # 5 | # === Parameters: 6 | # 7 | # [*enabled*] 8 | # (optional) Whether to enable the trove-conductor service 9 | # Defaults to true 10 | # 11 | # [*manage_service*] 12 | # (optional) Whether to start/stop the service 13 | # Defaults to true 14 | # 15 | # [*package_ensure*] 16 | # (optional) The state of the trove conductor package 17 | # Defaults to 'present' 18 | # 19 | # [*conductor_manager*] 20 | # (optional) Trove conductor manager. 21 | # Defaults to 'trove.conductor.manager.Manager'. 22 | # 23 | # [*workers*] 24 | # (optional) Number of trove conductor worker processes to start 25 | # Default: $facts['os_workers'] 26 | # 27 | # [*enable_profiler*] 28 | # (optional) If False fully disable profiling feature. 29 | # Default: $facts['os_service_default'] 30 | # 31 | # [*trace_sqlalchemy*] 32 | # (optional) If False doesn't trace SQL requests. 33 | # Default: $facts['os_service_default'] 34 | # 35 | class trove::conductor( 36 | Boolean $enabled = true, 37 | Boolean $manage_service = true, 38 | $package_ensure = 'present', 39 | $conductor_manager = 'trove.conductor.manager.Manager', 40 | $workers = $facts['os_workers'], 41 | $enable_profiler = $facts['os_service_default'], 42 | $trace_sqlalchemy = $facts['os_service_default'], 43 | ) { 44 | 45 | include trove::deps 46 | include trove::params 47 | 48 | # basic service config 49 | trove_config { 50 | 'DEFAULT/trove_conductor_workers': value => $workers; 51 | } 52 | 53 | # profiler config 54 | trove_config { 55 | 'profiler/enabled': value => $enable_profiler; 56 | 'profiler/trace_sqlalchemy': value => $trace_sqlalchemy; 57 | } 58 | 59 | trove::generic_service { 'conductor': 60 | enabled => $enabled, 61 | manage_service => $manage_service, 62 | package_name => $::trove::params::conductor_package_name, 63 | service_name => $::trove::params::conductor_service_name, 64 | package_ensure => $package_ensure, 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /manifests/config.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2015 UnitedStack 3 | # 4 | # Author: Xingchao Yu 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # == Class: trove::config 19 | # 20 | # This class is used to manage arbitrary trove configurations. 21 | # 22 | # === Parameters 23 | # 24 | # [*trove_config*] 25 | # (optional) Allow configuration of arbitrary trove configurations. 26 | # The value is an hash of trove_config resources. 27 | # Defaults to {} 28 | # 29 | # [*trove_guestagent_config*] 30 | # (optional) Allow configuration of arbitrary trove guestagent configurations. 31 | # The value is an hash of trove_guestagent_config resources. 32 | # Defaults to {} 33 | # 34 | # [*trove_api_paste_ini*] 35 | # (optional) Allow configuration of arbitrary trove paste api configurations. 36 | # The value is an hash of trove_paste_api_ini resources. 37 | # Defaults to {} 38 | # 39 | # Example: 40 | # { 'DEFAULT/foo' => { value => 'fooValue'}, 41 | # 'DEFAULT/bar' => { value => 'barValue'} 42 | # } 43 | # 44 | # In yaml format, Example: 45 | # trove_config: 46 | # DEFAULT/foo: 47 | # value: fooValue 48 | # DEFAULT/bar: 49 | # value: barValue 50 | # 51 | # NOTE: The configuration MUST NOT be already handled by this module 52 | # or Puppet catalog compilation will fail with duplicate resources. 53 | # 54 | class trove::config ( 55 | Hash $trove_config = {}, 56 | Hash $trove_guestagent_config = {}, 57 | Hash $trove_api_paste_ini = {}, 58 | ) { 59 | 60 | include trove::deps 61 | 62 | create_resources('trove_config', $trove_config) 63 | create_resources('trove_guestagent_config', $trove_guestagent_config) 64 | create_resources('trove_api_paste_ini', $trove_api_paste_ini) 65 | } 66 | -------------------------------------------------------------------------------- /manifests/db.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::db 2 | # 3 | # Configure the Trove database 4 | # 5 | # === Parameters 6 | # 7 | # [*database_connection*] 8 | # Url used to connect to database. 9 | # (Optional) Defaults to 'sqlite:////var/lib/trove/trove.sqlite'. 10 | # 11 | # [*database_connection_recycle_time*] 12 | # Timeout when db connections should be reaped. 13 | # (Optional) Defaults to 3600. 14 | # 15 | # [*database_max_retries*] 16 | # Maximum number of database connection retries during startup. 17 | # Setting -1 implies an infinite retry count. 18 | # (Optional) Defaults to 10. 19 | # 20 | # [*database_retry_interval*] 21 | # Interval between retries of opening a database connection. 22 | # (Optional) Defaults to 10. 23 | # 24 | # [*database_max_pool_size*] 25 | # Maximum number of SQL connections to keep open in a pool. 26 | # (Optional) Defaults to 10. 27 | # 28 | # [*database_max_overflow*] 29 | # If set, use this value for max_overflow with sqlalchemy. 30 | # (Optional) Defaults to 20. 31 | # 32 | # [*database_pool_timeout*] 33 | # (Optional) If set, use this value for pool_timeout with SQLAlchemy. 34 | # Defaults to $facts['os_service_default'] 35 | # 36 | # [*mysql_enable_ndb*] 37 | # (Optional) If True, transparently enables support for handling MySQL 38 | # Cluster (NDB). 39 | # Defaults to $facts['os_service_default'] 40 | # 41 | class trove::db ( 42 | $database_connection = 'sqlite:////var/lib/trove/trove.sqlite', 43 | $database_connection_recycle_time = $facts['os_service_default'], 44 | $database_max_pool_size = $facts['os_service_default'], 45 | $database_max_retries = $facts['os_service_default'], 46 | $database_retry_interval = $facts['os_service_default'], 47 | $database_max_overflow = $facts['os_service_default'], 48 | $database_pool_timeout = $facts['os_service_default'], 49 | $mysql_enable_ndb = $facts['os_service_default'], 50 | ) { 51 | 52 | include trove::deps 53 | 54 | oslo::db { 'trove_config': 55 | connection => $database_connection, 56 | connection_recycle_time => $database_connection_recycle_time, 57 | max_pool_size => $database_max_pool_size, 58 | max_retries => $database_max_retries, 59 | retry_interval => $database_retry_interval, 60 | max_overflow => $database_max_overflow, 61 | pool_timeout => $database_pool_timeout, 62 | mysql_enable_ndb => $mysql_enable_ndb, 63 | } 64 | 65 | # all db settings should be applied and all packages should be installed 66 | # before dbsync starts 67 | Oslo::Db['trove_config'] -> Anchor['trove::dbsync::begin'] 68 | } 69 | -------------------------------------------------------------------------------- /manifests/db/mysql.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # == Class: trove::db::mysql 19 | # 20 | # The trove::db::mysql class creates a MySQL database for trove. 21 | # It must be used on the MySQL server 22 | # 23 | # === Parameters 24 | # 25 | # [*password*] 26 | # (required) Password that will be used for the trove db user. 27 | # 28 | # [*dbname*] 29 | # (optional) Name of trove database. 30 | # Defaults to trove 31 | # 32 | # [*user*] 33 | # (optional) Name of trove user. 34 | # Defaults to trove 35 | # 36 | # [*host*] 37 | # (optional) Host where user should be allowed all privileges for database. 38 | # Defaults to 127.0.0.1 39 | # 40 | # [*allowed_hosts*] 41 | # (optional) Hosts allowed to use the database 42 | # Defaults to undef. 43 | # 44 | # [*charset*] 45 | # (optional) Charset of trove database 46 | # Defaults 'utf8'. 47 | # 48 | # [*collate*] 49 | # (optional) Charset collate of trove database 50 | # Defaults 'utf8_general_ci'. 51 | # 52 | class trove::db::mysql( 53 | String[1] $password, 54 | $dbname = 'trove', 55 | $user = 'trove', 56 | $host = '127.0.0.1', 57 | $allowed_hosts = undef, 58 | $charset = 'utf8', 59 | $collate = 'utf8_general_ci', 60 | ) { 61 | 62 | include trove::deps 63 | 64 | openstacklib::db::mysql { 'trove': 65 | user => $user, 66 | password => $password, 67 | dbname => $dbname, 68 | host => $host, 69 | charset => $charset, 70 | collate => $collate, 71 | allowed_hosts => $allowed_hosts, 72 | } 73 | 74 | Anchor['trove::db::begin'] 75 | ~> Class['trove::db::mysql'] 76 | ~> Anchor['trove::db::end'] 77 | } 78 | -------------------------------------------------------------------------------- /manifests/db/postgresql.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::db::postgresql 2 | # 3 | # Class that configures postgresql for trove 4 | # Requires the Puppetlabs postgresql module. 5 | # 6 | # === Parameters 7 | # 8 | # [*password*] 9 | # (Required) Password to connect to the database. 10 | # 11 | # [*dbname*] 12 | # (Optional) Name of the database. 13 | # Defaults to 'trove'. 14 | # 15 | # [*user*] 16 | # (Optional) User to connect to the database. 17 | # Defaults to 'trove'. 18 | # 19 | # [*encoding*] 20 | # (Optional) The charset to use for the database. 21 | # Default to undef. 22 | # 23 | # [*privileges*] 24 | # (Optional) Privileges given to the database user. 25 | # Default to 'ALL' 26 | # 27 | class trove::db::postgresql( 28 | String[1] $password, 29 | $dbname = 'trove', 30 | $user = 'trove', 31 | $encoding = undef, 32 | $privileges = 'ALL', 33 | ) { 34 | 35 | include trove::deps 36 | 37 | openstacklib::db::postgresql { 'trove': 38 | password => $password, 39 | dbname => $dbname, 40 | user => $user, 41 | encoding => $encoding, 42 | privileges => $privileges, 43 | } 44 | 45 | Anchor['trove::db::begin'] 46 | ~> Class['trove::db::postgresql'] 47 | ~> Anchor['trove::db::end'] 48 | } 49 | -------------------------------------------------------------------------------- /manifests/db/sync.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # Class to execute "trove-manage db_sync 19 | # 20 | # [*db_sync_timeout*] 21 | # (Optional) Timeout for the execution of the db_sync 22 | # Defaults to 300 23 | # 24 | class trove::db::sync( 25 | $db_sync_timeout = 300, 26 | ) { 27 | 28 | include trove::deps 29 | include trove::params 30 | 31 | exec { 'trove-manage db_sync': 32 | path => '/usr/bin', 33 | user => $::trove::params::user, 34 | refreshonly => true, 35 | try_sleep => 5, 36 | tries => 10, 37 | timeout => $db_sync_timeout, 38 | logoutput => on_failure, 39 | subscribe => [ 40 | Anchor['trove::install::end'], 41 | Anchor['trove::config::end'], 42 | Anchor['trove::dbsync::begin'] 43 | ], 44 | notify => Anchor['trove::dbsync::end'], 45 | tag => 'openstack-db', 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /manifests/deps.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::deps 2 | # 3 | # trove anchors and dependency management 4 | # 5 | class trove::deps { 6 | # Setup anchors for install, config and service phases of the module. These 7 | # anchors allow external modules to hook the begin and end of any of these 8 | # phases. Package or service management can also be replaced by ensuring the 9 | # package is absent or turning off service management and having the 10 | # replacement depend on the appropriate anchors. When applicable, end tags 11 | # should be notified so that subscribers can determine if installation, 12 | # config or service state changed and act on that if needed. 13 | anchor { 'trove::install::begin': } 14 | -> Package<| tag == 'trove-package'|> 15 | ~> anchor { 'trove::install::end': } 16 | -> anchor { 'trove::config::begin': } 17 | -> Trove_config<||> 18 | ~> anchor { 'trove::config::end': } 19 | -> anchor { 'trove::db::begin': } 20 | -> anchor { 'trove::db::end': } 21 | ~> anchor { 'trove::dbsync::begin': } 22 | -> anchor { 'trove::dbsync::end': } 23 | ~> anchor { 'trove::service::begin': } 24 | ~> Service<| tag == 'trove-service' |> 25 | ~> anchor { 'trove::service::end': } 26 | 27 | Anchor['trove::config::begin'] 28 | -> Trove_guestagent_config<||> 29 | -> Anchor['trove::config::end'] 30 | 31 | Anchor['trove::config::begin'] 32 | -> Trove_api_paste_ini<||> 33 | -> Anchor['trove::config::end'] 34 | 35 | # We need openstackclient installed before marking service end so that trove 36 | # will have clients available to create resources. This tag handles the 37 | # openstackclient but indirectly since the client is not available in 38 | # all catalogs that don't need the client class (like many spec tests). 39 | # Once the openstackclient is installed we will setup the datastores and 40 | # datastore_versions. Datastore_versions must come after datastores. 41 | Package<| tag == 'openstackclient'|> 42 | -> Anchor['trove::service::end'] 43 | 44 | # Installation or config changes will always restart services. 45 | Anchor['trove::install::end'] ~> Anchor['trove::service::begin'] 46 | Anchor['trove::config::end'] ~> Anchor['trove::service::begin'] 47 | } 48 | -------------------------------------------------------------------------------- /manifests/generic_service.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # == Define: trove::generic_service 19 | # 20 | # This defined type implements basic trove services. 21 | # It is introduced to attempt to consolidate 22 | # common code. 23 | # 24 | # It also allows users to specify ad-hoc services 25 | # as needed 26 | # 27 | # This define creates a service resource with title trove-${name} and 28 | # conditionally creates a package resource with title trove-${name} 29 | # 30 | # === Parameters: 31 | # 32 | # [*package_name*] 33 | # (mandatory) The package name (for the generic_service) 34 | # 35 | # [*service_name*] 36 | # (mandatory) The service name (for the generic_service) 37 | # 38 | # [*enabled*] 39 | # (optional) Define if the service must be enabled or not 40 | # Defaults to false. 41 | # 42 | # [*manage_service*] 43 | # (optional) Manage or not the service (if a service_name is provided). 44 | # Defaults to true. 45 | # 46 | # [*package_ensure*] 47 | # (optional) Control the ensure parameter for the package ressource. 48 | # Defaults to 'present'. 49 | # 50 | define trove::generic_service( 51 | $package_name, 52 | $service_name, 53 | Boolean $enabled = false, 54 | Boolean $manage_service = true, 55 | $package_ensure = 'present', 56 | ) { 57 | 58 | include trove::deps 59 | include trove::params 60 | 61 | $trove_title = "trove-${name}" 62 | 63 | if ($package_name) { 64 | if !defined(Package[$package_name]) { 65 | package { $trove_title: 66 | ensure => $package_ensure, 67 | name => $package_name, 68 | tag => ['openstack', 'trove-package'], 69 | } 70 | } 71 | } 72 | 73 | if $service_name { 74 | if $manage_service { 75 | if $enabled { 76 | $service_ensure = 'running' 77 | } else { 78 | $service_ensure = 'stopped' 79 | } 80 | 81 | service { $trove_title: 82 | ensure => $service_ensure, 83 | name => $service_name, 84 | enable => $enabled, 85 | hasstatus => true, 86 | tag => 'trove-service', 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /manifests/guestagent/mariadb.pp: -------------------------------------------------------------------------------- 1 | # == Class trove::guestagent::mariadb 2 | # 3 | # Configure the mariadb options 4 | # 5 | # == Parameters 6 | # 7 | # [*docker_image*] 8 | # (optional) Database docker image. 9 | # Defaults to $facts['os_service_default'] 10 | # 11 | # [*backup_docker_image*] 12 | # (optional) The docker image used for backup and restore. 13 | # Defaults to $facts['os_service_default'] 14 | # 15 | # [*icmp*] 16 | # (optional) Whether to permit ICMP. 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*root_on_create*] 20 | # (optional) Enable the automatic creation of the root user for the service 21 | # during instance-create. 22 | # Defaults to $facts['os_service_default'] 23 | # 24 | # [*usage_timeout*] 25 | # (optional) Maximum time (in seconds) to wait for a Guest to become active. 26 | # Defaults to $facts['os_service_default'] 27 | # 28 | # [*volume_support*] 29 | # (optional) Whether to provision a Cinder volume for datadir 30 | # Defaults to $facts['os_service_default'] 31 | # 32 | # [*ignore_users*] 33 | # (optional) Users to exclude when listing users. 34 | # Defaults to $facts['os_service_default'] 35 | # 36 | # [*ignore_dbs*] 37 | # (optional) Databases to exclude when listing databases. 38 | # Defaults to $facts['os_service_default'] 39 | # 40 | # [*guest_log_exposed_logs*] 41 | # (optional) List of Guest Logs to expose for publishing. 42 | # Defaults to $facts['os_service_default'] 43 | # 44 | # [*guest_log_long_query_time*] 45 | # (optional) The time in milliseconds that a statement must take in in order 46 | # to be logged in the slow_query log. 47 | # Defaults to $facts['os_service_default'] 48 | # 49 | # [*cluster_support*] 50 | # (optional) Enable clusters to be created and managed. 51 | # Defaults to $facts['os_service_default'] 52 | # 53 | # [*min_cluster_member_count*] 54 | # (optional) Minimum number of members in MariaDB cluster. 55 | # Defaults to $facts['os_service_default'] 56 | # 57 | # [*default_password_length*] 58 | # (optional) Character length of generated passwords. 59 | # Defaults to $facts['os_service_default'] 60 | # 61 | class trove::guestagent::mariadb ( 62 | $docker_image = $facts['os_service_default'], 63 | $backup_docker_image = $facts['os_service_default'], 64 | $icmp = $facts['os_service_default'], 65 | $root_on_create = $facts['os_service_default'], 66 | $usage_timeout = $facts['os_service_default'], 67 | $volume_support = $facts['os_service_default'], 68 | $ignore_users = $facts['os_service_default'], 69 | $ignore_dbs = $facts['os_service_default'], 70 | $guest_log_exposed_logs = $facts['os_service_default'], 71 | $guest_log_long_query_time = $facts['os_service_default'], 72 | $cluster_support = $facts['os_service_default'], 73 | $min_cluster_member_count = $facts['os_service_default'], 74 | $default_password_length = $facts['os_service_default'], 75 | ) { 76 | 77 | include trove::deps 78 | 79 | trove_guestagent_config { 80 | 'mariadb/docker_image': value => $docker_image; 81 | 'mariadb/backup_docker_image': value => $backup_docker_image; 82 | 'mariadb/icmp': value => $icmp; 83 | 'mariadb/root_on_create': value => $root_on_create; 84 | 'mariadb/usage_timeout': value => $usage_timeout; 85 | 'mariadb/volume_support': value => $volume_support; 86 | 'mariadb/ignore_users': value => join(any2array($ignore_users), ','); 87 | 'mariadb/ignore_dbs': value => join(any2array($ignore_dbs), ','); 88 | 'mariadb/guest_log_exposed_logs': value => join(any2array($guest_log_exposed_logs), ','); 89 | 'mariadb/guest_log_long_query_time': value => $guest_log_long_query_time; 90 | 'mariadb/cluster_support': value => $cluster_support; 91 | 'mariadb/min_cluster_member_count': value => $min_cluster_member_count; 92 | 'mariadb/default_password_length': value => $default_password_length; 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /manifests/guestagent/mysql.pp: -------------------------------------------------------------------------------- 1 | # == Class trove::guestagent::mysql 2 | # 3 | # Configure the mysql options 4 | # 5 | # == Parameters 6 | # 7 | # [*docker_image*] 8 | # (optional) Database docker image. 9 | # Defaults to $facts['os_service_default'] 10 | # 11 | # [*backup_docker_image*] 12 | # (optional) The docker image used for backup and restore. 13 | # Defaults to $facts['os_service_default'] 14 | # 15 | # [*icmp*] 16 | # (optional) Whether to permit ICMP. 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*root_on_create*] 20 | # (optional) Enable the automatic creation of the root user for the service 21 | # during instance-create. 22 | # Defaults to $facts['os_service_default'] 23 | # 24 | # [*usage_timeout*] 25 | # (optional) Maximum time (in seconds) to wait for a Guest to become active. 26 | # Defaults to $facts['os_service_default'] 27 | # 28 | # [*volume_support*] 29 | # (optional) Whether to provision a Cinder volume for datadir 30 | # Defaults to $facts['os_service_default'] 31 | # 32 | # [*ignore_users*] 33 | # (optional) Users to exclude when listing users. 34 | # Defaults to $facts['os_service_default'] 35 | # 36 | # [*ignore_dbs*] 37 | # (optional) Databases to exclude when listing databases. 38 | # Defaults to $facts['os_service_default'] 39 | # 40 | # [*guest_log_exposed_logs*] 41 | # (optional) List of Guest Logs to expose for publishing. 42 | # Defaults to $facts['os_service_default'] 43 | # 44 | # [*guest_log_long_query_time*] 45 | # (optional) The time in milliseconds that a statement must take in in order 46 | # to be logged in the slow_query log. 47 | # Defaults to $facts['os_service_default'] 48 | # 49 | # [*default_password_length*] 50 | # (optional) Character length of generated passwords. 51 | # Defaults to $facts['os_service_default'] 52 | # 53 | class trove::guestagent::mysql ( 54 | $docker_image = $facts['os_service_default'], 55 | $backup_docker_image = $facts['os_service_default'], 56 | $icmp = $facts['os_service_default'], 57 | $root_on_create = $facts['os_service_default'], 58 | $usage_timeout = $facts['os_service_default'], 59 | $volume_support = $facts['os_service_default'], 60 | $ignore_users = $facts['os_service_default'], 61 | $ignore_dbs = $facts['os_service_default'], 62 | $guest_log_exposed_logs = $facts['os_service_default'], 63 | $guest_log_long_query_time = $facts['os_service_default'], 64 | $default_password_length = $facts['os_service_default'], 65 | ) { 66 | 67 | include trove::deps 68 | 69 | trove_guestagent_config { 70 | 'mysql/docker_image': value => $docker_image; 71 | 'mysql/backup_docker_image': value => $backup_docker_image; 72 | 'mysql/icmp': value => $icmp; 73 | 'mysql/root_on_create': value => $root_on_create; 74 | 'mysql/usage_timeout': value => $usage_timeout; 75 | 'mysql/volume_support': value => $volume_support; 76 | 'mysql/ignore_users': value => join(any2array($ignore_users), ','); 77 | 'mysql/ignore_dbs': value => join(any2array($ignore_dbs), ','); 78 | 'mysql/guest_log_exposed_logs': value => join(any2array($guest_log_exposed_logs), ','); 79 | 'mysql/guest_log_long_query_time': value => $guest_log_long_query_time; 80 | 'mysql/default_password_length': value => $default_password_length; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /manifests/guestagent/service_credentials.pp: -------------------------------------------------------------------------------- 1 | # The trove::guestagent::service_credentials class helps configure auth settings 2 | # 3 | # == Parameters 4 | # 5 | # [*password*] 6 | # (required) the keystone password for trove services 7 | # 8 | # [*auth_url*] 9 | # (optional) the keystone public endpoint 10 | # Defaults to 'http://127.0.0.1:5000' 11 | # 12 | # [*region_name*] 13 | # (optional) the keystone region of this node 14 | # Defaults to 'RegionOne' 15 | # 16 | # [*username*] 17 | # (optional) the keystone user for trove services 18 | # Defaults to 'trove' 19 | # 20 | # [*project_name*] 21 | # (optional) the keystone tenant name for trove services 22 | # Defaults to 'services' 23 | # 24 | # [*project_domain_name*] 25 | # (optional) the keystone project domain name for trove services 26 | # Defaults to 'Default' 27 | # 28 | # [*user_domain_name*] 29 | # (optional) the keystone user domain name for trove services 30 | # Defaults to 'Default' 31 | # 32 | # [*system_scope*] 33 | # (optional) Scope for system operations. 34 | # Defaults to $facts['os_service_default'] 35 | # 36 | class trove::guestagent::service_credentials ( 37 | $password, 38 | $auth_url = 'http://127.0.0.1:5000', 39 | $region_name = 'RegionOne', 40 | $username = 'trove', 41 | $project_name = 'services', 42 | $project_domain_name = 'Default', 43 | $user_domain_name = 'Default', 44 | $system_scope = $facts['os_service_default'], 45 | ) { 46 | 47 | include trove::deps 48 | 49 | if is_service_default($system_scope) { 50 | $project_name_real = $project_name 51 | $project_domain_name_real = $project_domain_name 52 | } else { 53 | $project_name_real = $facts['os_service_default'] 54 | $project_domain_name_real = $facts['os_service_default'] 55 | } 56 | 57 | trove_guestagent_config { 58 | 'service_credentials/auth_url': value => $auth_url; 59 | 'service_credentials/username': value => $username; 60 | 'service_credentials/password': value => $password, secret => true; 61 | 'service_credentials/project_name': value => $project_name_real; 62 | 'service_credentials/project_domain_name': value => $project_domain_name_real; 63 | 'service_credentials/user_domain_name': value => $user_domain_name; 64 | 'service_credentials/system_scope': value => $system_scope; 65 | 'service_credentials/region_name': value => $region_name; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /manifests/healthcheck.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::healthcheck 2 | # 3 | # Configure oslo_middleware options in healthcheck section 4 | # 5 | # == Params 6 | # 7 | # [*detailed*] 8 | # (Optional) Show more detailed information as part of the response. 9 | # Defaults to $facts['os_service_default'] 10 | # 11 | # [*backends*] 12 | # (Optional) Additional backends that can perform health checks and report 13 | # that information back as part of a request. 14 | # Defaults to $facts['os_service_default'] 15 | # 16 | # [*allowed_source_ranges*] 17 | # (Optional) A list of network addresses to limit source ip allowed to access 18 | # healthcheck information. 19 | # Defaults to $facts['os_service_default'] 20 | # 21 | # [*ignore_proxied_requests*] 22 | # (Optional) Ignore requests with proxy headers 23 | # Defaults to $facts['os_service_default'] 24 | # 25 | # [*disable_by_file_path*] 26 | # (Optional) Check the presence of a file to determine if an application 27 | # is running on a port. 28 | # Defaults to $facts['os_service_default'] 29 | # 30 | # [*disable_by_file_paths*] 31 | # (Optional) Check the presence of a file to determine if an application 32 | # is running on a port. Expects a "port:path" list of strings. 33 | # Defaults to $facts['os_service_default'] 34 | # 35 | # [*enable_by_file_paths*] 36 | # (Optional) Check the presence of files. Used by EnableByFilesHealthcheck 37 | # plugin. 38 | # Defaults to $facts['os_service_default'] 39 | # 40 | class trove::healthcheck ( 41 | $detailed = $facts['os_service_default'], 42 | $backends = $facts['os_service_default'], 43 | $allowed_source_ranges = $facts['os_service_default'], 44 | $ignore_proxied_requests = $facts['os_service_default'], 45 | $disable_by_file_path = $facts['os_service_default'], 46 | $disable_by_file_paths = $facts['os_service_default'], 47 | $enable_by_file_paths = $facts['os_service_default'], 48 | ) { 49 | 50 | include trove::deps 51 | 52 | oslo::healthcheck { 'trove_config': 53 | detailed => $detailed, 54 | backends => $backends, 55 | allowed_source_ranges => $allowed_source_ranges, 56 | ignore_proxied_requests => $ignore_proxied_requests, 57 | disable_by_file_path => $disable_by_file_path, 58 | disable_by_file_paths => $disable_by_file_paths, 59 | enable_by_file_paths => $enable_by_file_paths, 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /manifests/keystone/auth.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # trove::keystone::auth 19 | # 20 | # Configures Trove user, service and endpoint in Keystone. 21 | # 22 | # === Parameters 23 | # 24 | # [*password*] 25 | # (Required) Password for Trove user. 26 | # 27 | # [*auth_name*] 28 | # (Optional) Username for Trove service. 29 | # Defaults to 'trove'. 30 | # 31 | # [*email*] 32 | # (Optional) Email for Trove user. 33 | # Defaults to 'trove@localhost'. 34 | # 35 | # [*tenant*] 36 | # (Optional) Tenant for Trove user. 37 | # Defaults to 'services'. 38 | # 39 | # [*roles*] 40 | # (Optional) List of roles assigned to trove user. 41 | # Defaults to ['admin'] 42 | # 43 | # [*system_scope*] 44 | # (Optional) Scope for system operations. 45 | # Defaults to 'all' 46 | # 47 | # [*system_roles*] 48 | # (Optional) List of system roles assigned to trove user. 49 | # Defaults to [] 50 | # 51 | # [*configure_endpoint*] 52 | # (Optional) Should Trove endpoint be configured? 53 | # Defaults to true. 54 | # 55 | # [*configure_user*] 56 | # (Optional) Should Trove user be configured? 57 | # Defaults to true. 58 | # 59 | # [*configure_user_role*] 60 | # (Optional) Should Trove user_role be configured? 61 | # Defaults to true. 62 | # 63 | # [*configure_service*] 64 | # (Optional) Should the service be configurd? 65 | # Defaults to True 66 | # 67 | # [*service_type*] 68 | # (Optional) Type of service. 69 | # Defaults to 'database'. 70 | # 71 | # [*service_name*] 72 | # (Optional) Name of the service. 73 | # Defaults to 'trove'. 74 | # 75 | # [*service_description*] 76 | # (Optional) Description for keystone service. 77 | # Defaults to 'Trove Database Service'. 78 | # 79 | # [*region*] 80 | # (Optional) Region for endpoint. 81 | # Defaults to 'RegionOne'. 82 | # 83 | # [*public_url*] 84 | # (0ptional) The endpoint's public url. 85 | # This url should *not* contain any trailing '/'. 86 | # Defaults to 'http://127.0.0.1:8779/v1.0/%(tenant_id)s' 87 | # 88 | # [*admin_url*] 89 | # (Optional) The endpoint's admin url. 90 | # This url should *not* contain any trailing '/'. 91 | # Defaults to 'http://127.0.0.1:8779/v1.0/%(tenant_id)s' 92 | # 93 | # [*internal_url*] 94 | # (Optional) The endpoint's internal url. 95 | # This url should *not* contain any trailing '/'. 96 | # Defaults to 'http://127.0.0.1:8779/v1.0/%(tenant_id)s' 97 | # 98 | # === Examples 99 | # 100 | # class { 'trove::keystone::auth': 101 | # public_url => 'https://10.0.0.10:8779/v1.0/%(tenant_id)s', 102 | # internal_url => 'https://10.0.0.11:8779/v1.0/%(tenant_id)s', 103 | # admin_url => 'https://10.0.0.11:8779/v1.0/%(tenant_id)s', 104 | # } 105 | # 106 | class trove::keystone::auth ( 107 | String[1] $password, 108 | String[1] $auth_name = 'trove', 109 | String[1] $email = 'trove@localhost', 110 | String[1] $tenant = 'services', 111 | Array[String[1]] $roles = ['admin'], 112 | String[1] $system_scope = 'all', 113 | Array[String[1]] $system_roles = [], 114 | Boolean $configure_user = true, 115 | Boolean $configure_user_role = true, 116 | Boolean $configure_endpoint = true, 117 | Boolean $configure_service = true, 118 | String[1] $service_name = 'trove', 119 | String[1] $service_type = 'database', 120 | String[1] $service_description = 'Trove Database Service', 121 | String[1] $region = 'RegionOne', 122 | Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', 123 | Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', 124 | Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', 125 | ) { 126 | 127 | include trove::deps 128 | 129 | Keystone::Resource::Service_identity['trove'] -> Anchor['trove::service::end'] 130 | 131 | keystone::resource::service_identity { 'trove': 132 | configure_user => $configure_user, 133 | configure_user_role => $configure_user_role, 134 | configure_endpoint => $configure_endpoint, 135 | configure_service => $configure_service, 136 | service_name => $service_name, 137 | service_type => $service_type, 138 | service_description => $service_description, 139 | region => $region, 140 | auth_name => $auth_name, 141 | password => $password, 142 | email => $email, 143 | tenant => $tenant, 144 | roles => $roles, 145 | system_scope => $system_scope, 146 | system_roles => $system_roles, 147 | public_url => $public_url, 148 | internal_url => $internal_url, 149 | admin_url => $admin_url, 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /manifests/params.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::params 2 | # 3 | # Parameters for puppet-trove 4 | # 5 | class trove::params { 6 | include openstacklib::defaults 7 | 8 | $client_package_name = 'python3-troveclient' 9 | $user = 'trove' 10 | $group = 'trove' 11 | 12 | case $facts['os']['family'] { 13 | 'RedHat': { 14 | $common_package_name = 'openstack-trove' 15 | $conductor_package_name = 'openstack-trove-conductor' 16 | $conductor_service_name = 'openstack-trove-conductor' 17 | $api_package_name = 'openstack-trove-api' 18 | $api_service_name = 'openstack-trove-api' 19 | $guestagent_package_name = 'openstack-trove-guestagent' 20 | $guestagent_service_name = 'openstack-trove-guestagent' 21 | $taskmanager_package_name = 'openstack-trove-taskmanager' 22 | $taskmanager_service_name = 'openstack-trove-taskmanager' 23 | $trove_wsgi_script_dir = '/var/www/cgi-bin/trove' 24 | $trove_wsgi_script_source = '/usr/bin/trove-wsgi' 25 | } 26 | 'Debian': { 27 | $common_package_name = 'trove-common' 28 | $conductor_package_name = 'trove-conductor' 29 | $conductor_service_name = 'trove-conductor' 30 | $api_package_name = 'trove-api' 31 | $api_service_name = 'trove-api' 32 | $guestagent_package_name = 'trove-guestagent' 33 | $guestagent_service_name = 'trove-guestagent' 34 | $taskmanager_package_name = 'trove-taskmanager' 35 | $taskmanager_service_name = 'trove-taskmanager' 36 | $trove_wsgi_script_dir = '/usr/lib/cgi-bin/trove' 37 | $trove_wsgi_script_source = '/usr/bin/trove-wsgi' 38 | } 39 | default: { 40 | fail("Unsupported osfamily: ${facts['os']['family']}") 41 | } 42 | 43 | } # Case $facts['os']['family'] 44 | } 45 | -------------------------------------------------------------------------------- /manifests/policy.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::policy 2 | # 3 | # Configure the trove policies 4 | # 5 | # === Parameters 6 | # 7 | # [*enforce_scope*] 8 | # (Optional) Whether or not to enforce scope when evaluating policies. 9 | # Defaults to $facts['os_service_default']. 10 | # 11 | # [*enforce_new_defaults*] 12 | # (Optional) Whether or not to use old deprecated defaults when evaluating 13 | # policies. 14 | # Defaults to $facts['os_service_default']. 15 | # 16 | # [*policies*] 17 | # (Optional) Set of policies to configure for trove 18 | # Example : 19 | # { 20 | # 'trove-context_is_admin' => { 21 | # 'key' => 'context_is_admin', 22 | # 'value' => 'true' 23 | # }, 24 | # 'trove-default' => { 25 | # 'key' => 'default', 26 | # 'value' => 'rule:admin_or_owner' 27 | # } 28 | # } 29 | # Defaults to empty hash. 30 | # 31 | # [*policy_path*] 32 | # (Optional) Path to the trove policy.yaml file 33 | # Defaults to /etc/trove/policy.yaml 34 | # 35 | # [*policy_default_rule*] 36 | # (Optional) Default rule. Enforced when a requested rule is not found. 37 | # Defaults to $facts['os_service_default']. 38 | # 39 | # [*policy_dirs*] 40 | # (Optional) Path to the trove policy folder 41 | # Defaults to $facts['os_service_default'] 42 | # 43 | # [*purge_config*] 44 | # (optional) Whether to set only the specified policy rules in the policy 45 | # file. 46 | # Defaults to false. 47 | # 48 | class trove::policy ( 49 | $enforce_scope = $facts['os_service_default'], 50 | $enforce_new_defaults = $facts['os_service_default'], 51 | Hash $policies = {}, 52 | $policy_path = '/etc/trove/policy.yaml', 53 | $policy_default_rule = $facts['os_service_default'], 54 | $policy_dirs = $facts['os_service_default'], 55 | Boolean $purge_config = false, 56 | ) { 57 | 58 | include trove::deps 59 | include trove::params 60 | 61 | $policy_parameters = { 62 | policies => $policies, 63 | policy_path => $policy_path, 64 | file_user => 'root', 65 | file_group => $::trove::params::group, 66 | file_format => 'yaml', 67 | purge_config => $purge_config, 68 | tag => 'trove', 69 | } 70 | 71 | create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) 72 | 73 | # policy config should occur in the config block also as soon as 74 | # puppet-trove supports it. Leave commented out for now. 75 | Anchor['trove::config::begin'] 76 | -> Openstacklib::Policy[$policy_path] 77 | -> Anchor['trove::config::end'] 78 | 79 | oslo::policy { 'trove_config': 80 | enforce_scope => $enforce_scope, 81 | enforce_new_defaults => $enforce_new_defaults, 82 | policy_file => $policy_path, 83 | policy_default_rule => $policy_default_rule, 84 | policy_dirs => $policy_dirs, 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /manifests/quota.pp: -------------------------------------------------------------------------------- 1 | # == Class: trove::quota 2 | # 3 | # Setup and configure trove quotas. 4 | # 5 | # === Parameters 6 | # 7 | # [*max_instances_per_tenant*] 8 | # (optional) Default maximum number of instances per tenant. 9 | # Defaults to $facts['os_service_default']. 10 | # 11 | # [*max_ram_per_tenant*] 12 | # (optional) Default maximum amount of RAM (in MB) per tenant. 13 | # Defaults to $facts['os_service_default']. 14 | # 15 | # [*max_accepted_volume_size*] 16 | # (optional) Default maximum volume size (in GB) for an instance. 17 | # Defaults to $facts['os_service_default']. 18 | # 19 | # [*max_volumes_per_tenant*] 20 | # (optional) Default maximum volume capacity (in GB) spanning across 21 | # all Trove volumes per tenant. 22 | # Defaults to 20. 23 | # 24 | # [*max_backups_per_tenant*] 25 | # (optional) Default maximum number of backups created by a tenant. 26 | # Defaults to $facts['os_service_default']. 27 | # 28 | # [*quota_driver*] 29 | # (optional) Default driver to use for quota checks. 30 | # Defaults to 'trove.quota.quota.DbQuotaDriver'. 31 | # 32 | class trove::quota ( 33 | $max_instances_per_tenant = $facts['os_service_default'], 34 | $max_ram_per_tenant = $facts['os_service_default'], 35 | $max_accepted_volume_size = $facts['os_service_default'], 36 | $max_volumes_per_tenant = $facts['os_service_default'], 37 | $max_backups_per_tenant = $facts['os_service_default'], 38 | $quota_driver = $facts['os_service_default'], 39 | ) { 40 | 41 | include trove::deps 42 | 43 | trove_config { 44 | 'DEFAULT/max_instances_per_tenant': value => $max_instances_per_tenant; 45 | 'DEFAULT/max_ram_per_tenant': value => $max_ram_per_tenant; 46 | 'DEFAULT/max_accepted_volume_size': value => $max_accepted_volume_size; 47 | 'DEFAULT/max_volumes_per_tenant': value => $max_volumes_per_tenant; 48 | 'DEFAULT/max_backups_per_tenant': value => $max_backups_per_tenant; 49 | 'DEFAULT/quota_driver': value => $quota_driver; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /manifests/service_credentials.pp: -------------------------------------------------------------------------------- 1 | # The trove::service_credentials class helps configure auth settings 2 | # 3 | # == Parameters 4 | # 5 | # [*password*] 6 | # (required) the keystone password for trove services 7 | # 8 | # [*auth_url*] 9 | # (optional) the keystone public endpoint 10 | # Defaults to 'http://127.0.0.1:5000' 11 | # 12 | # [*region_name*] 13 | # (optional) the keystone region of this node 14 | # Defaults to 'RegionOne' 15 | # 16 | # [*username*] 17 | # (optional) the keystone user for trove services 18 | # Defaults to 'trove' 19 | # 20 | # [*project_name*] 21 | # (optional) the keystone tenant name for trove services 22 | # Defaults to 'services' 23 | # 24 | # [*project_domain_name*] 25 | # (optional) the keystone project domain name for trove services 26 | # Defaults to 'Default' 27 | # 28 | # [*user_domain_name*] 29 | # (optional) the keystone user domain name for trove services 30 | # Defaults to 'Default' 31 | # 32 | # [*system_scope*] 33 | # (optional) Scope for system operations. 34 | # Defaults to $facts['os_service_default'] 35 | # 36 | class trove::service_credentials ( 37 | $password, 38 | $auth_url = 'http://127.0.0.1:5000', 39 | $region_name = 'RegionOne', 40 | $username = 'trove', 41 | $project_name = 'services', 42 | $project_domain_name = 'Default', 43 | $user_domain_name = 'Default', 44 | $system_scope = $facts['os_service_default'], 45 | ) { 46 | 47 | include trove::deps 48 | 49 | if is_service_default($system_scope) { 50 | $project_name_real = $project_name 51 | $project_domain_name_real = $project_domain_name 52 | } else { 53 | $project_name_real = $facts['os_service_default'] 54 | $project_domain_name_real = $facts['os_service_default'] 55 | } 56 | 57 | trove_config { 58 | 'service_credentials/auth_url': value => $auth_url; 59 | 'service_credentials/username': value => $username; 60 | 'service_credentials/password': value => $password, secret => true; 61 | 'service_credentials/project_name': value => $project_name_real; 62 | 'service_credentials/project_domain_name': value => $project_domain_name_real; 63 | 'service_credentials/system_scope': value => $system_scope; 64 | 'service_credentials/user_domain_name': value => $user_domain_name; 65 | 'service_credentials/region_name': value => $region_name; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /manifests/taskmanager.pp: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # == Class: trove::taskmanager 19 | # 20 | # Manages trove taskmanager package and service 21 | # 22 | # === Parameters: 23 | # 24 | # [*enabled*] 25 | # (optional) Whether to enable the trove-taskmanager service 26 | # Defaults to true 27 | # 28 | # [*manage_service*] 29 | # (optional) Whether to start/stop the service 30 | # Defaults to true 31 | # 32 | # [*package_ensure*] 33 | # (optional) The state of the trove taskmanager package 34 | # Defaults to 'present' 35 | # 36 | # [*guest_log_file*] 37 | # (optional) The path of file used for logging. 38 | # If set to $facts['os_service_default'], it will not log to any file. 39 | # Defaults to '/var/log/trove/trove-guestagent.log' 40 | # 41 | # [*guestagent_config_file*] 42 | # (optional) Trove guest agent configuration file. 43 | # Defaults to '/etc/trove/trove-guestagent.conf'. 44 | # 45 | # [*taskmanager_manager*] 46 | # Trove taskmanager entry point. 47 | # Defaults to 'trove.taskmanager.manager.Manager'. 48 | # 49 | class trove::taskmanager( 50 | Boolean $enabled = true, 51 | Boolean $manage_service = true, 52 | $guest_log_file = '/var/log/trove/trove-guestagent.log', 53 | $package_ensure = 'present', 54 | $guestagent_config_file = '/etc/trove/trove-guestagent.conf', 55 | $taskmanager_manager = 'trove.taskmanager.manager.Manager', 56 | ) inherits trove { 57 | 58 | include trove::deps 59 | include trove::params 60 | 61 | # basic service config 62 | trove_config { 63 | 'DEFAULT/guest_config': value => $guestagent_config_file; 64 | 'DEFAULT/taskmanager_manager': value => $taskmanager_manager; 65 | } 66 | include trove::guestagent 67 | 68 | trove::generic_service { 'taskmanager': 69 | enabled => $enabled, 70 | manage_service => $manage_service, 71 | package_name => $::trove::params::taskmanager_package_name, 72 | service_name => $::trove::params::taskmanager_service_name, 73 | package_ensure => $package_ensure, 74 | } 75 | 76 | # TO-DO(mmagr): Disabling transformer workarounds bug #1402055. 77 | # Remove this hack as soon as bug is fixed. 78 | trove_config { 79 | 'DEFAULT/exists_notification_transformer': ensure => absent, 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "eNovance and OpenStack Contributors", 3 | "dependencies": [ 4 | { 5 | "name": "puppetlabs/inifile", 6 | "version_requirement": ">=2.0.0 <7.0.0" 7 | }, 8 | { 9 | "name": "openstack/keystone", 10 | "version_requirement": ">=26.0.0 <27.0.0" 11 | }, 12 | { 13 | "name": "puppetlabs/stdlib", 14 | "version_requirement": ">=5.0.0 <10.0.0" 15 | }, 16 | { 17 | "name": "openstack/openstacklib", 18 | "version_requirement": ">=26.0.0 <27.0.0" 19 | }, 20 | { 21 | "name": "openstack/oslo", 22 | "version_requirement": ">=26.0.0 <27.0.0" 23 | } 24 | ], 25 | "description": "Installs and configures OpenStack Trove (Database service).", 26 | "issues_url": "https://bugs.launchpad.net/puppet-trove", 27 | "license": "Apache-2.0", 28 | "name": "openstack-trove", 29 | "operatingsystem_support": [ 30 | { 31 | "operatingsystem": "Debian", 32 | "operatingsystemrelease": [ 33 | "12" 34 | ] 35 | }, 36 | { 37 | "operatingsystem": "RedHat", 38 | "operatingsystemrelease": [ 39 | "9" 40 | ] 41 | }, 42 | { 43 | "operatingsystem": "CentOS", 44 | "operatingsystemrelease": [ 45 | "9" 46 | ] 47 | }, 48 | { 49 | "operatingsystem": "Ubuntu", 50 | "operatingsystemrelease": [ 51 | "24.04" 52 | ] 53 | } 54 | ], 55 | "project_page": "https://launchpad.net/puppet-trove", 56 | "requirements": [ 57 | { 58 | "name": "puppet", 59 | "version_requirement": ">= 7.0.0 < 9.0.0" 60 | } 61 | ], 62 | "source": "https://opendev.org/openstack/puppet-trove.git", 63 | "summary": "Puppet module for OpenStack Trove", 64 | "version": "26.0.0" 65 | } 66 | -------------------------------------------------------------------------------- /releasenotes/notes/add-openstackclient-client-aa12e000df7722b3.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add openstackclient installation to the client class. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/add-pool_timeout-option-for-db-bd805b61c49faa1e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Adds the pool_timeout option for configuring oslo.db. This will 5 | configure this value for pool_timeout with SQLAlchemy. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/add-service_token_roles-option-9dca2ded7ff9094f.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add support to configure service_token_roles in authtoken middleware. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add-use_journal-option-for-logging-94d344838c254a75.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Adds the use_journal option for configuring oslo.log. This will enable 5 | passing the logs to journald. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/add_db_sync_timeout-9a64e1cb0cd4b80d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Adds db_sync_timeout parameter to db sync. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/add_endpoint_type-92489bc41571f213.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add trove::nova_compute_endpoint_type, trove::neutron_endpoint_type, 4 | trove::glance_endpoint_type, trove::cinder_endpoint_type, 5 | trove::swift_endpoint_type, trove::trove_endpoint_type options to 6 | configure endpoint type to use when searching catalog. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/add_glance_service_type-option-1b62f22b9e3d3290.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add trove::glance_service_type option to configure glance 4 | service type to use when searching catalog. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_messaging_default_parameters-9135a887ef423451.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add new parameter "rpc_response_timeout", seconds to wait for a 4 | response from a call 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_mysql_enable_ndb-option-b5f429ce4141a4e4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add mysql_enable_ndb parameter to select mysql storage engine. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/add_oslo_messaging_amqp-ee62f22b973da190.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add support for oslo_messaging_amqp backend via puppet-oslo resource 4 | -------------------------------------------------------------------------------- /releasenotes/notes/add_rabbit_kombu_options-919c4f7279179e1b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Adds the kombu_failover_strategy option for configuring oslo.messaging.rabbit. 5 | This will determines how the next RabbitMQ node is chosen in case the one we 6 | are currently connected to becomes unavailable. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/add_transport_url_parameters-eaef5deb44a5bced.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add oslo.messaging transport_url parameters via puppet-oslo resource 4 | deprecations: 5 | - For the guestagent, control_exchange moved to trove class definition 6 | as it is intrinsic to default messaging configuration. It can no longer 7 | be set via the guestagent class and will be removed in a future release. -------------------------------------------------------------------------------- /releasenotes/notes/add_watch_log_file-option-ac0a6a04447b759f.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::logging::watch_log_file`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/amqp_auto_delete-d6d8b79d6445f6b2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Add a new ``amqp_auto_delete`` parameter, so that transient queues are 5 | automatically deleted. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/api_paste_ini-separator-04370950f086c7bb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``key_val_separator`` parameter has been added to 5 | the ``trove_api_paste_ini`` resource type. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/authtoken-bcb9cc0581080079.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Configure keystonemiddleware in a consistent way with all options required 4 | for Keystone v3. 5 | deprecations: 6 | - trove::api::keystone_tenant is deprecated in favor of trove::keystone::authtoken::project_name. 7 | - trove::api::keystone_user is deprecated in favor of trove::keystone::authtoken::username. 8 | - trove::api::keystone_password is deprecated in favor of trove::keystone::authtoken::password. 9 | - trove::api::identity_uri is deprecated in favor of trove::keystone::authtoken::auth_url. 10 | - trove::api::auth is deprecated in favor of trove::keystone::authtoken::auth_uri. 11 | -------------------------------------------------------------------------------- /releasenotes/notes/authtoken_manage_memcache_package-7bbd660df45a370e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Passes parameter to keystone authtoken define to manage python-memcache package install. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/bug-2058861-5b9681aa693a44e7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::single_tenant_mode`` parameter has been deprecated and it has 5 | no effect now. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-backend-expiration-time-ff2e121362581278.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::cache::backend_expiration_time`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-opts-d22f9a6692121131.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following two classes have been added, to support caching options. 5 | 6 | - ``trove::cache`` 7 | - ``trove::cache::instance_ports`` 8 | -------------------------------------------------------------------------------- /releasenotes/notes/cache-redis-opts-d6ebee69d2a12f84.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``trove::cache`` class now supports the following new options for 5 | Redis backend and Redis Sentinel backend. 6 | 7 | - ``redis_server`` 8 | - ``redis_username`` 9 | - ``redis_password`` 10 | - ``redis_sentinels`` 11 | - ``redis_socket_timeout`` 12 | - ``redis_sentinel_service_name`` 13 | -------------------------------------------------------------------------------- /releasenotes/notes/centos-9-support-46d145a9ed994fe7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Now this module supports CentOS 9 and Red Hat Enterprise Linux 9. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/cleanup_deprecated_params_from_trove-quota-19ce39fbd7611db7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following deprecated parameters have been removed. The new per_tenant 5 | parameters should be used instead. 6 | 7 | - ``trove::quota::max_instances_per_user`` 8 | - ``trove::quota::max_volumes_per_user`` 9 | - ``trove::quota::max_backups_per_user`` 10 | -------------------------------------------------------------------------------- /releasenotes/notes/configurable_swift_service_type-9a9b3bab6ff5e185.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add ability to configure swift_service_type in guestagent.conf. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/configure-backup_aes_cbc_key-aaf934036d76ee57.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add the ability to configure aes_cbc key for backup in trove-guestagent.conf 4 | -------------------------------------------------------------------------------- /releasenotes/notes/configure_service-a1d6962c8833e640.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::keystone::auth::configure_service`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/default_domain-a75b4fc5a094f93d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | issues: 3 | - | 4 | Keystone v2.0 API was removed so we need to set a default value 5 | for user_domain_name and project_domain name, which will be 6 | Default as it is already in some other classes in modules. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-api-service_credentials-a988f20f56a499e4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::api::service_credentials`` class has been deprecated. Use 5 | the ``trove::service_credentials`` class instead. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-default_password_length-cb13316b55232a7e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::guestagent::default_password_length`` parameter has been 5 | deprecated. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-guestagent-backup_aes_cbc_key-84ed0dd16e26c8b9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::guestagent::backup_aes_cbc_key`` parameter has been deprecated 5 | because the actual parameter in Trove was already deprecated. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-rabbit_heartbeat_in_pthread-cbb628bff236eca0.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::rabbit_heartbeat_in_pthread`` parameter has been deprecated 5 | and will be removed in the future release. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-rabbit_notification_topic-50956d3673363355.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::rabbit_notification_topic`` parameter has been deperecated, 5 | because it has had no effect. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-use_neutron-d39ccd82299c38b7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove:use_neutron`` parameter has been deprecated and has no effect 5 | now. This parameter will be removed in a future release. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate-watch_log_file-370604865ba4b894.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::logging::watch_log_file`` parameter has been deprecated. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_allow_insecure_clients-option-ac2bec38b8b002b8.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - allow_insecure_clients option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_auth_uri_parameter-87ffc735509a6e7c.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - auth_uri is deprecated and will be removed in a future release. 4 | Please use www_authenticate_uri instead. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_database_min_pool_size-option-86a395d45d177298.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - database_min_pool_size option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_database_options-34f9def22611cb34.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameters of the ``trove`` class have been deprecated. 5 | Use parameters of the ``trove::db`` class instead. 6 | 7 | - ``database_connection`` 8 | - ``database_idle_timeout`` 9 | - ``database_max_retries`` 10 | - ``database_retry_interval`` 11 | - ``database_max_pool_size`` 12 | - ``database_max_overflow`` 13 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_ensure_package_parameter-843952a793d67911.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - trove::generic_service::ensure_package is now deprecated and will be removed 4 | in the future release. Please use trove::generic_service::package_ensure instead. 5 | - trove::taskmanager::ensure_package is now deprecated and will be removed 6 | in the future release. Please use trove::taskmanager::package_ensure instead. 7 | - trove::api::ensure_package is now deprecated and will be removed 8 | in the future release. Please use trove::api::package_ensure instead. 9 | - trove::conductor::ensure_package is now deprecated and will be removed 10 | in the future release. Please use trove::conductor::package_ensure instead. 11 | - trove::guestagent::ensure_package is now deprecated and will be removed 12 | in the future release. Please use trove::guestagent::package_ensure instead. 13 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_heat_service_type-8a7a6a5b1c40bcdc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - trove::heat_service_type is deprecated and will be removed in a future 4 | release. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_idle_timeout_parameter-a47e878d44bf161b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - database_idle_timeout is deprecated and will be removed in a future 4 | release. Please use database_connection_recycle_time instead. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_pki_related_parameters-a29fb4207f537afb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - check_revocations_for_cached option is now deprecated for removal, the 4 | parameter has no effect. 5 | - hash_algorithms option is now deprecated for removal, the parameter 6 | has no effect. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_revocation_cache_time_parameter-28379ba2e4a35d0c.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - revocation_cache_time option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_rpc_backend_parameter-69670fb9496a4b95.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - trove::rpc_backend is deprecated and will be removed in a future 4 | release. Please use trove::default_transport_url instead. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_signing_dir_parameter-a5197a359e998f13.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - signing_dir option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/deprecate_templated_guestagent_conf-96e92af47e01fe35.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - Deprecate the templated version of guestagent.conf 4 | The templated copy of guestagent.conf is outdated and 5 | has been difficult to keep updated with correct defaults. 6 | Therefore we deprecate this file. Values will still be 7 | configured as before, but by the guestagent class. 8 | -------------------------------------------------------------------------------- /releasenotes/notes/drop-fedora-38ed41e5138154d7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Fedora is no longer supported. -------------------------------------------------------------------------------- /releasenotes/notes/drop_qpid-00ae0858778cae53.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - Drop all Qpid support, it was removed from Oslo in Mitaka. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/enable_cancel_on_failover-230b2088cad64cd9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::rabbit_enable_cancel_on_failover`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/external_dependency_management-4f5c1e349d9983fb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Dependencies are now managed in an external class. 4 | This allows installing Trove via other methods besides 5 | packages. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/fix-auth_url-330322b223994b41.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::taskmanager::auth_url parameter has been deprecated. Use 5 | the ``trove::taskmanager::service_credentials::auth_url`` parameter 6 | instead. 7 | 8 | - | 9 | The ``trove::conductor::auth_url parameter has been deprecated. Use 10 | the ``trove::conductor::service_credentials::auth_url`` parameter 11 | instead. 12 | 13 | fixes: 14 | - | 15 | Now the ``trove::taskmanager::auth_url`` parameter and 16 | the ``trove:conductor::auth_url`` parameter take effect and are used to 17 | define value of ``[service_credentials] auth_url`` parameter. 18 | -------------------------------------------------------------------------------- /releasenotes/notes/fix_log_dir_documentation-a8bb71233fba1e9e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - Fixed documentation for log_dir parameter 4 | -------------------------------------------------------------------------------- /releasenotes/notes/guestagent-disable-service-3c4100c486de4c2e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - | 4 | Now the ``trove-guestagent`` service is disabled by default, because this 5 | service should be run in instances instead of in hosts. The service can be 6 | still enabled by setting the ``trove::guestagent::enabled`` parameter to 7 | ``true`` but this requires careful consideration. 8 | -------------------------------------------------------------------------------- /releasenotes/notes/guestagent-override-rabbit-params-eaf20f06fad960c5.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - In some environments, Trove guests will talk to rabbit via a different 4 | gateway or VIP and possibly using a different port. This might be done 5 | for security or separation reasons. This change allows the guestagent's 6 | rabbit host(s) and port information to be different than that from the 7 | main cluster. 8 | -------------------------------------------------------------------------------- /releasenotes/notes/guestagent-swift_endpoint_type-2cd4e898f9ca5029.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``trove::guestagent::swift_endpoint_type`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/guestagent-volume-opts-6552894cb095e53b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameters have been added to the ``trove::guestagent`` 5 | class. 6 | 7 | - ``num_tries`` 8 | - ``volume_fstype`` 9 | - ``format_options`` 10 | - ``volume_format_timeout`` 11 | - ``mount_options`` 12 | -------------------------------------------------------------------------------- /releasenotes/notes/guestagent_swift_default-f14d658a976d69e2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - Change the default for swift_url in guestagent to 4 | be SERVICE_DEFAULT so that by default, installs 5 | will read the Swift URL from the Keystone catalog. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/hc-enable_by_file_paths-504bc380faf3b461.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::healthcheck::enable_by_file_paths`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/healthcheck-39c7baba411cc930.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::healthcheck`` class has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/keystone-auth-name-ca9c69995d1eac09.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - The keystone auth class has been updated to provide a default service_name 4 | to allow a user to specify a custom auth_name that may not contain the 5 | name of the service. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/keystone-authtoken-interface-a21e29a682e51819.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::keystone::authtoken::interface`` parameter has been added, 5 | which can be used to set the interface parameter in authtoken middleware. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/keystone-authtoken-service_type-839ae99f7083eacb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::keystone::authtoken::service_type`` parameter has been 5 | added to configure the service_type parameter in authtoken middleware. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/keystone-v3-auth-1572c6fe82f65b8b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following classes have been added to set parameters to define service 5 | credentials. 6 | 7 | - ``trove::api::service_credentials`` 8 | - ``trove::conductor::service_credentials`` 9 | - ``trove::guestagent::service_credentials`` 10 | - ``trove::taskmanager::service_credentials`` 11 | deprecations: 12 | - | 13 | The following parameters in ``trove`` class has been deprecated and will 14 | be removed in a future release. Use the parameters in ``trove::auth`` class 15 | to set required parameters for keystone v3 auth. 16 | 17 | - ``nova_proxy_admin_user`` 18 | - ``nova_proxy_admin_pass`` 19 | - ``nova_proxy_admin_tenant_name`` 20 | - ``os_region_name`` 21 | 22 | - | 23 | The auto detection of auth_url parameter from www_authenticate_uri is 24 | deprecated and will be removed in a future release. Please set 25 | auth_url parameter before the detection is removed. 26 | 27 | - | 28 | The ``trove::guestagent::auth_url`` parmaeter has been deprecated. Use 29 | ``trove::taskmanager::service_credentials::auth_url`` instead. 30 | -------------------------------------------------------------------------------- /releasenotes/notes/log-json-8713a9e0f135d123.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Expose use_json logging parameter, which enables JSON formatted logging. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/make_client_more_configurable-aa43f623d8c9d3c7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - The client_package_name is now configurable. 4 | It defaults to the name in the params class. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/management-networks-cff664649b786960.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The ``trove::default_neutron_networks`` parameter has been deprecated. Use 5 | the new ``trove::management_networks`` parameter instead. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/migrate-policy-format-from-json-to-yaml-dea57c16ede75e23.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Now policy.yaml is used by default instead of policy.json. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/mitaka-deprecations2-3ac716b493057152.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - max_volumes_per_user, max_instances_per_user, max_backups_per_user was 4 | deprecated in Mitaka and will be removed after Newton. 5 | upgrade: 6 | - max_volumes_per_tenant, max_instances_per_tenant, max_backups_per_tenant 7 | added to subistitute deprecated parameters. 8 | -------------------------------------------------------------------------------- /releasenotes/notes/mitka_deprecations-08a9171d3ec8bb5b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - Deprecate old authentification parameters. 4 | - Remove deprecated mysql_module parameter. 5 | - Put all the logging related parameters to the logging class. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/mysql-opts-cafd18ca1dc56cbd.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following two new classes have been added. 5 | 6 | - ``trove::guestagent::mariadb`` 7 | - ``trove::guestagent::mysql`` 8 | 9 | - | 10 | The following three parameters have been added to the ``trove::guestagent`` 11 | class. 12 | 13 | - ``container_registry`` 14 | - ``container_registry_username`` 15 | - ``container_registry_password`` 16 | -------------------------------------------------------------------------------- /releasenotes/notes/network_isolation-d7b0f489fb53d578.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::network_isolation`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/non-boolean-for-url-b33f16655e40c732.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following parameters of the ``trove`` class no longer treat `fase` 5 | as a special value to purge the option. Use the `os_service_default` fact 6 | which is not default. 7 | 8 | - `nova_compute_url` 9 | - `cinder_url` 10 | - `neutron_url` 11 | - `swift_url` 12 | -------------------------------------------------------------------------------- /releasenotes/notes/notification-retry-73b060f14a1cf542.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::notification_retry`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/notifications-77b6674b294c74e5.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add notification system options in trove. 4 | - Add rabbit_ha_queues and amqp_durable_queues options. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/openstack_db_tag-801df2b37104b652.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add openstack-db tag to Exec that run db-sync. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/os_workers_for_worker_count-3c4240c334ddc6a7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - Parameters that control the number of spawned child processes for 4 | distributing processing have had their default value changed from 5 | ::processorcount to ::os_workers. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/oslo_policy-enforce_scope-ea005786fd908381.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::policy::enforce_scope`` parameter has been added to 5 | support the corresponding parameter in oslo.policy library. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/parameter-cleanup-zed-92fb9e1f474c923a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following parameters of the ``trove::conductor`` class have been 5 | removed. 6 | 7 | - ``auth_url`` 8 | - ``debug`` 9 | - ``log_file`` 10 | - ``log_dir`` 11 | - ``use_rsyslog`` 12 | - ``log_facility`` 13 | 14 | - | 15 | The following parameters of the ``trove::taskmanager`` class have been 16 | removed. 17 | 18 | - ``auth_url`` 19 | - ``debug`` 20 | - ``log_file`` 21 | - ``log_dir`` 22 | - ``use_rsyslog`` 23 | - ``log_facility`` 24 | 25 | - | 26 | The ``trove::config::trove_conductor_config`` parameter and 27 | the ``trove::config::trove_taskmanager_config`` parameter have been 28 | removed. 29 | 30 | - | 31 | Template file for guest agent configuration has been removed. Because of 32 | this change, the ``trove::taskmanager::use_guestagent_template`` parameter 33 | has no effect now and the ``trove::guestagent`` class is always used. 34 | -------------------------------------------------------------------------------- /releasenotes/notes/policy-dirs-4345bfef1f3a3b85.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | There is now a new policy_dirs parameter in the trove::policy class, 5 | so one can set a custom path. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/policy-enforce_new_defaults-f4a0c36ad87ad096.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::policy::enforce_new_defaults`` parameter has been 5 | added. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/policy-file-support-06db0c1ae60284a5.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Support for policy files which are being added 4 | to Trove. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/policy_default_rule-7734b5695bae2731.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::policy::policy_default_rule`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/policy_purge_config-77dcdf6fec79a4fa.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Adds new purge_config parameter. When set to true, the policy file is 5 | cleared during configuration process. This allows to remove any existing 6 | rules before applying them or clean the file when all policies got removed. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/provider-deprecate-at-params-8a9c23a010d4b4d3.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - | 4 | The following resource types have been using the credential written in 5 | the ``[keystone_authtoken]`` section of ``trove.conf``. However this 6 | behavior has been deprecated and now these resource types first look for 7 | the yaml files in ``/etc/openstack/puppet``. Make sure one of 8 | ``clouds.yaml`` or ``admin-clouds.yaml`` (which is created by 9 | puppet-keystone) is created in that directory. 10 | 11 | - ``trove_datastore`` 12 | - ``trove_datastore_version`` 13 | -------------------------------------------------------------------------------- /releasenotes/notes/puppet-8-9f6429d787e1d6e6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | This module now officially supports Puppet 8. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/puppet4-mysql-func-a6bf94ee5cb5980e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | This module now requires a puppetlabs-mysql version >= 6.0.0 5 | -------------------------------------------------------------------------------- /releasenotes/notes/pymysql-e57bf1f0289dd426.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Support of PyMySQL driver for MySQL backend. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit-connection-params-deprecation-8e209afd31c042a1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - trove::rabbit_host, trove::rabbit_hosts, trove::rabbit_password, 4 | trove::rabbit_port, trove::rabbit_userid and 5 | trove::rabbit_virtual_host are deprecated. 6 | trove::default_transport_url should be used instead. 7 | - trove::guestagent::rabbit_host, trove::guestagent::rabbit_hosts, and 8 | trove::guestagent::rabbit_port are deprecated. 9 | trove::guestagent::default_transport_url should be used instead. 10 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit-heartbeat-opts-6263999f7a7536a8.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameters have been added to the ``trove`` class. 5 | 6 | - ``rabbit_heartbeat_timeout_threshold`` 7 | - ``rabbit_heartbeat_rate`` 8 | 9 | fixes: 10 | - | 11 | Fixed the ignored ``rabbitmq::rabbit_heartbeat_in_pthread`` parameter. 12 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit-quorum-queue-080ee93b83f60196.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``trove`` class now supports options for quorum queues in RabbitMQ. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit_hosts_in_guestagent_template-00c3a03cf1f2be39.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - when guestagent.conf is configured via template, 4 | it did not use the rabbit_hosts settings. This is 5 | now enabled. This change also moves the templated 6 | guestagent.conf rabbit config into the correct 7 | section. Finally this properly sets the ha_queues 8 | setting when the template is used. 9 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit_qos_prefetch_count-92ac029d5c8ce265.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::rabbit_qos_prefetch_count`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit_transient_queues_ttl-9416ff6bc511dcda.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | A new parameter ``rabbit_transient_queues_ttl`` has been added to the 5 | trove class to configure how long transtient queue should stay until 6 | they are automatically deleted. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbit_transient_quorum_queue-1431457758c39744.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``trove::rabbit_transient_quorum_queue`` parameter has been added. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/rabbitmq-heartbeat-over-pthread-93fe3506ae120580.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Allow users to run the RabbitMQ heartbeat over a native python thread in the 5 | oslo.messaging RabbitMQ driver, by using the `rabbit_heartbeat_in_pthread` 6 | option in configuration. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/ram-quota-db3f2cad1b2bfa90.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Support new `max_ram_per_tenant` quota option. Specified in MB, the default 5 | is -1 (unlimited) 6 | -------------------------------------------------------------------------------- /releasenotes/notes/refacotr-ssl-opts-bff4682538e62acb.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following parameters of the ``trove`` class no longer treat ``false`` 5 | as an indicator to remove the option. Use os_service_default fact instead. 6 | 7 | - ``ca_file`` 8 | - ``cert_file`` 9 | - ``key_file`` 10 | -------------------------------------------------------------------------------- /releasenotes/notes/release-note-ubuntu-py3-73f045d7443fc9a6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | prelude: > 3 | In this release Ubuntu has moved all projects that supported it to python3 4 | which means that there will be a lot of changes. The Puppet OpenStack project 5 | does not test the upgrade path from python2 to python3 packages so there might 6 | be manual steps required when moving to the python3 packages. 7 | upgrade: 8 | - | 9 | Ubuntu packages are now using python3, the upgrade path is not tested by 10 | Puppet OpenStack. Manual steps may be required when upgrading. 11 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-amqp1-71e859dfe34b0104.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Support for amqp1 messaging driver has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-amqp_allow_insecure_clients-1d9b19079584373a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::amqp_allow_insecure_clients`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-api-service_credentials-9faa76a3466ab8d6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated ``trove::api::service_credentials`` class has been removed. 5 | Use the ``trove::service_credentials`` class instead. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-auth-uri-78dfc3af814c1367.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated parameter auth_uri is now removed, please use www_authenticate_uri. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-centos-8-438a33ab60339ad4.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | CentOS 8 Stream is no longer supported by this module. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-database-options-9f865faa07dee7af.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following parameters of the ``trove`` class have been removed. 5 | Use parameters of the ``trove::db`` class instead. 6 | 7 | - ``database_connection`` 8 | - ``database_idle_timeout`` 9 | - ``database_max_retries`` 10 | - ``database_retry_interval`` 11 | - ``database_max_pool_size`` 12 | - ``database_max_overflow`` 13 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-database_min_pool_size-085bbcba091e61c9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::db::database_min_pool_size`` parameter and 5 | the ``trove::database_min_pool_size`` parameter have been removed. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-default_neutron_networks-1f133abd9e127a35.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::default_neutron_networks`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-deprecated-logging-89cb2fcbedb06176.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated parameters use_syslog, use_stderr, log_facility, log_dir, log_file 5 | and debug in the api class is now removed. Please set them in the logging class. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-deprecated-rabbit-params-b874abdbb701f1ae.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated trove::rabbit_host, trove::rabbit_hosts, trove::rabbit_password, 5 | trove::rabbit_port, trove::rabbit_userid and trove::rabit_virtual_host are now 6 | removed. Please use trove::default_transport_url instead. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-deprecated-rabbit-params-guestagent-4f0178bdfac9ffd9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - | 4 | The guestagent config now sets the transport_url instead of the removed 5 | rabbit options. 6 | upgrade: 7 | - | 8 | The deprecated rabbit_host, rabbit_hosts and rabbit_port parameters in 9 | trove::guestagent is now removed, please use default_transport_url instead. 10 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-guestagent-control_exchange-a890e7661cb40151.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated ``trove::guestagent::control_exchange`` parameter has been 5 | removed. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-keystone-v2-params-047438374b04606d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following deprecated parameters of the ``trove`` class have been 5 | removed. 6 | 7 | - ``nova_proxy_admin_user`` 8 | - ``nova_proxy_admin_pass`` 9 | - ``nova_proxy_tenant_name`` 10 | - ``os_region_name`` 11 | 12 | - | 13 | Now the ``trove::api::service_credentials`` class no longer looks up 14 | the ``auth_url`` parameter from the ``trove::keystone::authtoken`` class. 15 | The parameter should be defined properly. 16 | 17 | - | 18 | The ``trove::guestagent::auth_url`` parameter has been removed. 19 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-puppet-6-44adc89d762d943b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Puppet 6 is no longer supported. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-rabbit_notification_topic-705300aaf5725e2d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::rabbit_notification_topic`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-separate-config-9fed57e7e4954005.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The following resource types have been removed. 5 | 6 | - ``trove_conductor_config`` 7 | - ``trove_taskmanager_config`` 8 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-single_tenant_mode-6a8080f1e74266ad.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated ``trove::single_tenant_mode`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-use_guestagent_template-68282b363e234266.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::taskmanager::use_guestagent_template`` parameter has been 5 | removed. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-use_neutron-820b1a0eb3db454b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::use_neutron`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove-watch_log_file-30401b10abdc1769.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The ``trove::logging::watch_log_file`` parameter has been removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_ensure_package_option-a4088afe0b345a44.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Deprecated ensure_package option has been removed. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_heat_service_type-8f7a2256681b5ed0.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated trove::heat_service_type is now removed. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_keystone_auth_options-65fea5e2c80278e7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - Removed deprecated options for trove::keystone::auth class. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_keystone_revocation_cache_time_option-bbae786702cd1618.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Deprecated keystone::authtoken::revocation_cache_time option has been removed. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_keystone_signing_dir_option-9dfe0af3219d10f7.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Deprecated keystone authtoken signing_dir option is removed in Pike. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_deprecated_pki_related_options-9713e0ed5956a82a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | The deprecated pki related options check_revocations_for_cached and 5 | hash_algorithms option has been removed. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_idle_timeout_option-81bb50a1292b535e.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - Deprecated idle_timeout option has been removed. 4 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_old_authtoken_options-e873bed4cc0139cc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - removed deprecated trove::api::keystone_user 4 | - removed deprecated trove::api::keystone_password 5 | - removed deprecated trove::api::keystone_tenant 6 | - removed deprecated trove::api::identity_uri 7 | - removed deprecated trove::api::auth_url 8 | - removed deprecated trove::api::auth_uri 9 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_qpid-0b446db43fdea617.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - Remove QPID messaging support. 4 | Qpid messaging driver is removed from oslo.messaging so we won't support 5 | anymore. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/remove_verbose-208dc449d7fe91ff.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | other: 3 | - The verbose option was marked to be removed in Ocata, 4 | in Newton the option was deprecated. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/separate-api-taskmanager-settings-cc860762b270383a.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - trove::taskmanager::default_neutron_networks is now deprecated and will be 4 | removed in the future release. Please use trove::default_neutron_networks 5 | instead. 6 | - trove::taskmanager::taskmanager_queue is now been removed. 7 | Please use trove::api::taskmanager_queue instead. 8 | fixes: 9 | - Neutron settings were not applied to the API when the API and taskmanager 10 | were run on separate hosts. This has now been corrected. 11 | -------------------------------------------------------------------------------- /releasenotes/notes/service_token_roles_required-a2d688ca8fc88039.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Service_token_roles_required missing in the server config file which 4 | allows backwards compatibility to ensure that the service tokens are 5 | compared against a list of possible roles for validity. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/single-tenant-mode-9e39b1becaaad8c0.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Add support for enabling single tenant mode 4 | -------------------------------------------------------------------------------- /releasenotes/notes/switch-to-keystone-v3-6e8e02a1f2445ad9.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - | 4 | In queens cycle, Keystone API v2.0 has been retired. Default values for auth_url 5 | parameter in the different classes have been changed to point to the v3 URL. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/switch_to_oslo-1ae208bc1295238d.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Switch to puppet-oslo resource usage (instead of 4 | manual configuration file editing). 5 | -------------------------------------------------------------------------------- /releasenotes/notes/system_scope-all-b264889f42741908.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The new ``system_scope`` parameter has been added to the following classes. 5 | 6 | - ``trove::api::service_credentials`` 7 | - ``trove::guestagent::service_credentials`` 8 | -------------------------------------------------------------------------------- /releasenotes/notes/system_scope-keystone-527142cfc221fa2b.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The ``system_scope`` parameter has been added to 5 | the ``trove::keystone::authtoken`` class. 6 | 7 | - | 8 | The ``trove::keystone::auth`` class now supports customizing roles assigned 9 | to the trove service user. 10 | 11 | - | 12 | The ``trove::keystone::auth`` class now supports defining assignmet of 13 | system-scoped roles to the trove service user. 14 | -------------------------------------------------------------------------------- /releasenotes/notes/ubuntu-jammy-c4fbcd167bf27b70.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | This module now supports Ubuntu 22.04 (Jammy Jellyfish). 5 | 6 | upgrade: 7 | - | 8 | This module no longer supports Ubuntu 20.04 (Focal Fossa). 9 | -------------------------------------------------------------------------------- /releasenotes/notes/ubuntu-noble-a0b44b61a1105a08.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Ubuntu 24.04 is now formally supported. 5 | 6 | upgrade: 7 | - | 8 | Ubuntu 22.04 is no longer supported. 9 | -------------------------------------------------------------------------------- /releasenotes/notes/use-reno-1caaec4ba5aa4285.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - Release notes are no longer maintained by hand, we now use the reno tool to 4 | manage them. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/use-service-default-for-quota-opts-d06793e6832314d3.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Default values of the ``trove::quota`` class parameters have been updated 5 | and now the service default values are used by default. 6 | -------------------------------------------------------------------------------- /releasenotes/notes/use-single-config-233fda77f7d6c942.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | upgrade: 3 | - | 4 | Now this modules no longer use ``trove-conductor.conf`` and 5 | ``trove-taskmanager.conf``. The parameters previously added to these files 6 | are now added to the base ``trove.conf``. 7 | 8 | deprecations: 9 | - | 10 | The following parameters have been deprecated and have no effect now. 11 | 12 | - ``trove::config::trove_taskmanager_config`` 13 | - ``trove::config::trove_conductor_config`` 14 | 15 | - | 16 | The following classes have been deprecated and have no effect now. 17 | 18 | - ``trove::conductor::service_credentials`` 19 | - ``trove::taskmanager::service_credentials`` 20 | 21 | - | 22 | The following parameters of the ``trove::conductor`` class and 23 | the ``trove::taskmanager`` class have been deprecated and have no effect. 24 | 25 | - ``debug`` 26 | - ``log_file`` 27 | - ``log_dir`` 28 | - ``use_syslog`` 29 | - ``log_facility`` 30 | 31 | - | 32 | The following resource types have been deprecated. 33 | 34 | - ``trove_conductor`` 35 | - ``trove_taskmanager`` 36 | -------------------------------------------------------------------------------- /releasenotes/notes/use-volumev3-e0b5c5c444163b61.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fixes: 3 | - | 4 | Default value of the ``trove::cinder_api_version`` has been updated from 5 | ``volumev2`` to ``volumev3`` to use current Block Storage API v3 instead of 6 | deprecated Block Storage API v3. 7 | -------------------------------------------------------------------------------- /releasenotes/notes/verbose-deprecation-805b7a15b97a2f48.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | deprecations: 3 | - verbose option is now deprecated for removal, the 4 | parameter has no effect. 5 | -------------------------------------------------------------------------------- /releasenotes/notes/volume-opts-4456caffc83b79df.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | The following parameters have been added to the ``trove`` class. 5 | 6 | - ``trove_volume_support`` 7 | - ``volume_rootdisk_support`` 8 | - ``volume_rootdisk_size`` 9 | -------------------------------------------------------------------------------- /releasenotes/notes/wsgi-c8adcf992c49ea50.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | features: 3 | - | 4 | Now this module supports deploying trove-api using httpd and mod_wsgi. 5 | Use the ``trove::wsgi::apache`` class to set up vhost for trove API. Note 6 | the ``trove::api::service_name`` parameter should be set to ``httpd`` in 7 | case httpd is used. 8 | -------------------------------------------------------------------------------- /releasenotes/source/2023.1.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2023.1 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/2023.1 7 | -------------------------------------------------------------------------------- /releasenotes/source/2023.2.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2023.2 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2023.2 7 | -------------------------------------------------------------------------------- /releasenotes/source/2024.1.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2024.1 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2024.1 7 | -------------------------------------------------------------------------------- /releasenotes/source/2024.2.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2024.2 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2024.2 7 | -------------------------------------------------------------------------------- /releasenotes/source/2025.1.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | 2025.1 Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/2025.1 7 | -------------------------------------------------------------------------------- /releasenotes/source/_static/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openstack/puppet-trove/abbb57564409dd7862054ee0f18648b798a0d2fc/releasenotes/source/_static/.placeholder -------------------------------------------------------------------------------- /releasenotes/source/index.rst: -------------------------------------------------------------------------------- 1 | ====================================== 2 | Welcome to puppet-trove Release Notes! 3 | ====================================== 4 | 5 | Contents 6 | ======== 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | unreleased 12 | 2025.1 13 | 2024.2 14 | 2024.1 15 | 2023.2 16 | 2023.1 17 | zed 18 | yoga 19 | xena 20 | wallaby 21 | victoria 22 | ussuri 23 | train 24 | stein 25 | rocky 26 | queens 27 | pike 28 | ocata 29 | newton 30 | mitaka 31 | 32 | 33 | Indices and tables 34 | ================== 35 | 36 | * :ref:`genindex` 37 | * :ref:`search` 38 | -------------------------------------------------------------------------------- /releasenotes/source/mitaka.rst: -------------------------------------------------------------------------------- 1 | ============================ 2 | Mitaka Series Release Notes 3 | ============================ 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/mitaka 7 | -------------------------------------------------------------------------------- /releasenotes/source/newton.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Newton Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/newton 7 | -------------------------------------------------------------------------------- /releasenotes/source/ocata.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Ocata Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: origin/stable/ocata 7 | -------------------------------------------------------------------------------- /releasenotes/source/pike.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Pike Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/pike 7 | -------------------------------------------------------------------------------- /releasenotes/source/queens.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Queens Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/queens 7 | -------------------------------------------------------------------------------- /releasenotes/source/rocky.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Rocky Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/rocky 7 | -------------------------------------------------------------------------------- /releasenotes/source/stein.rst: -------------------------------------------------------------------------------- 1 | =================================== 2 | Stein Series Release Notes 3 | =================================== 4 | 5 | .. release-notes:: 6 | :branch: stable/stein 7 | -------------------------------------------------------------------------------- /releasenotes/source/train.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | Train Series Release Notes 3 | ========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/train 7 | -------------------------------------------------------------------------------- /releasenotes/source/unreleased.rst: -------------------------------------------------------------------------------- 1 | ============================== 2 | Current Series Release Notes 3 | ============================== 4 | 5 | .. release-notes:: 6 | -------------------------------------------------------------------------------- /releasenotes/source/ussuri.rst: -------------------------------------------------------------------------------- 1 | =========================== 2 | Ussuri Series Release Notes 3 | =========================== 4 | 5 | .. release-notes:: 6 | :branch: stable/ussuri 7 | -------------------------------------------------------------------------------- /releasenotes/source/victoria.rst: -------------------------------------------------------------------------------- 1 | ============================= 2 | Victoria Series Release Notes 3 | ============================= 4 | 5 | .. release-notes:: 6 | :branch: stable/victoria 7 | -------------------------------------------------------------------------------- /releasenotes/source/wallaby.rst: -------------------------------------------------------------------------------- 1 | ============================ 2 | Wallaby Series Release Notes 3 | ============================ 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/wallaby 7 | -------------------------------------------------------------------------------- /releasenotes/source/xena.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | Xena Series Release Notes 3 | ========================= 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/xena 7 | -------------------------------------------------------------------------------- /releasenotes/source/yoga.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | Yoga Series Release Notes 3 | ========================= 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/yoga 7 | -------------------------------------------------------------------------------- /releasenotes/source/zed.rst: -------------------------------------------------------------------------------- 1 | ======================== 2 | Zed Series Release Notes 3 | ======================== 4 | 5 | .. release-notes:: 6 | :branch: unmaintained/zed 7 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = puppet-trove 3 | summary = Puppet module for OpenStack Trove 4 | description_file = README.md 5 | author = OpenStack 6 | author_email = openstack-discuss@lists.openstack.org 7 | home_page = https://docs.openstack.org/puppet-openstack-guide/latest 8 | license = Apache License, Version 2.0 9 | classifier = 10 | Intended Audience :: Developers 11 | Intended Audience :: Information Technology 12 | Intended Audience :: System Administrators 13 | License :: OSI Approved :: Apache Software License 14 | Operating System :: POSIX :: Linux 15 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import setuptools 17 | 18 | setuptools.setup( 19 | setup_requires=['pbr>=2.0.0'], 20 | py_modules=[], 21 | pbr=True) 22 | -------------------------------------------------------------------------------- /spec/acceptance/10_basic_trove_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper_acceptance' 2 | 3 | describe 'basic trove' do 4 | 5 | context 'default parameters' do 6 | 7 | it 'should work with no errors' do 8 | pp= <<-EOS 9 | include openstack_integration 10 | include openstack_integration::repos 11 | include openstack_integration::apache 12 | include openstack_integration::rabbitmq 13 | include openstack_integration::mysql 14 | include openstack_integration::memcached 15 | include openstack_integration::keystone 16 | include openstack_integration::trove 17 | 18 | trove_datastore { 'mysql': 19 | } 20 | -> trove_datastore_version { '5.7.29': 21 | datastore => 'mysql', 22 | manager => 'mysql', 23 | image_id => 'dummy', 24 | packages => '', 25 | } 26 | EOS 27 | 28 | # Run it twice and test for idempotency 29 | apply_manifest(pp, :catch_failures => true) 30 | apply_manifest(pp, :catch_changes => true) 31 | end 32 | 33 | describe port(8779) do 34 | it { is_expected.to be_listening.with('tcp') } 35 | end 36 | 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /spec/acceptance/99_trove_config_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper_acceptance' 2 | 3 | describe 'basic trove_config resource' do 4 | 5 | context 'default parameters' do 6 | 7 | it 'should work with no errors' do 8 | pp= <<-EOS 9 | Exec { logoutput => 'on_failure' } 10 | 11 | File <||> -> Trove_config <||> 12 | File <||> -> Trove_api_paste_ini <||> 13 | File <||> -> Trove_guestagent_config <||> 14 | 15 | file { '/etc/trove' : 16 | ensure => directory, 17 | } 18 | file { '/etc/trove/trove.conf' : 19 | ensure => file, 20 | } 21 | file { '/etc/trove/api-paste.ini' : 22 | ensure => file, 23 | } 24 | file { '/etc/trove/trove-guestagent.conf' : 25 | ensure => file, 26 | } 27 | 28 | trove_config { 'DEFAULT/thisshouldexist' : 29 | value => 'foo', 30 | } 31 | 32 | trove_config { 'DEFAULT/thisshouldnotexist' : 33 | value => '', 34 | } 35 | 36 | trove_config { 'DEFAULT/thisshouldexist2' : 37 | value => '', 38 | ensure_absent_val => 'toto', 39 | } 40 | 41 | trove_config { 'DEFAULT/thisshouldnotexist2' : 42 | value => 'toto', 43 | ensure_absent_val => 'toto', 44 | } 45 | 46 | trove_config { 'DEFAULT/thisshouldexist3' : 47 | value => ['foo', 'bar'], 48 | } 49 | 50 | trove_api_paste_ini { 'DEFAULT/thisshouldexist' : 51 | value => 'foo', 52 | } 53 | 54 | trove_api_paste_ini { 'DEFAULT/thisshouldnotexist' : 55 | value => '', 56 | } 57 | 58 | trove_api_paste_ini { 'DEFAULT/thisshouldexist2' : 59 | value => '', 60 | ensure_absent_val => 'toto', 61 | } 62 | 63 | trove_api_paste_ini { 'DEFAULT/thisshouldnotexist2' : 64 | value => 'toto', 65 | ensure_absent_val => 'toto', 66 | } 67 | 68 | trove_api_paste_ini { 'DEFAULT/thisshouldexist3' : 69 | value => 'foo', 70 | key_val_separator => ':' 71 | } 72 | 73 | trove_guestagent_config { 'DEFAULT/thisshouldexist' : 74 | value => 'foo', 75 | } 76 | 77 | trove_guestagent_config { 'DEFAULT/thisshouldnotexist' : 78 | value => '', 79 | } 80 | 81 | trove_guestagent_config { 'DEFAULT/thisshouldexist2' : 82 | value => '', 83 | ensure_absent_val => 'toto', 84 | } 85 | 86 | trove_guestagent_config { 'DEFAULT/thisshouldnotexist2' : 87 | value => 'toto', 88 | ensure_absent_val => 'toto', 89 | } 90 | EOS 91 | 92 | 93 | # Run it twice and test for idempotency 94 | apply_manifest(pp, :catch_failures => true) 95 | apply_manifest(pp, :catch_changes => true) 96 | end 97 | 98 | describe file('/etc/trove/trove.conf') do 99 | it { is_expected.to exist } 100 | it { is_expected.to contain('thisshouldexist=foo') } 101 | it { is_expected.to contain('thisshouldexist2=') } 102 | it { is_expected.to contain('thisshouldexist3=foo') } 103 | it { is_expected.to contain('thisshouldexist3=bar') } 104 | 105 | describe '#content' do 106 | subject { super().content } 107 | it { is_expected.to_not match /thisshouldnotexist/ } 108 | end 109 | end 110 | 111 | describe file('/etc/trove/api-paste.ini') do 112 | it { is_expected.to exist } 113 | it { is_expected.to contain('thisshouldexist=foo') } 114 | it { is_expected.to contain('thisshouldexist2=') } 115 | it { is_expected.to contain('thisshouldexist3:foo') } 116 | 117 | describe '#content' do 118 | subject { super().content } 119 | it { is_expected.to_not match /thisshouldnotexist/ } 120 | end 121 | end 122 | 123 | describe file('/etc/trove/trove-guestagent.conf') do 124 | it { is_expected.to exist } 125 | it { is_expected.to contain('thisshouldexist=foo') } 126 | it { is_expected.to contain('thisshouldexist2=') } 127 | 128 | describe '#content' do 129 | subject { super().content } 130 | it { is_expected.to_not match /thisshouldnotexist/ } 131 | end 132 | end 133 | end 134 | end 135 | -------------------------------------------------------------------------------- /spec/classes/trove_api_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # Unit tests for trove::api 19 | # 20 | require 'spec_helper' 21 | 22 | describe 'trove::api' do 23 | 24 | let :params do 25 | {} 26 | end 27 | 28 | shared_examples 'trove-api' do 29 | 30 | context 'with default parameters' do 31 | 32 | let :pre_condition do 33 | "class { 'trove': 34 | } 35 | class { 'trove::keystone::authtoken': 36 | password => 'a_big_secret', 37 | }" 38 | end 39 | 40 | it 'includes required classes' do 41 | is_expected.to contain_class('trove::deps') 42 | is_expected.to contain_class('trove::db') 43 | is_expected.to contain_class('trove::db::sync') 44 | is_expected.to contain_class('trove::params') 45 | end 46 | 47 | it 'installs trove-api package and service' do 48 | is_expected.to contain_service('trove-api').with( 49 | :name => platform_params[:api_service_name], 50 | :ensure => 'running', 51 | :hasstatus => true, 52 | :enable => true 53 | ) 54 | is_expected.to contain_package('trove-api').with( 55 | :name => platform_params[:api_package_name], 56 | :ensure => 'present', 57 | :tag => ['openstack', 'trove-package'], 58 | ) 59 | end 60 | 61 | it 'configures trove-api with default parameters' do 62 | is_expected.to contain_trove_config('DEFAULT/bind_host').with_value('') 63 | is_expected.to contain_trove_config('DEFAULT/bind_port').with_value('') 64 | is_expected.to contain_trove_config('DEFAULT/backlog').with_value('') 65 | is_expected.to contain_trove_config('DEFAULT/trove_api_workers').with_value('8') 66 | is_expected.to contain_trove_config('DEFAULT/http_get_rate').with_value('') 67 | is_expected.to contain_trove_config('DEFAULT/http_post_rate').with_value('') 68 | is_expected.to contain_trove_config('DEFAULT/http_put_rate').with_value('') 69 | is_expected.to contain_trove_config('DEFAULT/http_delete_rate').with_value('') 70 | is_expected.to contain_trove_config('DEFAULT/http_mgmt_post_rate').with_value('') 71 | is_expected.to contain_trove_config('DEFAULT/taskmanager_queue').with_value('') 72 | is_expected.to contain_oslo__service__ssl('trove_config').with( 73 | :cert_file => '', 74 | :key_file => '', 75 | :ca_file => '' 76 | ) 77 | end 78 | 79 | context 'with SSL enabled on API' do 80 | before :each do 81 | params.merge!( 82 | :cert_file => '/path/to/cert', 83 | :key_file => '/path/to/key', 84 | :ca_file => '/path/to/ca', 85 | ) 86 | end 87 | 88 | it 'contains ssl parameters' do 89 | is_expected.to contain_oslo__service__ssl('trove_config').with( 90 | :cert_file => '/path/to/cert', 91 | :key_file => '/path/to/key', 92 | :ca_file => '/path/to/ca' 93 | ) 94 | end 95 | end 96 | 97 | context 'with overridden rate limit parameters' do 98 | before :each do 99 | params.merge!( 100 | :http_get_rate => '1000', 101 | :http_post_rate => '1000', 102 | :http_put_rate => '1000', 103 | :http_delete_rate => '1000', 104 | :http_mgmt_post_rate => '2000', 105 | ) 106 | end 107 | 108 | it 'contains overrided rate limit values' do 109 | is_expected.to contain_trove_config('DEFAULT/http_get_rate').with_value('1000') 110 | is_expected.to contain_trove_config('DEFAULT/http_post_rate').with_value('1000') 111 | is_expected.to contain_trove_config('DEFAULT/http_put_rate').with_value('1000') 112 | is_expected.to contain_trove_config('DEFAULT/http_delete_rate').with_value('1000') 113 | is_expected.to contain_trove_config('DEFAULT/http_mgmt_post_rate').with_value('2000') 114 | end 115 | end 116 | end 117 | end 118 | 119 | on_supported_os({ 120 | :supported_os => OSDefaults.get_supported_os 121 | }).each do |os,facts| 122 | context "on #{os}" do 123 | let (:facts) do 124 | facts.merge!(OSDefaults.get_facts({ :os_workers => 8 })) 125 | end 126 | 127 | let(:platform_params) do 128 | case facts[:os]['family'] 129 | when 'Debian' 130 | { :api_package_name => 'trove-api', 131 | :api_service_name => 'trove-api' } 132 | when 'RedHat' 133 | { :api_package_name => 'openstack-trove-api', 134 | :api_service_name => 'openstack-trove-api' } 135 | end 136 | end 137 | it_configures 'trove-api' 138 | end 139 | end 140 | 141 | end 142 | -------------------------------------------------------------------------------- /spec/classes/trove_cache_instance_ports_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::cache::instance_ports' do 4 | 5 | shared_examples_for 'trove::cache::instance_ports' do 6 | context 'with default parameters' do 7 | it 'contains default values' do 8 | is_expected.to contain_trove_config('instance_ports_cache/expiration_time').with_value('') 9 | is_expected.to contain_trove_config('instance_ports_cache/caching').with_value('') 10 | end 11 | end 12 | 13 | context 'with overridden parameters' do 14 | let :params do 15 | { 16 | :expiration_time => 86400, 17 | :caching => true 18 | } 19 | end 20 | it 'contains overrided values' do 21 | is_expected.to contain_trove_config('instance_ports_cache/expiration_time').with_value(86400) 22 | is_expected.to contain_trove_config('instance_ports_cache/caching').with_value(true) 23 | end 24 | end 25 | end 26 | 27 | on_supported_os({ 28 | :supported_os => OSDefaults.get_supported_os 29 | }).each do |os,facts| 30 | context "on #{os}" do 31 | let (:facts) do 32 | facts.merge!(OSDefaults.get_facts()) 33 | end 34 | 35 | it_configures 'trove::cache::instance_ports' 36 | end 37 | end 38 | 39 | end 40 | -------------------------------------------------------------------------------- /spec/classes/trove_client_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # Unit tests for trove::client 19 | # 20 | 21 | require 'spec_helper' 22 | 23 | describe 'trove::client' do 24 | 25 | shared_examples_for 'trove client' do 26 | 27 | it { is_expected.to contain_class('trove::deps') } 28 | 29 | context 'with default parameters' do 30 | it { is_expected.to contain_package('python-troveclient').with( 31 | :ensure => 'present', 32 | :name => platform_params[:client_package_name], 33 | :tag => ['openstack', 'openstackclient', 'trove-package'] 34 | )} 35 | end 36 | 37 | context 'with package_ensure parameter provided' do 38 | let :params do 39 | { :package_ensure => false } 40 | end 41 | it { is_expected.to contain_package('python-troveclient').with( 42 | :ensure => false, 43 | :name => platform_params[:client_package_name], 44 | :tag => ['openstack', 'openstackclient', 'trove-package'] 45 | )} 46 | end 47 | 48 | it { is_expected.to contain_class('openstacklib::openstackclient') } 49 | end 50 | 51 | on_supported_os({ 52 | :supported_os => OSDefaults.get_supported_os 53 | }).each do |os,facts| 54 | context "on #{os}" do 55 | let (:facts) do 56 | facts.merge!(OSDefaults.get_facts()) 57 | end 58 | 59 | let(:platform_params) do 60 | case facts[:os]['family'] 61 | when 'Debian' 62 | { :client_package_name => 'python3-troveclient' } 63 | when 'RedHat' 64 | { :client_package_name => 'python3-troveclient' } 65 | end 66 | end 67 | 68 | it_configures 'trove client' 69 | end 70 | end 71 | 72 | end 73 | -------------------------------------------------------------------------------- /spec/classes/trove_conductor_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::conductor' do 4 | 5 | shared_examples 'trove-conductor' do 6 | 7 | context 'with default parameters' do 8 | it 'includes required classes' do 9 | is_expected.to contain_class('trove::deps') 10 | is_expected.to contain_class('trove::params') 11 | end 12 | 13 | it 'installs trove-conductor package and service' do 14 | is_expected.to contain_service('trove-conductor').with( 15 | :name => platform_params[:conductor_service_name], 16 | :ensure => 'running', 17 | :hasstatus => true, 18 | :enable => true 19 | ) 20 | is_expected.to contain_package('trove-conductor').with( 21 | :name => platform_params[:conductor_package_name], 22 | :ensure => 'present', 23 | :tag => ['openstack', 'trove-package'], 24 | ) 25 | end 26 | 27 | it 'configures trove-conductor with default parameters' do 28 | is_expected.to contain_trove_config('DEFAULT/trove_conductor_workers').with_value('8') 29 | end 30 | end 31 | end 32 | 33 | on_supported_os({ 34 | :supported_os => OSDefaults.get_supported_os 35 | }).each do |os,facts| 36 | context "on #{os}" do 37 | let (:facts) do 38 | facts.merge!(OSDefaults.get_facts({ :os_workers => 8 })) 39 | end 40 | 41 | let(:platform_params) do 42 | case facts[:os]['family'] 43 | when 'Debian' 44 | { :conductor_package_name => 'trove-conductor', 45 | :conductor_service_name => 'trove-conductor' } 46 | when 'RedHat' 47 | { :conductor_package_name => 'openstack-trove-conductor', 48 | :conductor_service_name => 'openstack-trove-conductor' } 49 | end 50 | end 51 | it_configures 'trove-conductor' 52 | end 53 | end 54 | 55 | end 56 | -------------------------------------------------------------------------------- /spec/classes/trove_config_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::config' do 4 | 5 | shared_examples_for 'trove::config' do 6 | let :params do 7 | { :trove_config => { 8 | 'DEFAULT/foo' => { 'value' => 'fooValue' }, 9 | 'DEFAULT/bar' => { 'value' => 'barValue' }, 10 | 'DEFAULT/baz' => { 'ensure' => 'absent' } 11 | }, 12 | :trove_guestagent_config => { 13 | 'DEFAULT/foo2' => { 'value' => 'fooValue' }, 14 | 'DEFAULT/bar2' => { 'value' => 'barValue' }, 15 | 'DEFAULT/baz2' => { 'ensure' => 'absent' } 16 | }, 17 | :trove_api_paste_ini => { 18 | 'DEFAULT/foo2' => { 'value' => 'fooValue' }, 19 | 'DEFAULT/bar2' => { 'value' => 'barValue' }, 20 | 'DEFAULT/baz2' => { 'ensure' => 'absent' } 21 | } 22 | } 23 | end 24 | 25 | it { is_expected.to contain_class('trove::deps') } 26 | 27 | it 'configures arbitrary trove configurations' do 28 | is_expected.to contain_trove_config('DEFAULT/foo').with_value('fooValue') 29 | is_expected.to contain_trove_config('DEFAULT/bar').with_value('barValue') 30 | is_expected.to contain_trove_config('DEFAULT/baz').with_ensure('absent') 31 | end 32 | 33 | it 'configures arbitrary trove guestagent configurations' do 34 | is_expected.to contain_trove_guestagent_config('DEFAULT/foo2').with_value('fooValue') 35 | is_expected.to contain_trove_guestagent_config('DEFAULT/bar2').with_value('barValue') 36 | is_expected.to contain_trove_guestagent_config('DEFAULT/baz2').with_ensure('absent') 37 | end 38 | 39 | it 'configures arbitrary trove api-paste configurations' do 40 | is_expected.to contain_trove_api_paste_ini('DEFAULT/foo2').with_value('fooValue') 41 | is_expected.to contain_trove_api_paste_ini('DEFAULT/bar2').with_value('barValue') 42 | is_expected.to contain_trove_api_paste_ini('DEFAULT/baz2').with_ensure('absent') 43 | end 44 | end 45 | 46 | on_supported_os({ 47 | :supported_os => OSDefaults.get_supported_os 48 | }).each do |os,facts| 49 | context "on #{os}" do 50 | let (:facts) do 51 | facts.merge!(OSDefaults.get_facts()) 52 | end 53 | 54 | it_configures 'trove::config' 55 | end 56 | end 57 | 58 | end 59 | -------------------------------------------------------------------------------- /spec/classes/trove_db_mysql_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | 18 | require 'spec_helper' 19 | 20 | describe 'trove::db::mysql' do 21 | 22 | let :pre_condition do 23 | [ 24 | 'include mysql::server', 25 | 'include trove::db::sync' 26 | ] 27 | end 28 | 29 | let :params do 30 | { :dbname => 'trove', 31 | :password => 'trovepass', 32 | :user => 'trove', 33 | :charset => 'utf8', 34 | :collate => 'utf8_general_ci', 35 | :host => '127.0.0.1', 36 | } 37 | end 38 | 39 | shared_examples_for 'trove mysql database' do 40 | it { should contain_class('trove::deps') } 41 | 42 | context 'when omiting the required parameter password' do 43 | before { params.delete(:password) } 44 | it { expect { is_expected.to raise_error(Puppet::Error) } } 45 | end 46 | 47 | it 'creates a mysql database' do 48 | is_expected.to contain_openstacklib__db__mysql('trove').with( 49 | :user => params[:user], 50 | :dbname => params[:dbname], 51 | :password => params[:password], 52 | :host => params[:host], 53 | :charset => params[:charset] 54 | ) 55 | end 56 | 57 | context 'overriding allowed_hosts param to array' do 58 | before :each do 59 | params.merge!( 60 | :allowed_hosts => ['127.0.0.1','%'] 61 | ) 62 | end 63 | 64 | it { 65 | is_expected.to contain_openstacklib__db__mysql('trove').with( 66 | :user => params[:user], 67 | :dbname => params[:dbname], 68 | :password => params[:password], 69 | :host => params[:host], 70 | :charset => params[:charset], 71 | :allowed_hosts => ['127.0.0.1','%'] 72 | )} 73 | end 74 | 75 | context 'overriding allowed_hosts param to string' do 76 | before :each do 77 | params.merge!( 78 | :allowed_hosts => '192.168.1.1' 79 | ) 80 | end 81 | 82 | it { 83 | is_expected.to contain_openstacklib__db__mysql('trove').with( 84 | :user => params[:user], 85 | :dbname => params[:dbname], 86 | :password => params[:password], 87 | :host => params[:host], 88 | :charset => params[:charset], 89 | :allowed_hosts => '192.168.1.1' 90 | )} 91 | end 92 | 93 | end 94 | 95 | on_supported_os({ 96 | :supported_os => OSDefaults.get_supported_os 97 | }).each do |os,facts| 98 | context "on #{os}" do 99 | let (:facts) do 100 | facts.merge!(OSDefaults.get_facts()) 101 | end 102 | 103 | it_configures 'trove mysql database' 104 | end 105 | end 106 | 107 | end 108 | -------------------------------------------------------------------------------- /spec/classes/trove_db_postgresql_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::db::postgresql' do 4 | 5 | shared_examples_for 'trove::db::postgresql' do 6 | let :req_params do 7 | { :password => 'trovepass' } 8 | end 9 | 10 | let :pre_condition do 11 | 'include postgresql::server' 12 | end 13 | 14 | context 'with only required parameters' do 15 | let :params do 16 | req_params 17 | end 18 | 19 | it { is_expected.to contain_class('trove::deps') } 20 | 21 | it { is_expected.to contain_openstacklib__db__postgresql('trove').with( 22 | :user => 'trove', 23 | :password => 'trovepass', 24 | :dbname => 'trove', 25 | :encoding => nil, 26 | :privileges => 'ALL', 27 | )} 28 | end 29 | 30 | end 31 | 32 | on_supported_os({ 33 | :supported_os => OSDefaults.get_supported_os 34 | }).each do |os,facts| 35 | context "on #{os}" do 36 | let (:facts) do 37 | facts.merge(OSDefaults.get_facts({ 38 | # puppet-postgresql requires the service_provider fact provided by 39 | # puppetlabs-postgresql. 40 | :service_provider => 'systemd' 41 | })) 42 | end 43 | 44 | it_configures 'trove::db::postgresql' 45 | end 46 | end 47 | 48 | end 49 | -------------------------------------------------------------------------------- /spec/classes/trove_db_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::db' do 4 | shared_examples 'trove::db' do 5 | context 'with default parameters' do 6 | it { should contain_class('trove::deps') } 7 | 8 | it { should contain_oslo__db('trove_config').with( 9 | :connection => 'sqlite:////var/lib/trove/trove.sqlite', 10 | :connection_recycle_time => '', 11 | :max_pool_size => '', 12 | :max_retries => '', 13 | :retry_interval => '', 14 | :max_overflow => '', 15 | :pool_timeout => '', 16 | :mysql_enable_ndb => '', 17 | )} 18 | end 19 | 20 | context 'with specific parameters' do 21 | let :params do 22 | { 23 | :database_connection => 'mysql+pymysql://trove:trove@localhost/trove', 24 | :database_connection_recycle_time => '3601', 25 | :database_max_pool_size => '21', 26 | :database_max_retries => '11', 27 | :database_max_overflow => '21', 28 | :database_pool_timeout => '21', 29 | :mysql_enable_ndb => true, 30 | :database_retry_interval => '11', 31 | } 32 | end 33 | 34 | it { should contain_class('trove::deps') } 35 | 36 | it { should contain_oslo__db('trove_config').with( 37 | :connection => 'mysql+pymysql://trove:trove@localhost/trove', 38 | :connection_recycle_time => '3601', 39 | :max_pool_size => '21', 40 | :max_retries => '11', 41 | :retry_interval => '11', 42 | :max_overflow => '21', 43 | :pool_timeout => '21', 44 | :mysql_enable_ndb => true, 45 | )} 46 | end 47 | end 48 | 49 | on_supported_os({ 50 | :supported_os => OSDefaults.get_supported_os 51 | }).each do |os,facts| 52 | context "on #{os}" do 53 | let (:facts) do 54 | facts.merge!(OSDefaults.get_facts()) 55 | end 56 | 57 | it_behaves_like 'trove::db' 58 | end 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /spec/classes/trove_db_sync_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::db::sync' do 4 | 5 | shared_examples_for 'trove-dbsync' do 6 | 7 | it { is_expected.to contain_class('trove::deps') } 8 | 9 | it 'runs trove-db-sync' do 10 | is_expected.to contain_exec('trove-manage db_sync').with( 11 | :command => 'trove-manage db_sync', 12 | :path => '/usr/bin', 13 | :refreshonly => 'true', 14 | :user => 'trove', 15 | :try_sleep => 5, 16 | :tries => 10, 17 | :timeout => 300, 18 | :logoutput => 'on_failure', 19 | :subscribe => ['Anchor[trove::install::end]', 20 | 'Anchor[trove::config::end]', 21 | 'Anchor[trove::dbsync::begin]'], 22 | :notify => 'Anchor[trove::dbsync::end]', 23 | :tag => 'openstack-db', 24 | ) 25 | end 26 | 27 | end 28 | 29 | on_supported_os({ 30 | :supported_os => OSDefaults.get_supported_os 31 | }).each do |os,facts| 32 | context "on #{os}" do 33 | let (:facts) do 34 | facts.merge(OSDefaults.get_facts({ 35 | :os_workers => 8, 36 | })) 37 | end 38 | 39 | it_configures 'trove-dbsync' 40 | end 41 | end 42 | 43 | end 44 | -------------------------------------------------------------------------------- /spec/classes/trove_deps_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::deps' do 4 | 5 | shared_examples_for 'trove::deps' do 6 | context 'defaults' do 7 | it 'set up the anchors' do 8 | is_expected.to contain_anchor('trove::install::begin') 9 | is_expected.to contain_anchor('trove::install::end') 10 | is_expected.to contain_anchor('trove::config::begin') 11 | is_expected.to contain_anchor('trove::config::end') 12 | is_expected.to contain_anchor('trove::db::begin') 13 | is_expected.to contain_anchor('trove::db::end') 14 | is_expected.to contain_anchor('trove::dbsync::begin') 15 | is_expected.to contain_anchor('trove::dbsync::end') 16 | is_expected.to contain_anchor('trove::service::begin') 17 | is_expected.to contain_anchor('trove::service::end') 18 | end 19 | end 20 | end 21 | 22 | on_supported_os({ 23 | :supported_os => OSDefaults.get_supported_os 24 | }).each do |os,facts| 25 | context "on #{os}" do 26 | let (:facts) do 27 | facts.merge!(OSDefaults.get_facts()) 28 | end 29 | 30 | it_configures 'trove::deps' 31 | end 32 | end 33 | 34 | end 35 | -------------------------------------------------------------------------------- /spec/classes/trove_guestagent_mariadb_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::guestagent::mariadb' do 4 | 5 | shared_examples 'trove::guestagent::mariadb' do 6 | 7 | context 'with defaults' do 8 | it 'configures mariadb options with defaultss' do 9 | is_expected.to contain_trove_guestagent_config('mariadb/docker_image').with_value('') 10 | is_expected.to contain_trove_guestagent_config('mariadb/backup_docker_image').with_value('') 11 | is_expected.to contain_trove_guestagent_config('mariadb/icmp').with_value('') 12 | is_expected.to contain_trove_guestagent_config('mariadb/root_on_create').with_value('') 13 | is_expected.to contain_trove_guestagent_config('mariadb/usage_timeout').with_value('') 14 | is_expected.to contain_trove_guestagent_config('mariadb/volume_support').with_value('') 15 | is_expected.to contain_trove_guestagent_config('mariadb/ignore_users').with_value('') 16 | is_expected.to contain_trove_guestagent_config('mariadb/ignore_dbs').with_value('') 17 | is_expected.to contain_trove_guestagent_config('mariadb/guest_log_exposed_logs').with_value('') 18 | is_expected.to contain_trove_guestagent_config('mariadb/guest_log_long_query_time').with_value('') 19 | is_expected.to contain_trove_guestagent_config('mariadb/default_password_length').with_value('') 20 | end 21 | end 22 | 23 | context 'with parameters overridden' do 24 | let :params do 25 | { 26 | :docker_image => 'mariadb', 27 | :backup_docker_image => 'openstacktrove/db-backup-mariadb:1.1.0', 28 | :icmp => false, 29 | :root_on_create => false, 30 | :usage_timeout => 400, 31 | :volume_support => true, 32 | :ignore_users => ['os_admin', 'root'], 33 | :ignore_dbs => ['mariadb', 'information_schema', 'performance_schema', 'sys'], 34 | :guest_log_exposed_logs => ['general', 'slow_query'], 35 | :guest_log_long_query_time => 1000, 36 | :cluster_support => true, 37 | :min_cluster_member_count => 3, 38 | :default_password_length => 36, 39 | } 40 | end 41 | 42 | it 'configures mariadb options with given values' do 43 | is_expected.to contain_trove_guestagent_config('mariadb/docker_image').with_value('mariadb') 44 | is_expected.to contain_trove_guestagent_config('mariadb/backup_docker_image').with_value('openstacktrove/db-backup-mariadb:1.1.0') 45 | is_expected.to contain_trove_guestagent_config('mariadb/icmp').with_value(false) 46 | is_expected.to contain_trove_guestagent_config('mariadb/root_on_create').with_value(false) 47 | is_expected.to contain_trove_guestagent_config('mariadb/usage_timeout').with_value(400) 48 | is_expected.to contain_trove_guestagent_config('mariadb/volume_support').with_value(true) 49 | is_expected.to contain_trove_guestagent_config('mariadb/ignore_users').with_value('os_admin,root') 50 | is_expected.to contain_trove_guestagent_config('mariadb/ignore_dbs').with_value('mariadb,information_schema,performance_schema,sys') 51 | is_expected.to contain_trove_guestagent_config('mariadb/guest_log_exposed_logs').with_value('general,slow_query') 52 | is_expected.to contain_trove_guestagent_config('mariadb/guest_log_long_query_time').with_value(1000) 53 | is_expected.to contain_trove_guestagent_config('mariadb/cluster_support').with_value(true) 54 | is_expected.to contain_trove_guestagent_config('mariadb/min_cluster_member_count').with_value(3) 55 | is_expected.to contain_trove_guestagent_config('mariadb/default_password_length').with_value(36) 56 | end 57 | end 58 | end 59 | 60 | on_supported_os({ 61 | :supported_os => OSDefaults.get_supported_os 62 | }).each do |os,facts| 63 | let (:facts) do 64 | facts.merge!(OSDefaults.get_facts()) 65 | end 66 | 67 | context "on #{os}" do 68 | it_configures 'trove::guestagent::mariadb' 69 | end 70 | end 71 | 72 | end 73 | -------------------------------------------------------------------------------- /spec/classes/trove_guestagent_mysql_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::guestagent::mysql' do 4 | 5 | shared_examples 'trove::guestagent::mysql' do 6 | 7 | context 'with defaults' do 8 | it 'configures mysql options with defaultss' do 9 | is_expected.to contain_trove_guestagent_config('mysql/docker_image').with_value('') 10 | is_expected.to contain_trove_guestagent_config('mysql/backup_docker_image').with_value('') 11 | is_expected.to contain_trove_guestagent_config('mysql/icmp').with_value('') 12 | is_expected.to contain_trove_guestagent_config('mysql/root_on_create').with_value('') 13 | is_expected.to contain_trove_guestagent_config('mysql/usage_timeout').with_value('') 14 | is_expected.to contain_trove_guestagent_config('mysql/volume_support').with_value('') 15 | is_expected.to contain_trove_guestagent_config('mysql/ignore_users').with_value('') 16 | is_expected.to contain_trove_guestagent_config('mysql/ignore_dbs').with_value('') 17 | is_expected.to contain_trove_guestagent_config('mysql/guest_log_exposed_logs').with_value('') 18 | is_expected.to contain_trove_guestagent_config('mysql/guest_log_long_query_time').with_value('') 19 | is_expected.to contain_trove_guestagent_config('mysql/default_password_length').with_value('') 20 | end 21 | end 22 | 23 | context 'with parameters overridden' do 24 | let :params do 25 | { 26 | :docker_image => 'mysql', 27 | :backup_docker_image => 'openstacktrove/db-backup-mysql:1.1.0', 28 | :icmp => false, 29 | :root_on_create => false, 30 | :usage_timeout => 400, 31 | :volume_support => true, 32 | :ignore_users => ['os_admin', 'root'], 33 | :ignore_dbs => ['mysql', 'information_schema', 'performance_schema', 'sys'], 34 | :guest_log_exposed_logs => ['general', 'slow_query'], 35 | :guest_log_long_query_time => 1000, 36 | :default_password_length => 36, 37 | } 38 | end 39 | 40 | it 'configures mysql options with given values' do 41 | is_expected.to contain_trove_guestagent_config('mysql/docker_image').with_value('mysql') 42 | is_expected.to contain_trove_guestagent_config('mysql/backup_docker_image').with_value('openstacktrove/db-backup-mysql:1.1.0') 43 | is_expected.to contain_trove_guestagent_config('mysql/icmp').with_value(false) 44 | is_expected.to contain_trove_guestagent_config('mysql/root_on_create').with_value(false) 45 | is_expected.to contain_trove_guestagent_config('mysql/usage_timeout').with_value(400) 46 | is_expected.to contain_trove_guestagent_config('mysql/volume_support').with_value(true) 47 | is_expected.to contain_trove_guestagent_config('mysql/ignore_users').with_value('os_admin,root') 48 | is_expected.to contain_trove_guestagent_config('mysql/ignore_dbs').with_value('mysql,information_schema,performance_schema,sys') 49 | is_expected.to contain_trove_guestagent_config('mysql/guest_log_exposed_logs').with_value('general,slow_query') 50 | is_expected.to contain_trove_guestagent_config('mysql/guest_log_long_query_time').with_value(1000) 51 | is_expected.to contain_trove_guestagent_config('mysql/default_password_length').with_value(36) 52 | end 53 | end 54 | end 55 | 56 | on_supported_os({ 57 | :supported_os => OSDefaults.get_supported_os 58 | }).each do |os,facts| 59 | let (:facts) do 60 | facts.merge!(OSDefaults.get_facts()) 61 | end 62 | 63 | context "on #{os}" do 64 | it_configures 'trove::guestagent::mysql' 65 | end 66 | end 67 | 68 | end 69 | -------------------------------------------------------------------------------- /spec/classes/trove_guestagent_service_credentials_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Red Hat, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | # 16 | require 'spec_helper' 17 | 18 | describe 'trove::guestagent::service_credentials' do 19 | 20 | shared_examples 'trove::guestagent::service_credentials' do 21 | 22 | let :params do 23 | { 24 | :password => 'verysecrete' 25 | } 26 | end 27 | 28 | context 'with default parameters' do 29 | it 'configures service credentials with default parameters' do 30 | is_expected.to contain_trove_guestagent_config('service_credentials/auth_url').with_value('http://127.0.0.1:5000') 31 | is_expected.to contain_trove_guestagent_config('service_credentials/username').with_value('trove') 32 | is_expected.to contain_trove_guestagent_config('service_credentials/password').with_value('verysecrete').with_secret(true) 33 | is_expected.to contain_trove_guestagent_config('service_credentials/project_name').with_value('services') 34 | is_expected.to contain_trove_guestagent_config('service_credentials/region_name').with_value('RegionOne') 35 | is_expected.to contain_trove_guestagent_config('service_credentials/user_domain_name').with_value('Default') 36 | is_expected.to contain_trove_guestagent_config('service_credentials/project_domain_name').with_value('Default') 37 | is_expected.to contain_trove_guestagent_config('service_credentials/system_scope').with_value('') 38 | end 39 | end 40 | 41 | context 'when overriding defaults' do 42 | before do 43 | params.merge!({ 44 | :auth_url => 'http://localhost:5000', 45 | :username => 'trove2', 46 | :project_name => 'services2', 47 | :region_name => 'RegionTwo', 48 | :user_domain_name => 'MyDomain', 49 | :project_domain_name => 'MyDomain', 50 | }) 51 | end 52 | 53 | it 'configures service credentials with default parameters' do 54 | is_expected.to contain_trove_guestagent_config('service_credentials/auth_url').with_value('http://localhost:5000') 55 | is_expected.to contain_trove_guestagent_config('service_credentials/username').with_value('trove2') 56 | is_expected.to contain_trove_guestagent_config('service_credentials/project_name').with_value('services2') 57 | is_expected.to contain_trove_guestagent_config('service_credentials/region_name').with_value('RegionTwo') 58 | is_expected.to contain_trove_guestagent_config('service_credentials/user_domain_name').with_value('MyDomain') 59 | is_expected.to contain_trove_guestagent_config('service_credentials/project_domain_name').with_value('MyDomain') 60 | is_expected.to contain_trove_guestagent_config('service_credentials/system_scope').with_value('') 61 | end 62 | end 63 | 64 | context 'when system_scope is set' do 65 | before do 66 | params.merge!( 67 | :system_scope => 'all' 68 | ) 69 | end 70 | it 'configures system-scoped credential' do 71 | is_expected.to contain_trove_guestagent_config('service_credentials/project_domain_name').with_value('') 72 | is_expected.to contain_trove_guestagent_config('service_credentials/project_name').with_value('') 73 | is_expected.to contain_trove_guestagent_config('service_credentials/system_scope').with_value('all') 74 | end 75 | end 76 | end 77 | 78 | on_supported_os({ 79 | :supported_os => OSDefaults.get_supported_os 80 | }).each do |os,facts| 81 | let (:facts) do 82 | facts.merge!(OSDefaults.get_facts()) 83 | end 84 | 85 | context "on #{os}" do 86 | it_configures 'trove::guestagent::service_credentials' 87 | end 88 | end 89 | 90 | end 91 | -------------------------------------------------------------------------------- /spec/classes/trove_healthcheck_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::healthcheck' do 4 | 5 | shared_examples_for 'trove::healthcheck' do 6 | 7 | context 'with default parameters' do 8 | let :params do 9 | {} 10 | end 11 | 12 | it 'configures default values' do 13 | is_expected.to contain_oslo__healthcheck('trove_config').with( 14 | :detailed => '', 15 | :backends => '', 16 | :allowed_source_ranges => '', 17 | :ignore_proxied_requests => '', 18 | :disable_by_file_path => '', 19 | :disable_by_file_paths => '', 20 | :enable_by_file_paths => '', 21 | ) 22 | end 23 | end 24 | 25 | context 'with specific parameters' do 26 | let :params do 27 | { 28 | :detailed => true, 29 | :backends => ['disable_by_file'], 30 | :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], 31 | :ignore_proxied_requests => false, 32 | :disable_by_file_path => '/etc/trove/healthcheck/disabled', 33 | :disable_by_file_paths => ['8779:/etc/trove/healthcheck/disabled'], 34 | :enable_by_file_paths => ['/etc/trove/healthcheck/enabled'], 35 | } 36 | end 37 | 38 | it 'configures specified values' do 39 | is_expected.to contain_oslo__healthcheck('trove_config').with( 40 | :detailed => true, 41 | :backends => ['disable_by_file'], 42 | :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], 43 | :ignore_proxied_requests => false, 44 | :disable_by_file_path => '/etc/trove/healthcheck/disabled', 45 | :disable_by_file_paths => ['8779:/etc/trove/healthcheck/disabled'], 46 | :enable_by_file_paths => ['/etc/trove/healthcheck/enabled'], 47 | ) 48 | end 49 | end 50 | end 51 | 52 | on_supported_os({ 53 | :supported_os => OSDefaults.get_supported_os 54 | }).each do |os,facts| 55 | context "on #{os}" do 56 | let (:facts) do 57 | facts.merge!(OSDefaults.get_facts()) 58 | end 59 | 60 | it_configures 'trove::healthcheck' 61 | end 62 | end 63 | 64 | end 65 | -------------------------------------------------------------------------------- /spec/classes/trove_keystone_auth_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Unit tests for trove::keystone::auth 3 | # 4 | 5 | require 'spec_helper' 6 | 7 | describe 'trove::keystone::auth' do 8 | shared_examples_for 'trove::keystone::auth' do 9 | context 'with default class parameters' do 10 | let :params do 11 | { :password => 'trove_password' } 12 | end 13 | 14 | it { is_expected.to contain_keystone__resource__service_identity('trove').with( 15 | :configure_user => true, 16 | :configure_user_role => true, 17 | :configure_endpoint => true, 18 | :configure_service => true, 19 | :service_name => 'trove', 20 | :service_type => 'database', 21 | :service_description => 'Trove Database Service', 22 | :region => 'RegionOne', 23 | :auth_name => 'trove', 24 | :password => 'trove_password', 25 | :email => 'trove@localhost', 26 | :tenant => 'services', 27 | :roles => ['admin'], 28 | :system_scope => 'all', 29 | :system_roles => [], 30 | :public_url => 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', 31 | :internal_url => 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', 32 | :admin_url => 'http://127.0.0.1:8779/v1.0/%(tenant_id)s', 33 | ) } 34 | end 35 | 36 | context 'when overriding parameters' do 37 | let :params do 38 | { :password => 'trove_password', 39 | :auth_name => 'alt_trove', 40 | :email => 'alt_trove@alt_localhost', 41 | :tenant => 'alt_service', 42 | :roles => ['admin', 'service'], 43 | :system_scope => 'alt_all', 44 | :system_roles => ['admin', 'member', 'reader'], 45 | :configure_endpoint => false, 46 | :configure_user => false, 47 | :configure_user_role => false, 48 | :configure_service => false, 49 | :service_description => 'Alternative Trove Database Service', 50 | :service_name => 'alt_service', 51 | :service_type => 'alt_database', 52 | :region => 'RegionTwo', 53 | :public_url => 'https://10.10.10.10:80', 54 | :internal_url => 'http://10.10.10.11:81', 55 | :admin_url => 'http://10.10.10.12:81' } 56 | end 57 | 58 | it { is_expected.to contain_keystone__resource__service_identity('trove').with( 59 | :configure_user => false, 60 | :configure_user_role => false, 61 | :configure_endpoint => false, 62 | :configure_service => false, 63 | :service_name => 'alt_service', 64 | :service_type => 'alt_database', 65 | :service_description => 'Alternative Trove Database Service', 66 | :region => 'RegionTwo', 67 | :auth_name => 'alt_trove', 68 | :password => 'trove_password', 69 | :email => 'alt_trove@alt_localhost', 70 | :tenant => 'alt_service', 71 | :roles => ['admin', 'service'], 72 | :system_scope => 'alt_all', 73 | :system_roles => ['admin', 'member', 'reader'], 74 | :public_url => 'https://10.10.10.10:80', 75 | :internal_url => 'http://10.10.10.11:81', 76 | :admin_url => 'http://10.10.10.12:81', 77 | ) } 78 | end 79 | end 80 | 81 | on_supported_os({ 82 | :supported_os => OSDefaults.get_supported_os 83 | }).each do |os,facts| 84 | context "on #{os}" do 85 | let (:facts) do 86 | facts.merge!(OSDefaults.get_facts()) 87 | end 88 | 89 | it_behaves_like 'trove::keystone::auth' 90 | end 91 | end 92 | end 93 | -------------------------------------------------------------------------------- /spec/classes/trove_policy_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::policy' do 4 | shared_examples 'trove::policy' do 5 | 6 | context 'setup policy with parameters' do 7 | let :params do 8 | { 9 | :enforce_scope => false, 10 | :enforce_new_defaults => false, 11 | :policy_path => '/etc/trove/policy.yaml', 12 | :policy_default_rule => 'default', 13 | :policy_dirs => '/etc/trove/policy.d', 14 | :policies => { 15 | 'context_is_admin' => { 16 | 'key' => 'context_is_admin', 17 | 'value' => 'foo:bar' 18 | } 19 | } 20 | } 21 | end 22 | 23 | it 'set up the policies' do 24 | is_expected.to contain_openstacklib__policy('/etc/trove/policy.yaml').with( 25 | :policies => { 26 | 'context_is_admin' => { 27 | 'key' => 'context_is_admin', 28 | 'value' => 'foo:bar' 29 | } 30 | }, 31 | :policy_path => '/etc/trove/policy.yaml', 32 | :file_user => 'root', 33 | :file_group => 'trove', 34 | :file_format => 'yaml', 35 | :purge_config => false, 36 | :tag => 'trove', 37 | ) 38 | is_expected.to contain_oslo__policy('trove_config').with( 39 | :enforce_scope => false, 40 | :enforce_new_defaults => false, 41 | :policy_file => '/etc/trove/policy.yaml', 42 | :policy_default_rule => 'default', 43 | :policy_dirs => '/etc/trove/policy.d', 44 | ) 45 | end 46 | end 47 | 48 | context 'with empty policies and purge_config enabled' do 49 | let :params do 50 | { 51 | :enforce_scope => false, 52 | :enforce_new_defaults => false, 53 | :policy_path => '/etc/trove/policy.yaml', 54 | :policies => {}, 55 | :purge_config => true, 56 | } 57 | end 58 | 59 | it 'set up the policies' do 60 | is_expected.to contain_openstacklib__policy('/etc/trove/policy.yaml').with( 61 | :policies => {}, 62 | :policy_path => '/etc/trove/policy.yaml', 63 | :file_user => 'root', 64 | :file_group => 'trove', 65 | :file_format => 'yaml', 66 | :purge_config => true, 67 | :tag => 'trove', 68 | ) 69 | is_expected.to contain_oslo__policy('trove_config').with( 70 | :enforce_scope => false, 71 | :enforce_new_defaults => false, 72 | :policy_file => '/etc/trove/policy.yaml', 73 | ) 74 | end 75 | end 76 | end 77 | 78 | on_supported_os({ 79 | :supported_os => OSDefaults.get_supported_os 80 | }).each do |os,facts| 81 | context "on #{os}" do 82 | let (:facts) do 83 | facts.merge!(OSDefaults.get_facts()) 84 | end 85 | 86 | it_behaves_like 'trove::policy' 87 | end 88 | end 89 | end 90 | -------------------------------------------------------------------------------- /spec/classes/trove_quota_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'trove::quota' do 4 | 5 | shared_examples_for 'trove::quota' do 6 | context 'with default parameters' do 7 | it 'contains default values' do 8 | is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with_value('') 9 | is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with_value('') 10 | is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with_value('') 11 | is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with_value('') 12 | is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with_value('') 13 | is_expected.to contain_trove_config('DEFAULT/quota_driver').with_value('') 14 | end 15 | end 16 | 17 | context 'with overridden parameters' do 18 | let :params do 19 | { :max_instances_per_tenant => 10, 20 | :max_ram_per_tenant => 10, 21 | :max_accepted_volume_size => 10, 22 | :max_volumes_per_tenant => 100, 23 | :max_backups_per_tenant => 100, 24 | :quota_driver => 'trove.quota.quota.DbQuotaDriver', 25 | } 26 | end 27 | it 'contains overrided values' do 28 | is_expected.to contain_trove_config('DEFAULT/max_instances_per_tenant').with_value(10) 29 | is_expected.to contain_trove_config('DEFAULT/max_ram_per_tenant').with_value(10) 30 | is_expected.to contain_trove_config('DEFAULT/max_accepted_volume_size').with_value(10) 31 | is_expected.to contain_trove_config('DEFAULT/max_volumes_per_tenant').with_value(100) 32 | is_expected.to contain_trove_config('DEFAULT/max_backups_per_tenant').with_value(100) 33 | is_expected.to contain_trove_config('DEFAULT/quota_driver').with_value('trove.quota.quota.DbQuotaDriver') 34 | end 35 | end 36 | end 37 | 38 | on_supported_os({ 39 | :supported_os => OSDefaults.get_supported_os 40 | }).each do |os,facts| 41 | context "on #{os}" do 42 | let (:facts) do 43 | facts.merge!(OSDefaults.get_facts()) 44 | end 45 | 46 | it_configures 'trove::quota' 47 | end 48 | end 49 | 50 | end 51 | -------------------------------------------------------------------------------- /spec/classes/trove_service_credentials_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Red Hat, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | # 16 | require 'spec_helper' 17 | 18 | describe 'trove::service_credentials' do 19 | 20 | shared_examples 'trove::service_credentials' do 21 | 22 | let :params do 23 | { 24 | :password => 'verysecrete' 25 | } 26 | end 27 | 28 | context 'with default parameters' do 29 | it 'configures service credentials with default parameters' do 30 | is_expected.to contain_trove_config('service_credentials/auth_url').with_value('http://127.0.0.1:5000') 31 | is_expected.to contain_trove_config('service_credentials/username').with_value('trove') 32 | is_expected.to contain_trove_config('service_credentials/password').with_value('verysecrete').with_secret(true) 33 | is_expected.to contain_trove_config('service_credentials/project_name').with_value('services') 34 | is_expected.to contain_trove_config('service_credentials/region_name').with_value('RegionOne') 35 | is_expected.to contain_trove_config('service_credentials/user_domain_name').with_value('Default') 36 | is_expected.to contain_trove_config('service_credentials/project_domain_name').with_value('Default') 37 | is_expected.to contain_trove_config('service_credentials/system_scope').with_value('') 38 | end 39 | end 40 | 41 | context 'when overriding defaults' do 42 | before do 43 | params.merge!({ 44 | :auth_url => 'http://localhost:5000', 45 | :username => 'trove2', 46 | :project_name => 'services2', 47 | :region_name => 'RegionTwo', 48 | :user_domain_name => 'MyDomain', 49 | :project_domain_name => 'MyDomain', 50 | }) 51 | end 52 | 53 | it 'configures service credentials with default parameters' do 54 | is_expected.to contain_trove_config('service_credentials/auth_url').with_value('http://localhost:5000') 55 | is_expected.to contain_trove_config('service_credentials/username').with_value('trove2') 56 | is_expected.to contain_trove_config('service_credentials/project_name').with_value('services2') 57 | is_expected.to contain_trove_config('service_credentials/region_name').with_value('RegionTwo') 58 | is_expected.to contain_trove_config('service_credentials/user_domain_name').with_value('MyDomain') 59 | is_expected.to contain_trove_config('service_credentials/project_domain_name').with_value('MyDomain') 60 | is_expected.to contain_trove_config('service_credentials/system_scope').with_value('') 61 | end 62 | end 63 | 64 | context 'when system_scope is set' do 65 | before do 66 | params.merge!( 67 | :system_scope => 'all' 68 | ) 69 | end 70 | it 'configures system-scoped credential' do 71 | is_expected.to contain_trove_config('service_credentials/project_domain_name').with_value('') 72 | is_expected.to contain_trove_config('service_credentials/project_name').with_value('') 73 | is_expected.to contain_trove_config('service_credentials/system_scope').with_value('all') 74 | end 75 | end 76 | end 77 | 78 | on_supported_os({ 79 | :supported_os => OSDefaults.get_supported_os 80 | }).each do |os,facts| 81 | let (:facts) do 82 | facts.merge!(OSDefaults.get_facts()) 83 | end 84 | 85 | context "on #{os}" do 86 | it_configures 'trove::service_credentials' 87 | end 88 | end 89 | 90 | end 91 | -------------------------------------------------------------------------------- /spec/classes/trove_taskmanager_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 eNovance SAS 3 | # 4 | # Author: Emilien Macchi 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 7 | # not use this file except in compliance with the License. You may obtain 8 | # a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 15 | # License for the specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | # Unit tests for trove::taskmanager 19 | # 20 | require 'spec_helper' 21 | 22 | describe 'trove::taskmanager' do 23 | 24 | shared_examples 'trove-taskmanager' do 25 | 26 | context 'with default parameters' do 27 | let :pre_condition do 28 | "class { 'trove::guestagent::service_credentials': 29 | password => 'verysectrete', 30 | }" 31 | end 32 | 33 | it 'includes required classes' do 34 | is_expected.to contain_class('trove::deps') 35 | is_expected.to contain_class('trove::params') 36 | end 37 | 38 | it 'installs trove-taskmanager package and service' do 39 | is_expected.to contain_service('trove-taskmanager').with( 40 | :name => platform_params[:taskmanager_service_name], 41 | :ensure => 'running', 42 | :hasstatus => true, 43 | :enable => true 44 | ) 45 | is_expected.to contain_package('trove-taskmanager').with( 46 | :name => platform_params[:taskmanager_package_name], 47 | :ensure => 'present', 48 | :tag => ['openstack', 'trove-package'] 49 | ) 50 | end 51 | 52 | it 'configures trove-taskmanager with default parameters' do 53 | is_expected.to contain_trove_config('DEFAULT/taskmanager_manager').with_value('trove.taskmanager.manager.Manager') 54 | is_expected.to contain_trove_config('DEFAULT/guest_config').with_value('/etc/trove/trove-guestagent.conf') 55 | end 56 | 57 | it 'configures trove-taskmanager with trove::guestagent' do 58 | is_expected.to contain_class('trove::guestagent') 59 | end 60 | end 61 | end 62 | 63 | on_supported_os({ 64 | :supported_os => OSDefaults.get_supported_os 65 | }).each do |os,facts| 66 | context "on #{os}" do 67 | let (:facts) do 68 | facts.merge!(OSDefaults.get_facts()) 69 | end 70 | 71 | let(:platform_params) do 72 | case facts[:os]['family'] 73 | when 'Debian' 74 | { :taskmanager_package_name => 'trove-taskmanager', 75 | :taskmanager_service_name => 'trove-taskmanager' } 76 | when 'RedHat' 77 | { :taskmanager_package_name => 'openstack-trove-taskmanager', 78 | :taskmanager_service_name => 'openstack-trove-taskmanager' } 79 | end 80 | end 81 | it_configures 'trove-taskmanager' 82 | end 83 | end 84 | 85 | end 86 | -------------------------------------------------------------------------------- /spec/shared_examples.rb: -------------------------------------------------------------------------------- 1 | shared_examples_for "a Puppet::Error" do |description| 2 | it "with message matching #{description.inspect}" do 3 | expect { is_expected.to have_class_count(1) }.to raise_error(Puppet::Error, description) 4 | end 5 | end 6 | 7 | shared_examples 'generic trove service' do |service| 8 | 9 | context 'with default parameters' do 10 | it 'installs package and service' do 11 | is_expected.to contain_package(service[:name]).with({ 12 | :name => service[:package_name], 13 | :ensure => 'present', 14 | :notify => "Service[#{service[:name]}]", 15 | :tag => ['openstack', 'trove-package'], 16 | }) 17 | is_expected.to contain_service(service[:name]).with({ 18 | :name => service[:service_name], 19 | :ensure => 'stopped', 20 | :hasstatus => true, 21 | :enable => false, 22 | :tag => 'trove-service', 23 | }) 24 | end 25 | end 26 | 27 | context 'with overridden parameters' do 28 | let :params do 29 | { :enabled => true, 30 | :package_ensure => '2014.1-1' } 31 | end 32 | 33 | it 'installs package and service' do 34 | is_expected.to contain_package(service[:name]).with({ 35 | :name => service[:package_name], 36 | :ensure => '2014.1-1', 37 | :notify => "Service[#{service[:name]}]", 38 | :tag => ['openstack', 'trove-package'], 39 | }) 40 | is_expected.to contain_service(service[:name]).with({ 41 | :name => service[:service_name], 42 | :ensure => 'running', 43 | :hasstatus => true, 44 | :enable => true, 45 | :tag => 'trove-service', 46 | }) 47 | end 48 | end 49 | 50 | context 'while not managing service state' do 51 | let :params do 52 | { :enabled => false, 53 | :manage_service => false } 54 | end 55 | 56 | it 'does not control service state' do 57 | is_expected.to contain_service(service[:name]).without_ensure 58 | end 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # Load libraries here to simulate how they live together in a real puppet run (for provider unit tests) 2 | $LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'inifile', 'lib')) 3 | $LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'openstacklib', 'lib')) 4 | require 'puppetlabs_spec_helper/module_spec_helper' 5 | require 'shared_examples' 6 | require 'puppet-openstack_spec_helper/facts' 7 | 8 | fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures')) 9 | 10 | RSpec.configure do |c| 11 | c.alias_it_should_behave_like_to :it_configures, 'configures' 12 | c.alias_it_should_behave_like_to :it_raises, 'raises' 13 | 14 | c.module_path = File.join(fixture_path, 'modules') 15 | end 16 | 17 | at_exit { RSpec::Puppet::Coverage.report! } 18 | -------------------------------------------------------------------------------- /spec/spec_helper_acceptance.rb: -------------------------------------------------------------------------------- 1 | require 'puppet-openstack_spec_helper/litmus_spec_helper' 2 | -------------------------------------------------------------------------------- /spec/unit/provider/trove_config/openstackconfig_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | provider_class = Puppet::Type.type(:trove_config).provider(:openstackconfig) 3 | describe provider_class do 4 | 5 | it 'should default to the default setting when no other one is specified' do 6 | resource = Puppet::Type::Trove_config.new( 7 | {:name => 'DEFAULT/foo', :value => 'bar'} 8 | ) 9 | provider = provider_class.new(resource) 10 | expect(provider.section).to eq('DEFAULT') 11 | expect(provider.setting).to eq('foo') 12 | end 13 | 14 | it 'should allow setting to be set explicitly' do 15 | resource = Puppet::Type::Trove_config.new( 16 | {:name => 'dude/foo', :value => 'bar'} 17 | ) 18 | provider = provider_class.new(resource) 19 | expect(provider.section).to eq('dude') 20 | expect(provider.setting).to eq('foo') 21 | end 22 | 23 | it 'should ensure absent when is specified as a value' do 24 | resource = Puppet::Type::Trove_config.new( 25 | {:name => 'dude/foo', :value => ''} 26 | ) 27 | provider = provider_class.new(resource) 28 | provider.exists? 29 | expect(resource[:ensure]).to eq :absent 30 | end 31 | 32 | it 'should ensure absent when value matches ensure_absent_val' do 33 | resource = Puppet::Type::Trove_config.new( 34 | {:name => 'dude/foo', :value => 'foo', :ensure_absent_val => 'foo' } 35 | ) 36 | provider = provider_class.new(resource) 37 | provider.exists? 38 | expect(resource[:ensure]).to eq :absent 39 | end 40 | 41 | end 42 | -------------------------------------------------------------------------------- /spec/unit/provider/trove_datastore_version/trove_spec.rb: -------------------------------------------------------------------------------- 1 | require 'puppet' 2 | require 'spec_helper' 3 | require 'puppet/provider/trove_datastore_version/trove' 4 | 5 | provider_class = Puppet::Type.type(:trove_datastore_version).provider(:trove) 6 | 7 | describe provider_class do 8 | 9 | let(:set_env) do 10 | ENV['OS_USERNAME'] = 'test' 11 | ENV['OS_PASSWORD'] = 'abc123' 12 | ENV['OS_PROJECT_NAME'] = 'test' 13 | ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000' 14 | end 15 | 16 | let :datastore_name do 17 | 'mysql' 18 | end 19 | 20 | let :datastore_version do 21 | '5.7.29' 22 | end 23 | 24 | let :resource do 25 | Puppet::Type::Trove_datastore_version.new({ 26 | :name => datastore_version, 27 | :ensure => 'present', 28 | :datastore => datastore_name, 29 | :manager => 'mysql', 30 | :image_id => '1234', 31 | :packages => 'mysql', 32 | :active => 1 33 | }) 34 | end 35 | 36 | let :provider do 37 | described_class.new(resource) 38 | end 39 | 40 | before :each do 41 | set_env 42 | end 43 | 44 | describe "#instances" do 45 | it "should have an instances method" do 46 | expect(provider.class).to respond_to(:instances) 47 | end 48 | end 49 | 50 | describe '#create' do 51 | it 'should call trove-manage' do 52 | expect(provider). to receive(:trove_manage).with( 53 | ['datastore_version_update', datastore_name, 54 | datastore_version, 'mysql', '1234', 'mysql', '1'] 55 | ).and_return(0) 56 | 57 | provider.create 58 | end 59 | end 60 | 61 | describe '#exists' do 62 | it 'should list datastore versions' do 63 | expect(provider_class).to receive(:openstack) 64 | .with('datastore version', 'list', '--quiet', '--format', 'csv', 65 | datastore_name) 66 | .and_return('"ID","Name","Version" 67 | "9c4d3fb1-644c-4543-9c37-49b3a801b66c","5.7.29","5.7.29" 68 | "406b75fb-0727-4923-a702-d677e3fd84ab","5.7.30","5.7.30" 69 | ') 70 | expect(provider.exists?).to be_truthy 71 | end 72 | end 73 | end 74 | -------------------------------------------------------------------------------- /spec/unit/provider/trove_guestagent_config/openstackconfig_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | provider_class = Puppet::Type.type(:trove_guestagent_config).provider(:openstackconfig) 3 | describe provider_class do 4 | 5 | it 'should default to the default setting when no other one is specified' do 6 | resource = Puppet::Type::Trove_guestagent_config.new( 7 | {:name => 'DEFAULT/foo', :value => 'bar'} 8 | ) 9 | provider = provider_class.new(resource) 10 | expect(provider.section).to eq('DEFAULT') 11 | expect(provider.setting).to eq('foo') 12 | end 13 | 14 | it 'should allow setting to be set explicitly' do 15 | resource = Puppet::Type::Trove_guestagent_config.new( 16 | {:name => 'dude/foo', :value => 'bar'} 17 | ) 18 | provider = provider_class.new(resource) 19 | expect(provider.section).to eq('dude') 20 | expect(provider.setting).to eq('foo') 21 | end 22 | 23 | it 'should ensure absent when is specified as a value' do 24 | resource = Puppet::Type::Trove_guestagent_config.new( 25 | {:name => 'dude/foo', :value => ''} 26 | ) 27 | provider = provider_class.new(resource) 28 | provider.exists? 29 | expect(resource[:ensure]).to eq :absent 30 | end 31 | 32 | it 'should ensure absent when value matches ensure_absent_val' do 33 | resource = Puppet::Type::Trove_guestagent_config.new( 34 | {:name => 'dude/foo', :value => 'foo', :ensure_absent_val => 'foo' } 35 | ) 36 | provider = provider_class.new(resource) 37 | provider.exists? 38 | expect(resource[:ensure]).to eq :absent 39 | end 40 | 41 | end 42 | -------------------------------------------------------------------------------- /spec/unit/provider/trove_spec.rb: -------------------------------------------------------------------------------- 1 | require 'puppet' 2 | require 'spec_helper' 3 | require 'puppet/provider/trove' 4 | 5 | 6 | klass = Puppet::Provider::Trove 7 | 8 | describe Puppet::Provider::Trove do 9 | 10 | after :each do 11 | klass.reset 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /spec/unit/type/trove_api_paste_ini_spec.rb: -------------------------------------------------------------------------------- 1 | require 'puppet' 2 | require 'puppet/type/trove_api_paste_ini' 3 | 4 | describe 'Puppet::Type.type(:trove_api_paste_ini)' do 5 | before :each do 6 | @trove_api_paste_ini = Puppet::Type.type(:trove_api_paste_ini).new(:name => 'DEFAULT/foo', :value => 'bar') 7 | end 8 | 9 | it 'should accept a valid value' do 10 | @trove_api_paste_ini[:value] = 'bar' 11 | expect(@trove_api_paste_ini[:value]).to eq('bar') 12 | end 13 | 14 | it 'should autorequire the package that install the file' do 15 | catalog = Puppet::Resource::Catalog.new 16 | anchor = Puppet::Type.type(:anchor).new(:name => 'trove::install::end') 17 | catalog.add_resource anchor, @trove_api_paste_ini 18 | dependency = @trove_api_paste_ini.autorequire 19 | expect(dependency.size).to eq(1) 20 | expect(dependency[0].target).to eq(@trove_api_paste_ini) 21 | expect(dependency[0].source).to eq(anchor) 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /spec/unit/type/trove_conductor_guestagent_spec.rb: -------------------------------------------------------------------------------- 1 | require 'puppet' 2 | require 'puppet/type/trove_guestagent_config' 3 | 4 | describe 'Puppet::Type.type(:trove_guestagent_config)' do 5 | before :each do 6 | @trove_guestagent_config = Puppet::Type.type(:trove_guestagent_config).new(:name => 'DEFAULT/foo', :value => 'bar') 7 | end 8 | 9 | it 'should autorequire the package that installs the file' do 10 | catalog = Puppet::Resource::Catalog.new 11 | anchor = Puppet::Type.type(:anchor).new(:name => 'trove::install::end') 12 | catalog.add_resource anchor, @trove_guestagent_config 13 | dependency = @trove_guestagent_config.autorequire 14 | expect(dependency.size).to eq(1) 15 | expect(dependency[0].target).to eq(@trove_guestagent_config) 16 | expect(dependency[0].source).to eq(anchor) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/unit/type/trove_config_spec.rb: -------------------------------------------------------------------------------- 1 | require 'puppet' 2 | require 'puppet/type/trove_config' 3 | 4 | describe 'Puppet::Type.type(:trove_config)' do 5 | before :each do 6 | @trove_config = Puppet::Type.type(:trove_config).new(:name => 'DEFAULT/foo', :value => 'bar') 7 | end 8 | 9 | it 'should require a name' do 10 | expect { 11 | Puppet::Type.type(:trove_config).new({}) 12 | }.to raise_error(Puppet::Error, 'Title or name must be provided') 13 | end 14 | 15 | it 'should not expect a name with whitespace' do 16 | expect { 17 | Puppet::Type.type(:trove_config).new(:name => 'f oo') 18 | }.to raise_error(Puppet::Error, /Parameter name failed/) 19 | end 20 | 21 | it 'should fail when there is no section' do 22 | expect { 23 | Puppet::Type.type(:trove_config).new(:name => 'foo') 24 | }.to raise_error(Puppet::Error, /Parameter name failed/) 25 | end 26 | 27 | it 'should not require a value when ensure is absent' do 28 | Puppet::Type.type(:trove_config).new(:name => 'DEFAULT/foo', :ensure => :absent) 29 | end 30 | 31 | it 'should accept a valid value' do 32 | @trove_config[:value] = 'bar' 33 | expect(@trove_config[:value]).to eq(['bar']) 34 | end 35 | 36 | it 'should accept a value with whitespace' do 37 | @trove_config[:value] = 'b ar' 38 | expect(@trove_config[:value]).to eq(['b ar']) 39 | end 40 | 41 | it 'should accept valid ensure values' do 42 | @trove_config[:ensure] = :present 43 | expect(@trove_config[:ensure]).to eq(:present) 44 | @trove_config[:ensure] = :absent 45 | expect(@trove_config[:ensure]).to eq(:absent) 46 | end 47 | 48 | it 'should not accept invalid ensure values' do 49 | expect { 50 | @trove_config[:ensure] = :latest 51 | }.to raise_error(Puppet::Error, /Invalid value/) 52 | end 53 | 54 | it 'should autorequire the package that installs the file' do 55 | catalog = Puppet::Resource::Catalog.new 56 | anchor = Puppet::Type.type(:anchor).new(:name => 'trove::install::end') 57 | catalog.add_resource anchor, @trove_config 58 | dependency = @trove_config.autorequire 59 | expect(dependency.size).to eq(1) 60 | expect(dependency[0].target).to eq(@trove_config) 61 | expect(dependency[0].source).to eq(anchor) 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /spec/unit/type/trove_guestagent_config_spec.rb: -------------------------------------------------------------------------------- 1 | require 'puppet' 2 | require 'puppet/type/trove_guestagent_config' 3 | 4 | describe 'Puppet::Type.type(:trove_guestagent_config)' do 5 | before :each do 6 | @trove_guestagent_config = Puppet::Type.type(:trove_guestagent_config).new(:name => 'DEFAULT/foo', :value => 'bar') 7 | end 8 | 9 | it 'should require a name' do 10 | expect { 11 | Puppet::Type.type(:trove_guestagent_config).new({}) 12 | }.to raise_error(Puppet::Error, 'Title or name must be provided') 13 | end 14 | 15 | it 'should not expect a name with whitespace' do 16 | expect { 17 | Puppet::Type.type(:trove_guestagent_config).new(:name => 'f oo') 18 | }.to raise_error(Puppet::Error, /Parameter name failed/) 19 | end 20 | 21 | it 'should fail when there is no section' do 22 | expect { 23 | Puppet::Type.type(:trove_guestagent_config).new(:name => 'foo') 24 | }.to raise_error(Puppet::Error, /Parameter name failed/) 25 | end 26 | 27 | it 'should not require a value when ensure is absent' do 28 | Puppet::Type.type(:trove_guestagent_config).new(:name => 'DEFAULT/foo', :ensure => :absent) 29 | end 30 | 31 | it 'should accept a valid value' do 32 | @trove_guestagent_config[:value] = 'bar' 33 | expect(@trove_guestagent_config[:value]).to eq(['bar']) 34 | end 35 | 36 | it 'should accept a value with whitespace' do 37 | @trove_guestagent_config[:value] = 'b ar' 38 | expect(@trove_guestagent_config[:value]).to eq(['b ar']) 39 | end 40 | 41 | it 'should accept valid ensure values' do 42 | @trove_guestagent_config[:ensure] = :present 43 | expect(@trove_guestagent_config[:ensure]).to eq(:present) 44 | @trove_guestagent_config[:ensure] = :absent 45 | expect(@trove_guestagent_config[:ensure]).to eq(:absent) 46 | end 47 | 48 | it 'should not accept invalid ensure values' do 49 | expect { 50 | @trove_guestagent_config[:ensure] = :latest 51 | }.to raise_error(Puppet::Error, /Invalid value/) 52 | end 53 | 54 | it 'should autorequire the package that installs the file' do 55 | catalog = Puppet::Resource::Catalog.new 56 | anchor = Puppet::Type.type(:anchor).new(:name => 'trove::install::end') 57 | catalog.add_resource anchor, @trove_guestagent_config 58 | dependency = @trove_guestagent_config.autorequire 59 | expect(dependency.size).to eq(1) 60 | expect(dependency[0].target).to eq(@trove_guestagent_config) 61 | expect(dependency[0].source).to eq(anchor) 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | minversion = 3.1 3 | skipsdist = True 4 | envlist = releasenotes 5 | ignore_basepython_conflict = True 6 | 7 | [testenv] 8 | basepython = python3 9 | 10 | [testenv:releasenotes] 11 | deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} 12 | -r{toxinidir}/doc/requirements.txt 13 | commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 14 | --------------------------------------------------------------------------------