]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add support for Intank Ceph Enterprise 155/head
authorSébastien Han <sebastien.han@enovance.com>
Tue, 16 Dec 2014 12:46:32 +0000 (13:46 +0100)
committerSébastien Han <sebastien.han@enovance.com>
Tue, 16 Dec 2014 13:47:35 +0000 (14:47 +0100)
With the appropriate subscription details you will be able to use the
Inktank Ceph Enterprise version of Ceph running on RHEL7.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
roles/ceph-common/tasks/install_on_redhat.yml
roles/ceph-common/tasks/main.yml
roles/ceph-common/templates/ice.repo.j2 [new file with mode: 0644]
roles/ceph-common/vars/main.yml

index 54fb644794f15dbb92b72a2502a63cdae2a6047a..7dfd5df4ff0d0bb2ba73554062bd58e49c42e715 100644 (file)
   command: "rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm creates=/etc/yum.repos.d/ceph.repo"
   when: ceph_dev
 
+- name: Create package directory
+  file: >
+    path=/tmp/ice_repo
+    state=directory
+    owner=root
+    group=root
+    mode=0644
+  when: ceph_stable_ice
+
+- name: Get ICE packages
+  get_url: >
+    url_username={{ ceph_stable_ice_user }}
+    url_password={{ ceph_stable_ice_password }}
+    url=https://download.inktank.com/enterprise/{{ ceph_stable_ice_version }}/ICE-{{ ceph_stable_ice_version }}-rhel7.tar.gz
+    dest=/tmp/ice_repo/ICE-{{ ceph_stable_ice_version }}-rhel7.tar.gz
+  when: ceph_stable_ice
+
+- name: Stat extracted repo files
+  stat: >
+    path=/tmp/ice_repo/repodata/repomd.xml
+  register: repo_exist
+
+- name: Extract packages
+  shell: cd /tmp/ice_repo && tar -xzf ICE-{{ ceph_stable_ice_version }}-rhel7.tar.gz
+  when: ceph_stable_ice and repo_exist.stat.exists == False
+
+- name: Move the extracted packages
+  shell: mv /tmp/ice_repo/ceph/*/* /tmp/ice_repo
+  when: ceph_stable_ice and repo_exist.stat.exists == False
+
+- name: Create repository
+  template: >
+    src=ice.repo.j2
+    dest=/etc/yum.repos.d/ice.repo
+    owner=root
+    group=root
+    mode=0644
+  when: ceph_stable_ice
+
 - name: Install Ceph
   yum: >
     name=ceph
     state=latest
-
index 86961fd01b9e889320bb716692b762ddd0d0a746..dd26210552ede06037f3fe48137a85729a8fbf4a 100644 (file)
   fail: "msg=Distribution not supported {{ ansible_os_family }}"
   when: "ansible_os_family not in ['Debian', 'RedHat']"
 
+- name: Fail on wrong distribution with wrong repo
+  fail: "msg=Inktank Ceph Enterprise can not be installed on {{ ansible_os_family }}, Red Hat Enterprise Linux 7 only"
+  when: ansible_os_family == 'Debian' and ceph_stable_ice
+
+- name: Fail on wrong distribution with wrong repo
+  fail: "msg=Inktank Ceph Enterprise can not be installed on {{ ansible_os_family }}i {{ ansible_distribution_major_version }}, Red Hat Enterprise Linux 7 only"
+  when: ansible_os_family == 'RedHat' and ansible_distribution_major_version != '7' and ceph_stable_ice
+
 - include: install_on_redhat.yml
   when: ansible_os_family == 'RedHat'
 
diff --git a/roles/ceph-common/templates/ice.repo.j2 b/roles/ceph-common/templates/ice.repo.j2
new file mode 100644 (file)
index 0000000..0b47a2d
--- /dev/null
@@ -0,0 +1,8 @@
+# {{ ansible_managed }}
+[ice]
+name=Inktank Ceph Enterprise - local packages for Ceph
+baseurl=file:///tmp/ice_repo
+enabled=1
+gpgcheck=0
+protect=1
+priority=1
index 95fd1ead75f85204f8a2981990e3258f9879217b..58cfd414a0f116d0f5594937f4218f2e6a317bc9 100644 (file)
@@ -1,13 +1,16 @@
 ---\r
 # You can override vars by using host or group vars\r
 \r
-## Setup options\r
-#\r
+#########\r
+# INSTALL\r
+#########\r
 \r
-# ACTIVATE THE FSID VARIABLE FOR NON-VAGRANT DEPLOYMENT\r
-fsid: "{{ cluster_uuid.stdout }}"\r
+# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\\r
 \r
-## Packages branch\r
+# STABLE\r
+########\r
+\r
+# COMMUNITY VERSION\r
 ceph_stable: true # use ceph stable branch\r
 ceph_stable_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc\r
 ceph_stable_release: giant # ceph stable release\r
@@ -16,6 +19,15 @@ ceph_stable_release: giant # ceph stable release
 # # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11, centos7 (see http://ceph.com/rpm-firefly/)\r
 ceph_stable_redhat_distro: el7\r
 \r
+# ENTERPRISE VERSION\r
+ceph_stable_ice: false # use Inktank Ceph Enterprise\r
+#ceph_stable_ice_version:\r
+#ceph_stable_ice_user:\r
+#ceph_stable_ice_password:\r
+\r
+# DEV\r
+# ###\r
+\r
 ceph_dev: false # use ceph development branch\r
 ceph_dev_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc\r
 ceph_dev_branch: master # development branch you would like to use e.g: master, wip-hack\r
@@ -25,8 +37,13 @@ ceph_dev_branch: master # development branch you would like to use e.g: master,
 # For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.\r
 ceph_dev_redhat_distro: centos7\r
 \r
+###############\r
+# CONFIGURATION\r
+###############\r
+\r
 ## Ceph options\r
 #\r
+fsid: "{{ cluster_uuid.stdout }}"\r
 cephx: true\r
 cephx_require_signatures: true # Kernel RBD does NOT support signatures!\r
 cephx_cluster_require_signatures: true\r