]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Remove rgw installation from the ceph-rgw role 364/head
authorSébastien Han <seb@redhat.com>
Mon, 3 Aug 2015 15:39:57 +0000 (17:39 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 3 Aug 2015 20:17:43 +0000 (22:17 +0200)
The installation of rgw is now handled by the ceph-common role.
Fixes: #307
Signed-off-by: Sébastien Han <seb@redhat.com>
26 files changed:
group_vars/all.sample
group_vars/rgws.sample
roles/ceph-common/defaults/main.yml
roles/ceph-common/handlers/main.yml
roles/ceph-common/tasks/installs/install_on_debian.yml
roles/ceph-common/tasks/installs/install_on_redhat.yml
roles/ceph-common/tasks/installs/install_rgw_on_debian.yml [new file with mode: 0644]
roles/ceph-common/tasks/installs/install_rgw_on_redhat.yml [new file with mode: 0644]
roles/ceph-common/tasks/main.yml
roles/ceph-common/templates/ceph-extra.repo [new file with mode: 0644]
roles/ceph-common/templates/ceph.j2 [new file with mode: 0644]
roles/ceph-common/templates/httpd.conf [new file with mode: 0644]
roles/ceph-common/templates/rgw.conf [new file with mode: 0644]
roles/ceph-common/templates/s3gw.fcgi.j2 [new file with mode: 0644]
roles/ceph-rgw/defaults/main.yml
roles/ceph-rgw/files/cephdev.asc [deleted file]
roles/ceph-rgw/handlers/main.yml [deleted file]
roles/ceph-rgw/tasks/installs/install_debian.yml [deleted file]
roles/ceph-rgw/tasks/installs/install_redhat.yml [deleted file]
roles/ceph-rgw/tasks/main.yml
roles/ceph-rgw/tasks/start_radosgw.yml
roles/ceph-rgw/templates/ceph-extra.repo [deleted file]
roles/ceph-rgw/templates/ceph.j2 [deleted file]
roles/ceph-rgw/templates/httpd.conf [deleted file]
roles/ceph-rgw/templates/rgw.conf [deleted file]
roles/ceph-rgw/templates/s3gw.fcgi.j2 [deleted file]

index e6da186946f6c54c2718c0c3197d6b26842f5224..71403ef3592adf43c762f8cc3981d3ba0308b4a3 100644 (file)
@@ -171,6 +171,12 @@ dummy:
 #radosgw_keystone_revocation_internal: 900
 #radosgw_s3_auth_use_keystone: "true"
 #radosgw_nss_db_path: /var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}/nss
+# Toggle 100-continue support for Apache and FastCGI
+# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes
+#http_100_continue: false
+# Rados Gateway options
+#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
+#email_address: foo@bar.com
 
 ## REST API options
 #
index 15ff7150cb5c8c163a04dd057bcade194717f8a8..f0c930c5d7a82e952e711f86e6ca2eadca02ff6d 100644 (file)
@@ -10,16 +10,6 @@ dummy:
 # allowing root to not require tty\r
 #radosgw_user: root\r
 \r
-# Toggle 100-continue support for Apache and FastCGI\r
-# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
-#http_100_continue: false\r
-\r
-# 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
-#radosgw_frontend: civetweb # we currently only support a single backend\r
-\r
-\r
 ##########\r
 # DOCKER #\r
 ##########\r
index 301520f9f3917f1f0652bb5bca98f96c13400b36..ba48c6459d4115e5d438c78ecffe41e2cd59389f 100644 (file)
@@ -179,6 +179,12 @@ radosgw_keystone_token_cache_size: 10000
 radosgw_keystone_revocation_internal: 900\r
 radosgw_s3_auth_use_keystone: "true"\r
 radosgw_nss_db_path: /var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}/nss\r
+# Toggle 100-continue support for Apache and FastCGI\r
+# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
+http_100_continue: false\r
+# 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
 ## REST API options\r
 #\r
