diff --git a/README.md b/README.md index e4b53cc..052decf 100644 --- a/README.md +++ b/README.md @@ -1,135 +1,104 @@ Team and repository tags ======================== [![Team and repository tags](https://governance.openstack.org/tc/badges/puppet-ceph.svg)](https://governance.openstack.org/tc/reference/tags/index.html) ceph ==== #### Table of Contents 1. [Overview - What is the ceph module?](#overview) 2. [Module Description - What does the module do?](#module-description) 3. [Setup - The basics of getting started with ceph](#setup) 4. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 5. [Limitations - OS compatibility, etc.](#limitations) 6. [Use Cases - Examples of how to use this module](#limitations) 7. [Development - Guide for contributing to the module](#development) -8. [Beaker Integration Tests - Apply the module and test results](#beaker-integration-tests) -9. [Contributors - Those with commits](#contributors) -10. [Release Notes - Notes on the most recent updates to the module](#release-notes) -11. [Repository - Repository for the module](#repository) +8. [Contributors - Those with commits](#contributors) +9. [Release Notes - Notes on the most recent updates to the module](#release-notes) +10. [Repository - Repository for the module](#repository) Overview -------- The ceph module is intended to leverage all [Ceph](http://ceph.com/) has to offer and allow for a wide range of use case. Although hosted on the OpenStack infrastructure, it does not require to sign a CLA nor is it restricted to OpenStack users. It benefits from a structured development process that helps federate the development effort. Each feature is tested with integration tests involving virtual machines to show that it performs as expected when used with a realistic scenario. Module Description ------------------ The ceph module deploys a [Ceph](http://ceph.com/) cluster ( MON, OSD ), the [Cephfs](http://docs.ceph.com/docs/master/cephfs/) file system and the [RadosGW](http://docs.ceph.com/docs/firefly/radosgw/) object store. It provides integration with various environments ( OpenStack ... ) and components to be used by third party puppet modules that depend on a Ceph cluster. Setup ----- Implementation -------------- A [blueprint](https://wiki.openstack.org/wiki/Puppet/ceph-blueprint) contains an inventory of what is desirable. It was decided to start from scratch and implement one module at a time. Limitations ----------- We follow the OS compatibility of Ceph. With the release of infernalis this is currently: * CentOS 7 or later * Debian Jessie 8.x or later * Ubuntu Trusty 14.04 or later * Fedora 22 or later Use Cases --------- * [I want to try this module, heard of ceph, want to see it in action](USECASES.md#i-want-to-try-this-module,-heard-of-ceph,-want-to-see-it-in-action) * [I want to operate a production cluster](USECASES.md#i-want-to-operate-a-production-cluster) * [I want to run benchmarks on three new machines](USECASES.md#i-want-to-run-benchmarks-on-three-new-machines) Development ----------- ``` git clone https://github.com/openstack/puppet-ceph.git cd puppet-ceph sudo gem install bundler bundle install ``` The developer documentation of the puppet-openstack project is the reference: * https://docs.openstack.org/puppet-openstack-guide/latest/ Mailing lists: * [puppet-openstack](https://groups.google.com/a/puppetlabs.com/forum/#!forum/puppet-openstack) * [ceph-devel](http://ceph.com/resources/mailing-list-irc/) IRC channels: * irc.freenode.net#puppet-openstack * irc.oftc.net#ceph-devel -Beaker Integration Tests ------------------------- - -Relies on -[rspec-beaker](https://github.com/puppetlabs/beaker-rspec) -and tests are in spec/acceptance. -It also requires [Vagrant and Virtualbox](http://docs-v1.vagrantup.com/v1/docs/getting-started/) -. - -``` -bundle install -bundle exec rspec spec/acceptance -``` - -The BEAKER_set environment variable contains the resource set of linux -distribution configurations for which integration tests are going -to be run. Available values are - -* two-centos-70-x64 -* centos-70-x64 -* two-ubuntu-server-1404-x64 -* ubuntu-server-1404-x64 - -The default is - -``` -BEAKER_set=two-ubuntu-server-1404-x64 \ -bundle exec rspec spec/acceptance -``` - Development ----------- Developer documentation for the entire puppet-openstack project. * https://docs.openstack.org/puppet-openstack-guide/latest/ Contributors ------------ * https://github.com/openstack/puppet-ceph/graphs/contributors Release Notes ------------- * https://docs.openstack.org/releasenotes/puppet-ceph Repository ------------- * https://opendev.org/openstack/puppet-ceph diff --git a/spec/acceptance/ceph_mon_osd_spec.rb b/spec/acceptance/ceph_mon_osd_spec.rb index 18f5466..a44bfa3 100644 --- a/spec/acceptance/ceph_mon_osd_spec.rb +++ b/spec/acceptance/ceph_mon_osd_spec.rb @@ -1,72 +1,75 @@ # # Copyright (C) 2015 David Gurtner # # Author: David Gurtner # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require 'spec_helper_acceptance' describe 'ceph mon osd' do context 'default parameters' do it 'should install one monitor and one OSD on /srv/data' do pp = <<-EOS class { 'ceph::repo': enable_sig => true, enable_epel => false, ceph_mirror => $ceph_mirror, } class { 'ceph': fsid => '82274746-9a2c-426b-8c51-107fb0d890c6', mon_host => $::ipaddress, authentication_type => 'none', osd_pool_default_size => '1', osd_pool_default_min_size => '1', osd_max_object_namespace_len => '64', osd_max_object_name_len => '256', } ceph_config { 'global/osd_journal_size': value => '100'; } ceph::mgr { 'a': authentication_type => 'none', } ceph::mon { 'a': public_addr => $::ipaddress, authentication_type => 'none', } ceph::osd { '/srv/data': } EOS apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) if os[:family].casecmp('RedHat') == 0 - shell 'sleep 10' # we need to wait a bit until the OSD is up - - shell 'ceph -s', { :acceptable_exit_codes => [0] } do |r| - expect(r.stdout).to match(/mon: 1 daemons/) - expect(r.stderr).to be_empty + describe command('sleep 10') do + its(:exit_status) { should eq 0 } end - shell 'ceph osd tree | grep osd.0', { :acceptable_exit_codes => [0] } do |r| - expect(r.stdout).to match(/up/) - expect(r.stderr).to be_empty + describe command('ceph -s') do + its(:exit_status) { should eq 0 } + its(:stdout) { should match /mon: 1 daemons/) } + its(:stderr) { should be_empty } end + + describe command('ceph osd tree | grep osd.0') do + its(:exit_status) { should eq 0 } + its(:stdout) { should match /up/ } + its(:stderr) { should be_empty } end end end end diff --git a/spec/acceptance/nodesets/centos-70-x64.yml b/spec/acceptance/nodesets/centos-70-x64.yml deleted file mode 100644 index b75c1f1..0000000 --- a/spec/acceptance/nodesets/centos-70-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - - osd - - client - platform: el-7-x86_64 - box: puppetlabs/centos-7.0-64-nocm - box_url: https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.0-64-nocm - hypervisor: vagrant - ip: 10.11.12.2 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/default.yml b/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 1cdca66..0000000 --- a/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,22 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - platform: ubuntu-1404-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm - hypervisor: vagrant - ip: 10.11.12.2 - second: - roles: - - osd - - client - platform: ubuntu-1404-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm - hypervisor: vagrant - ip: 10.11.12.3 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/nodepool-centos7.yml b/spec/acceptance/nodesets/nodepool-centos7.yml deleted file mode 100644 index d52883d..0000000 --- a/spec/acceptance/nodesets/nodepool-centos7.yml +++ /dev/null @@ -1,13 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - - osd - - client - platform: el-7-x86_64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/nodepool-centos8.yml b/spec/acceptance/nodesets/nodepool-centos8.yml deleted file mode 100644 index 4111da1..0000000 --- a/spec/acceptance/nodesets/nodepool-centos8.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-80-x64: - roles: - - master - platform: el-8-x86_64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/nodepool-trusty.yml b/spec/acceptance/nodesets/nodepool-trusty.yml deleted file mode 100644 index dc22d56..0000000 --- a/spec/acceptance/nodesets/nodepool-trusty.yml +++ /dev/null @@ -1,13 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - - osd - - client - platform: ubuntu-14.04-amd64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/nodepool-xenial.yml b/spec/acceptance/nodesets/nodepool-xenial.yml deleted file mode 100644 index 1f1c3c5..0000000 --- a/spec/acceptance/nodesets/nodepool-xenial.yml +++ /dev/null @@ -1,13 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - - osd - - client - platform: ubuntu-16.04-amd64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/two-centos-70-x64.yml b/spec/acceptance/nodesets/two-centos-70-x64.yml deleted file mode 100644 index d2607a3..0000000 --- a/spec/acceptance/nodesets/two-centos-70-x64.yml +++ /dev/null @@ -1,22 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - platform: el-7-x86_64 - box: puppetlabs/centos-7.0-64-nocm - box_url: https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.0-64-nocm - hypervisor: vagrant - ip: 10.11.12.2 - second: - roles: - - osd - - client - platform: el-7-x86_64 - box: puppetlabs/centos-7.0-64-nocm - box_url: https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.0-64-nocm - hypervisor: vagrant - ip: 10.11.12.3 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/two-ubuntu-server-1404-x64.yml b/spec/acceptance/nodesets/two-ubuntu-server-1404-x64.yml deleted file mode 100644 index 1cdca66..0000000 --- a/spec/acceptance/nodesets/two-ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,22 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - platform: ubuntu-1404-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm - hypervisor: vagrant - ip: 10.11.12.2 - second: - roles: - - osd - - client - platform: ubuntu-1404-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm - hypervisor: vagrant - ip: 10.11.12.3 -CONFIG: - type: foss - set_env: false diff --git a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index ff07927..0000000 --- a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,15 +0,0 @@ -HOSTS: - first: - roles: - - master - - mon - - osd - - client - platform: ubuntu-1404-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm - hypervisor: vagrant - ip: 10.11.12.2 -CONFIG: - type: foss - set_env: false diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 9196bc9..d51dfdb 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1 +1 @@ -require 'puppet-openstack_spec_helper/beaker_spec_helper' +require 'puppet-openstack_spec_helper/litmus_spec_helper'