diff --git a/.kitchen.yml b/.kitchen.yml index ae7e508..bf59323 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -1,7 +1,8 @@ --- -driver_plugin: vagrant -driver_config: - vagrantfile_erb: test/integration/Vagrantfile.erb +driver: + name: vagrant + vagrantfiles: + - test/integration/Vagrantfile.rb require_chef_omnibus: true platforms: @@ -34,9 +35,9 @@ suites: config: fsid: ae3f1d03-bacd-4a90-b869-1a4fabb107f2 mon_initial_members: - - "127.0.0.1" - name: osd run_list: + - "role[ceph-mon]" - "role[ceph-osd]" attributes: *defaults - name: mon @@ -45,10 +46,12 @@ suites: attributes: *defaults - name: mds run_list: + - "role[ceph-mon]" - "role[ceph-mds]" attributes: *defaults - name: radosgw run_list: + - "role[ceph-mon]" - "role[ceph-radosgw]" attributes: *defaults - name: aio diff --git a/Berksfile b/Berksfile index 8b96da8..73404dc 100644 --- a/Berksfile +++ b/Berksfile @@ -1,4 +1,4 @@ -site :opscode +source 'https://supermarket.chef.io' metadata diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9bf1c..efd66af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ ceph ==== +v0.9.0 (2016-07-12) +------------------- + +- Multiple fixes to tests, Berksfile etc. +- Default ceph version to install is 'jewel'. +- Run daemons as ceph unprivileged user (from Infernalis onwards). +- Removed support for the 'ceph_extras' repository, it does not exist anymore. + v0.2.0 (2014-03-03) ------------------- diff --git a/README.md b/README.md index eed13cc..53bdecc 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The other set of attributes that this recipe needs is `node['ceph']['osd_devices * {'device' => '/dev/sdb'} - Use a full disk for the OSD, with a small partition for the journal * {'type' => 'directory', 'device' => '/src/node/sdb1/ceph'} - Use a directory, and have a small file for the journal -* {'device' => '/dev/sde', 'dmcrypt' => true} - Store the data encrypted by passing --dmcrypt to `ceph-disk-prepare` +* {'device' => '/dev/sde', 'dmcrypt' => true} - Store the data encrypted by passing --dmcrypt to `ceph-disk prepare` * {'device' => '/dev/sdc', 'journal' => '/dev/sdd2'} - use a full disk for the OSD with a custom partition for the journal ### Using a Policy Wrapper Cookbook @@ -109,7 +109,6 @@ Ceph Rados Gateway nodes should use the ceph-radosgw role * `node['ceph']['search_environment']` - a custom Chef environment to search when looking for mon nodes. The cookbook defaults to searching the current environment * `node['ceph']['branch']` - selects whether to install the stable, testing, or dev version of Ceph * `node['ceph']['version']` - install a version of Ceph that is different than the cookbook default. If this is changed in a wrapper cookbook, some repository urls may also need to be replaced, and they are found in attributes/repo.rb. If the branch attribute is set to dev, this selects the gitbuilder branch to install -* `node['ceph']['extras_repo']` - whether to install the ceph extras repo. The tgt recipe requires this * `node['ceph']['config']['fsid']` - the cluster UUID * `node['ceph']['config']['global']['public network']` - a CIDR specification of the public network diff --git a/attributes/default.rb b/attributes/default.rb index 2b7e541..35786a4 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -1,3 +1,6 @@ +# Major release version to install or gitbuilder branch +default['ceph']['version'] = 'jewel' + default['ceph']['install_debug'] = false default['ceph']['encrypted_data_bags'] = false @@ -5,6 +8,15 @@ default['ceph']['user_pools'] = [] +# starting with Infernalis release, ceph runs as non-root by default +if node['ceph']['version'] >= 'infernalis' + default['ceph']['user'] = 'ceph' + default['ceph']['group'] = 'ceph' +else + default['ceph']['user'] = 'root' + default['ceph']['group'] = 'root' +end + case node['platform'] when 'ubuntu' default['ceph']['init_style'] = 'upstart' diff --git a/attributes/mds.rb b/attributes/mds.rb index 54c21cd..1b089fa 100644 --- a/attributes/mds.rb +++ b/attributes/mds.rb @@ -1,6 +1,7 @@ include_attribute 'ceph' default['ceph']['mds']['init_style'] = node['init_style'] +default['ceph']['mds']['fs']['ceph'] = { 'data_pool' => 'data', 'metadata_pool' => 'metadata' } case node['platform_family'] when 'debian' diff --git a/attributes/repo.rb b/attributes/repo.rb index f215493..2147da6 100644 --- a/attributes/repo.rb +++ b/attributes/repo.rb @@ -1,42 +1,32 @@ default['ceph']['branch'] = 'stable' # Can be stable, testing or dev. -# Major release version to install or gitbuilder branch -default['ceph']['version'] = 'firefly' default['ceph']['el_add_epel'] = true -default['ceph']['repo_url'] = 'http://ceph.com' -default['ceph']['extras_repo_url'] = 'http://ceph.com/packages/ceph-extras' -default['ceph']['extras_repo'] = false +default['ceph']['repo_url'] = 'https://download.ceph.com' case node['platform_family'] when 'debian' # Debian/Ubuntu default repositories default['ceph']['debian']['stable']['repository'] = "#{node['ceph']['repo_url']}/debian-#{node['ceph']['version']}/" - default['ceph']['debian']['stable']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + default['ceph']['debian']['stable']['repository_key'] = 'https://raw.githubusercontent.com/ceph/ceph/master/keys/release.asc' default['ceph']['debian']['testing']['repository'] = "#{node['ceph']['repo_url']}/debian-testing/" - default['ceph']['debian']['testing']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + default['ceph']['debian']['testing']['repository_key'] = 'https://raw.githubusercontent.com/ceph/ceph/master/keys/release.asc' default['ceph']['debian']['dev']['repository'] = "http://gitbuilder.ceph.com/ceph-deb-#{node['lsb']['codename']}-x86_64-basic/ref/#{node['ceph']['version']}" default['ceph']['debian']['dev']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc' - default['ceph']['debian']['extras']['repository'] = "#{node['ceph']['extras_repo_url']}/debian/" - default['ceph']['debian']['extras']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' when 'rhel' # Redhat/CentOS default repositories default['ceph']['rhel']['stable']['repository'] = "#{node['ceph']['repo_url']}/rpm-#{node['ceph']['version']}/el6/x86_64/" - default['ceph']['rhel']['stable']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + default['ceph']['rhel']['stable']['repository_key'] = 'https://raw.githubusercontent.com/ceph/ceph/master/keys/release.asc' default['ceph']['rhel']['testing']['repository'] = "#{node['ceph']['repo_url']}/rpm-testing/el6/x86_64/" - default['ceph']['rhel']['testing']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + default['ceph']['rhel']['testing']['repository_key'] = 'https://raw.githubusercontent.com/ceph/ceph/master/keys/release.asc' default['ceph']['rhel']['dev']['repository'] = "http://gitbuilder.ceph.com/ceph-rpm-centos6-x86_64-basic/ref/#{node['ceph']['version']}/x86_64/" default['ceph']['rhel']['dev']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc' - default['ceph']['rhel']['extras']['repository'] = "#{node['ceph']['extras_repo_url']}/rpm/rhel6/x86_64/" - default['ceph']['rhel']['extras']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' when 'fedora' # Fedora default repositories default['ceph']['fedora']['stable']['repository'] = "#{node['ceph']['repo_url']}/rpm-#{node['ceph']['version']}/fc#{node['platform_version']}/x86_64/" - default['ceph']['fedora']['stable']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + default['ceph']['fedora']['stable']['repository_key'] = 'https://raw.githubusercontent.com/ceph/ceph/master/keys/release.asc' default['ceph']['fedora']['testing']['repository'] = "#{node['ceph']['repo_url']}/rpm-testing/fc#{node['platform_version']}/x86_64/" - default['ceph']['fedora']['testing']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + default['ceph']['fedora']['testing']['repository_key'] = 'https://raw.githubusercontent.com/ceph/ceph/master/keys/release.asc' default['ceph']['fedora']['dev']['repository'] = "http://gitbuilder.ceph.com/ceph-rpm-fc#{node['platform_version']}-x86_64-basic/ref/#{node['ceph']['version']}/RPMS/x86_64/" default['ceph']['fedora']['dev']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc' - default['ceph']['fedora']['extras']['repository'] = "#{node['ceph']['extras_repo_url']}/rpm/fedora#{node['platform_version']}/x86_64/" - default['ceph']['fedora']['extras']['repository_key'] = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' when 'suse' # (Open)SuSE default repositories # Chef doesn't make a difference between suse and opensuse @@ -46,7 +36,6 @@ default['ceph']['suse']['stable']['repository'] = "#{node['ceph']['repo_url']}/rpm-#{node['ceph']['version']}/#{suse_version}/x86_64/ceph-release-1-0.#{suse_version}.noarch.rpm" default['ceph']['suse']['testing']['repository'] = "#{node['ceph']['repo_url']}/rpm-testing/#{suse_version}/x86_64/ceph-release-1-0.#{suse_version}.noarch.rpm" - default['ceph']['suse']['extras']['repository'] = "#{node['ceph']['extras_repo_url']}/rpm/#{suse_version}/x86_64/" else fail "#{node['platform_family']} is not supported" end diff --git a/infrastructure.yml b/infrastructure.yml index de8655b..6ad27ad 100644 --- a/infrastructure.yml +++ b/infrastructure.yml @@ -3,4 +3,3 @@ roles: - ceph-mon: - ceph-osd: - ceph-radosgw: -- ceph-tgt: diff --git a/metadata.rb b/metadata.rb index 1f65d7a..fb8b60c 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Installs/Configures the Ceph distributed filesystem' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.8.0' +version '0.9.0' depends 'apache2', '>= 1.1.12' depends 'apt' diff --git a/providers/cephfs.rb b/providers/cephfs.rb index 1205afb..57e9a63 100644 --- a/providers/cephfs.rb +++ b/providers/cephfs.rb @@ -29,6 +29,7 @@ def manage_mount(directory, subdir, use_fuse, action) dump 0 pass 0 action action + not_if "mount | grep \"^ceph-fuse on #{Regexp.escape(directory)}\"" if action == :mount end else mons = mon_addresses.sort.join(',') + ':' + subdir diff --git a/recipes/apt.rb b/recipes/apt.rb index b5720fb..a5d032d 100644 --- a/recipes/apt.rb +++ b/recipes/apt.rb @@ -22,12 +22,3 @@ components ['main'] key node['ceph']['debian'][branch]['repository_key'] end - -apt_repository 'ceph-extras' do - repo_name 'ceph-extras' - uri node['ceph']['debian']['extras']['repository'] - distribution distribution_codename - components ['main'] - key node['ceph']['debian']['extras']['repository_key'] - only_if { node['ceph']['extras_repo'] } -end diff --git a/recipes/conf.rb b/recipes/conf.rb index 43d6a54..54d8984 100644 --- a/recipes/conf.rb +++ b/recipes/conf.rb @@ -9,7 +9,7 @@ directory '/etc/ceph' do owner 'root' - group 'root' + group node['ceph']['group'] mode '0755' action :create end @@ -22,5 +22,7 @@ :is_rgw => node['ceph']['is_radosgw'] } } + owner 'root' + group node['ceph']['group'] mode '0644' end diff --git a/recipes/default.rb b/recipes/default.rb index 936bc33..c9c76a4 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,9 +1,10 @@ include_recipe 'ceph::repo' if node['ceph']['install_repo'] -include_recipe 'ceph::conf' -# Tools needed by cookbook +# Tools needed by cookbook (including ceph-common, which creates the ceph user). node['ceph']['packages'].each do |pck| package pck end +include_recipe 'ceph::conf' + chef_gem 'netaddr' diff --git a/recipes/mds.rb b/recipes/mds.rb index aedff15..1803a6e 100644 --- a/recipes/mds.rb +++ b/recipes/mds.rb @@ -22,9 +22,33 @@ cluster = 'ceph' +if node['ceph']['version'] >= 'giant' + # doesn't work on non-mon nodes, will need to be moved to lwrp + node['ceph']['mds']['fs'].keys.each do |fs| + metadata_pool = node['ceph']['mds']['fs'][fs]['metadata_pool'] + data_pool = node['ceph']['mds']['fs'][fs]['data_pool'] + + [metadata_pool, data_pool].each do |pool_name| + execute "ensure ceph pool #{pool_name} exists" do + command "ceph osd pool create #{pool_name} 32" + user node['ceph']['user'] + group node['ceph']['group'] + not_if "rados lspools | grep '^#{Regexp.quote(pool_name)}$'" + end + end + + execute "ensure cephfs #{fs} exists" do + command "ceph fs new #{fs} #{metadata_pool} #{data_pool}" + user node['ceph']['user'] + group node['ceph']['group'] + not_if "ceph fs ls | grep '^#{Regexp.quote(fs)}$'" + end + end +end + directory "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}" do - owner 'root' - group 'root' + owner node['ceph']['user'] + group node['ceph']['group'] mode 00755 recursive true action :create @@ -34,6 +58,8 @@ caps('osd' => 'allow *', 'mon' => 'allow rwx') keyname "mds.#{node['hostname']}" filename "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}/keyring" + owner node['ceph']['user'] + group node['ceph']['group'] end file "/var/lib/ceph/mds/#{cluster}-#{node['hostname']}/done" do diff --git a/recipes/mon.rb b/recipes/mon.rb index 4da92e0..3768cd4 100644 --- a/recipes/mon.rb +++ b/recipes/mon.rb @@ -22,16 +22,16 @@ service_type = node['ceph']['mon']['init_style'] directory '/var/run/ceph' do - owner 'root' - group 'root' + owner node['ceph']['user'] + group node['ceph']['group'] mode 00755 recursive true action :create end directory "/var/lib/ceph/mon/ceph-#{node['hostname']}" do - owner 'root' - group 'root' + owner node['ceph']['user'] + group node['ceph']['group'] mode 00755 recursive true action :create @@ -40,10 +40,12 @@ # TODO: cluster name cluster = 'ceph' -keyring = "#{Chef::Config[:file_cache_path]}/#{cluster}-#{node['hostname']}.mon.keyring" +keyring = "/var/run/ceph/#{cluster}-#{node['hostname']}.mon.keyring" execute 'format mon-secret as keyring' do # ~FC009 command lazy { "ceph-authtool '#{keyring}' --create-keyring --name=mon. --add-key='#{mon_secret}' --cap mon 'allow *'" } + user node['ceph']['user'] + group node['ceph']['group'] creates keyring only_if { mon_secret } sensitive true if Chef::Resource::Execute.method_defined? :sensitive @@ -51,6 +53,8 @@ execute 'generate mon-secret as keyring' do # ~FC009 command "ceph-authtool '#{keyring}' --create-keyring --name=mon. --gen-key --cap mon 'allow *'" + user node['ceph']['user'] + group node['ceph']['group'] creates keyring not_if { mon_secret } notifies :create, 'ruby_block[save mon_secret]', :immediately @@ -59,12 +63,14 @@ execute 'add bootstrap-osd key to keyring' do command lazy { "ceph-authtool '#{keyring}' --name=client.bootstrap-osd --add-key='#{osd_secret}' --cap mon 'allow profile bootstrap-osd' --cap osd 'allow profile bootstrap-osd'" } + user node['ceph']['user'] + group node['ceph']['group'] only_if { node['ceph']['encrypted_data_bags'] && osd_secret } end ruby_block 'save mon_secret' do block do - fetch = Mixlib::ShellOut.new("ceph-authtool '#{keyring}' --print-key --name=mon.") + fetch = Mixlib::ShellOut.new("ceph-authtool '#{keyring}' --print-key --name=mon.", user: node['ceph']['user'], group: node['ceph']['group']) fetch.run_command key = fetch.stdout node.set['ceph']['monitor-secret'] = key @@ -75,6 +81,8 @@ execute 'ceph-mon mkfs' do command "ceph-mon --mkfs -i #{node['hostname']} --keyring '#{keyring}'" + user node['ceph']['user'] + group node['ceph']['group'] end ruby_block 'finalise' do @@ -112,6 +120,8 @@ mon_addresses.each do |addr| execute "peer #{addr}" do command "ceph --admin-daemon '/var/run/ceph/ceph-mon.#{node['hostname']}.asok' add_bootstrap_peer_hint #{addr}" + user node['ceph']['user'] + group node['ceph']['group'] ignore_failure true end end @@ -123,7 +133,7 @@ block do run_out = '' while run_out.empty? - run_out = Mixlib::ShellOut.new('ceph auth get-key client.bootstrap-osd').run_command.stdout.strip + run_out = Mixlib::ShellOut.new('ceph auth get-key client.bootstrap-osd', user: node['ceph']['user'], group: node['ceph']['group']).run_command.stdout.strip sleep 2 end node.set['ceph']['bootstrap_osd_key'] = run_out diff --git a/recipes/osd.rb b/recipes/osd.rb index 8cf4100..d5922be 100644 --- a/recipes/osd.rb +++ b/recipes/osd.rb @@ -46,8 +46,8 @@ service_type = node['ceph']['osd']['init_style'] directory '/var/lib/ceph/bootstrap-osd' do - owner 'root' - group 'root' + owner node['ceph']['user'] + group node['ceph']['group'] mode '0755' end @@ -56,6 +56,8 @@ execute 'format bootstrap-osd as keyring' do # ~FC009 command lazy { "ceph-authtool '/var/lib/ceph/bootstrap-osd/#{cluster}.keyring' --create-keyring --name=client.bootstrap-osd --add-key='#{osd_secret}'" } + user node['ceph']['user'] + group node['ceph']['group'] creates "/var/lib/ceph/bootstrap-osd/#{cluster}.keyring" only_if { osd_secret } sensitive true if Chef::Resource::Execute.method_defined? :sensitive @@ -63,8 +65,8 @@ if crowbar? node['crowbar']['disks'].each do |disk, _data| - execute "ceph-disk-prepare #{disk}" do - command "ceph-disk-prepare /dev/#{disk}" + execute "ceph-disk prepare #{disk}" do + command "ceph-disk prepare /dev/#{disk}" only_if { node['crowbar']['disks'][disk]['usage'] == 'Storage' } notifies :run, 'execute[udev trigger]', :immediately end @@ -82,13 +84,12 @@ action :nothing end else - # Calling ceph-disk-prepare is sufficient for deploying an OSD - # After ceph-disk-prepare finishes, the new device will be caught - # by udev which will run ceph-disk-activate on it (udev will map + # Calling ceph-disk prepare is sufficient for deploying an OSD + # After ceph-disk prepare finishes, the new device will be caught + # by udev which will run ceph-disk activate on it (udev will map # the devices if dm-crypt is used). # IMPORTANT: - # - Always use the default path for OSD (i.e. /var/lib/ceph/ - # osd/$cluster-$id) + # - Always use the default path for OSD (i.e. /var/lib/ceph/osd/$cluster-$id) # - $cluster should always be ceph # - The --dmcrypt option will be available starting w/ Cuttlefish if node['ceph']['osd_devices'] @@ -103,21 +104,21 @@ end directory osd_device['device'] do # ~FC022 - owner 'root' - group 'root' + owner node['ceph']['user'] + group node['ceph']['group'] recursive true only_if { osd_device['type'] == 'directory' } end dmcrypt = osd_device['encrypted'] == true ? '--dmcrypt' : '' - execute "ceph-disk-prepare on #{osd_device['device']}" do - command "ceph-disk-prepare #{dmcrypt} #{osd_device['device']} #{osd_device['journal']}" + execute "ceph-disk prepare on #{osd_device['device']}" do + command "ceph-disk prepare #{dmcrypt} #{osd_device['device']} #{osd_device['journal']}" action :run notifies :create, "ruby_block[save osd_device status #{index}]", :immediately end - execute "ceph-disk-activate #{osd_device['device']}" do + execute "ceph-disk activate #{osd_device['device']}" do only_if { osd_device['type'] == 'directory' } end diff --git a/recipes/rpm.rb b/recipes/rpm.rb index a2708ef..daa0d6d 100644 --- a/recipes/rpm.rb +++ b/recipes/rpm.rb @@ -15,15 +15,9 @@ gpgkey node['ceph'][platform_family][branch]['repository_key'] end -yum_repository 'ceph-extra' do - baseurl node['ceph'][platform_family]['extras']['repository'] - gpgkey node['ceph'][platform_family]['extras']['repository_key'] - only_if { node['ceph']['extras_repo'] } -end - -package 'parted' # needed by ceph-disk-prepare to run partprobe +package 'parted' # needed by ceph-disk prepare to run partprobe package 'hdparm' # used by ceph-disk activate -package 'xfsprogs' # needed by ceph-disk-prepare to format as xfs +package 'xfsprogs' # needed by ceph-disk prepare to format as xfs if node['platform_family'] == 'rhel' && node['platform_version'].to_f > 6 package 'btrfs-progs' # needed to format as btrfs, in the future end diff --git a/recipes/tgt.rb b/recipes/tgt.rb deleted file mode 100644 index eb353e9..0000000 --- a/recipes/tgt.rb +++ /dev/null @@ -1,51 +0,0 @@ -# -# Author:: Kyle Bader -# Cookbook Name:: ceph -# Recipe:: radosgw -# -# Copyright 2011, DreamHost Web Hosting -# -# 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. - -node.default['ceph']['extras_repo'] = true - -case node['platform_family'] -when 'debian' - packages = %w( - tgt - ) -when 'rhel', 'fedora' - packages = %w( - scsi-target-utils - ) -end - -packages.each do |pkg| - package pkg do - action :upgrade - end -end - -include_recipe 'ceph::conf' -# probably needs the key -service 'tgt' do - if node['platform'] == 'ubuntu' - # The ceph version of tgt does not provide an Upstart script - provider Chef::Provider::Service::Init::Debian - service_name 'tgt' - else - service_name 'tgt' - end - supports :restart => true - action [:enable, :start] -end diff --git a/roles/ceph-mon.json b/roles/ceph-mon.json index 5e610e0..cedae1e 100644 --- a/roles/ceph-mon.json +++ b/roles/ceph-mon.json @@ -5,6 +5,6 @@ "run_list": [ "recipe[ceph::repo]", "recipe[ceph::mon]", - "recipe[ceph:pools] + "recipe[ceph::pools]" ] } diff --git a/roles/ceph-tgt.json b/roles/ceph-tgt.json deleted file mode 100644 index 913d30f..0000000 --- a/roles/ceph-tgt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "ceph-tgt", - "json_class": "Chef::Role", - "description": "Ceph iSCSI Target", - "run_list": [ - "recipe[ceph::repo]", - "recipe[ceph::tgt]" - ] -} diff --git a/test/integration/Vagrantfile.erb b/test/integration/Vagrantfile.erb deleted file mode 100644 index 8266d08..0000000 --- a/test/integration/Vagrantfile.erb +++ /dev/null @@ -1,10 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.box = "<%= config[:box] %>" - config.vm.box_url = "<%= config[:box_url ]%>" - (0..2).each do |d| - config.vm.provider :virtualbox do |vb| - vb.customize [ "createhd", "--filename", "disk-#{d}", "--size", "1000" ] - vb.customize [ "storageattach", :id, "--storagectl", "IDE Controller", "--device", (1+d)/2, "--port", (1+d)%2, "--type", "hdd", "--medium", "disk-#{d}.vdi" ] - end - end -end diff --git a/test/integration/Vagrantfile.rb b/test/integration/Vagrantfile.rb new file mode 100644 index 0000000..f103efa --- /dev/null +++ b/test/integration/Vagrantfile.rb @@ -0,0 +1,12 @@ +Vagrant.configure("2") do |config| + config.vm.provider :virtualbox do |vb| + vb.customize [ "storagectl", :id, "--name", "IDE Controller", "--remove" ] + vb.customize [ "storagectl", :id, "--name", "OSD Controller", "--add", "scsi", "--bootable", "off" ] + end + (0..2).each do |d| + config.vm.provider :virtualbox do |vb| + vb.customize [ "createhd", "--filename", "disk-#{d}", "--size", "1000" ] + vb.customize [ "storageattach", :id, "--storagectl", "OSD Controller", "--port", d, "--type", "hdd", "--medium", "disk-#{d}.vdi" ] + end + end +end