]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add support of civetweb for Rados Gateway 218/head
authorSébastien Han <sebastien.han@enovance.com>
Mon, 2 Mar 2015 09:22:52 +0000 (10:22 +0100)
committerSébastien Han <sebastien.han@enovance.com>
Mon, 2 Mar 2015 13:16:53 +0000 (14:16 +0100)
Almost here.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
roles/ceph-common/defaults/main.yml
roles/ceph-common/templates/ceph.conf.j2
roles/ceph-radosgw/defaults/main.yml
roles/ceph-radosgw/tasks/install_debian.yml
roles/ceph-radosgw/tasks/install_redhat.yml
roles/ceph-radosgw/tasks/main.yml

index 05f76e8894bbbe68f107c00f0a1e29ad66575954..dd96d61f5424ffe82caa56ec178a2cebadcd7b7f 100644 (file)
@@ -120,10 +120,12 @@ osd_recovery_threads: 1
 #\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
index 88f09a1c922cf8541ad40eec0b57028b9f996187..7f361e2de2636293152556b4402ae281569156db 100644 (file)
   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 %}
index e4c31ef3750cc82b03c8f56e19ddc6e4247075b1..91f1a4c6418369051a079d3d0d9e18e500567a97 100644 (file)
@@ -12,3 +12,5 @@ http_100_continue: false
 # 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
index de3a362831b8c6fafd83979ca8f046d6a8023a00..e8c0b3f6f484644b5c63da3eb90a319a77d87392 100644 (file)
@@ -86,7 +86,7 @@
     - 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
@@ -94,7 +94,6 @@
   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
index 94d1fd73b3ce4aa16d9e6cbadf13b97d81775a93..dab4f080eccc465c586e756ffc36ec7cd7a38996 100644 (file)
@@ -15,7 +15,7 @@
 - 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
@@ -23,7 +23,6 @@
     - 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
index bea2a8278008018976ae2ab2663d6c2a7b21faf2..58360949279433354eb8ea1629bdf44ce8a8f728 100644 (file)
     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