Files
openstack-ansible/playbooks/roles/os_aodh/defaults/main.yml
Matt Thompson 81be611ead Re-deploy the Aodh venv if it mismatches the repo
We currently have two issues with venvs:

- if you update your venv on the repo server, it is not possible for
  that updated venv to land on the service's container as the get_url
  task always skips if the file exists (even if the file is different)
- if you have an updated venv on the repo server and forcefully delete
  the cached venv tarball on the service's container, the new tarball
  will get unarchived over top of the existing venv

This commit does the following:

- gets the checksum of the /var/cache tarball and downloads checksum
  file from repo server
- updates "Attempt venv download" to only download the venv if the
  cache doesn't exist or if the local and remote checksums differ
- adds a "force: true" to "Attempt venv download" task so that the venv
  tarball will get re-downloaded when the when condition is true (this
  is necessary otherwise the download will get skipped since the
  destination already exists)
- adds a new task "Remove existing venv" so we can first remove the
  venv before we unarchive the potentially new venv from the repo
  server
- updates "Create aodh venv dir" and "Unarchive pre-built venv"
  tasks to only proceed if "aodh_get_venv | changed", which
  prevents these tasks from running when they the venv tarball hasn't
  changed
- adds multiple service restarts to
  os_aodh/tasks/aodh_install.yml so that aodh will restart
  correctly should the venv/packages update without any associated
  config changes

NOTE: The reason why we compare local and remote checksum is to avoid
      unnecessarily downloading the venv when the checksums are in fact
      the same.  On small deploys this is more or less a non-issue but
      if a deploy w/ thousands of compute nodes re-runs playbooks we
      want to limit the venv downloads when it's unnecessary.

Change-Id: Ic3773c4d6e8e62e2b9dc0203190b2fba675afc59
2016-01-28 09:13:05 +00:00

118 lines
3.5 KiB
YAML

---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
## Verbosity Options
debug: False
verbose: False
# Name of the virtual env to deploy into
aodh_venv_tag: untagged
aodh_venv_bin: "/openstack/venvs/aodh-{{ aodh_venv_tag }}/bin"
# Set this to enable or disable installing in a venv
aodh_venv_enabled: true
# The bin path defaults to the venv path however if installation in a
# venv is disabled the bin path will be dynamically set based on the
# system path used when the installing.
aodh_bin: "{{ aodh_venv_bin }}"
aodh_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/aodh.tgz
## System info
aodh_system_user_name: aodh
aodh_system_group_name: aodh
aodh_system_shell: /bin/false
aodh_system_comment: aodh system user
aodh_system_user_home: "/var/lib/{{ aodh_system_user_name }}"
## DB info
aodh_database_name: aodh
aodh_database_user: aodh
aodh_db_type: mongodb
aodh_db_ip: localhost
aodh_db_port: 27017
aodh_connection_string: "{{ aodh_db_type }}://{{ aodh_database_user }}:{{ aodh_container_db_password }}@{{ aodh_db_ip }}:{{ aodh_db_port }}/{{ aodh_database_name }}"
## RabbitMQ info
aodh_rabbitmq_userid: aodh
aodh_rabbitmq_vhost: /aodh
#Aodh services info
aodh_role_name: admin
aodh_alarm_notifier_program_name: aodh-alarm-notifier
aodh_alarm_evaluator_program_name: aodh-alarm-evaluator
aodh_listener_program_name: aodh-listener
aodh_api_program_name: aodh-api
## Service Type and Data
aodh_service_region: RegionOne
aodh_service_endpoint_type: internalURL
aodh_service_name: aodh
aodh_service_port: 8042
aodh_service_proto: http
aodh_service_type: alarming
aodh_service_description: "Telemetry"
aodh_service_project_domain_id: default
aodh_service_user_domain_id: default
aodh_service_user_name: aodh
aodh_keystone_auth_plugin: password
aodh_service_tenant_name: service
aodh_service_project_name: service
aodh_service_publicuri: "{{ aodh_service_proto }}://{{ external_lb_vip_address }}:{{ aodh_service_port }}"
aodh_service_publicurl: "{{ aodh_service_publicuri }}"
aodh_service_internaluri: "{{ aodh_service_proto }}://{{ internal_lb_vip_address }}:{{ aodh_service_port }}"
aodh_service_internalurl: "{{ aodh_service_internaluri }}"
aodh_service_adminuri: "{{ aodh_service_proto }}://{{ internal_lb_vip_address }}:{{ aodh_service_port }}"
aodh_service_adminurl: "{{ aodh_service_adminuri }}"
aodh_service_in_ldap: false
# Common apt packages
aodh_apt_packages:
- rpcbind
# aodh packages that must be installed before anything else
aodh_requires_pip_packages:
- virtualenv
- virtualenv-tools
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
- httplib2
# Common pip packages
aodh_pip_packages:
- aodh
- python-ceilometerclient
- ceilometermiddleware
- MySQL-python
- python-memcached
- pycrypto
- warlock
- pymongo
## Service Names
aodh_service_names:
- "aodh-api"
- "aodh-alarm-notifier"
- "aodh-alarm-evaluator"
- "aodh-listener"
## Tunable overrides
aodh_policy_overrides: {}
aodh_aodh_conf_overrides: {}
aodh_api_paste_ini_overrides: {}