UCA support for nova compute

This changes adds the Ubuntu Cloud Archive repo support for the nova
compute kvm. UCA repo is important to support architecture ppc64le
since the default Ubuntu trusty repo does not contain the all required
packages for libvirt-bin.

Change-Id: Ic1e7619b48a9b12ba876f83507497cf1e557223a
This commit is contained in:
Chhavi Agarwal 2016-05-30 20:00:06 +05:30
parent 1fc45e5465
commit e37a680f92
3 changed files with 40 additions and 1 deletions

View File

@ -403,3 +403,11 @@ nova_nova_conf_overrides: {}
nova_rootwrap_conf_overrides: {} nova_rootwrap_conf_overrides: {}
nova_api_paste_ini_overrides: {} nova_api_paste_ini_overrides: {}
nova_policy_overrides: {} nova_policy_overrides: {}
# Ubuntu Cloud Archive variables
nova_uca_enable: True
uca_openstack_release: mitaka
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"

View File

@ -0,0 +1,10 @@
---
features:
- Nova UCA repository support is implemented by default.
This will allow the users to benefit from the updated
packages for KVM.
The ``nova_uca_enable`` variable controls the install
source for the KVM packages. By default this value is set
to ``True`` to make use of UCA repository. User can set to
``False`` to disable.

View File

@ -13,6 +13,26 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Add ubuntu cloud archive key package
apt:
pkg: ubuntu-cloud-keyring
when: nova_uca_enable
register: add_keys
tags:
- add-apt-keys
- name: Add UCA repo(s)
apt_repository:
repo: "{{ uca_repo }}"
state: present
register: add_repo
when: nova_uca_enable
until: add_repo|success
retries: 5
delay: 2
tags:
- add-uca-repo
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache #TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged #when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
#in 1.9.x or we move to 2.0 (if tested working) #in 1.9.x or we move to 2.0 (if tested working)
@ -27,7 +47,8 @@
- name: Update apt if needed - name: Update apt if needed
apt: apt:
update_cache: yes update_cache: yes
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}" when: ("ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}" or
add_keys|changed or add_repo|changed)
tags: tags:
- nova-apt-packages - nova-apt-packages
- nova-compute-kvm-apt-packages - nova-compute-kvm-apt-packages