mirror of https://github.com/ceph/ceph-ansible.git
Add ipv6 libvirt support scenario in vagrant
Addition of ipv6 support in vagrant/libvirt and an all_daemons_ipv6 scenario.
Some typo fixes
Signed-off-by: Teoman ONAY <tonay@ibm.com>
(cherry picked from commit 8f3bdd8559
)
pull/7449/head
parent
bbaec6776c
commit
96b0f8abcd
|
@ -2,6 +2,7 @@
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
require 'resolv'
|
||||||
VAGRANTFILE_API_VERSION = '2'
|
VAGRANTFILE_API_VERSION = '2'
|
||||||
|
|
||||||
if File.file?(File.join(File.dirname(__FILE__), 'vagrant_variables.yml')) then
|
if File.file?(File.join(File.dirname(__FILE__), 'vagrant_variables.yml')) then
|
||||||
|
@ -40,6 +41,8 @@ DEBUG = settings['debug']
|
||||||
ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
|
ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
|
||||||
DISABLE_SYNCED_FOLDER = settings.fetch('vagrant_disable_synced_folder', false)
|
DISABLE_SYNCED_FOLDER = settings.fetch('vagrant_disable_synced_folder', false)
|
||||||
|
|
||||||
|
"#{PUBLIC_SUBNET}" =~ Resolv::IPv6::Regex ? IPV6 = true : IPV6 = false
|
||||||
|
|
||||||
$last_ip_pub_digit = 9
|
$last_ip_pub_digit = 9
|
||||||
$last_ip_cluster_digit = 9
|
$last_ip_cluster_digit = 9
|
||||||
|
|
||||||
|
@ -69,18 +72,26 @@ ansible_provision = proc do |ansible|
|
||||||
'monitoring' => (0..GRAFANA - 1).map { |j| "#{LABEL_PREFIX}grafana#{j}" }
|
'monitoring' => (0..GRAFANA - 1).map { |j| "#{LABEL_PREFIX}grafana#{j}" }
|
||||||
}
|
}
|
||||||
|
|
||||||
ansible.extra_vars = {
|
if IPV6 then
|
||||||
cluster_network: "#{CLUSTER_SUBNET}.0/24",
|
ansible.extra_vars = {
|
||||||
journal_size: 100,
|
cluster_network: "#{CLUSTER_SUBNET}/64",
|
||||||
public_network: "#{PUBLIC_SUBNET}.0/24",
|
journal_size: 100,
|
||||||
}
|
public_network: "#{PUBLIC_SUBNET}/64",
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ansible.extra_vars = {
|
||||||
|
cluster_network: "#{CLUSTER_SUBNET}.0/24",
|
||||||
|
journal_size: 100,
|
||||||
|
public_network: "#{PUBLIC_SUBNET}.0/24",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
# In a production deployment, these should be secret
|
# In a production deployment, these should be secret
|
||||||
if DOCKER then
|
if DOCKER then
|
||||||
ansible.extra_vars = ansible.extra_vars.merge({
|
ansible.extra_vars = ansible.extra_vars.merge({
|
||||||
containerized_deployment: 'true',
|
containerized_deployment: 'true',
|
||||||
monitor_interface: ETH,
|
monitor_interface: ETH,
|
||||||
ceph_mon_docker_subnet: "#{PUBLIC_SUBNET}.0/24",
|
ceph_mon_docker_subnet: ansible.extra_vars[:public_network],
|
||||||
devices: settings['disks'],
|
devices: settings['disks'],
|
||||||
radosgw_interface: ETH,
|
radosgw_interface: ETH,
|
||||||
generate_fsid: 'true',
|
generate_fsid: 'true',
|
||||||
|
@ -190,12 +201,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NMONS - 1).each do |i|
|
(0..NMONS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}mon#{i}" do |mon|
|
config.vm.define "#{LABEL_PREFIX}mon#{i}" do |mon|
|
||||||
mon.vm.hostname = "#{LABEL_PREFIX}mon#{i}"
|
mon.vm.hostname = "#{LABEL_PREFIX}mon#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
mon.vm.network :private_network,
|
mon.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
mon.vm.provider :virtualbox do |vb|
|
mon.vm.provider :virtualbox do |vb,override|
|
||||||
vb.customize ['modifyvm', :id, '--memory', "#{MEMORY}"]
|
vb.customize ['modifyvm', :id, '--memory', "#{MEMORY}"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -205,9 +217,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
mon.vm.provider :libvirt do |lv|
|
mon.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
@ -225,9 +247,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..GRAFANA - 1).each do |i|
|
(0..GRAFANA - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}grafana#{i}" do |grf|
|
config.vm.define "#{LABEL_PREFIX}grafana#{i}" do |grf|
|
||||||
grf.vm.hostname = "#{LABEL_PREFIX}grafana#{i}"
|
grf.vm.hostname = "#{LABEL_PREFIX}grafana#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
grf.vm.network :private_network,
|
grf.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
grf.vm.provider :virtualbox do |vb|
|
grf.vm.provider :virtualbox do |vb|
|
||||||
|
@ -240,9 +262,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
grf.vm.provider :libvirt do |lv|
|
grf.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
@ -260,9 +292,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..MGRS - 1).each do |i|
|
(0..MGRS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}mgr#{i}" do |mgr|
|
config.vm.define "#{LABEL_PREFIX}mgr#{i}" do |mgr|
|
||||||
mgr.vm.hostname = "#{LABEL_PREFIX}mgr#{i}"
|
mgr.vm.hostname = "#{LABEL_PREFIX}mgr#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
mgr.vm.network :private_network,
|
mgr.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
mgr.vm.provider :virtualbox do |vb|
|
mgr.vm.provider :virtualbox do |vb|
|
||||||
|
@ -275,9 +307,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
mgr.vm.provider :libvirt do |lv|
|
mgr.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
@ -296,9 +338,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
config.vm.define "#{LABEL_PREFIX}client#{i}" do |client|
|
config.vm.define "#{LABEL_PREFIX}client#{i}" do |client|
|
||||||
client.vm.box = CLIENT_BOX
|
client.vm.box = CLIENT_BOX
|
||||||
client.vm.hostname = "#{LABEL_PREFIX}client#{i}"
|
client.vm.hostname = "#{LABEL_PREFIX}client#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
client.vm.network :private_network,
|
client.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
client.vm.provider :virtualbox do |vb|
|
client.vm.provider :virtualbox do |vb|
|
||||||
|
@ -311,9 +353,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
client.vm.provider :libvirt do |lv|
|
client.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
@ -331,9 +383,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NRGWS - 1).each do |i|
|
(0..NRGWS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}rgw#{i}" do |rgw|
|
config.vm.define "#{LABEL_PREFIX}rgw#{i}" do |rgw|
|
||||||
rgw.vm.hostname = "#{LABEL_PREFIX}rgw#{i}"
|
rgw.vm.hostname = "#{LABEL_PREFIX}rgw#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
rgw.vm.network :private_network,
|
rgw.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
|
@ -347,9 +399,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
rgw.vm.provider :libvirt do |lv|
|
rgw.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
@ -367,9 +429,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NNFSS - 1).each do |i|
|
(0..NNFSS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}nfs#{i}" do |nfs|
|
config.vm.define "#{LABEL_PREFIX}nfs#{i}" do |nfs|
|
||||||
nfs.vm.hostname = "#{LABEL_PREFIX}nfs#{i}"
|
nfs.vm.hostname = "#{LABEL_PREFIX}nfs#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
nfs.vm.network :private_network,
|
nfs.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
|
@ -383,9 +445,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
nfs.vm.provider :libvirt do |lv|
|
nfs.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
@ -403,9 +475,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NMDSS - 1).each do |i|
|
(0..NMDSS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}mds#{i}" do |mds|
|
config.vm.define "#{LABEL_PREFIX}mds#{i}" do |mds|
|
||||||
mds.vm.hostname = "#{LABEL_PREFIX}mds#{i}"
|
mds.vm.hostname = "#{LABEL_PREFIX}mds#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
mds.vm.network :private_network,
|
mds.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
mds.vm.provider :virtualbox do |vb|
|
mds.vm.provider :virtualbox do |vb|
|
||||||
|
@ -418,9 +490,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
mds.vm.provider :libvirt do |lv|
|
mds.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# Parallels
|
# Parallels
|
||||||
mds.vm.provider "parallels" do |prl|
|
mds.vm.provider "parallels" do |prl|
|
||||||
|
@ -437,9 +519,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NRBD_MIRRORS - 1).each do |i|
|
(0..NRBD_MIRRORS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}rbd-mirror#{i}" do |rbd_mirror|
|
config.vm.define "#{LABEL_PREFIX}rbd-mirror#{i}" do |rbd_mirror|
|
||||||
rbd_mirror.vm.hostname = "#{LABEL_PREFIX}rbd-mirror#{i}"
|
rbd_mirror.vm.hostname = "#{LABEL_PREFIX}rbd-mirror#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
rbd_mirror.vm.network :private_network,
|
rbd_mirror.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
rbd_mirror.vm.provider :virtualbox do |vb|
|
rbd_mirror.vm.provider :virtualbox do |vb|
|
||||||
|
@ -452,9 +534,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
rbd_mirror.vm.provider :libvirt do |lv|
|
rbd_mirror.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# Parallels
|
# Parallels
|
||||||
rbd_mirror.vm.provider "parallels" do |prl|
|
rbd_mirror.vm.provider "parallels" do |prl|
|
||||||
|
@ -471,9 +563,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NISCSI_GWS - 1).each do |i|
|
(0..NISCSI_GWS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}iscsi-gw#{i}" do |iscsi_gw|
|
config.vm.define "#{LABEL_PREFIX}iscsi-gw#{i}" do |iscsi_gw|
|
||||||
iscsi_gw.vm.hostname = "#{LABEL_PREFIX}iscsi-gw#{i}"
|
iscsi_gw.vm.hostname = "#{LABEL_PREFIX}iscsi-gw#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
iscsi_gw.vm.network :private_network,
|
iscsi_gw.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
iscsi_gw.vm.provider :virtualbox do |vb|
|
iscsi_gw.vm.provider :virtualbox do |vb|
|
||||||
|
@ -486,9 +578,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
iscsi_gw.vm.provider :libvirt do |lv|
|
iscsi_gw.vm.provider :libvirt do |lv,override|
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:ip => "#{PUBLIC_SUBNET}#{$last_ip_pub_digit+=1}",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# Parallels
|
# Parallels
|
||||||
iscsi_gw.vm.provider "parallels" do |prl|
|
iscsi_gw.vm.provider "parallels" do |prl|
|
||||||
|
@ -505,11 +607,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
(0..NOSDS - 1).each do |i|
|
(0..NOSDS - 1).each do |i|
|
||||||
config.vm.define "#{LABEL_PREFIX}osd#{i}" do |osd|
|
config.vm.define "#{LABEL_PREFIX}osd#{i}" do |osd|
|
||||||
osd.vm.hostname = "#{LABEL_PREFIX}osd#{i}"
|
osd.vm.hostname = "#{LABEL_PREFIX}osd#{i}"
|
||||||
if ASSIGN_STATIC_IP
|
if ASSIGN_STATIC_IP && !IPV6
|
||||||
osd.vm.network :private_network,
|
osd.vm.network :private_network,
|
||||||
ip: "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
:ip => "#{PUBLIC_SUBNET}.#{$last_ip_pub_digit+=1}"
|
||||||
osd.vm.network :private_network,
|
osd.vm.network :private_network,
|
||||||
ip: "#{CLUSTER_SUBNET}.#{$last_ip_cluster_digit+=1}"
|
:ip => "#{CLUSTER_SUBNET}.#{$last_ip_cluster_digit+=1}"
|
||||||
end
|
end
|
||||||
# Virtualbox
|
# Virtualbox
|
||||||
osd.vm.provider :virtualbox do |vb|
|
osd.vm.provider :virtualbox do |vb|
|
||||||
|
@ -550,7 +652,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
# Libvirt
|
# Libvirt
|
||||||
driverletters = ('a'..'z').to_a
|
driverletters = ('a'..'z').to_a
|
||||||
osd.vm.provider :libvirt do |lv|
|
osd.vm.provider :libvirt do |lv,override|
|
||||||
# always make /dev/sd{a/b/c} so that CI can ensure that
|
# always make /dev/sd{a/b/c} so that CI can ensure that
|
||||||
# virtualbox and libvirt will have the same devices to use for OSDs
|
# virtualbox and libvirt will have the same devices to use for OSDs
|
||||||
(0..2).each do |d|
|
(0..2).each do |d|
|
||||||
|
@ -558,6 +660,22 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
end
|
end
|
||||||
lv.memory = MEMORY
|
lv.memory = MEMORY
|
||||||
lv.random_hostname = true
|
lv.random_hostname = true
|
||||||
|
if IPV6 then
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{PUBLIC_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-public-network",
|
||||||
|
:netmask => "64"
|
||||||
|
override.vm.network :private_network,
|
||||||
|
:libvirt__ipv6_address => "#{CLUSTER_SUBNET}",
|
||||||
|
:libvirt__ipv6_prefix => "64",
|
||||||
|
:libvirt__dhcp_enabled => false,
|
||||||
|
:libvirt__forward_mode => "veryisolated",
|
||||||
|
:libvirt__network_name => "ipv6-cluster-network",
|
||||||
|
:netmask => "64"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Parallels
|
# Parallels
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
../../../Vagrantfile
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"ceph_conf_overrides": {
|
||||||
|
"global": {
|
||||||
|
"auth_allow_insecure_global_id_reclaim": false,
|
||||||
|
"osd_pool_default_pg_num": 12,
|
||||||
|
"osd_pool_default_size": 1,
|
||||||
|
"mon_allow_pool_size_one": true,
|
||||||
|
"mon_warn_on_pool_no_redundancy": false,
|
||||||
|
"mon_max_pg_per_osd": 300
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cephfs_pools": [
|
||||||
|
{
|
||||||
|
"name": "cephfs_data",
|
||||||
|
"pg_num": 8,
|
||||||
|
"pgp_num": 8,
|
||||||
|
"rule_name": "replicated_rule",
|
||||||
|
"type": 1,
|
||||||
|
"erasure_profile": "",
|
||||||
|
"expected_num_objects": "",
|
||||||
|
"application": "cephfs",
|
||||||
|
"size": 2,
|
||||||
|
"min_size": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cephfs_metadata",
|
||||||
|
"pg_num": 8,
|
||||||
|
"pgp_num": 8,
|
||||||
|
"rule_name": "replicated_rule",
|
||||||
|
"type": 1,
|
||||||
|
"erasure_profile": "",
|
||||||
|
"expected_num_objects": "",
|
||||||
|
"application": "cephfs",
|
||||||
|
"size": 2,
|
||||||
|
"min_size": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ceph_mon_docker_memory_limit": "2g",
|
||||||
|
"radosgw_num_instances": 2
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
../../../../Vagrantfile
|
|
@ -0,0 +1 @@
|
||||||
|
../ceph-override.json
|
|
@ -0,0 +1,46 @@
|
||||||
|
---
|
||||||
|
# this is only here to let the CI tests know
|
||||||
|
# that this scenario is using docker
|
||||||
|
docker: True
|
||||||
|
|
||||||
|
containerized_deployment: True
|
||||||
|
monitor_interface: "{{ 'eth1' if ansible_facts['distribution'] == 'CentOS' else 'ens6' }}"
|
||||||
|
radosgw_interface: "{{ 'eth1' if ansible_facts['distribution'] == 'CentOS' else 'ens6' }}"
|
||||||
|
ceph_mon_docker_subnet: "{{ public_network }}"
|
||||||
|
ip_version: ipv6
|
||||||
|
public_network: "fdec:f1fb:29cd:6940::/64"
|
||||||
|
cluster_network: "fdec:f1fb:29cd:7120::/64"
|
||||||
|
rgw_override_bucket_index_max_shards: 16
|
||||||
|
rgw_bucket_default_quota_max_objects: 1638400
|
||||||
|
ceph_conf_overrides:
|
||||||
|
global:
|
||||||
|
auth_allow_insecure_global_id_reclaim: false
|
||||||
|
mon_allow_pool_size_one: true
|
||||||
|
mon_warn_on_pool_no_redundancy: false
|
||||||
|
osd_pool_default_size: 1
|
||||||
|
mon_max_pg_per_osd: 300
|
||||||
|
openstack_config: True
|
||||||
|
openstack_glance_pool:
|
||||||
|
name: "images"
|
||||||
|
size: 1
|
||||||
|
target_size_ratio: 0.2
|
||||||
|
openstack_cinder_pool:
|
||||||
|
name: "volumes"
|
||||||
|
rule_name: "HDD"
|
||||||
|
size: 1
|
||||||
|
openstack_pools:
|
||||||
|
- "{{ openstack_glance_pool }}"
|
||||||
|
- "{{ openstack_cinder_pool }}"
|
||||||
|
docker_pull_timeout: 600s
|
||||||
|
handler_health_mon_check_delay: 10
|
||||||
|
handler_health_osd_check_delay: 10
|
||||||
|
mds_max_mds: 2
|
||||||
|
dashboard_admin_password: $sX!cD$rYU6qR^B!
|
||||||
|
grafana_admin_password: +xFRe+RES@7vg24n
|
||||||
|
ceph_docker_registry: quay.io
|
||||||
|
ceph_docker_image: ceph/daemon-base
|
||||||
|
ceph_docker_image_tag: latest-main
|
||||||
|
node_exporter_container_image: "quay.io/prometheus/node-exporter:v0.17.0"
|
||||||
|
prometheus_container_image: "quay.io/prometheus/prometheus:v2.7.2"
|
||||||
|
alertmanager_container_image: "quay.io/prometheus/alertmanager:v0.16.2"
|
||||||
|
grafana_container_image: "quay.io/ceph/ceph-grafana:6.7.4"
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
user_config: True
|
||||||
|
copy_admin_key: True
|
||||||
|
test:
|
||||||
|
name: "test"
|
||||||
|
rule_name: "HDD"
|
||||||
|
size: 1
|
||||||
|
test2:
|
||||||
|
name: "test2"
|
||||||
|
size: 1
|
||||||
|
pools:
|
||||||
|
- "{{ test }}"
|
||||||
|
- "{{ test2 }}"
|
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
generate_crt: True
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
create_crush_tree: True
|
||||||
|
crush_rule_config: True
|
||||||
|
crush_rule_hdd:
|
||||||
|
name: HDD
|
||||||
|
root: default
|
||||||
|
type: host
|
||||||
|
class: hdd
|
||||||
|
default: true
|
||||||
|
crush_rules:
|
||||||
|
- "{{ crush_rule_hdd }}"
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
lvm_volumes:
|
||||||
|
- data: data-lv1
|
||||||
|
data_vg: test_group
|
||||||
|
- data: data-lv2
|
||||||
|
data_vg: test_group
|
||||||
|
db: journal1
|
||||||
|
db_vg: journals
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
copy_admin_key: True
|
||||||
|
rgw_create_pools:
|
||||||
|
foo:
|
||||||
|
pg_num: 16
|
||||||
|
type: replicated
|
||||||
|
bar:
|
||||||
|
pg_num: 16
|
|
@ -0,0 +1,36 @@
|
||||||
|
[mons]
|
||||||
|
mon0 monitor_address="fdec:f1fb:29cd:6940::10"
|
||||||
|
mon1 monitor_interface="{{ 'eth1' if ansible_facts['distribution'] == 'CentOS' else 'ens6' }}"
|
||||||
|
mon2 monitor_address="fdec:f1fb:29cd:6940::12"
|
||||||
|
|
||||||
|
[mgrs]
|
||||||
|
mgr0
|
||||||
|
|
||||||
|
[osds]
|
||||||
|
osd0 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'osd0' }"
|
||||||
|
osd1 osd_crush_location="{ 'root': 'default', 'host': 'osd1' }"
|
||||||
|
osd2 osd_crush_location="{ 'root': 'default', 'host': 'osd2' }" devices="['/dev/sda', '/dev/sdb']" dedicated_devices="['/dev/sdc']" lvm_volumes="[]"
|
||||||
|
|
||||||
|
[mdss]
|
||||||
|
mds0
|
||||||
|
mds1
|
||||||
|
mds2
|
||||||
|
|
||||||
|
[rgws]
|
||||||
|
rgw0
|
||||||
|
|
||||||
|
#[nfss]
|
||||||
|
#nfs0
|
||||||
|
|
||||||
|
[clients]
|
||||||
|
client0
|
||||||
|
client1
|
||||||
|
|
||||||
|
[rbdmirrors]
|
||||||
|
rbd-mirror0
|
||||||
|
|
||||||
|
[iscsigws]
|
||||||
|
iscsi-gw0
|
||||||
|
|
||||||
|
[monitoring]
|
||||||
|
mon0
|
|
@ -0,0 +1,61 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
# DEPLOY CONTAINERIZED DAEMONS
|
||||||
|
docker: True
|
||||||
|
|
||||||
|
# DEFINE THE NUMBER OF VMS TO RUN
|
||||||
|
mon_vms: 3
|
||||||
|
osd_vms: 3
|
||||||
|
mds_vms: 3
|
||||||
|
rgw_vms: 1
|
||||||
|
nfs_vms: 0
|
||||||
|
grafana_server_vms: 0
|
||||||
|
rbd_mirror_vms: 1
|
||||||
|
client_vms: 2
|
||||||
|
iscsi_gw_vms: 1
|
||||||
|
mgr_vms: 1
|
||||||
|
|
||||||
|
# SUBNETS TO USE FOR THE VMS
|
||||||
|
public_subnet: "fdec:f1fb:29cd:6940::"
|
||||||
|
cluster_subnet: "fdec:f1fb:29cd:7120::"
|
||||||
|
|
||||||
|
# MEMORY
|
||||||
|
# set 1024 for CentOS
|
||||||
|
memory: 1024
|
||||||
|
|
||||||
|
# Disks
|
||||||
|
# For libvirt use disks: "[ '/dev/vdb', '/dev/vdc' ]"
|
||||||
|
# For CentOS7 use disks: "[ '/dev/sda', '/dev/sdb' ]"
|
||||||
|
disks: "[ '/dev/sda', '/dev/sdb' ]"
|
||||||
|
|
||||||
|
# VAGRANT BOX
|
||||||
|
# Ceph boxes are *strongly* suggested. They are under better control and will
|
||||||
|
# not get updated frequently unless required for build systems. These are (for
|
||||||
|
# now):
|
||||||
|
#
|
||||||
|
# * ceph/ubuntu-xenial
|
||||||
|
#
|
||||||
|
# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64
|
||||||
|
# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet
|
||||||
|
# libvirt CentOS: centos/7
|
||||||
|
# parallels Ubuntu: parallels/ubuntu-14.04
|
||||||
|
# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller'
|
||||||
|
# For more boxes have a look at:
|
||||||
|
# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
|
||||||
|
# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
|
||||||
|
vagrant_box: centos/atomic-host
|
||||||
|
#client_vagrant_box: centos/stream8
|
||||||
|
#ssh_private_key_path: "~/.ssh/id_rsa"
|
||||||
|
# The sync directory changes based on vagrant box
|
||||||
|
# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant
|
||||||
|
#vagrant_sync_dir: /home/vagrant/sync
|
||||||
|
vagrant_sync_dir: /vagrant
|
||||||
|
# Disables synced folder creation. Not needed for testing, will skip mounting
|
||||||
|
# the vagrant directory on the remote box regardless of the provider.
|
||||||
|
vagrant_disable_synced_folder: true
|
||||||
|
# VAGRANT URL
|
||||||
|
# This is a URL to download an image from an alternate location. vagrant_box
|
||||||
|
# above should be set to the filename of the image.
|
||||||
|
# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
|
||||||
|
# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box
|
||||||
|
# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
|
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
ceph_origin: repository
|
||||||
|
ceph_repository: dev
|
||||||
|
ip_version: ipv6
|
||||||
|
public_network: "fdec:f1fb:29cd:6940::/64"
|
||||||
|
cluster_network: "fdec:f1fb:29cd:7120::/64"
|
||||||
|
radosgw_interface: "{{ 'eth1' if ansible_facts['distribution'] == 'CentOS' else 'ens6' }}"
|
||||||
|
ceph_conf_overrides:
|
||||||
|
global:
|
||||||
|
auth_allow_insecure_global_id_reclaim: false
|
||||||
|
mon_allow_pool_size_one: true
|
||||||
|
mon_warn_on_pool_no_redundancy: false
|
||||||
|
osd_pool_default_size: 1
|
||||||
|
mon_max_pg_per_osd: 300
|
||||||
|
openstack_config: True
|
||||||
|
openstack_glance_pool:
|
||||||
|
name: "images"
|
||||||
|
size: 1
|
||||||
|
application: rbd
|
||||||
|
target_size_ratio: 0.2
|
||||||
|
openstack_cinder_pool:
|
||||||
|
name: "volumes"
|
||||||
|
rule_name: "HDD"
|
||||||
|
size: 1
|
||||||
|
application: rbd
|
||||||
|
openstack_pools:
|
||||||
|
- "{{ openstack_glance_pool }}"
|
||||||
|
- "{{ openstack_cinder_pool }}"
|
||||||
|
handler_health_mon_check_delay: 10
|
||||||
|
handler_health_osd_check_delay: 10
|
||||||
|
mds_max_mds: 2
|
||||||
|
dashboard_admin_password: $sX!cD$rYU6qR^B!
|
||||||
|
grafana_admin_password: +xFRe+RES@7vg24n
|
||||||
|
ceph_docker_registry: quay.io
|
||||||
|
node_exporter_container_image: "quay.io/prometheus/node-exporter:v0.17.0"
|
||||||
|
prometheus_container_image: "quay.io/prometheus/prometheus:v2.7.2"
|
||||||
|
alertmanager_container_image: "quay.io/prometheus/alertmanager:v0.16.2"
|
||||||
|
grafana_container_image: "quay.io/ceph/ceph-grafana:6.7.4"
|
||||||
|
grafana_server_group_name: ceph_monitoring
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
copy_admin_key: True
|
||||||
|
user_config: True
|
||||||
|
test:
|
||||||
|
name: "test"
|
||||||
|
rule_name: "HDD"
|
||||||
|
size: 1
|
||||||
|
test2:
|
||||||
|
name: "test2"
|
||||||
|
size: 1
|
||||||
|
pools:
|
||||||
|
- "{{ test }}"
|
||||||
|
- "{{ test2 }}"
|
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
generate_crt: True
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
create_crush_tree: True
|
||||||
|
crush_rule_config: True
|
||||||
|
crush_rule_hdd:
|
||||||
|
name: HDD
|
||||||
|
root: default
|
||||||
|
type: host
|
||||||
|
class: hdd
|
||||||
|
default: true
|
||||||
|
crush_rules:
|
||||||
|
- "{{ crush_rule_hdd }}"
|
|
@ -0,0 +1,10 @@
|
||||||
|
copy_admin_key: true
|
||||||
|
nfs_file_gw: false
|
||||||
|
nfs_obj_gw: true
|
||||||
|
ganesha_conf_overrides: |
|
||||||
|
CACHEINODE {
|
||||||
|
Entries_HWMark = 100000;
|
||||||
|
}
|
||||||
|
nfs_ganesha_stable: true
|
||||||
|
nfs_ganesha_dev: false
|
||||||
|
nfs_ganesha_flavor: "ceph_main"
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
os_tuning_params:
|
||||||
|
- { name: fs.file-max, value: 26234859 }
|
||||||
|
lvm_volumes:
|
||||||
|
- data: data-lv1
|
||||||
|
data_vg: test_group
|
||||||
|
- data: data-lv2
|
||||||
|
data_vg: test_group
|
||||||
|
db: journal1
|
||||||
|
db_vg: journals
|
|
@ -0,0 +1,9 @@
|
||||||
|
copy_admin_key: true
|
||||||
|
rgw_create_pools:
|
||||||
|
foo:
|
||||||
|
pg_num: 16
|
||||||
|
type: replicated
|
||||||
|
bar:
|
||||||
|
pg_num: 16
|
||||||
|
rgw_override_bucket_index_max_shards: 16
|
||||||
|
rgw_bucket_default_quota_max_objects: 1638400
|
|
@ -0,0 +1,36 @@
|
||||||
|
[mons]
|
||||||
|
mon0 monitor_address="fdec:f1fb:29cd:6940::10"
|
||||||
|
mon1 monitor_interface="{{ 'eth1' if ansible_facts['distribution'] == 'CentOS' else 'ens6' }}"
|
||||||
|
mon2 monitor_address="fdec:f1fb:29cd:6940::12"
|
||||||
|
|
||||||
|
[mgrs]
|
||||||
|
mgr0
|
||||||
|
|
||||||
|
[osds]
|
||||||
|
osd0 osd_crush_location="{ 'root': 'HDD', 'rack': 'mon-rackkkk', 'pod': 'monpod', 'host': 'osd0' }"
|
||||||
|
osd1 osd_crush_location="{ 'root': 'default', 'host': 'osd1' }"
|
||||||
|
osd2 osd_crush_location="{ 'root': 'default', 'host': 'osd2' }" devices="['/dev/sda', '/dev/sdb']" dedicated_devices="['/dev/sdc']" lvm_volumes="[]"
|
||||||
|
|
||||||
|
[mdss]
|
||||||
|
mds0
|
||||||
|
mds1
|
||||||
|
mds2
|
||||||
|
|
||||||
|
[rgws]
|
||||||
|
rgw0
|
||||||
|
|
||||||
|
[clients]
|
||||||
|
client0
|
||||||
|
client1
|
||||||
|
|
||||||
|
#[nfss]
|
||||||
|
#nfs0
|
||||||
|
|
||||||
|
[rbdmirrors]
|
||||||
|
rbd-mirror0
|
||||||
|
|
||||||
|
[iscsigws]
|
||||||
|
iscsi-gw0
|
||||||
|
|
||||||
|
[ceph_monitoring]
|
||||||
|
mon0
|
|
@ -0,0 +1,74 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
# DEPLOY CONTAINERIZED DAEMONS
|
||||||
|
docker: false
|
||||||
|
|
||||||
|
# DEFINE THE NUMBER OF VMS TO RUN
|
||||||
|
mon_vms: 3
|
||||||
|
osd_vms: 3
|
||||||
|
mds_vms: 3
|
||||||
|
rgw_vms: 1
|
||||||
|
nfs_vms: 0
|
||||||
|
grafana_server_vms: 0
|
||||||
|
rbd_mirror_vms: 1
|
||||||
|
client_vms: 2
|
||||||
|
iscsi_gw_vms: 1
|
||||||
|
mgr_vms: 1
|
||||||
|
|
||||||
|
# INSTALL SOURCE OF CEPH
|
||||||
|
# valid values are 'stable' and 'dev'
|
||||||
|
ceph_install_source: stable
|
||||||
|
|
||||||
|
# SUBNETS TO USE FOR THE VMS
|
||||||
|
public_subnet: "fdec:f1fb:29cd:6940::"
|
||||||
|
cluster_subnet: "fdec:f1fb:29cd:7120::"
|
||||||
|
|
||||||
|
# MEMORY
|
||||||
|
# set 1024 for CentOS
|
||||||
|
memory: 1024
|
||||||
|
|
||||||
|
# Ethernet interface name
|
||||||
|
# use eth1 for libvirt and ubuntu precise, enp0s8 for CentOS and ubuntu xenial
|
||||||
|
eth: 'eth1'
|
||||||
|
|
||||||
|
# Disks
|
||||||
|
# For libvirt use disks: "[ '/dev/vdb', '/dev/vdc' ]"
|
||||||
|
# For CentOS7 use disks: "[ '/dev/sda', '/dev/sdb' ]"
|
||||||
|
disks: "[ '/dev/sdb', '/dev/sdc' ]"
|
||||||
|
|
||||||
|
# VAGRANT BOX
|
||||||
|
# Ceph boxes are *strongly* suggested. They are under better control and will
|
||||||
|
# not get updated frequently unless required for build systems. These are (for
|
||||||
|
# now):
|
||||||
|
#
|
||||||
|
# * ceph/ubuntu-xenial
|
||||||
|
#
|
||||||
|
# Ubuntu: ceph/ubuntu-xenial bento/ubuntu-16.04 or ubuntu/trusty64 or ubuntu/wily64
|
||||||
|
# CentOS: bento/centos-7.1 or puppetlabs/centos-7.0-64-puppet
|
||||||
|
# libvirt CentOS: centos/7
|
||||||
|
# parallels Ubuntu: parallels/ubuntu-14.04
|
||||||
|
# Debian: deb/jessie-amd64 - be careful the storage controller is named 'SATA Controller'
|
||||||
|
# For more boxes have a look at:
|
||||||
|
# - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q=
|
||||||
|
# - https://download.gluster.org/pub/gluster/purpleidea/vagrant/
|
||||||
|
vagrant_box: centos/stream8
|
||||||
|
#ssh_private_key_path: "~/.ssh/id_rsa"
|
||||||
|
# The sync directory changes based on vagrant box
|
||||||
|
# Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant
|
||||||
|
#vagrant_sync_dir: /home/vagrant/sync
|
||||||
|
vagrant_sync_dir: /vagrant
|
||||||
|
# Disables synced folder creation. Not needed for testing, will skip mounting
|
||||||
|
# the vagrant directory on the remote box regardless of the provider.
|
||||||
|
vagrant_disable_synced_folder: true
|
||||||
|
# VAGRANT URL
|
||||||
|
# This is a URL to download an image from an alternate location. vagrant_box
|
||||||
|
# above should be set to the filename of the image.
|
||||||
|
# Fedora virtualbox: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
|
||||||
|
# Fedora libvirt: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box
|
||||||
|
# vagrant_box_url: https://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-virtualbox.box
|
||||||
|
|
||||||
|
os_tuning_params:
|
||||||
|
- { name: fs.file-max, value: 26234859 }
|
||||||
|
|
||||||
|
# VM prefix name, need to match the hostname
|
||||||
|
# label_prefix: ceph
|
|
@ -1,5 +1,5 @@
|
||||||
# These are Python requirements needed to run the functional tests
|
# These are Python requirements needed to run the functional tests
|
||||||
testinfra
|
pytest-testinfra
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytest
|
pytest
|
||||||
ansible>=2.10,<2.11,!=2.9.10
|
ansible>=2.10,<2.11,!=2.9.10
|
||||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = centos-{container,non_container}-{all_daemons,collocation,lvm_osds,shrink_mon,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,rgw_multisite,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt,purge_dashboard}
|
envlist = centos-{container,non_container}-{all_daemons,all_daemons_ipv6,collocation,lvm_osds,shrink_mon,shrink_mgr,shrink_mds,shrink_rbdmirror,shrink_rgw,lvm_batch,add_mons,add_mgrs,add_mdss,add_rbdmirrors,add_rgws,rgw_multisite,purge,storage_inventory,lvm_auto_discovery,all_in_one,cephadm_adopt,purge_dashboard}
|
||||||
centos-non_container-{switch_to_containers}
|
centos-non_container-{switch_to_containers}
|
||||||
infra_lv_create
|
infra_lv_create
|
||||||
migrate_ceph_disk_to_ceph_volume
|
migrate_ceph_disk_to_ceph_volume
|
||||||
|
@ -298,6 +298,7 @@ setenv=
|
||||||
deps= -r{toxinidir}/tests/requirements.txt
|
deps= -r{toxinidir}/tests/requirements.txt
|
||||||
changedir=
|
changedir=
|
||||||
all_daemons: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
all_daemons: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
||||||
|
all_daemons_ipv6: {toxinidir}/tests/functional/all_daemons_ipv6{env:CONTAINER_DIR:}
|
||||||
cluster: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
cluster: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
||||||
shrink_mon: {toxinidir}/tests/functional/shrink_mon{env:CONTAINER_DIR:}
|
shrink_mon: {toxinidir}/tests/functional/shrink_mon{env:CONTAINER_DIR:}
|
||||||
shrink_mgn: {toxinidir}/tests/functional/shrink_mon{env:CONTAINER_DIR:}
|
shrink_mgn: {toxinidir}/tests/functional/shrink_mon{env:CONTAINER_DIR:}
|
||||||
|
@ -350,13 +351,13 @@ commands=
|
||||||
py.test --reruns 20 --reruns-delay 3 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
|
py.test --reruns 20 --reruns-delay 3 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
|
||||||
|
|
||||||
# reboot all vms
|
# reboot all vms
|
||||||
all_daemons,collocation: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml
|
all_daemons,all_daemons_ipv6,collocation: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml
|
||||||
|
|
||||||
# retest to ensure cluster came back up correctly after rebooting
|
# retest to ensure cluster came back up correctly after rebooting
|
||||||
all_daemons,collocation: py.test --reruns 20 --reruns-delay 3 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
|
all_daemons,all_daemons_ipv6,collocation: py.test --reruns 20 --reruns-delay 3 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
|
||||||
|
|
||||||
# handlers/idempotency test
|
# handlers/idempotency test
|
||||||
all_daemons,all_in_one,collocation: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "delegate_facts_host={env:DELEGATE_FACTS_HOST:True} ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG_BIS:latest-bis-pacific}" --extra-vars @ceph-override.json
|
all_daemons,all_daemons_ipv6,all_in_one,collocation: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "delegate_facts_host={env:DELEGATE_FACTS_HOST:True} ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG_BIS:latest-bis-pacific}" --extra-vars @ceph-override.json
|
||||||
|
|
||||||
purge: {[purge]commands}
|
purge: {[purge]commands}
|
||||||
purge_dashboard: {[purge-dashboard]commands}
|
purge_dashboard: {[purge-dashboard]commands}
|
||||||
|
|
Loading…
Reference in New Issue