Merge pull request #304 from ceph/cleanup-rgw

Cleanup daemon declaration
pull/306/head
Leseb 2015-07-02 15:32:44 +02:00
commit e3988ca099
11 changed files with 42 additions and 93 deletions

74
Vagrantfile vendored
View File

@ -7,13 +7,13 @@ VAGRANTFILE_API_VERSION = '2'
config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml'))
settings=YAML.load_file(config_file)
NMONS = settings['mon_vms']
NOSDS = settings['osd_vms']
NMDSS = settings['mds_vms']
NRGWS = settings['rgw_vms']
CLIENTS = settings['client_vms']
SUBNET = settings['subnet']
BOX = settings['vagrant_box']
NMONS = settings['mon_vms']
NOSDS = settings['osd_vms']
NMDSS = settings['mds_vms']
NRGWS = settings['rgw_vms']
CLIENTS = settings['client_vms']
SUBNET = settings['subnet']
BOX = settings['vagrant_box']
MEMORY = settings['memory']
ansible_provision = proc do |ansible|
@ -22,55 +22,23 @@ ansible_provision = proc do |ansible|
# these aren't supported by Vagrant, see
# https://github.com/mitchellh/vagrant/issues/3539
ansible.groups = {
'mons' => (0..NMONS - 1).map { |j| "mon#{j}" },
'osds' => (0..NOSDS - 1).map { |j| "osd#{j}" },
'mdss' => (0..NMDSS - 1).map { |j| "mds#{j}" },
'rgws' => (0..NRGWS - 1).map { |j| "rgw#{j}" },
'clients' => (0..CLIENTS - 1).map { |j| "client#{j}" }
'mons' => (0..NMONS - 1).map { |j| "mon#{j}" },
'restapis' => (0..NMONS - 1).map { |j| "mon#{j}" },
'osds' => (0..NOSDS - 1).map { |j| "osd#{j}" },
'mdss' => (0..NMDSS - 1).map { |j| "mds#{j}" },
'rgws' => (0..NRGWS - 1).map { |j| "rgw#{j}" },
'clients' => (0..CLIENTS - 1).map { |j| "client#{j}" }
}
# In a production deployment, these should be secret
if NMDSS != 0 && NRGWS != 0
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
radosgw: 'true',
mds: 'true',
}
elsif NMDSS != 0
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
mds: 'true',
}
elsif NRGWS != 0
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
radosgw: 'true',
}
else
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
}
end
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
}
ansible.limit = 'all'
end

View File

@ -12,6 +12,7 @@ dummy:
#osd_group_name: osds
#rgw_group_name: rgws
#mds_group_name: mdss
#restapi_group_name: restapis
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
@ -90,7 +91,7 @@ dummy:
#rbd_client_directories: false # this will create rbd_client_log_path and rbd_client_admin_socket_path directories with proper permissions, this WON'T work if libvirt and kvm are installed
#rbd_client_log_file: /var/log/rbd-clients/qemu-guest-$pid.log # must be writable by QEMU and allowed by SELinux or AppArmor
#rbd_client_log_path: /var/log/rbd-clients/
#rbd_client_admin_socket_path: /var/run/ceph/rbd-clients/$cluster-$type.$id.$pid.$cctid.asok
#rbd_client_admin_socket_path: /var/run/ceph/rbd-clients/
## Monitor options
#
@ -145,13 +146,8 @@ dummy:
#osd_scrub_chunk_max: 5
#osd_deep_scrub_stride: 1048576
## MDS options
#
#mds: false # disable mds configuration in ceph.conf
# Rados Gateway options
#
#radosgw: false # referenced in monitor role too.
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
#radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml
#radosgw_civetweb_port: 80
@ -166,8 +162,8 @@ dummy:
## REST API options
#
#restapi: false # disable restapi configuration in ceph.conf
#restapi_public_addr: 0.0.0.0:5000
#restapi_interface: "{{ monitor_interface }}"
#restapi_port: 5000
#restapi_base_url: /api/v0.1
#restapi_log_level: warning

View File

