]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Rework upstart and sysvinit 239/head
authorSébastien Han <sebastien.han@enovance.com>
Mon, 30 Mar 2015 08:59:08 +0000 (10:59 +0200)
committerSébastien Han <sebastien.han@enovance.com>
Mon, 30 Mar 2015 09:38:19 +0000 (11:38 +0200)
Once again and hopefully final commit to rework the support of both
upstart and sysvinit. As from now, Ubuntu systems will use upstart and
the others will use sysvinit.
A later commit might include the support of systemd as the unit files
come out. This will be for Hammer so probably soon.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
roles/ceph-mds/tasks/pre_requisite.yml
roles/ceph-radosgw/tasks/main.yml
roles/ceph-radosgw/tasks/pre_requisite.yml
roles/ceph-restapi/tasks/pre_requisite.yml

index 0bd1ffee3351433e2592c5dec31894216e1bb51e..d45f28680f8fc4a414a8d935d22c77b1a70c6df0 100644 (file)
     group=root
   when: cephx
 
-- name: Start and add that the MDS service to the init sequence
+- name: Activate metadata server with upstart
+  file: >
+    path=/var/lib/ceph/mds/ceph-{{ ansible_hostname }}/{{ item }}
+    state=touch
+    owner=root
+    group=root
+    mode=0600
+  with_items:
+    - done
+    - upstart
+  when: ansible_distribution == "Ubuntu"
+
+- name: Activate metadata server with sysvinit
+  file: >
+    path=/var/lib/ceph/mds/ceph-{{ ansible_hostname }}/{{ item }}
+    state=touch
+    owner=root
+    group=root
+    mode=0600
+  with_items:
+    - done
+    - sysvinit
+  when: ansible_distribution != "Ubuntu"
+
+- name: Start and add that the metadata service to the init sequence (Ubuntu)
+  service: >
+    name=ceph-mds
+    state=started
+    enabled=yes
+    args="id={{ ansible_hostname }}"
+  when: ansible_distribution == "Ubuntu"
+
+- name: Start and add that the metadata service to the init sequence
   service: >
     name=ceph
     state=started
     enabled=yes
     args=mds
+  when: ansible_distribution != "Ubuntu"
index 0d7aecb50a71657872f4d952fdd9b318ce05dc43..2430c1532cfb3fe3e4da05460a15cca4e4b1d910 100644 (file)
@@ -4,10 +4,10 @@
   when: not ceph_containerized_deployment
 
 - include: install_redhat.yml
-  when: ansible_os_family == 'RedHat' and radosgw_frontend == 'apache'
+  when: ansible_os_family == 'RedHat' and radosgw_frontend == 'apache' and not ceph_containerized_deployment
 
 - include: install_debian.yml
-  when: ansible_os_family == 'Debian' and radosgw_frontend == 'apache'
+  when: ansible_os_family == 'Debian' and radosgw_frontend == 'apache' and not ceph_containerized_deployment
 
 - name: "Install Rados Gateway"
   apt: >
@@ -23,6 +23,7 @@
   when: ansible_os_family == 'RedHat' and not ceph_containerized_deployment
 
 - include: start_radosgw.yml
+  when: not ceph_containerized_deployment
 
 - include: docker.yml
   when: ceph_containerized_deployment
index 80fabf82c1077c44174dbc56f5f7816d9135c883..98148972f359877ceac6cc9816bd156015b93967 100644 (file)
 
 - name: Activate RGW with upstart
   file: >
-    path=/var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_fqdn }}/done
+    path=/var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_fqdn }}/{{ item }}
     state=touch
     owner=root
     group=root
     mode=0644
+  with_items:
+    - done
+    - upstart
+  when: ansible_distribution == "Ubuntu"
index 063af107fc6bda4e8015c1565016c8087273d8cf..25a586daff22f1203a05678ea95401811da84e1b 100644 (file)
 
 - name: Activate Ceph REST API with upstart
   file: >
-    path=/var/lib/ceph/restapi/ceph-restapi/done
+    path=/var/lib/ceph/restapi/{{ item }}
     state=touch
     owner=root
     group=root
-    mode=0644
+    mode=0600
+  with_items:
+    - done
+    - upstart
+  when: ansible_distribution == "Ubuntu"
+
+- name: Activate Ceph REST API with sysvinit
+  file: >
+    path=/var/lib/ceph/restapi/{{ item }}
+    state=touch
+    owner=root
+    group=root
+    mode=0600
+  with_items:
+    - done
+    - sysvinit
+  when: ansible_distribution != "Ubuntu"
+
+# NOTE (leseb): will uncomment this when this https://github.com/ceph/ceph/pull/4144 lands
+#- name: Start and add that the Ceph REST API service to the init sequence (Ubuntu)
+#  service: >
+#    name=ceph-restapi
+#    state=started
+#    enabled=yes
+#    args="id={{ ansible_hostname }}"
+#  when: ansible_distribution == "Ubuntu"
+#
+#- name: Start and add that the Ceph REST API service to the init sequence
+#  service: >
+#    name=ceph
+#    state=started
+#    enabled=yes
+#    args=restapi
+#  when: ansible_distribution != "Ubuntu"