index 0fd2f023ad16844f07114c00d8b0258837cdce42..f2c54aa82772c78a8d87d2bf4b1279bec024db2b 100644 (file)
     socketrgw.rc == 0 and
     ansible_os_family == 'RedHat' and
     rgw_group_name in group_names
+
+- name: restart apache2
+  service: >
+    name=apache2
+    state=restarted
+    enabled=yes
+  when:
+    ansible_os_family == 'Debian' and
+    rgw_group_name in group_names
+
+- name: restart apache2
+  service: >
+    name=httpd
+    state=restarted
+    enabled=yes
+  when:
+    ansible_os_family == 'RedHat' and
+    rgw_group_name in group_names
index df129b0a52363220cdcb6a8d7b1b30fe06ef0495..d1813ed2c0c51b1db43ed6e21887e43b27c48253 100644 (file)
     - ceph-mds       #|--> they don't get update so we need to force them
     - libcephfs1     #|
 
+- name: install rados gateway
+  apt: >
+    pkg=radosgw
+    state=present
+    update_cache=yes
+  when:
+    rgw_group_name in group_names
+
 - name: configure rbd clients directories
   file: >
     path={{ item }}
index d8fbfe6f8b5823cb584c3bbb8ea6e72bd2b7412f..d133250b686d32e2ded442133b44dcbe090a253b 100644 (file)
     - "{{ ceph_stable_ice_temp_path }}/kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm"
   when: ceph_stable_ice
 
+- name: install rados gateway
+  yum: >
+    name=ceph-radosgw
+    state=present
+  when:
+    rgw_group_name in group_names
+
 - name: configure rbd clients directories
   file: >
     path={{ item }}
