Skip to content

Commit

Permalink
Add support for install from Ubuntu Cloud Archive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
smatzek committed May 3, 2016
1 parent b3c4196 commit c5c5bd1
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 6 deletions.
12 changes: 11 additions & 1 deletion group_vars/all.sample
Expand Up @@ -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
Expand Down Expand Up @@ -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
# ###

Expand Down
12 changes: 11 additions & 1 deletion roles/ceph-common/defaults/main.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
# ###

Expand Down
3 changes: 2 additions & 1 deletion roles/ceph-common/tasks/checks/check_mandatory_vars.yml
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions roles/ceph-common/tasks/checks/check_system.yml
Expand Up @@ -21,6 +21,13 @@
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!"
Expand Down
12 changes: 12 additions & 0 deletions roles/ceph-common/tasks/installs/debian_ceph_repository.yml
Expand Up @@ -38,3 +38,15 @@
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
6 changes: 3 additions & 3 deletions roles/ceph-common/tasks/installs/install_on_debian.yml
Expand Up @@ -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 #|
Expand All @@ -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
Expand All @@ -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

0 comments on commit c5c5bd1

Please sign in to comment.