@ -14,20 +14,12 @@ dummy:
# monitor_secret:
#cephx: true
# Rados Gateway options
# referenced in common role too.
#radosgw: false
# CephFS
#pool_default_pg_num: 128
#cephfs_data: cephfs_data
#cephfs_metadata: cephfs_metadata
#cephfs: cephfs
# Ceph REST API
# referenced in common role too.
#restapi: false
# Secure your cluster
# This will set the following flags on all the pools:
# * nosizechange

View File

@ -9,6 +9,7 @@ mon_group_name: mons
osd_group_name: osds
rgw_group_name: rgws
mds_group_name: mdss
restapi_group_name: restapis
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
@ -155,13 +156,8 @@ osd_disk_thread_ioprio_priority: 0
osd_scrub_chunk_max: 5
osd_deep_scrub_stride: 1048576
## MDS options
#
mds: false # disable mds configuration in ceph.conf
## Rados Gateway options
#
radosgw: false # referenced in monitor role too.
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml
radosgw_civetweb_port: 80
@ -176,8 +172,7 @@ radosgw_nss_db_path: /var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}/n
## REST API options
#
restapi: false # disable restapi configuration in ceph.conf
restapi_interface: eth1
restapi_interface: "{{ monitor_interface }}"
restapi_port: 5000
restapi_base_url: /api/v0.1
restapi_log_level: warning # available level are: critical, error, warning, info, debug

View File

@ -53,6 +53,15 @@
mode=0644
when: ceph_stable_ice
- name: add red hat storage repository
template: >
src=redhat_storage_repo.j2
dest=/etc/yum.repos.d/rh_storage.repo
owner=root
group=root
mode=0644
when: ceph_stable_rh_storage
- name: install Ceph
yum: >
name=ceph

View File

@ -3,9 +3,6 @@
file: >
path={{ ceph_stable_rh_storage_mount_path }}
state=directory
owner=root
group=root
mode=0644
- name: get red hat storage packages
get_url: >

View File

@ -124,7 +124,7 @@
osd scrub chunk max = {{ osd_scrub_chunk_max }}
osd deep scrub stride = {{ osd_deep_scrub_stride }}
{% if mds %}
{% if groups[mds_group_name] is defined %}
[mds]
{% if enable_debug_mds %}
debug mds = {{ debug_mds_level }}
@ -140,7 +140,7 @@
{% endfor %}
{% endif %}
{% if radosgw %}
{% if groups[mds_group_name] is defined %}
{% for host in groups[rgw_group_name] %}
{% if hostvars[host]['ansible_hostname'] is defined %}
[client.rgw.{{ hostvars[host]['ansible_hostname'] }}]
@ -169,7 +169,7 @@
{% endfor %}
{% endif %}
{% if restapi %}
{% if groups[restapi_group_name] is defined %}
[client.restapi]
public addr = {{ hostvars[inventory_hostname]['ansible_' + restapi_interface]['ipv4']['address'] }}:{{ restapi_port }}
restapi base url = {{ restapi_base_url }}

View File

@ -12,20 +12,12 @@ fsid: "{{ cluster_uuid.stdout }}"
# monitor_secret:
cephx: true
# Rados Gateway options
# referenced in common role too.
radosgw: false
# CephFS
pool_default_pg_num: 128
cephfs_data: cephfs_data
cephfs_metadata: cephfs_metadata
cephfs: cephfs
# Ceph REST API
# referenced in common role too.
restapi: false
# Secure your cluster
# This will set the following flags on all the pools:
# * nosizechange

View File

@ -11,7 +11,7 @@
changed_when: false
when:
cephx and
restapi
groups[restapi_group_name] is defined
- include: openstack_config.yml
when:

View File

@ -11,7 +11,7 @@
- include: create_mds_filesystems.yml
when:
not ceph_containerized_deployment and
mds
mds_group_name is defined
- include: secure_cluster.yml
when:

View File

@ -5,7 +5,7 @@
sudo: True
roles:
- ceph-mon
- { role: ceph-restapi, when: restapi }
- ceph-restapi
- hosts: osds
sudo: True