diff --git a/roles/ceph-common/tasks/installs/install_rgw_on_debian.yml b/roles/ceph-common/tasks/installs/install_rgw_on_debian.yml
new file mode 100644 (file)
index 0000000..1905394
--- /dev/null
@@ -0,0 +1,144 @@
+---
+- name: add ceph extra
+  apt_repository: >
+    repo="deb http://ceph.com/packages/ceph-extras/debian {{ ansible_lsb.codename }} main"
+    state=present
+  when: ansible_lsb.codename in ['natty', 'oneiric', 'precise', 'quantal', 'raring', 'sid', 'squeeze', 'wheezy']
+
+# NOTE (leseb): needed for Ubuntu 12.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used
+- name: enable multiverse repo for precise
+  apt_repository: >
+    repo="{{ item }}"
+    state=present
+  with_items:
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
+    - deb http://security.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-security multiverse
+  when:
+    ansible_lsb.codename in ['precise'] and not
+    http_100_continue
+
+# NOTE (leseb): disable the repo when we are using the Ceph repo for 100-continue packages
+- name: disable multiverse repo for precise
+  apt_repository: >
+    repo="{{ item }}"
+    state=absent
+  with_items:
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
+    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
+    - deb http://security.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-security multiverse
+  when:
+    ansible_lsb.codename in ['precise'] and
+    http_100_continue
+
+# NOTE (leseb): needed for Ubuntu 14.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used
+- name: enable multiverse repo for trusty
+  command: "apt-add-repository multiverse"
+  changed_when: false
+  when:
+    ansible_lsb.codename in ['trusty'] and not
+    http_100_continue
+
+# NOTE (leseb): disable the repo when we are using the Ceph repo for 100-continue packages
+- name: disable multiverse repo for trusty
+  command: "apt-add-repository -r multiverse"
+  changed_when: false
+  when:
+    ansible_lsb.codename in ['trusty'] and
+    http_100_continue
+
+# NOTE (leseb): if using 100-continue, add Ceph dev key
+- name: install the ceph development repository key
+  apt_key: >
+    data="{{ lookup('file', 'cephdev.asc') }}"
+    state=present
+  when: http_100_continue
+
+# NOTE (leseb): if using 100-continue, add Ceph sources and update
+- name: add ceph apache and fastcgi sources
+  apt_repository: >
+    repo="{{ item }}"
+    state=present
+  with_items:
+    - deb http://gitbuilder.ceph.com/apache2-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
+    - deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
+  register: purge_default_apache
+  when: http_100_continue
+
+# NOTE (leseb): else remove them to ensure you use the default packages
+- name: remove ceph apache and fastcgi sources
+  apt_repository: >
+    repo="{{ item }}"
+    state=absent
+  with_items:
+    - deb http://gitbuilder.ceph.com/apache2-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
+    - deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
+  register: purge_ceph_apache
+  when: not http_100_continue
+
+# NOTE (leseb): purge Ceph Apache and FastCGI packages if needed
+- name: purge ceph apache and fastcgi packages
+  apt: >
+    pkg="{{ item }}"
+    state=absent
+    purge=yes
+  with_items:
+    - apache2
+    - apache2-bin
+    - apache2-data
+    - apache2-mpm-worker
+    - apache2-utils
+    - apache2.2-bin
+    - apache2.2-common
+    - libapache2-mod-fastcgi
+  when:
+    purge_default_apache.changed or
+    purge_ceph_apache.changed
+
+- name: install apache and fastcgi
+  apt: >
+    pkg={{ item }}
+    state=present
+    update_cache=yes
+  with_items:
+    - apache2
+    - libapache2-mod-fastcgi
+
+- name: install default httpd.conf
+  template: >
+    src=../../templates/httpd.conf
+    dest=/etc/apache2/httpd.conf
+    owner=root
+    group=root
+
+- name: enable some apache mod rewrite and fastcgi
+  command: "{{ item }}"
+  with_items:
+    - a2enmod rewrite
+    - a2enmod fastcgi
+  changed_when: false
+
+- name: install rados gateway vhost
+  template: >
+    src=../../templates/rgw.conf
+    dest=/etc/apache2/sites-available/rgw.conf
+    owner=root
+    group=root
+
+- name: enable rados gateway vhost and disable default site
+  command: "{{ item }}"
+  with_items:
+    - a2ensite rgw.conf
+    - a2dissite *default
+  changed_when: false
+  failed_when: false
+  notify:
+    - restart apache2
+
+- name: install s3gw.fcgi script
+  template: >
+    src=../../templates/s3gw.fcgi.j2
+    dest=/var/www/s3gw.fcgi
+    mode=0555
+    owner=root
+    group=root
diff --git a/roles/ceph-common/tasks/installs/install_rgw_on_redhat.yml b/roles/ceph-common/tasks/installs/install_rgw_on_redhat.yml
new file mode 100644 (file)
index 0000000..79d10ee
--- /dev/null
@@ -0,0 +1,44 @@
+---
+- name: add ceph extra
+  template: >
+    src=../../templates/ceph-extra.repo
+    dest=/etc/yum.repos.d
+    owner=root
+    group=root
+
+- name: add special fastcgi repository key
+  rpm_key: key=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
+
+- 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
+  changed_when: false
+
+- name: install apache and fastcgi
+  yum: >
+    name={{ item }}
+    state=present
+  with_items:
+    - httpd
+    - mod_fastcgi
+    - mod_fcgid
+
+- name: install rados gateway vhost
+  template: >
+    src=../../templates/rgw.conf
+    dest=/etc/httpd/conf.d/rgw.conf
+    owner=root
+    group=root
+
+- name: install s3gw.fcgi script
+  template: >
+    src=../../templates/s3gw.fcgi.j2
+    dest=/var/www/s3gw.fcgi
+    mode=0555
+    owner=root
+    group=root
+
+- name: disable default site
+  shell: sed -i "s/^[^+#]/#/g" /etc/httpd/conf.d/welcome.conf
+  changed_when: false
+  notify:
+    - restart apache2
index fd840e0e914c07a953c5dc2e3d1e828631c0c075..3d46fa3378f1fd73567df00ad38ee55373f432c6 100644 (file)
 - include: ./installs/install_on_debian.yml
   when: ansible_os_family == 'Debian'
 
