]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add support for install from Ubuntu Cloud Archive 747/head
authorSamuel Matzek <smatzek@us.ibm.com>
Mon, 2 May 2016 16:25:52 +0000 (11:25 -0500)
committerSamuel Matzek <smatzek@us.ibm.com>
Tue, 3 May 2016 15:51:39 +0000 (10:51 -0500)
This adds support to allow the install of Ceph from the
Ubuntu Cloud Archive.  The Ubuntu Cloud Archive provides newer
release of Ceph than the normal Ubuntu distro repository.

Signed-off-by: Samuel Matzek <smatzek@us.ibm.com>
group_vars/all.sample
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/checks/check_mandatory_vars.yml
roles/ceph-common/tasks/checks/check_system.yml
roles/ceph-common/tasks/installs/debian_ceph_repository.yml
roles/ceph-common/tasks/installs/install_on_debian.yml

index fec0cfca8714ce79c74fb438c82f724b539dfd95..ab36dc184e27721c0a1f197714d3feb9811d7f2f 100644 (file)
@@ -42,7 +42,7 @@ dummy:
 # is not needed for versions after infernalis.
 #use_server_package_split: true
 
-# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
+# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_stable_uca OR ceph_dev /!\
 
 #debian_package_dependencies:
 #  - python-pycurl
@@ -138,6 +138,16 @@ dummy:
 #ceph_stable_rh_storage_mount_path: /tmp/rh-storage-mount
 #ceph_stable_rh_storage_repository_path: /tmp/rh-storage-repo # where to copy iso's content
 
+
+# UBUNTU CLOUD ARCHIVE
+# This allows the install of Ceph from the Ubuntu Cloud Archive.  The Ubuntu Cloud Archive
+# usually has newer Ceph releases than the normal distro repository.
+#
+#ceph_stable_uca: false
+#ceph_stable_repo_uca: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
+#ceph_stable_openstack_release_uca: liberty
+#ceph_stable_release_uca: "{{ansible_lsb.codename}}-updates/{{ceph_stable_openstack_release_uca}}"
+
 # DEV
 # ###
 
index 9252df15121fa4f4be69f4fc9db7f31d15fa8060..6e703d6bef49b5dec0dd7ac9f31e1d359bca85e4 100644 (file)
@@ -34,7 +34,7 @@ upgrade_ceph_packages: False
 # is not needed for versions after infernalis.
 use_server_package_split: true
 
-# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
+# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_stable_uca OR ceph_dev /!\
 
 debian_package_dependencies:
   - python-pycurl
@@ -130,6 +130,16 @@ ceph_stable_rh_storage_iso_install: false # usually used when nodes don't have a
 ceph_stable_rh_storage_mount_path: /tmp/rh-storage-mount
 ceph_stable_rh_storage_repository_path: /tmp/rh-storage-repo # where to copy iso's content
 
+
+# UBUNTU CLOUD ARCHIVE
+# This allows the install of Ceph from the Ubuntu Cloud Archive.  The Ubuntu Cloud Archive
+# usually has newer Ceph releases than the normal distro repository.
+#
+ceph_stable_uca: false
+#ceph_stable_repo_uca: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
+#ceph_stable_openstack_release_uca: liberty
+#ceph_stable_release_uca: "{{ansible_lsb.codename}}-updates/{{ceph_stable_openstack_release_uca}}"
+
 # DEV
 # ###
 
index 1926077b4097b466a8abda73c8058b2ce1b04146..60ecbbce32e805d8d62c999be3bfd2b5b4b6c2f4 100644 (file)
@@ -16,7 +16,8 @@
     not ceph_stable and
     not ceph_dev and
     not ceph_stable_ice and
-    not ceph_stable_rh_storage
+    not ceph_stable_rh_storage and
+    not ceph_stable_uca
   tags:
     - package-install
 
index e0c93da8b84149284dbf5c5144e6627c373db952..13eb0eed20ccb459ff919c18e440802773367c5c 100644 (file)
     ceph_stable_rh_storage and
     {{ ansible_distribution_version | version_compare('7.1', '<') }}
 
+- name: fail on unsupported distribution for ubuntu cloud archive
+  fail:
+    msg: "Distribution not supported by Ubuntu Cloud Archive: {{ ansible_distribution }}"
+  when:
+    ceph_stable_uca and
+    '{{ ansible_distribution }}' not in ['Ubuntu']
+
 - name: fail on unsupported ansible version
   fail:
     msg: "Ansible version must be >= 1.9, please update!"
index 145c2c61bce02649e4a8d5c99e30135fd691a7c8..fbfd2c4db1047eddbedf4e42c0c0593810455584 100644 (file)
     state: present
   changed_when: false
   when: ceph_stable_ice
+
+- name: add ubuntu cloud archive key package
+  apt:
+    pkg: ubuntu-cloud-keyring
+  when: ceph_stable_uca
+
+- name: add ubuntu cloud archive repository
+  apt_repository:
+    repo: "deb {{ ceph_stable_repo_uca }} {{ ceph_stable_release_uca}} main"
+    state: present
+  changed_when: false
+  when: ceph_stable_uca
index 64e950ede0c859d5ad2b8592d4c9077ea0632f80..34eb9f4e77bef281c2d70e23b923a6a6cd3b47eb 100644 (file)
@@ -15,7 +15,7 @@
   apt:
     pkg: "{{ item }}"
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ansible_distribution_release }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
   with_items:
     - ceph
     - ceph-common    #|
@@ -27,7 +27,7 @@
   apt:
     pkg: ceph-test
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ansible_distribution_release }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
   when: ceph_test
 
 - name: install rados gateway
@@ -42,6 +42,6 @@
   apt:
     pkg: ceph-mds
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ansible_distribution_release }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
   when:
     mds_group_name in group_names