diff --git a/deployment_scripts/puppet/manifests/override_hiera.pp b/deployment_scripts/puppet/manifests/override_hiera.pp new file mode 100644 index 0000000..fbc1c7a --- /dev/null +++ b/deployment_scripts/puppet/manifests/override_hiera.pp @@ -0,0 +1,3 @@ +notify {'MODULAR: manila/override_hiera'} + +override_hiera('/etc/hiera/plugins/fuel-plugin-manila.yaml') diff --git a/deployment_scripts/puppet/manifests/populate_hiera.pp b/deployment_scripts/puppet/manifests/populate_hiera.pp new file mode 100644 index 0000000..7d53599 --- /dev/null +++ b/deployment_scripts/puppet/manifests/populate_hiera.pp @@ -0,0 +1,3 @@ +notify {'MODULAR: manila/override_hiera'} + +populate_hiera('/etc/hiera/plugins/fuel-plugin-manila.yaml') diff --git a/deployment_scripts/puppet/manifests/populate_hiera.pp~ b/deployment_scripts/puppet/manifests/populate_hiera.pp~ new file mode 100644 index 0000000..fbc1c7a --- /dev/null +++ b/deployment_scripts/puppet/manifests/populate_hiera.pp~ @@ -0,0 +1,3 @@ +notify {'MODULAR: manila/override_hiera'} + +override_hiera('/etc/hiera/plugins/fuel-plugin-manila.yaml') diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/Gemfile b/deployment_scripts/puppet/modules/manila_auxiliary/Gemfile new file mode 100644 index 0000000..b33108e --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 3.3'] +gem 'puppet', puppetversion +gem 'puppetlabs_spec_helper', '>= 0.8.2' +gem 'puppet-lint', '>= 1.0.0' +gem 'facter', '>= 1.7.0' diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/README.md b/deployment_scripts/puppet/modules/manila_auxiliary/README.md new file mode 100644 index 0000000..8721fe5 --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/README.md @@ -0,0 +1,83 @@ +# manila_auxiliary + +#### Table of Contents + +1. [Description](#description) +1. [Setup - The basics of getting started with manila_auxiliary](#setup) + * [What manila_auxiliary affects](#what-manila_auxiliary-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with manila_auxiliary](#beginning-with-manila_auxiliary) +1. [Usage - Configuration options and additional functionality](#usage) +1. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +1. [Limitations - OS compatibility, etc.](#limitations) +1. [Development - Guide for contributing to the module](#development) + +## Description + +Start with a one- or two-sentence summary of what the module does and/or what +problem it solves. This is your 30-second elevator pitch for your module. +Consider including OS/Puppet version it works with. + +You can give more descriptive information in a second paragraph. This paragraph +should answer the questions: "What does this module *do*?" and "Why would I use +it?" If your module has a range of functionality (installation, configuration, +management, etc.), this is the time to mention it. + +## Setup + +### What manila_auxiliary affects **OPTIONAL** + +If it's obvious what your module touches, you can skip this section. For +example, folks can probably figure out that your mysql_instance module affects +their MySQL instances. + +If there's more that they should know about, though, this is the place to mention: + +* A list of files, packages, services, or operations that the module will alter, + impact, or execute. +* Dependencies that your module automatically installs. +* Warnings or other important notices. + +### Setup Requirements **OPTIONAL** + +If your module requires anything extra before setting up (pluginsync enabled, +etc.), mention it here. + +If your most recent release breaks compatibility or requires particular steps +for upgrading, you might want to include an additional "Upgrading" section +here. + +### Beginning with manila_auxiliary + +The very basic steps needed for a user to get the module up and running. This +can include setup steps, if necessary, or it can be an example of the most +basic use of the module. + +## Usage + +This section is where you describe how to customize, configure, and do the +fancy stuff with your module here. It's especially helpful if you include usage +examples and code samples for doing things with your module. + +## Reference + +Here, include a complete list of your module's classes, types, providers, +facts, along with the parameters for each. Users refer to this section (thus +the name "Reference") to find specific details; most users don't read it per +se. + +## Limitations + +This is where you list OS compatibility, version compatibility, etc. If there +are Known Issues, you might want to include them under their own heading here. + +## Development + +Since your module is awesome, other users will want to play with it. Let them +know what the ground rules for contributing are. + +## Release Notes/Contributors/Etc. **Optional** + +If you aren't using changelog, put your release notes here (though you should +consider using changelog). You can also add any additional sections you feel +are necessary or important to include here. Please use the `## ` header. diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/Rakefile b/deployment_scripts/puppet/modules/manila_auxiliary/Rakefile new file mode 100644 index 0000000..a16ed29 --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/Rakefile @@ -0,0 +1,17 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] + +desc "Validate manifests, templates, and ruby files" +task :validate do + Dir['manifests/**/*.pp'].each do |manifest| + sh "puppet parser validate --noop #{manifest}" + end + Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| + sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ + end + Dir['templates/**/*.erb'].each do |template| + sh "erb -P -x -T '-' #{template} | ruby -c" + end +end diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/manifests/init.pp b/deployment_scripts/puppet/modules/manila_auxiliary/manifests/init.pp new file mode 100644 index 0000000..0211963 --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/manifests/init.pp @@ -0,0 +1,48 @@ +# Class: manila_auxiliary +# =========================== +# +# Full description of class manila_auxiliary here. +# +# Parameters +# ---------- +# +# Document parameters here. +# +# * `sample parameter` +# Explanation of what this parameter affects and what it defaults to. +# e.g. "Specify one or more upstream ntp servers as an array." +# +# Variables +# ---------- +# +# Here you should define a list of variables that this module would require. +# +# * `sample variable` +# Explanation of how this variable affects the function of this class and if +# it has a default. e.g. "The parameter enc_ntp_servers must be set by the +# External Node Classifier as a comma separated list of hostnames." (Note, +# global variables should be avoided in favor of class parameters as +# of Puppet 2.6.) +# +# Examples +# -------- +# +# @example +# class { 'manila_auxiliary': +# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ], +# } +# +# Authors +# ------- +# +# Author Name +# +# Copyright +# --------- +# +# Copyright 2016 Your name here, unless otherwise noted. +# +class manila_auxiliary { + + +} diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/metadata.json b/deployment_scripts/puppet/modules/manila_auxiliary/metadata.json new file mode 100644 index 0000000..1f0f03b --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/metadata.json @@ -0,0 +1,15 @@ +{ + "name": "mirantis-manila_auxiliary", + "version": "0.1.0", + "author": "mirantis", + "summary": "Auxilary things for manila installation and configuration", + "license": "Apache-2.0", + "source": "", + "project_page": null, + "issues_url": null, + "dependencies": [ + {"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"} + ], + "data_provider": null +} + diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/spec/classes/init_spec.rb b/deployment_scripts/puppet/modules/manila_auxiliary/spec/classes/init_spec.rb new file mode 100644 index 0000000..1866721 --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/spec/classes/init_spec.rb @@ -0,0 +1,7 @@ +require 'spec_helper' +describe 'manila_auxiliary' do + + context 'with defaults for all parameters' do + it { should contain_class('manila_auxiliary') } + end +end diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/spec/spec_helper.rb b/deployment_scripts/puppet/modules/manila_auxiliary/spec/spec_helper.rb new file mode 100644 index 0000000..2c6f566 --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/deployment_scripts/puppet/modules/manila_auxiliary/tests/init.pp b/deployment_scripts/puppet/modules/manila_auxiliary/tests/init.pp new file mode 100644 index 0000000..507dcaf --- /dev/null +++ b/deployment_scripts/puppet/modules/manila_auxiliary/tests/init.pp @@ -0,0 +1,12 @@ +# The baseline for module testing used by Puppet Labs is that each manifest +# should have a corresponding test manifest that declares that class or defined +# type. +# +# Tests are then run by using puppet apply --noop (to check for compilation +# errors and view a log of events) or by fully applying the test in a virtual +# environment (to compare the resulting system state to the desired state). +# +# Learn more about module testing here: +# http://docs.puppetlabs.com/guides/tests_smoke.html +# +include manila_auxiliary diff --git a/docs/check-list.org b/docs/check-list.org new file mode 100644 index 0000000..0c06fab --- /dev/null +++ b/docs/check-list.org @@ -0,0 +1,13 @@ +Steps for installation and configuration of the manila: +* Installation +* Configuration +** DONE create user + openstack user create manila --password manila + openstack role add --user manila --project services admin +** DONE create service + openstack service create --name manila --description "OpenStack Shared Filesystems" share + openstack service create --name manilav2 --description "OpenStack Shared Filesystems" sharev2 +** TODO create endpoint +* Notest +** Receive the puppet-manila module when the plugin is bulded +** How to generate password in puppet? diff --git a/docs/check-list.org~ b/docs/check-list.org~ new file mode 100644 index 0000000..e8a7536 --- /dev/null +++ b/docs/check-list.org~ @@ -0,0 +1,2 @@ +1. openstack user create manila --password manila + done diff --git a/fuel-plugin-manila-1.0-1.0.0-1.noarch.rpm b/fuel-plugin-manila-1.0-1.0.0-1.noarch.rpm new file mode 100644 index 0000000..1cbdaeb Binary files /dev/null and b/fuel-plugin-manila-1.0-1.0.0-1.noarch.rpm differ diff --git a/node_roles.yaml b/node_roles.yaml index 2fe9d66..f5a7c20 100644 --- a/node_roles.yaml +++ b/node_roles.yaml @@ -1,8 +1,8 @@ fuel-plugin-manila_role: # Role name - name: "Set here the name for the role. This name will be displayed in the Fuel web UI" + name: "Manila pomanila" # Role description - description: "Write description for your role" + description: "Desc of the manila role" # If primary then during orchestration this role will be # separated into primary-role and role has_primary: false