+- include: ./installs/install_rgw_on_redhat.yml
+  when:
+    ansible_os_family == 'RedHat' and
+    radosgw_frontend == 'apache' and
+    rgw_group_name in group_names
+
+- include: ./installs/install_rgw_on_debian.yml
+  when:
+    ansible_os_family == 'Debian' and
+    radosgw_frontend == 'apache' and
+    rgw_group_name in group_names
+
 - name: check for a ceph socket
   shell: "stat /var/run/ceph/*.asok > /dev/null 2>&1"
   changed_when: false
@@ -38,7 +50,7 @@
   register: socketrgw
 
 - name: create a local fetch directory if it doesn't exist
-  local_action: file path=fetch state=directory 
+  local_action: file path=fetch state=directory
   changed_when: false
   sudo: false
 
diff --git a/roles/ceph-common/templates/ceph-extra.repo b/roles/ceph-common/templates/ceph-extra.repo
new file mode 100644 (file)
index 0000000..84a863b
--- /dev/null
@@ -0,0 +1,30 @@
+# {{ ansible_managed }}
+
+[ceph-extras]
+name=Ceph Extras Packages
+baseurl=http://ceph.com/packages/ceph-extras/rpm/{{ redhat_distro_ceph_extra }}/$basearch
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+
+{% if (redhat_distro_ceph_extra != "centos6.4" and redhat_distro_ceph_extra !=  "rhel6.4" and redhat_distro_ceph_extra !=  "rhel6.5") %}
+[ceph-extras-noarch]
+name=Ceph Extras noarch
+baseurl=http://ceph.com/packages/ceph-extras/rpm/{{ redhat_distro_ceph_extra }}/noarch
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+{% endif %}
+
+[ceph-extras-source]
+name=Ceph Extras Sources
+baseurl=http://ceph.com/packages/ceph-extras/rpm/{{ redhat_distro_ceph_extra }}/SRPMS
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
diff --git a/roles/ceph-common/templates/ceph.j2 b/roles/ceph-common/templates/ceph.j2
new file mode 100644 (file)
index 0000000..d0d31dc
--- /dev/null
@@ -0,0 +1,2 @@
+# {{ ansible_managed }}
+Defaults:{{ radosgw_user }} !requiretty
diff --git a/roles/ceph-common/templates/httpd.conf b/roles/ceph-common/templates/httpd.conf
new file mode 100644 (file)
index 0000000..d82d98a
--- /dev/null
@@ -0,0 +1,3 @@
+# {{ ansible_managed }}
+
+ServerName {{ ansible_hostname }}
diff --git a/roles/ceph-common/templates/rgw.conf b/roles/ceph-common/templates/rgw.conf
new file mode 100644 (file)
index 0000000..f934d3a
--- /dev/null
@@ -0,0 +1,23 @@
+# {{ ansible_managed }}
+
+FastCgiExternalServer /var/www/s3gw.fcgi -socket  /tmp/radosgw-{{ ansible_hostname }}.sock
+<VirtualHost *:80>
+        ServerName {{ ansible_hostname }}
+        ServerAdmin {{ email_address }}@{{ ansible_fqdn }}
+        DocumentRoot /var/www
+
+        <IfModule mod_fastcgi.c>
+                <Directory /var/www>
+                        Options +ExecCGI
+                        AllowOverride All
+                        SetHandler fastcgi-script
+                        Order allow,deny
+                        Allow from all
+                        AuthBasicAuthoritative Off
+                </Directory>
+        </IfModule>
+
+        RewriteEngine On
+        RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1&params=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
+
+</VirtualHost>
diff --git a/roles/ceph-common/templates/s3gw.fcgi.j2 b/roles/ceph-common/templates/s3gw.fcgi.j2
new file mode 100644 (file)
index 0000000..f309fff
--- /dev/null
@@ -0,0 +1,3 @@
+# {{ ansible_managed }}
+#!/bin/sh
+exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.{{ ansible_hostname }}
index 1046e481e99899fadadf0635cbb611f5d2d42869..1a482aceeff4f441d4d09cd5469e3e811a533a99 100644 (file)
@@ -10,16 +10,6 @@ cephx: true
 # allowing root to not require tty\r
 radosgw_user: root\r
 \r
