From c6d90bc61c23fb52f8d0156c3379666e8c92a3a8 Mon Sep 17 00:00:00 2001 From: Igor Gajsin Date: Fri, 29 Jul 2016 12:59:33 +0300 Subject: [PATCH] configure manila First approach to make configuration files Change-Id: Ifbbd1b38402e5140d7884246dfd6bdb53870449a --- deployment_scripts/puppet/manifests/site.pp | 94 +++++++++++++++++++++ repositories/python/manila | 2 +- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 deployment_scripts/puppet/manifests/site.pp diff --git a/deployment_scripts/puppet/manifests/site.pp b/deployment_scripts/puppet/manifests/site.pp new file mode 100644 index 0000000..335c927 --- /dev/null +++ b/deployment_scripts/puppet/manifests/site.pp @@ -0,0 +1,94 @@ +# Copyright 2016 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +notify {'MOUDULAR: fuel-plugin-manila/site': } + +$manila = hiera_hash('manila', {}) +$db_user = 'manila' +$db_pass = $manila['db_password'] +$db_host = hiera('database_vip') +$sql_conn = "mysql+pymysql://${db_user}:${db_pass}@${db_host}/manila?charset=utf8" + +$rabbit_hash = hiera_hash('rabbit', {}) +$amqp_user = $rabbit_hash['user'] +$amqp_password = $rabbit_hash['password'] +$amqp_hosts = split(hiera('amqp_hosts', ''), ',') + +$network_metadata = hiera_hash('network_metadata', {}) +$mgmt_ip = $network_metadata['vips']['management']['ipaddr'] + +$verbose = hiera('verbose') +$debug = hiera('debug') +$use_syslog = hiera('use_syslog') + +$neutron = hiera_hash('quantum_settings', {}) +$neutron_pass = $neutron['keystone']['admin_password'] +$neutron_url = "http://${mgmt_ip}:35357/" + +$cinder = hiera_hash('cinder', {}) +$cinder_pass = $cinder['user_password'] +$auth_url = "http://${mgmt_ip}:35357/" + +$nova = hiera_hash('nova', {}) +$nova_pass = $nova['user_password'] + +class {'::manila': + sql_connection => $sql_conn, + rabbit_userid => $amqp_user, + rabbit_hosts => $amqp_hosts, + rabbit_password => $amqp_password, + package_ensure => 'absent', + verbose => $verbose, + debug => $debug, + use_syslog => $use_syslog, + log_facility => 'LOG_LOCAL4', +} + +class {'::manila::api': + keystone_password => $manila['user_password'], + keystone_auth_host => $mgmt_ip, + package_ensure => 'absent', + enabled => false, + manage_service => false, +} + +class {'::manila::quota': +} + +class {'::manila::network::neutron': + neutron_admin_password => $neutron_pass, + neutron_admin_auth_url => $neutron_url, +} + +class {'::manila::volume::cinder': + cinder_admin_password => $cinder_pass, + cinder_admin_auth_url => $auth_url, +} + +class {'::manila::compute::nova': + nova_admin_password => $nova_pass, + nova_admin_auth_url => $auth_url, +} + +class {'::manila::backends': + enabled_share_backends => 'generic', +} + +$gen = {'generic' => + {'share_backend_name' => 'generic', + 'driver_handles_share_servers' => 'true', + } +} + +create_resources('::manila::backend::generic', $gen) diff --git a/repositories/python/manila b/repositories/python/manila index 7fc2348..d74bd05 160000 --- a/repositories/python/manila +++ b/repositories/python/manila @@ -1 +1 @@ -Subproject commit 7fc23483a553f3d110a29308390af432b9479508 +Subproject commit d74bd053dd005fc5aedc3c2d168cbf5ab874d4f8