batrick / ceph-linode

Launch Ceph using the Linode VPS provider
GNU General Public License v3.0
13 stars 10 forks source link

update deployment backend to cephadm #57

Closed batrick closed 4 years ago

batrick commented 4 years ago

This ends up being significantly faster and ceph-ansible is on the way out.

Obviously, this is not backwards compatible with Nautilus or older.

Signed-off-by: Patrick Donnelly pdonnell@redhat.com

batrick commented 4 years ago

cc @kotreshhr

batrick commented 4 years ago

cc @bengland2

batrick commented 4 years ago

Just leaving a note for posterity that this commit did not work:

commit 5a35a153d76999905f2f28092a07785f30d61968 HEAD (HEAD -> cephadm, origin/heads/cephadm)
Date:   Tue Jul 14 13:26:09 2020 -0700

    testme
---
 cephadm.yml | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/cephadm.yml b/cephadm.yml
index c25b580..1b56053 100644
--- a/cephadm.yml
+++ b/cephadm.yml
@@ -133,9 +133,21 @@
     shell: hostname --fqdn
     register: myhostname

-#FIXME this is not idempotent!!
+#    shell: tee /dev/stderr | ceph orch apply -i
+#      stdin: |
   - name: add osd
-    shell: ceph orch daemon add osd "{{ myhostname.stdout }}:/dev/sdc"
+    shell:
+      cmd: |
+        tee /dev/stderr <<EOF | ceph orch apply -i -
+        service_type: osd
+        spec:
+          placement:
+            hosts:
+            - {{ myhostname.stdout }}
+          data_devices:
+            paths:
+            - /dev/sdc
+        EOF
     delegate_to: mon-000
     ignore_errors: yes