-# Toggle 100-continue support for Apache and FastCGI\r
-# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
-http_100_continue: false\r
-\r
-# 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
-radosgw_frontend: civetweb # we currently only support a single backend\r
-\r
-\r
 ##########\r
 # DOCKER #\r
 ##########\r
diff --git a/roles/ceph-rgw/files/cephdev.asc b/roles/ceph-rgw/files/cephdev.asc
deleted file mode 100644 (file)
index e43bd6c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-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
-=per8
------END PGP PUBLIC KEY BLOCK-----
diff --git a/roles/ceph-rgw/handlers/main.yml b/roles/ceph-rgw/handlers/main.yml
deleted file mode 100644 (file)
index 06c7398..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: restart apache2
-  service: >
-    name=apache2
-    state=restarted
-    enabled=yes
-  when: ansible_os_family == 'Debian'
-
-- name: restart apache2
-  service: >
-    name=httpd
-    state=restarted
-    enabled=yes
-  when: ansible_os_family == 'RedHat'
diff --git a/roles/ceph-rgw/tasks/installs/install_debian.yml b/roles/ceph-rgw/tasks/installs/install_debian.yml
deleted file mode 100644 (file)
index 1905394..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
----
-- name: add ceph extra
-  apt_repository: >
-    repo="deb http://ceph.com/packages/ceph-extras/debian {{ ansible_lsb.codename }} main"
-    state=present
-  when: ansible_lsb.codename in ['natty', 'oneiric', 'precise', 'quantal', 'raring', 'sid', 'squeeze', 'wheezy']
-
-# NOTE (leseb): needed for Ubuntu 12.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used
-- name: enable multiverse repo for precise
-  apt_repository: >
-    repo="{{ item }}"
-    state=present
-  with_items:
-    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
-    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
-    - deb http://security.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-security multiverse
-  when:
-    ansible_lsb.codename in ['precise'] and not
-    http_100_continue
-
-# NOTE (leseb): disable the repo when we are using the Ceph repo for 100-continue packages
-- name: disable multiverse repo for precise
-  apt_repository: >
-    repo="{{ item }}"
-    state=absent
-  with_items:
-    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
-    - deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
-    - deb http://security.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-security multiverse
-  when:
-    ansible_lsb.codename in ['precise'] and
-    http_100_continue
-
-# NOTE (leseb): needed for Ubuntu 14.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used
-- name: enable multiverse repo for trusty
-  command: "apt-add-repository multiverse"
-  changed_when: false
-  when:
-    ansible_lsb.codename in ['trusty'] and not
-    http_100_continue
-
-# NOTE (leseb): disable the repo when we are using the Ceph repo for 100-continue packages
-- name: disable multiverse repo for trusty
-  command: "apt-add-repository -r multiverse"
-  changed_when: false
-  when:
-    ansible_lsb.codename in ['trusty'] and
-    http_100_continue
-
-# NOTE (leseb): if using 100-continue, add Ceph dev key
-- name: install the ceph development repository key
-  apt_key: >
-    data="{{ lookup('file', 'cephdev.asc') }}"
-    state=present
-  when: http_100_continue
-
-# NOTE (leseb): if using 100-continue, add Ceph sources and update
-- name: add ceph apache and fastcgi sources
-  apt_repository: >
-    repo="{{ item }}"
-    state=present
-  with_items:
-    - deb http://gitbuilder.ceph.com/apache2-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
-    - deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
-  register: purge_default_apache
-  when: http_100_continue
-
-# NOTE (leseb): else remove them to ensure you use the default packages
-- name: remove ceph apache and fastcgi sources
-  apt_repository: >
-    repo="{{ item }}"
-    state=absent
-  with_items:
-    - deb http://gitbuilder.ceph.com/apache2-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
-    - deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
-  register: purge_ceph_apache
-  when: not http_100_continue
-
-# NOTE (leseb): purge Ceph Apache and FastCGI packages if needed
-- name: purge ceph apache and fastcgi packages
-  apt: >
-    pkg="{{ item }}"
-    state=absent
-    purge=yes
-  with_items:
-    - apache2
-    - apache2-bin
-    - apache2-data
-    - apache2-mpm-worker
-    - apache2-utils
-    - apache2.2-bin
-    - apache2.2-common
-    - libapache2-mod-fastcgi
-  when:
-    purge_default_apache.changed or
-    purge_ceph_apache.changed
-
-- name: install apache and fastcgi
-  apt: >
-    pkg={{ item }}
-    state=present
-    update_cache=yes
-  with_items:
-    - apache2
-    - libapache2-mod-fastcgi
-
-- name: install default httpd.conf
-  template: >
-    src=../../templates/httpd.conf
-    dest=/etc/apache2/httpd.conf
-    owner=root
-    group=root
-
-- name: enable some apache mod rewrite and fastcgi
-  command: "{{ item }}"
-  with_items:
-    - a2enmod rewrite
-    - a2enmod fastcgi
-  changed_when: false
-
-- name: install rados gateway vhost
-  template: >
-    src=../../templates/rgw.conf
-    dest=/etc/apache2/sites-available/rgw.conf
-    owner=root
-    group=root
-
-- name: enable rados gateway vhost and disable default site
-  command: "{{ item }}"
-  with_items:
-    - a2ensite rgw.conf
-    - a2dissite *default
-  changed_when: false
-  failed_when: false
-  notify:
-    - restart apache2
-
-- name: install s3gw.fcgi script
-  template: >
-    src=../../templates/s3gw.fcgi.j2
-    dest=/var/www/s3gw.fcgi
-    mode=0555
-    owner=root
-    group=root
diff --git a/roles/ceph-rgw/tasks/installs/install_redhat.yml b/roles/ceph-rgw/tasks/installs/install_redhat.yml
deleted file mode 100644 (file)
index 79d10ee..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- name: add ceph extra
-  template: >
-    src=../../templates/ceph-extra.repo
-    dest=/etc/yum.repos.d
-    owner=root
-    group=root
-
-- name: add special fastcgi repository key
-  rpm_key: key=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
-
-- 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
-  changed_when: false
-
-- name: install apache and fastcgi
-  yum: >
-    name={{ item }}
-    state=present
-  with_items:
-    - httpd
-    - mod_fastcgi
-    - mod_fcgid
-
-- name: install rados gateway vhost
-  template: >
-    src=../../templates/rgw.conf
-    dest=/etc/httpd/conf.d/rgw.conf
-    owner=root
-    group=root
-
-- name: install s3gw.fcgi script
-  template: >
-    src=../../templates/s3gw.fcgi.j2
-    dest=/var/www/s3gw.fcgi
-    mode=0555
-    owner=root
-    group=root
-
-- name: disable default site
-  shell: sed -i "s/^[^+#]/#/g" /etc/httpd/conf.d/welcome.conf
-  changed_when: false
-  notify:
-    - restart apache2
index 04d1bf8d361c77287e925a28756d7e2108088784..7b7e7305727177365de6a908b73927363ea5e0aa 100644 (file)
@@ -2,35 +2,6 @@
 - include: pre_requisite.yml
   when: not ceph_containerized_deployment
 
