Almost here.
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
#\r
mds: false # disable mds configuration in ceph.conf\r
\r
-# Rados Gateway options\r
+## Rados Gateway options\r
#\r
radosgw: false # referenced in monitor role too.\r
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls\r
+radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml\r
+radosgw_civetweb_port: 80\r
\r
## Testing mode\r
# enable this mode _only_ when you have a single node\r
log file = /var/log/ceph/radosgw-{{ hostvars[host]['ansible_hostname'] }}.log
rgw data = /var/lib/ceph/radosgw/{{ hostvars[host]['ansible_hostname'] }}
rgw print continue = false
+ {% if radosgw_frontend == 'civetweb' %}
+ rgw frontends = civetweb port={{ radosgw_civetweb_port }}
+ {% endif %}
{% endif %}
{% endfor %}
{% endif %}
# Rados Gateway options\r
redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2\r
email_address: foo@bar.com\r
+\r
+radosgw_frontend: civetweb # we currently only support a single backend\r
- libapache2-mod-fastcgi
when: purge_default_apache.changed or purge_ceph_apache.changed
-- name: "Install Apache, fastcgi and Rados Gateway"
+- name: "Install Apache and fastcgi"
apt: >
pkg={{ item }}
state=present
with_items:
- apache2
- libapache2-mod-fastcgi
- - radosgw
## Prepare Apache
#
## Prepare RGW
#
-- name: Create RGW directory
- file: >
- path=/var/lib/ceph/radosgw/{{ ansible_fqdn }}
- state=directory
- owner=root
- group=root
- mode=0644
-
- name: Enable Rados Gateway vhost and disable default site
command: "{{ item }}"
with_items:
mode=0555
owner=root
group=root
-
-## If we don't perform this check Ansible will start multiple instance of radosgw
-- name: Check if RGW is started
- command: /etc/init.d/radosgw status
- register: rgwstatus
- ignore_errors: True
-
-- name: Start RGW
- command: /etc/init.d/radosgw start
- when: rgwstatus.rc != 0
- name: Add special fastcgi repository
command: rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
-- name: "Install Apache, fastcgi, and Rados Gateway"
+- name: "Install Apache and fastcgi"
yum: >
name={{ item }}
state=present
- httpd
- mod_fastcgi
- mod_fcgid
- - ceph-radosgw
## Prepare Apache
#
## Prepare RGW
#
-- name: Create RGW directory
- file: >
- path=/var/lib/ceph/radosgw/{{ ansible_fqdn }}
- state=directory
- owner=root
- group=root
- mode=0644
-
- name: Install s3gw.fcgi script
template: >
src=s3gw.fcgi.j2
changed_when: False
notify:
- restart apache2
-
-## If we don't perform this check Ansible will start multiple instance of radosgw
-- name: Check if RGW is started
- command: /etc/init.d/ceph-radosgw status
- register: rgwstatus
- ignore_errors: True
-
-- name: Start RGW
- command: /etc/init.d/ceph-radosgw start
- when: rgwstatus.rc != 0
group=root
when: cephx
+- name: Create RGW directory
+ file: >
+ path=/var/lib/ceph/radosgw/{{ ansible_fqdn }}
+ state=directory
+ owner=root
+ group=root
+ mode=0644
+
## Check OS family
#
- include: install_redhat.yml
- when: ansible_os_family == 'RedHat'
+ when: ansible_os_family == 'RedHat' and radosgw_frontend == 'apache'
- include: install_debian.yml
+ when: ansible_os_family == 'Debian' and radosgw_frontend == 'apache'
+
+- name: "Install Rados Gateway"
+ apt: >
+ pkg=radosgw
+ state=present
+ update_cache=yes
when: ansible_os_family == 'Debian'
+
+- name: "Install Rados Gateway"
+ yum: >
+ name=ceph-radosgw
+ state=present
+ when: ansible_os_family == 'RedHat'
+
+## If we don't perform this check Ansible will start multiple instance of radosgw
+- name: Check if RGW is started
+ command: /etc/init.d/radosgw status
+ register: rgwstatus
+ ignore_errors: True
+
+- name: Start RGW
+ command: /etc/init.d/radosgw start
+ when: rgwstatus.rc != 0