]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Activate rados gateway with systemd
authorleseb <seb@redhat.com>
Tue, 7 Jul 2015 09:19:50 +0000 (11:19 +0200)
committerleseb <seb@redhat.com>
Tue, 7 Jul 2015 09:27:52 +0000 (11:27 +0200)
Signed-off-by: leseb <seb@redhat.com>
roles/ceph-radosgw/tasks/install_debian.yml
roles/ceph-radosgw/tasks/install_redhat.yml
roles/ceph-radosgw/tasks/main.yml
roles/ceph-radosgw/tasks/openstack-keystone.yml
roles/ceph-radosgw/tasks/pre_requisite.yml
roles/ceph-radosgw/tasks/start_radosgw.yml

index 1752f19ba5c4ff12b0bf5f1978470c9909131fc0..6d39a44904aa70a38ffdfce8ad4f9227595693af 100644 (file)
@@ -1,12 +1,12 @@
 ---
-- name: add Ceph extra
+- 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
+- name: enable multiverse repo for precise
   apt_repository: >
     repo="{{ item }}"
     state=present
@@ -19,7 +19,7 @@
     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
+- name: disable multiverse repo for precise
   apt_repository: >
     repo="{{ item }}"
     state=absent
@@ -32,7 +32,7 @@
     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
+- name: enable multiverse repo for trusty
   command: "apt-add-repository multiverse"
   changed_when: false
   when:
@@ -40,7 +40,7 @@
     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
+- name: disable multiverse repo for trusty
   command: "apt-add-repository -r multiverse"
   changed_when: false
   when:
     http_100_continue
 
 # NOTE (leseb): if using 100-continue, add Ceph dev key
-- name: install the Ceph development repository 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
+- name: add ceph apache and fastcgi sources
   apt_repository: >
     repo="{{ item }}"
     state=present
@@ -66,7 +66,7 @@
   when: http_100_continue
 
 # NOTE (leseb): else remove them to ensure you use the default packages
-- name: remove Ceph Apache and FastCGI sources
+- name: remove ceph apache and fastcgi sources
   apt_repository: >
     repo="{{ item }}"
     state=absent
@@ -77,7 +77,7 @@
   when: not http_100_continue
 
 # NOTE (leseb): purge Ceph Apache and FastCGI packages if needed
-- name: purge Ceph Apache and FastCGI packages
+- name: purge ceph apache and fastcgi packages
   apt: >
     pkg="{{ item }}"
     state=absent
@@ -95,7 +95,7 @@
     purge_default_apache.changed or
     purge_ceph_apache.changed
 
-- name: install Apache and fastcgi
+- name: install apache and fastcgi
   apt: >
     pkg={{ item }}
     state=present
     - a2enmod fastcgi
   changed_when: false
 
-- name: install Rados Gateway vhost
+- name: install rados gateway vhost
   template: >
     src=rgw.conf
     dest=/etc/apache2/sites-available/rgw.conf
     owner=root
     group=root
 
-- name: enable Rados Gateway vhost and disable default site
+- name: enable rados gateway vhost and disable default site
   command: "{{ item }}"
   with_items:
     - a2ensite rgw.conf
index 9be921d6cb808a3fae5e1d293216bd983522f876..7531d10b3c2ddb603867c13aee79cf1dabbd8266 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- name: add Ceph extra
+- name: add ceph extra
   template: >
     src=ceph-extra.repo
     dest=/etc/yum.repos.d
@@ -13,7 +13,7 @@
   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
+- name: install apache and fastcgi
   yum: >
     name={{ item }}
     state=present
@@ -22,7 +22,7 @@
     - mod_fastcgi
     - mod_fcgid
 
-- name: install Rados Gateway vhost
+- name: install rados gateway vhost
   template: >
     src=rgw.conf
     dest=/etc/httpd/conf.d/rgw.conf
index 05f3d0070ee7cb3a6f54e26d041dfe6bf744e264..f05123b214fb20a689494ec0e34475f6cc20ea32 100644 (file)
@@ -14,7 +14,7 @@
     radosgw_frontend == 'apache' and not
     ceph_containerized_deployment
 
-- name: install Rados Gateway
+- name: install rados gateway
   apt: >
     pkg=radosgw
     state=present
@@ -23,7 +23,7 @@
     ansible_os_family == 'Debian' and not
     ceph_containerized_deployment
 
-- name: install Rados Gateway
+- name: install rados gateway
   yum: >
     name=ceph-radosgw
     state=present
index 09887f2221d9374302822d694c34135417622f02..24306c2d8b3c6ecea21ef3a7c9c7c70ecaa093f0 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- name: create nss directory for Keystone certificates
+- name: create nss directory for keystone certificates
   file: >
     path={{ radosgw_nss_db_path }}
     state=directory
@@ -7,7 +7,7 @@
     group=root
     mode=0644
 
-- name: create nss entries for Keystone certificates
+- name: create nss entries for keystone certificates
   shell: "{{ item }}"
   with_items:
     - "openssl x509 -in /etc/keystone/ssl/certs/ca.pem -pubkey |certutil -d {{ radosgw_nss_db_path }} -A -n ca -t 'TCu,Cu,Tuw'"
index fbd2114a8ebfb06e98ad723a702f2a2285142b53..fec0ed0f2f7e4465d60ae2feb2de727f3aaf78f1 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- name: create RGW directories
+- name: create rgw directories
   file: >
     path={{ item }}
     state=directory
@@ -10,7 +10,7 @@
     - /var/lib/ceph/bootstrap-rgw
     - /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
 
-- name: copy RGW bootstrap key
+- name: copy rgw bootstrap key
   copy: >
     src=fetch/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring
     dest=/var/lib/ceph/bootstrap-rgw/ceph.keyring
     mode=600
   when: cephx
 
-- name: create RGW keyring
+- name: create rgw keyring
   command: >
     ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.{{ ansible_hostname }} osd 'allow rwx' mon 'allow rw' -o /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
     creates=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
   changed_when: false
   when: cephx
 
-- name: set RGW key permissions
+- name: set rgw key permissions
   file: >
     path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
     mode=0600
@@ -34,7 +34,7 @@
     group=root
   when: cephx
 
-- name: activate RGW with upstart
+- name: activate rgw with upstart
   file: >
     path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
     state=touch
     - upstart
   changed_when: false
   when: ansible_distribution == "Ubuntu"
+
+- name: activate rgw with sysvinit
+  file: >
+    path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
+    state=touch
+    owner=root
+    group=root
+    mode=0644
+  with_items:
+    - done
+    - sysvinit
+  changed_when: false
+  when: ansible_distribution != "Ubuntu"
+
index 53a5107494bb33683249eea371b85c6492886aca..4781d5abf7287d4a81b11bc1fa4280dbbf1c3eb1 100644 (file)
@@ -1,23 +1,27 @@
 ---
-- name: check if RGW is started
+- name: check if rgw is started
   command: /etc/init.d/radosgw status
   register: rgwstatus
   ignore_errors: true
 
-- name: start RGW
+- name: start rgw
   command: /etc/init.d/radosgw start
   when:
     rgwstatus.rc != 0 and
     ansible_distribution != "Ubuntu" and
     ansible_os_family != 'RedHat'
 
-- name: start RGW
+- name: start rgw
   service: >
     name=radosgw-all
     state=started
   when: ansible_distribution == "Ubuntu"
 
-- name: start RGW
+- name: activate rgw service
+  command: systemctl enable ceph-radosgw.service
+  when: ansible_os_family == 'RedHat'
+
+- name: start rgw
   service: >
     name=ceph-radosgw
     state=started