-- include: ./installs/install_redhat.yml
-  when:
-    ansible_os_family == 'RedHat' and
-    radosgw_frontend == 'apache' and not
-    ceph_containerized_deployment
-
-- include: ./installs/install_debian.yml
-  when:
-    ansible_os_family == 'Debian' and
-    radosgw_frontend == 'apache' and not
-    ceph_containerized_deployment
-
-- name: install rados gateway
-  apt: >
-    pkg=radosgw
-    state=present
-    update_cache=yes
-  when:
-    ansible_os_family == 'Debian' and not
-    ceph_containerized_deployment
-
-- name: install rados gateway
-  yum: >
-    name=ceph-radosgw
-    state=present
-  when:
-    ansible_os_family == 'RedHat' and not
-    ceph_containerized_deployment
-
 - include: openstack-keystone.yml
   when: radosgw_keystone
 
index 2301b4974717fc7cf1fda5a8b0acb012ca96a348..f67ed9299787f8b57349b0e1fb99f66736d17da4 100644 (file)
@@ -2,6 +2,7 @@
 - name: check if rgw is started
   command: /etc/init.d/radosgw status
   register: rgwstatus
+  changed_when: false
   failed_when: false
 
 - name: start rgw
     ansible_distribution != "Ubuntu" and
     ansible_os_family != 'RedHat'
 
