Add support for install from Ubuntu Cloud Archive

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>
pull/747/head
Samuel Matzek 2016-05-02 11:25:52 -05:00
parent b3c4196700
commit ae239aaf09
6 changed files with 46 additions and 6 deletions

View File

@ -42,7 +42,7 @@ dummy:
# is not needed for versions after infernalis. # is not needed for versions after infernalis.
#use_server_package_split: true #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: #debian_package_dependencies:
# - python-pycurl # - python-pycurl
@ -138,6 +138,16 @@ dummy:
#ceph_stable_rh_storage_mount_path: /tmp/rh-storage-mount #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 #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 # DEV
# ### # ###

View File

@ -34,7 +34,7 @@ upgrade_ceph_packages: False
# is not needed for versions after infernalis. # is not needed for versions after infernalis.
use_server_package_split: true 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: debian_package_dependencies:
- python-pycurl - 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_mount_path: /tmp/rh-storage-mount
ceph_stable_rh_storage_repository_path: /tmp/rh-storage-repo # where to copy iso's content 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 # DEV
# ### # ###

View File

@ -16,7 +16,8 @@
not ceph_stable and not ceph_stable and
not ceph_dev and not ceph_dev and
not ceph_stable_ice and not ceph_stable_ice and
not ceph_stable_rh_storage not ceph_stable_rh_storage and
not ceph_stable_uca
tags: tags:
- package-install - package-install

View File

@ -21,6 +21,13 @@
ceph_stable_rh_storage and ceph_stable_rh_storage and
{{ ansible_distribution_version | version_compare('7.1', '<') }} {{ 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 - name: fail on unsupported ansible version
fail: fail:
msg: "Ansible version must be >= 1.9, please update!" msg: "Ansible version must be >= 1.9, please update!"

View File

@ -38,3 +38,15 @@
state: present state: present
changed_when: false changed_when: false
when: ceph_stable_ice 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

View File

@ -15,7 +15,7 @@
apt: apt:
pkg: "{{ item }}" pkg: "{{ item }}"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" 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: with_items:
- ceph - ceph
- ceph-common #| - ceph-common #|
@ -27,7 +27,7 @@
apt: apt:
pkg: ceph-test pkg: ceph-test
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" 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 when: ceph_test
- name: install rados gateway - name: install rados gateway
@ -42,6 +42,6 @@
apt: apt:
pkg: ceph-mds pkg: ceph-mds
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}" 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: when:
mds_group_name in group_names mds_group_name in group_names