+- name: activate rgw on ubuntu
+  command: initctl emit radosgw cluster=ceph id=rgw.{{ ansible_hostname }}
+  changed_when: false
+  when: ansible_distribution == 'Ubuntu'
+
 - name: start rgw on ubuntu
   service: >
-    name=radosgw-all
+    name=radosgw
+    args=id=rgw.{{ ansible_hostname }}
     state=started
   when: ansible_distribution == 'Ubuntu'
 
diff --git a/roles/ceph-rgw/templates/ceph-extra.repo b/roles/ceph-rgw/templates/ceph-extra.repo
deleted file mode 100644 (file)
index 84a863b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# {{ ansible_managed }}
-
-[ceph-extras]
-name=Ceph Extras Packages
-baseurl=http://ceph.com/packages/ceph-extras/rpm/{{ redhat_distro_ceph_extra }}/$basearch
-enabled=1
-priority=2
-gpgcheck=1
-type=rpm-md
-gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
-
-{% if (redhat_distro_ceph_extra != "centos6.4" and redhat_distro_ceph_extra !=  "rhel6.4" and redhat_distro_ceph_extra !=  "rhel6.5") %}
-[ceph-extras-noarch]
-name=Ceph Extras noarch
-baseurl=http://ceph.com/packages/ceph-extras/rpm/{{ redhat_distro_ceph_extra }}/noarch
-enabled=1
-priority=2
-gpgcheck=1
-type=rpm-md
-gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
-{% endif %}
-
-[ceph-extras-source]
-name=Ceph Extras Sources
-baseurl=http://ceph.com/packages/ceph-extras/rpm/{{ redhat_distro_ceph_extra }}/SRPMS
-enabled=1
-priority=2
-gpgcheck=1
-type=rpm-md
-gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
diff --git a/roles/ceph-rgw/templates/ceph.j2 b/roles/ceph-rgw/templates/ceph.j2
deleted file mode 100644 (file)
index d0d31dc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# {{ ansible_managed }}
-Defaults:{{ radosgw_user }} !requiretty
diff --git a/roles/ceph-rgw/templates/httpd.conf b/roles/ceph-rgw/templates/httpd.conf
deleted file mode 100644 (file)
index d82d98a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# {{ ansible_managed }}
-
-ServerName {{ ansible_hostname }}
diff --git a/roles/ceph-rgw/templates/rgw.conf b/roles/ceph-rgw/templates/rgw.conf
deleted file mode 100644 (file)
index f934d3a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# {{ ansible_managed }}
-
-FastCgiExternalServer /var/www/s3gw.fcgi -socket  /tmp/radosgw-{{ ansible_hostname }}.sock
-<VirtualHost *:80>
-        ServerName {{ ansible_hostname }}
-        ServerAdmin {{ email_address }}@{{ ansible_fqdn }}
-        DocumentRoot /var/www
-
-        <IfModule mod_fastcgi.c>
-                <Directory /var/www>
-                        Options +ExecCGI
-                        AllowOverride All
-                        SetHandler fastcgi-script
-                        Order allow,deny
-                        Allow from all
-                        AuthBasicAuthoritative Off
-                </Directory>
-        </IfModule>
-
-        RewriteEngine On
-        RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1&params=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
-
-</VirtualHost>
diff --git a/roles/ceph-rgw/templates/s3gw.fcgi.j2 b/roles/ceph-rgw/templates/s3gw.fcgi.j2
deleted file mode 100644 (file)
index f309fff..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# {{ ansible_managed }}
-#!/bin/sh
-exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.{{ ansible_hostname }}